1#! /bin/sh
2# From configure.in Id: 1c7bad4c0b18f9e988c4b161a996f5078917430e .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.65.
5#
6# Copyright 1998-2021 The OpenLDAP Foundation. All rights reserved.
7# Restrictions apply, see COPYRIGHT and LICENSE files.
8#
9#
10# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
11# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
12# Inc.
13#
14#
15# This configure script is free software; the Free Software Foundation
16# gives unlimited permission to copy, distribute and modify it.
17## -------------------- ##
18## M4sh Initialization. ##
19## -------------------- ##
20
21# Be more Bourne compatible
22DUALCASE=1; export DUALCASE # for MKS sh
23if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24  emulate sh
25  NULLCMD=:
26  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
27  # is contrary to our usage.  Disable this feature.
28  alias -g '${1+"$@"}'='"$@"'
29  setopt NO_GLOB_SUBST
30else
31  case `(set -o) 2>/dev/null` in #(
32  *posix*) :
33    set -o posix ;; #(
34  *) :
35     ;;
36esac
37fi
38
39
40as_nl='
41'
42export as_nl
43# Printing a long string crashes Solaris 7 /usr/bin/printf.
44as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
46as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
47# Prefer a ksh shell builtin over an external printf program on Solaris,
48# but without wasting forks for bash or zsh.
49if test -z "$BASH_VERSION$ZSH_VERSION" \
50    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51  as_echo='print -r --'
52  as_echo_n='print -rn --'
53elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
54  as_echo='printf %s\n'
55  as_echo_n='printf %s'
56else
57  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
58    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
59    as_echo_n='/usr/ucb/echo -n'
60  else
61    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
62    as_echo_n_body='eval
63      arg=$1;
64      case $arg in #(
65      *"$as_nl"*)
66	expr "X$arg" : "X\\(.*\\)$as_nl";
67	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
68      esac;
69      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70    '
71    export as_echo_n_body
72    as_echo_n='sh -c $as_echo_n_body as_echo'
73  fi
74  export as_echo_body
75  as_echo='sh -c $as_echo_body as_echo'
76fi
77
78# The user is always right.
79if test "${PATH_SEPARATOR+set}" != set; then
80  PATH_SEPARATOR=:
81  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
82    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
83      PATH_SEPARATOR=';'
84  }
85fi
86
87
88# IFS
89# We need space, tab and new line, in precisely that order.  Quoting is
90# there to prevent editors from complaining about space-tab.
91# (If _AS_PATH_WALK were called with IFS unset, it would disable word
92# splitting by setting IFS to empty value.)
93IFS=" ""	$as_nl"
94
95# Find who we are.  Look in the path if we contain no directory separator.
96case $0 in #((
97  *[\\/]* ) as_myself=$0 ;;
98  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99for as_dir in $PATH
100do
101  IFS=$as_save_IFS
102  test -z "$as_dir" && as_dir=.
103    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104  done
105IFS=$as_save_IFS
106
107     ;;
108esac
109# We did not find ourselves, most probably we were run as `sh COMMAND'
110# in which case we are not to be found in the path.
111if test "x$as_myself" = x; then
112  as_myself=$0
113fi
114if test ! -f "$as_myself"; then
115  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116  exit 1
117fi
118
119# Unset variables that we do not need and which cause bugs (e.g. in
120# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
121# suppresses any "Segmentation fault" message there.  '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
136
137# CDPATH.
138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140if test "x$CONFIG_SHELL" = x; then
141  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142  emulate sh
143  NULLCMD=:
144  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145  # is contrary to our usage.  Disable this feature.
146  alias -g '\${1+\"\$@\"}'='\"\$@\"'
147  setopt NO_GLOB_SUBST
148else
149  case \`(set -o) 2>/dev/null\` in #(
150  *posix*) :
151    set -o posix ;; #(
152  *) :
153     ;;
154esac
155fi
156"
157  as_required="as_fn_return () { (exit \$1); }
158as_fn_success () { as_fn_return 0; }
159as_fn_failure () { as_fn_return 1; }
160as_fn_ret_success () { return 0; }
161as_fn_ret_failure () { return 1; }
162
163exitcode=0
164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170else
171  exitcode=1; echo positional parameters were not saved.
172fi
173test x\$exitcode = x0 || exit 1"
174  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178test \$(( 1 + 1 )) = 2 || exit 1"
179  if (eval "$as_required") 2>/dev/null; then :
180  as_have_required=yes
181else
182  as_have_required=no
183fi
184  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186else
187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188as_found=false
189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190do
191  IFS=$as_save_IFS
192  test -z "$as_dir" && as_dir=.
193  as_found=:
194  case $as_dir in #(
195	 /*)
196	   for as_base in sh bash ksh sh5; do
197	     # Try only shells that exist, to save several forks.
198	     as_shell=$as_dir/$as_base
199	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  CONFIG_SHELL=$as_shell as_have_required=yes
202		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203  break 2
204fi
205fi
206	   done;;
207       esac
208  as_found=false
209done
210$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212  CONFIG_SHELL=$SHELL as_have_required=yes
213fi; }
214IFS=$as_save_IFS
215
216
217      if test "x$CONFIG_SHELL" != x; then :
218  # We cannot yet assume a decent shell, so we have to provide a
219	# neutralization value for shells without unset; and this also
220	# works around shells that cannot unset nonexistent variables.
221	BASH_ENV=/dev/null
222	ENV=/dev/null
223	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
224	export CONFIG_SHELL
225	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
226fi
227
228    if test x$as_have_required = xno; then :
229  $as_echo "$0: This script requires a shell more modern than all"
230  $as_echo "$0: the shells that I found on your system."
231  if test x${ZSH_VERSION+set} = xset ; then
232    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
233    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
234  else
235    $as_echo "$0: Please tell bug-autoconf@gnu.org and
236$0: <http://www.openldap.org/its/> about your system,
237$0: including any error possibly output before this
238$0: message. Then install a modern shell, or manually run
239$0: the script under such a shell if you do have one."
240  fi
241  exit 1
242fi
243fi
244fi
245SHELL=${CONFIG_SHELL-/bin/sh}
246export SHELL
247# Unset more variables known to interfere with behavior of common tools.
248CLICOLOR_FORCE= GREP_OPTIONS=
249unset CLICOLOR_FORCE GREP_OPTIONS
250
251## --------------------- ##
252## M4sh Shell Functions. ##
253## --------------------- ##
254# as_fn_unset VAR
255# ---------------
256# Portably unset VAR.
257as_fn_unset ()
258{
259  { eval $1=; unset $1;}
260}
261as_unset=as_fn_unset
262
263# as_fn_set_status STATUS
264# -----------------------
265# Set $? to STATUS, without forking.
266as_fn_set_status ()
267{
268  return $1
269} # as_fn_set_status
270
271# as_fn_exit STATUS
272# -----------------
273# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
274as_fn_exit ()
275{
276  set +e
277  as_fn_set_status $1
278  exit $1
279} # as_fn_exit
280
281# as_fn_mkdir_p
282# -------------
283# Create "$as_dir" as a directory, including parents if necessary.
284as_fn_mkdir_p ()
285{
286
287  case $as_dir in #(
288  -*) as_dir=./$as_dir;;
289  esac
290  test -d "$as_dir" || eval $as_mkdir_p || {
291    as_dirs=
292    while :; do
293      case $as_dir in #(
294      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
295      *) as_qdir=$as_dir;;
296      esac
297      as_dirs="'$as_qdir' $as_dirs"
298      as_dir=`$as_dirname -- "$as_dir" ||
299$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
300	 X"$as_dir" : 'X\(//\)[^/]' \| \
301	 X"$as_dir" : 'X\(//\)$' \| \
302	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
303$as_echo X"$as_dir" |
304    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
305	    s//\1/
306	    q
307	  }
308	  /^X\(\/\/\)[^/].*/{
309	    s//\1/
310	    q
311	  }
312	  /^X\(\/\/\)$/{
313	    s//\1/
314	    q
315	  }
316	  /^X\(\/\).*/{
317	    s//\1/
318	    q
319	  }
320	  s/.*/./; q'`
321      test -d "$as_dir" && break
322    done
323    test -z "$as_dirs" || eval "mkdir $as_dirs"
324  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
325
326
327} # as_fn_mkdir_p
328# as_fn_append VAR VALUE
329# ----------------------
330# Append the text in VALUE to the end of the definition contained in VAR. Take
331# advantage of any shell optimizations that allow amortized linear growth over
332# repeated appends, instead of the typical quadratic growth present in naive
333# implementations.
334if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
335  eval 'as_fn_append ()
336  {
337    eval $1+=\$2
338  }'
339else
340  as_fn_append ()
341  {
342    eval $1=\$$1\$2
343  }
344fi # as_fn_append
345
346# as_fn_arith ARG...
347# ------------------
348# Perform arithmetic evaluation on the ARGs, and store the result in the
349# global $as_val. Take advantage of shells that can avoid forks. The arguments
350# must be portable across $(()) and expr.
351if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
352  eval 'as_fn_arith ()
353  {
354    as_val=$(( $* ))
355  }'
356else
357  as_fn_arith ()
358  {
359    as_val=`expr "$@" || test $? -eq 1`
360  }
361fi # as_fn_arith
362
363
364# as_fn_error ERROR [LINENO LOG_FD]
365# ---------------------------------
366# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
367# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
368# script with status $?, using 1 if that was 0.
369as_fn_error ()
370{
371  as_status=$?; test $as_status -eq 0 && as_status=1
372  if test "$3"; then
373    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
374    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
375  fi
376  $as_echo "$as_me: error: $1" >&2
377  as_fn_exit $as_status
378} # as_fn_error
379
380if expr a : '\(a\)' >/dev/null 2>&1 &&
381   test "X`expr 00001 : '.*\(...\)'`" = X001; then
382  as_expr=expr
383else
384  as_expr=false
385fi
386
387if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
388  as_basename=basename
389else
390  as_basename=false
391fi
392
393if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
394  as_dirname=dirname
395else
396  as_dirname=false
397fi
398
399as_me=`$as_basename -- "$0" ||
400$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
401	 X"$0" : 'X\(//\)$' \| \
402	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
403$as_echo X/"$0" |
404    sed '/^.*\/\([^/][^/]*\)\/*$/{
405	    s//\1/
406	    q
407	  }
408	  /^X\/\(\/\/\)$/{
409	    s//\1/
410	    q
411	  }
412	  /^X\/\(\/\).*/{
413	    s//\1/
414	    q
415	  }
416	  s/.*/./; q'`
417
418# Avoid depending upon Character Ranges.
419as_cr_letters='abcdefghijklmnopqrstuvwxyz'
420as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
421as_cr_Letters=$as_cr_letters$as_cr_LETTERS
422as_cr_digits='0123456789'
423as_cr_alnum=$as_cr_Letters$as_cr_digits
424
425
426  as_lineno_1=$LINENO as_lineno_1a=$LINENO
427  as_lineno_2=$LINENO as_lineno_2a=$LINENO
428  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
429  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
430  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
431  sed -n '
432    p
433    /[$]LINENO/=
434  ' <$as_myself |
435    sed '
436      s/[$]LINENO.*/&-/
437      t lineno
438      b
439      :lineno
440      N
441      :loop
442      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
443      t loop
444      s/-\n.*//
445    ' >$as_me.lineno &&
446  chmod +x "$as_me.lineno" ||
447    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
448
449  # Don't try to exec as it changes $[0], causing all sort of problems
450  # (the dirname of $[0] is not the place where we might find the
451  # original and so on.  Autoconf is especially sensitive to this).
452  . "./$as_me.lineno"
453  # Exit status is that of the last command.
454  exit
455}
456
457ECHO_C= ECHO_N= ECHO_T=
458case `echo -n x` in #(((((
459-n*)
460  case `echo 'xy\c'` in
461  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
462  xy)  ECHO_C='\c';;
463  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
464       ECHO_T='	';;
465  esac;;
466*)
467  ECHO_N='-n';;
468esac
469
470rm -f conf$$ conf$$.exe conf$$.file
471if test -d conf$$.dir; then
472  rm -f conf$$.dir/conf$$.file
473else
474  rm -f conf$$.dir
475  mkdir conf$$.dir 2>/dev/null
476fi
477if (echo >conf$$.file) 2>/dev/null; then
478  if ln -s conf$$.file conf$$ 2>/dev/null; then
479    as_ln_s='ln -s'
480    # ... but there are two gotchas:
481    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
482    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
483    # In both cases, we have to default to `cp -p'.
484    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
485      as_ln_s='cp -p'
486  elif ln conf$$.file conf$$ 2>/dev/null; then
487    as_ln_s=ln
488  else
489    as_ln_s='cp -p'
490  fi
491else
492  as_ln_s='cp -p'
493fi
494rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
495rmdir conf$$.dir 2>/dev/null
496
497if mkdir -p . 2>/dev/null; then
498  as_mkdir_p='mkdir -p "$as_dir"'
499else
500  test -d ./-p && rmdir ./-p
501  as_mkdir_p=false
502fi
503
504if test -x / >/dev/null 2>&1; then
505  as_test_x='test -x'
506else
507  if ls -dL / >/dev/null 2>&1; then
508    as_ls_L_option=L
509  else
510    as_ls_L_option=
511  fi
512  as_test_x='
513    eval sh -c '\''
514      if test -d "$1"; then
515	test -d "$1/.";
516      else
517	case $1 in #(
518	-*)set "./$1";;
519	esac;
520	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
521	???[sx]*):;;*)false;;esac;fi
522    '\'' sh
523  '
524fi
525as_executable_p=$as_test_x
526
527# Sed expression to map a string onto a valid CPP name.
528as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
529
530# Sed expression to map a string onto a valid variable name.
531as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
532
533
534
535# Check that we are running under the correct shell.
536SHELL=${CONFIG_SHELL-/bin/sh}
537
538case X$ECHO in
539X*--fallback-echo)
540  # Remove one level of quotation (which was required for Make).
541  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
542  ;;
543esac
544
545echo=${ECHO-echo}
546if test "X$1" = X--no-reexec; then
547  # Discard the --no-reexec flag, and continue.
548  shift
549elif test "X$1" = X--fallback-echo; then
550  # Avoid inline document here, it may be left over
551  :
552elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
553  # Yippee, $echo works!
554  :
555else
556  # Restart under the correct shell.
557  exec $SHELL "$0" --no-reexec ${1+"$@"}
558fi
559
560if test "X$1" = X--fallback-echo; then
561  # used as fallback echo
562  shift
563  cat <<EOF
564$*
565EOF
566  exit 0
567fi
568
569# The HP-UX ksh and POSIX shell print the target directory to stdout
570# if CDPATH is set.
571(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
572
573if test -z "$ECHO"; then
574if test "X${echo_test_string+set}" != Xset; then
575# find a string as large as possible, as long as the shell can cope with it
576  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
577    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
578    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
579       echo_test_string=`eval $cmd` &&
580       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
581    then
582      break
583    fi
584  done
585fi
586
587if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
588   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
589   test "X$echo_testing_string" = "X$echo_test_string"; then
590  :
591else
592  # The Solaris, AIX, and Digital Unix default echo programs unquote
593  # backslashes.  This makes it impossible to quote backslashes using
594  #   echo "$something" | sed 's/\\/\\\\/g'
595  #
596  # So, first we look for a working echo in the user's PATH.
597
598  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
599  for dir in $PATH /usr/ucb; do
600    IFS="$lt_save_ifs"
601    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
602       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
603       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
604       test "X$echo_testing_string" = "X$echo_test_string"; then
605      echo="$dir/echo"
606      break
607    fi
608  done
609  IFS="$lt_save_ifs"
610
611  if test "X$echo" = Xecho; then
612    # We didn't find a better echo, so look for alternatives.
613    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
614       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
615       test "X$echo_testing_string" = "X$echo_test_string"; then
616      # This shell has a builtin print -r that does the trick.
617      echo='print -r'
618    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
619	 test "X$CONFIG_SHELL" != X/bin/ksh; then
620      # If we have ksh, try running configure again with it.
621      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
622      export ORIGINAL_CONFIG_SHELL
623      CONFIG_SHELL=/bin/ksh
624      export CONFIG_SHELL
625      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
626    else
627      # Try using printf.
628      echo='printf %s\n'
629      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
630	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
631	 test "X$echo_testing_string" = "X$echo_test_string"; then
632	# Cool, printf works
633	:
634      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
635	   test "X$echo_testing_string" = 'X\t' &&
636	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
637	   test "X$echo_testing_string" = "X$echo_test_string"; then
638	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
639	export CONFIG_SHELL
640	SHELL="$CONFIG_SHELL"
641	export SHELL
642	echo="$CONFIG_SHELL $0 --fallback-echo"
643      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
644	   test "X$echo_testing_string" = 'X\t' &&
645	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
646	   test "X$echo_testing_string" = "X$echo_test_string"; then
647	echo="$CONFIG_SHELL $0 --fallback-echo"
648      else
649	# maybe with a smaller string...
650	prev=:
651
652	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
653	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
654	  then
655	    break
656	  fi
657	  prev="$cmd"
658	done
659
660	if test "$prev" != 'sed 50q "$0"'; then
661	  echo_test_string=`eval $prev`
662	  export echo_test_string
663	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
664	else
665	  # Oops.  We lost completely, so just stick with echo.
666	  echo=echo
667	fi
668      fi
669    fi
670  fi
671fi
672fi
673
674# Copy echo and quote the copy suitably for passing to libtool from
675# the Makefile, instead of quoting the original, which is used later.
676ECHO=$echo
677if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
678   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
679fi
680
681
682
683
684test -n "$DJDIR" || exec 7<&0 </dev/null
685exec 6>&1
686
687# Name of the host.
688# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
689# so uname gets run too.
690ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
691
692#
693# Initializations.
694#
695ac_default_prefix=/usr/local
696ac_clean_files=
697ac_config_libobj_dir=.
698LIBOBJS=
699cross_compiling=no
700subdirs=
701MFLAGS=
702MAKEFLAGS=
703
704# Identity of this package.
705PACKAGE_NAME=
706PACKAGE_TARNAME=
707PACKAGE_VERSION=
708PACKAGE_STRING=
709PACKAGE_BUGREPORT=
710PACKAGE_URL=
711
712ac_unique_file="OpenLDAP"
713ac_unique_file="build/version.sh"
714ac_default_prefix=/usr/local
715# Factoring default headers for most tests.
716ac_includes_default="\
717#include <stdio.h>
718#ifdef HAVE_SYS_TYPES_H
719# include <sys/types.h>
720#endif
721#ifdef HAVE_SYS_STAT_H
722# include <sys/stat.h>
723#endif
724#ifdef STDC_HEADERS
725# include <stdlib.h>
726# include <stddef.h>
727#else
728# ifdef HAVE_STDLIB_H
729#  include <stdlib.h>
730# endif
731#endif
732#ifdef HAVE_STRING_H
733# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
734#  include <memory.h>
735# endif
736# include <string.h>
737#endif
738#ifdef HAVE_STRINGS_H
739# include <strings.h>
740#endif
741#ifdef HAVE_INTTYPES_H
742# include <inttypes.h>
743#endif
744#ifdef HAVE_STDINT_H
745# include <stdint.h>
746#endif
747#ifdef HAVE_UNISTD_H
748# include <unistd.h>
749#endif"
750
751ac_subst_vars='LTLIBOBJS
752SLAPD_SQL_INCLUDES
753SLAPD_SQL_LIBS
754SLAPD_SQL_LDFLAGS
755SLAPD_GMP_LIBS
756SLAPD_SLP_LIBS
757AUTH_LIBS
758LIBSLAPI
759SLAPI_LIBS
760MODULES_LIBS
761TLS_LIBS
762SASL_LIBS
763KRB5_LIBS
764KRB4_LIBS
765MOD_PERL_LDFLAGS
766SLAPD_PERL_LDFLAGS
767PERL_CPPFLAGS
768SLAPD_DYNAMIC_OVERLAYS
769SLAPD_STATIC_OVERLAYS
770SLAPD_DYNAMIC_BACKENDS
771SLAPD_STATIC_BACKENDS
772SLAPD_NO_STATIC
773SLAPD_MODULES_LDFLAGS
774SLAPD_MODULES_CPPFLAGS
775WRAP_LIBS
776LUTIL_LIBS
777LTHREAD_LIBS
778SLAPD_NDB_INCS
779SLAPD_NDB_LIBS
780BDB_LIBS
781SLAPD_LIBS
782LDAP_LIBS
783BUILD_VALSORT
784BUILD_UNIQUE
785BUILD_TRANSLUCENT
786BUILD_SYNCPROV
787BUILD_SSSVLV
788BUILD_SEQMOD
789BUILD_RWM
790BUILD_RETCODE
791BUILD_REFINT
792BUILD_PROXYCACHE
793BUILD_PPOLICY
794BUILD_MEMBEROF
795BUILD_LASTMOD
796BUILD_DYNLIST
797BUILD_DYNGROUP
798BUILD_DEREF
799BUILD_DENYOP
800BUILD_DDS
801BUILD_CONSTRAINT
802BUILD_COLLECT
803BUILD_AUDITLOG
804BUILD_ACCESSLOG
805BUILD_SQL
806BUILD_SOCK
807BUILD_SHELL
808BUILD_PERL
809BUILD_RELAY
810BUILD_PASSWD
811BUILD_NULL
812BUILD_NDB
813BUILD_MONITOR
814BUILD_META
815BUILD_MDB
816BUILD_LDAP
817BUILD_HDB
818BUILD_DNSSRV
819BUILD_BDB
820SLAPD_SLAPI_DEPEND
821BUILD_SLAPI
822BUILD_SLAPD
823BUILD_LIBS_DYNAMIC
824BUILD_THREAD
825WITH_ACI_ENABLED
826WITH_MODULES_ENABLED
827WITH_TLS
828WITH_SASL
829PLAT
830LIBSRCS
831LIBOBJS
832MYSQL
833LTSTATIC
834OL_MKDEP_FLAGS
835OL_MKDEP
836PERLBIN
837LIBTOOL
838CPP
839OBJDUMP
840AS
841DLLTOOL
842RANLIB
843ECHO
844LN_S
845EGREP
846GREP
847am__fastdepCC_FALSE
848am__fastdepCC_TRUE
849CCDEPMODE
850AMDEPBACKSLASH
851AMDEP_FALSE
852AMDEP_TRUE
853am__quote
854am__include
855DEPDIR
856OBJEXT
857EXEEXT
858ac_ct_CC
859CPPFLAGS
860LDFLAGS
861CFLAGS
862AR
863CC
864ldap_subdir
865top_builddir
866OPENLDAP_RELEASE_DATE
867OPENLDAP_LIBVERSION
868OPENLDAP_LIBRELEASE
869am__untar
870am__tar
871AMTAR
872am__leading_dot
873SET_MAKE
874AWK
875mkdir_p
876INSTALL_STRIP_PROGRAM
877STRIP
878install_sh
879MAKEINFO
880AUTOHEADER
881AUTOMAKE
882AUTOCONF
883ACLOCAL
884VERSION
885PACKAGE
886CYGPATH_W
887INSTALL_DATA
888INSTALL_SCRIPT
889INSTALL_PROGRAM
890target_os
891target_vendor
892target_cpu
893target
894host_os
895host_vendor
896host_cpu
897host
898build_os
899build_vendor
900build_cpu
901build
902target_alias
903host_alias
904build_alias
905LIBS
906ECHO_T
907ECHO_N
908ECHO_C
909DEFS
910mandir
911localedir
912libdir
913psdir
914pdfdir
915dvidir
916htmldir
917infodir
918docdir
919oldincludedir
920includedir
921localstatedir
922sharedstatedir
923sysconfdir
924datadir
925datarootdir
926libexecdir
927sbindir
928bindir
929program_transform_name
930prefix
931exec_prefix
932PACKAGE_URL
933PACKAGE_BUGREPORT
934PACKAGE_STRING
935PACKAGE_VERSION
936PACKAGE_TARNAME
937PACKAGE_NAME
938PATH_SEPARATOR
939SHELL'
940ac_subst_files=''
941ac_user_opts='
942enable_option_checking
943with_subdir
944enable_debug
945enable_dynamic
946enable_syslog
947enable_proctitle
948enable_ipv6
949enable_local
950with_cyrus_sasl
951with_fetch
952with_threads
953with_tls
954with_yielding_select
955with_mp
956with_odbc
957enable_xxslapdoptions
958enable_slapd
959enable_dynacl
960enable_aci
961enable_cleartext
962enable_crypt
963enable_lmpasswd
964enable_spasswd
965enable_modules
966enable_rewrite
967enable_rlookups
968enable_slapi
969enable_slp
970enable_wrappers
971enable_xxslapbackends
972enable_backends
973enable_bdb
974enable_dnssrv
975enable_hdb
976enable_ldap
977enable_mdb
978enable_meta
979enable_monitor
980enable_ndb
981enable_null
982enable_passwd
983enable_perl
984enable_relay
985enable_shell
986enable_sock
987enable_sql
988enable_xxslapoverlays
989enable_overlays
990enable_accesslog
991enable_auditlog
992enable_collect
993enable_constraint
994enable_dds
995enable_deref
996enable_dyngroup
997enable_dynlist
998enable_memberof
999enable_ppolicy
1000enable_proxycache
1001enable_refint
1002enable_retcode
1003enable_rwm
1004enable_seqmod
1005enable_sssvlv
1006enable_syncprov
1007enable_translucent
1008enable_unique
1009enable_valsort
1010enable_xxliboptions
1011enable_static
1012enable_shared
1013enable_fast_install
1014enable_dependency_tracking
1015with_gnu_ld
1016enable_libtool_lock
1017with_pic
1018with_tags
1019with_xxinstall
1020'
1021      ac_precious_vars='build_alias
1022host_alias
1023target_alias
1024CC
1025CFLAGS
1026LDFLAGS
1027LIBS
1028CPPFLAGS
1029CPP'
1030
1031
1032# Initialize some variables set by options.
1033ac_init_help=
1034ac_init_version=false
1035ac_unrecognized_opts=
1036ac_unrecognized_sep=
1037# The variables have the same names as the options, with
1038# dashes changed to underlines.
1039cache_file=/dev/null
1040exec_prefix=NONE
1041no_create=
1042no_recursion=
1043prefix=NONE
1044program_prefix=NONE
1045program_suffix=NONE
1046program_transform_name=s,x,x,
1047silent=
1048site=
1049srcdir=
1050verbose=
1051x_includes=NONE
1052x_libraries=NONE
1053
1054# Installation directory options.
1055# These are left unexpanded so users can "make install exec_prefix=/foo"
1056# and all the variables that are supposed to be based on exec_prefix
1057# by default will actually change.
1058# Use braces instead of parens because sh, perl, etc. also accept them.
1059# (The list follows the same order as the GNU Coding Standards.)
1060bindir='${exec_prefix}/bin'
1061sbindir='${exec_prefix}/sbin'
1062libexecdir='${exec_prefix}/libexec'
1063datarootdir='${prefix}/share'
1064datadir='${datarootdir}'
1065sysconfdir='${prefix}/etc'
1066sharedstatedir='${prefix}/com'
1067localstatedir='${prefix}/var'
1068includedir='${prefix}/include'
1069oldincludedir='/usr/include'
1070docdir='${datarootdir}/doc/${PACKAGE}'
1071infodir='${datarootdir}/info'
1072htmldir='${docdir}'
1073dvidir='${docdir}'
1074pdfdir='${docdir}'
1075psdir='${docdir}'
1076libdir='${exec_prefix}/lib'
1077localedir='${datarootdir}/locale'
1078mandir='${datarootdir}/man'
1079
1080ac_prev=
1081ac_dashdash=
1082for ac_option
1083do
1084  # If the previous option needs an argument, assign it.
1085  if test -n "$ac_prev"; then
1086    eval $ac_prev=\$ac_option
1087    ac_prev=
1088    continue
1089  fi
1090
1091  case $ac_option in
1092  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1093  *)	ac_optarg=yes ;;
1094  esac
1095
1096  # Accept the important Cygnus configure options, so we can diagnose typos.
1097
1098  case $ac_dashdash$ac_option in
1099  --)
1100    ac_dashdash=yes ;;
1101
1102  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1103    ac_prev=bindir ;;
1104  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1105    bindir=$ac_optarg ;;
1106
1107  -build | --build | --buil | --bui | --bu)
1108    ac_prev=build_alias ;;
1109  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1110    build_alias=$ac_optarg ;;
1111
1112  -cache-file | --cache-file | --cache-fil | --cache-fi \
1113  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1114    ac_prev=cache_file ;;
1115  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1116  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1117    cache_file=$ac_optarg ;;
1118
1119  --config-cache | -C)
1120    cache_file=config.cache ;;
1121
1122  -datadir | --datadir | --datadi | --datad)
1123    ac_prev=datadir ;;
1124  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1125    datadir=$ac_optarg ;;
1126
1127  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1128  | --dataroo | --dataro | --datar)
1129    ac_prev=datarootdir ;;
1130  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1131  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1132    datarootdir=$ac_optarg ;;
1133
1134  -disable-* | --disable-*)
1135    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1136    # Reject names that are not valid shell variable names.
1137    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1138      as_fn_error "invalid feature name: $ac_useropt"
1139    ac_useropt_orig=$ac_useropt
1140    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141    case $ac_user_opts in
1142      *"
1143"enable_$ac_useropt"
1144"*) ;;
1145      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1146	 ac_unrecognized_sep=', ';;
1147    esac
1148    eval enable_$ac_useropt=no ;;
1149
1150  -docdir | --docdir | --docdi | --doc | --do)
1151    ac_prev=docdir ;;
1152  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1153    docdir=$ac_optarg ;;
1154
1155  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1156    ac_prev=dvidir ;;
1157  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1158    dvidir=$ac_optarg ;;
1159
1160  -enable-* | --enable-*)
1161    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1162    # Reject names that are not valid shell variable names.
1163    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1164      as_fn_error "invalid feature name: $ac_useropt"
1165    ac_useropt_orig=$ac_useropt
1166    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167    case $ac_user_opts in
1168      *"
1169"enable_$ac_useropt"
1170"*) ;;
1171      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1172	 ac_unrecognized_sep=', ';;
1173    esac
1174    eval enable_$ac_useropt=\$ac_optarg ;;
1175
1176  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1177  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1178  | --exec | --exe | --ex)
1179    ac_prev=exec_prefix ;;
1180  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1181  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1182  | --exec=* | --exe=* | --ex=*)
1183    exec_prefix=$ac_optarg ;;
1184
1185  -gas | --gas | --ga | --g)
1186    # Obsolete; use --with-gas.
1187    with_gas=yes ;;
1188
1189  -help | --help | --hel | --he | -h)
1190    ac_init_help=long ;;
1191  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1192    ac_init_help=recursive ;;
1193  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1194    ac_init_help=short ;;
1195
1196  -host | --host | --hos | --ho)
1197    ac_prev=host_alias ;;
1198  -host=* | --host=* | --hos=* | --ho=*)
1199    host_alias=$ac_optarg ;;
1200
1201  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1202    ac_prev=htmldir ;;
1203  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1204  | --ht=*)
1205    htmldir=$ac_optarg ;;
1206
1207  -includedir | --includedir | --includedi | --included | --include \
1208  | --includ | --inclu | --incl | --inc)
1209    ac_prev=includedir ;;
1210  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1211  | --includ=* | --inclu=* | --incl=* | --inc=*)
1212    includedir=$ac_optarg ;;
1213
1214  -infodir | --infodir | --infodi | --infod | --info | --inf)
1215    ac_prev=infodir ;;
1216  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1217    infodir=$ac_optarg ;;
1218
1219  -libdir | --libdir | --libdi | --libd)
1220    ac_prev=libdir ;;
1221  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1222    libdir=$ac_optarg ;;
1223
1224  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1225  | --libexe | --libex | --libe)
1226    ac_prev=libexecdir ;;
1227  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1228  | --libexe=* | --libex=* | --libe=*)
1229    libexecdir=$ac_optarg ;;
1230
1231  -localedir | --localedir | --localedi | --localed | --locale)
1232    ac_prev=localedir ;;
1233  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1234    localedir=$ac_optarg ;;
1235
1236  -localstatedir | --localstatedir | --localstatedi | --localstated \
1237  | --localstate | --localstat | --localsta | --localst | --locals)
1238    ac_prev=localstatedir ;;
1239  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1240  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1241    localstatedir=$ac_optarg ;;
1242
1243  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1244    ac_prev=mandir ;;
1245  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1246    mandir=$ac_optarg ;;
1247
1248  -nfp | --nfp | --nf)
1249    # Obsolete; use --without-fp.
1250    with_fp=no ;;
1251
1252  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1253  | --no-cr | --no-c | -n)
1254    no_create=yes ;;
1255
1256  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1257  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1258    no_recursion=yes ;;
1259
1260  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1261  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1262  | --oldin | --oldi | --old | --ol | --o)
1263    ac_prev=oldincludedir ;;
1264  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1265  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1266  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1267    oldincludedir=$ac_optarg ;;
1268
1269  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1270    ac_prev=prefix ;;
1271  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1272    prefix=$ac_optarg ;;
1273
1274  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1275  | --program-pre | --program-pr | --program-p)
1276    ac_prev=program_prefix ;;
1277  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1278  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1279    program_prefix=$ac_optarg ;;
1280
1281  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1282  | --program-suf | --program-su | --program-s)
1283    ac_prev=program_suffix ;;
1284  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1285  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1286    program_suffix=$ac_optarg ;;
1287
1288  -program-transform-name | --program-transform-name \
1289  | --program-transform-nam | --program-transform-na \
1290  | --program-transform-n | --program-transform- \
1291  | --program-transform | --program-transfor \
1292  | --program-transfo | --program-transf \
1293  | --program-trans | --program-tran \
1294  | --progr-tra | --program-tr | --program-t)
1295    ac_prev=program_transform_name ;;
1296  -program-transform-name=* | --program-transform-name=* \
1297  | --program-transform-nam=* | --program-transform-na=* \
1298  | --program-transform-n=* | --program-transform-=* \
1299  | --program-transform=* | --program-transfor=* \
1300  | --program-transfo=* | --program-transf=* \
1301  | --program-trans=* | --program-tran=* \
1302  | --progr-tra=* | --program-tr=* | --program-t=*)
1303    program_transform_name=$ac_optarg ;;
1304
1305  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1306    ac_prev=pdfdir ;;
1307  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1308    pdfdir=$ac_optarg ;;
1309
1310  -psdir | --psdir | --psdi | --psd | --ps)
1311    ac_prev=psdir ;;
1312  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1313    psdir=$ac_optarg ;;
1314
1315  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1316  | -silent | --silent | --silen | --sile | --sil)
1317    silent=yes ;;
1318
1319  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1320    ac_prev=sbindir ;;
1321  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1322  | --sbi=* | --sb=*)
1323    sbindir=$ac_optarg ;;
1324
1325  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1326  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1327  | --sharedst | --shareds | --shared | --share | --shar \
1328  | --sha | --sh)
1329    ac_prev=sharedstatedir ;;
1330  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1331  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1332  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1333  | --sha=* | --sh=*)
1334    sharedstatedir=$ac_optarg ;;
1335
1336  -site | --site | --sit)
1337    ac_prev=site ;;
1338  -site=* | --site=* | --sit=*)
1339    site=$ac_optarg ;;
1340
1341  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1342    ac_prev=srcdir ;;
1343  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1344    srcdir=$ac_optarg ;;
1345
1346  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1347  | --syscon | --sysco | --sysc | --sys | --sy)
1348    ac_prev=sysconfdir ;;
1349  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1350  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1351    sysconfdir=$ac_optarg ;;
1352
1353  -target | --target | --targe | --targ | --tar | --ta | --t)
1354    ac_prev=target_alias ;;
1355  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1356    target_alias=$ac_optarg ;;
1357
1358  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1359    verbose=yes ;;
1360
1361  -version | --version | --versio | --versi | --vers | -V)
1362    ac_init_version=: ;;
1363
1364  -with-* | --with-*)
1365    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1366    # Reject names that are not valid shell variable names.
1367    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1368      as_fn_error "invalid package name: $ac_useropt"
1369    ac_useropt_orig=$ac_useropt
1370    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1371    case $ac_user_opts in
1372      *"
1373"with_$ac_useropt"
1374"*) ;;
1375      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1376	 ac_unrecognized_sep=', ';;
1377    esac
1378    eval with_$ac_useropt=\$ac_optarg ;;
1379
1380  -without-* | --without-*)
1381    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1382    # Reject names that are not valid shell variable names.
1383    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1384      as_fn_error "invalid package name: $ac_useropt"
1385    ac_useropt_orig=$ac_useropt
1386    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1387    case $ac_user_opts in
1388      *"
1389"with_$ac_useropt"
1390"*) ;;
1391      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1392	 ac_unrecognized_sep=', ';;
1393    esac
1394    eval with_$ac_useropt=no ;;
1395
1396  --x)
1397    # Obsolete; use --with-x.
1398    with_x=yes ;;
1399
1400  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1401  | --x-incl | --x-inc | --x-in | --x-i)
1402    ac_prev=x_includes ;;
1403  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1404  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1405    x_includes=$ac_optarg ;;
1406
1407  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1408  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1409    ac_prev=x_libraries ;;
1410  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1411  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1412    x_libraries=$ac_optarg ;;
1413
1414  -*) as_fn_error "unrecognized option: \`$ac_option'
1415Try \`$0 --help' for more information."
1416    ;;
1417
1418  *=*)
1419    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1420    # Reject names that are not valid shell variable names.
1421    case $ac_envvar in #(
1422      '' | [0-9]* | *[!_$as_cr_alnum]* )
1423      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1424    esac
1425    eval $ac_envvar=\$ac_optarg
1426    export $ac_envvar ;;
1427
1428  *)
1429    # FIXME: should be removed in autoconf 3.0.
1430    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1431    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1432      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1433    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1434    ;;
1435
1436  esac
1437done
1438
1439if test -n "$ac_prev"; then
1440  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1441  as_fn_error "missing argument to $ac_option"
1442fi
1443
1444if test -n "$ac_unrecognized_opts"; then
1445  case $enable_option_checking in
1446    no) ;;
1447    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1448    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1449  esac
1450fi
1451
1452# Check all directory arguments for consistency.
1453for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1454		datadir sysconfdir sharedstatedir localstatedir includedir \
1455		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1456		libdir localedir mandir
1457do
1458  eval ac_val=\$$ac_var
1459  # Remove trailing slashes.
1460  case $ac_val in
1461    */ )
1462      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1463      eval $ac_var=\$ac_val;;
1464  esac
1465  # Be sure to have absolute directory names.
1466  case $ac_val in
1467    [\\/$]* | ?:[\\/]* )  continue;;
1468    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1469  esac
1470  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1471done
1472
1473# There might be people who depend on the old broken behavior: `$host'
1474# used to hold the argument of --host etc.
1475# FIXME: To remove some day.
1476build=$build_alias
1477host=$host_alias
1478target=$target_alias
1479
1480# FIXME: To remove some day.
1481if test "x$host_alias" != x; then
1482  if test "x$build_alias" = x; then
1483    cross_compiling=maybe
1484    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1485    If a cross compiler is detected then cross compile mode will be used." >&2
1486  elif test "x$build_alias" != "x$host_alias"; then
1487    cross_compiling=yes
1488  fi
1489fi
1490
1491ac_tool_prefix=
1492test -n "$host_alias" && ac_tool_prefix=$host_alias-
1493
1494test "$silent" = yes && exec 6>/dev/null
1495
1496
1497ac_pwd=`pwd` && test -n "$ac_pwd" &&
1498ac_ls_di=`ls -di .` &&
1499ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1500  as_fn_error "working directory cannot be determined"
1501test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1502  as_fn_error "pwd does not report name of working directory"
1503
1504
1505# Find the source files, if location was not specified.
1506if test -z "$srcdir"; then
1507  ac_srcdir_defaulted=yes
1508  # Try the directory containing this script, then the parent directory.
1509  ac_confdir=`$as_dirname -- "$as_myself" ||
1510$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1511	 X"$as_myself" : 'X\(//\)[^/]' \| \
1512	 X"$as_myself" : 'X\(//\)$' \| \
1513	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1514$as_echo X"$as_myself" |
1515    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1516	    s//\1/
1517	    q
1518	  }
1519	  /^X\(\/\/\)[^/].*/{
1520	    s//\1/
1521	    q
1522	  }
1523	  /^X\(\/\/\)$/{
1524	    s//\1/
1525	    q
1526	  }
1527	  /^X\(\/\).*/{
1528	    s//\1/
1529	    q
1530	  }
1531	  s/.*/./; q'`
1532  srcdir=$ac_confdir
1533  if test ! -r "$srcdir/$ac_unique_file"; then
1534    srcdir=..
1535  fi
1536else
1537  ac_srcdir_defaulted=no
1538fi
1539if test ! -r "$srcdir/$ac_unique_file"; then
1540  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1541  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1542fi
1543ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1544ac_abs_confdir=`(
1545	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1546	pwd)`
1547# When building in place, set srcdir=.
1548if test "$ac_abs_confdir" = "$ac_pwd"; then
1549  srcdir=.
1550fi
1551# Remove unnecessary trailing slashes from srcdir.
1552# Double slashes in file names in object file debugging info
1553# mess up M-x gdb in Emacs.
1554case $srcdir in
1555*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1556esac
1557for ac_var in $ac_precious_vars; do
1558  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_env_${ac_var}_value=\$${ac_var}
1560  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1561  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1562done
1563
1564#
1565# Report the --help message.
1566#
1567if test "$ac_init_help" = "long"; then
1568  # Omit some internal or obsolete options to make the list less imposing.
1569  # This message is too long to be a string in the A/UX 3.1 sh.
1570  cat <<_ACEOF
1571\`configure' configures this package to adapt to many kinds of systems.
1572
1573Usage: $0 [OPTION]... [VAR=VALUE]...
1574
1575To assign environment variables (e.g., CC, CFLAGS...), specify them as
1576VAR=VALUE.  See below for descriptions of some of the useful variables.
1577
1578Defaults for the options are specified in brackets.
1579
1580Configuration:
1581  -h, --help              display this help and exit
1582      --help=short        display options specific to this package
1583      --help=recursive    display the short help of all the included packages
1584  -V, --version           display version information and exit
1585  -q, --quiet, --silent   do not print \`checking...' messages
1586      --cache-file=FILE   cache test results in FILE [disabled]
1587  -C, --config-cache      alias for \`--cache-file=config.cache'
1588  -n, --no-create         do not create output files
1589      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1590
1591Installation directories:
1592  --prefix=PREFIX         install architecture-independent files in PREFIX
1593                          [$ac_default_prefix]
1594  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1595                          [PREFIX]
1596
1597By default, \`make install' will install all the files in
1598\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1599an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1600for instance \`--prefix=\$HOME'.
1601
1602For better control, use the options below.
1603
1604Fine tuning of the installation directories:
1605  --bindir=DIR            user executables [EPREFIX/bin]
1606  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1607  --libexecdir=DIR        program executables [EPREFIX/libexec]
1608  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1609  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1610  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1611  --libdir=DIR            object code libraries [EPREFIX/lib]
1612  --includedir=DIR        C header files [PREFIX/include]
1613  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1614  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1615  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1616  --infodir=DIR           info documentation [DATAROOTDIR/info]
1617  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1618  --mandir=DIR            man documentation [DATAROOTDIR/man]
1619  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
1620  --htmldir=DIR           html documentation [DOCDIR]
1621  --dvidir=DIR            dvi documentation [DOCDIR]
1622  --pdfdir=DIR            pdf documentation [DOCDIR]
1623  --psdir=DIR             ps documentation [DOCDIR]
1624_ACEOF
1625
1626  cat <<\_ACEOF
1627
1628Program names:
1629  --program-prefix=PREFIX            prepend PREFIX to installed program names
1630  --program-suffix=SUFFIX            append SUFFIX to installed program names
1631  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1632
1633System types:
1634  --build=BUILD     configure for building on BUILD [guessed]
1635  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1636  --target=TARGET   configure for building compilers for TARGET [HOST]
1637_ACEOF
1638fi
1639
1640if test -n "$ac_init_help"; then
1641
1642  cat <<\_ACEOF
1643
1644Optional Features:
1645  --disable-option-checking  ignore unrecognized --enable/--with options
1646  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1647  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1648  --enable-debug 	  enable debugging no|yes|traditional [yes]
1649  --enable-dynamic	  enable linking built binaries with dynamic libs [no]
1650  --enable-syslog	  enable syslog support [auto]
1651  --enable-proctitle	  enable proctitle support [yes]
1652  --enable-ipv6 	  enable IPv6 support [auto]
1653  --enable-local	  enable AF_LOCAL (AF_UNIX) socket support [auto]
1654
1655SLAPD (Standalone LDAP Daemon) Options:
1656  --enable-slapd	  enable building slapd [yes]
1657    --enable-dynacl	  enable run-time loadable ACL support (experimental) [no]
1658    --enable-aci	  enable per-object ACIs (experimental) no|yes|mod [no]
1659    --enable-cleartext	  enable cleartext passwords [yes]
1660    --enable-crypt	  enable crypt(3) passwords [no]
1661    --enable-lmpasswd	  enable LAN Manager passwords [no]
1662    --enable-spasswd	  enable (Cyrus) SASL password verification [no]
1663    --enable-modules	  enable dynamic module support [no]
1664    --enable-rewrite	  enable DN rewriting in back-ldap and rwm overlay [auto]
1665    --enable-rlookups	  enable reverse lookups of client hostnames [no]
1666    --enable-slapi        enable SLAPI support (experimental) [no]
1667    --enable-slp          enable SLPv2 support [no]
1668    --enable-wrappers	  enable tcp wrapper support [no]
1669
1670SLAPD Backend Options:
1671    --enable-backends	  enable all available backends no|yes|mod
1672    --enable-bdb	  enable Berkeley DB backend no|yes|mod [yes]
1673    --enable-dnssrv	  enable dnssrv backend no|yes|mod [no]
1674    --enable-hdb	  enable Hierarchical DB backend no|yes|mod [yes]
1675    --enable-ldap	  enable ldap backend no|yes|mod [no]
1676    --enable-mdb	  enable mdb database backend no|yes|mod [yes]
1677    --enable-meta	  enable metadirectory backend no|yes|mod [no]
1678    --enable-monitor	  enable monitor backend no|yes|mod [yes]
1679    --enable-ndb	  enable MySQL NDB Cluster backend no|yes|mod [no]
1680    --enable-null	  enable null backend no|yes|mod [no]
1681    --enable-passwd	  enable passwd backend no|yes|mod [no]
1682    --enable-perl	  enable perl backend no|yes|mod [no]
1683    --enable-relay  	  enable relay backend no|yes|mod [yes]
1684    --enable-shell	  enable shell backend no|yes|mod [no]
1685    --enable-sock	  enable sock backend no|yes|mod [no]
1686    --enable-sql	  enable sql backend no|yes|mod [no]
1687
1688SLAPD Overlay Options:
1689    --enable-overlays	  enable all available overlays no|yes|mod
1690    --enable-accesslog	  In-Directory Access Logging overlay no|yes|mod [no]
1691    --enable-auditlog	  Audit Logging overlay no|yes|mod [no]
1692    --enable-collect	  Collect overlay no|yes|mod [no]
1693    --enable-constraint	  Attribute Constraint overlay no|yes|mod [no]
1694    --enable-dds  	  Dynamic Directory Services overlay no|yes|mod [no]
1695    --enable-deref	  Dereference overlay no|yes|mod [no]
1696    --enable-dyngroup	  Dynamic Group overlay no|yes|mod [no]
1697    --enable-dynlist	  Dynamic List overlay no|yes|mod [no]
1698    --enable-memberof	  Reverse Group Membership overlay no|yes|mod [no]
1699    --enable-ppolicy	  Password Policy overlay no|yes|mod [no]
1700    --enable-proxycache	  Proxy Cache overlay no|yes|mod [no]
1701    --enable-refint	  Referential Integrity overlay no|yes|mod [no]
1702    --enable-retcode	  Return Code testing overlay no|yes|mod [no]
1703    --enable-rwm       	  Rewrite/Remap overlay no|yes|mod [no]
1704    --enable-seqmod	  Sequential Modify overlay no|yes|mod [no]
1705    --enable-sssvlv	  ServerSideSort/VLV overlay no|yes|mod [no]
1706    --enable-syncprov	  Syncrepl Provider overlay no|yes|mod [yes]
1707    --enable-translucent  Translucent Proxy overlay no|yes|mod [no]
1708    --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]
1709    --enable-valsort      Value Sorting overlay no|yes|mod [no]
1710
1711Library Generation & Linking Options
1712  --enable-static[=PKGS]  build static libraries [default=yes]
1713  --enable-shared[=PKGS]  build shared libraries [default=yes]
1714  --enable-fast-install[=PKGS]
1715                          optimize for fast installation [default=yes]
1716  --disable-dependency-tracking  speeds up one-time build
1717  --enable-dependency-tracking   do not reject slow dependency extractors
1718  --disable-libtool-lock  avoid locking (might break parallel builds)
1719
1720Optional Packages:
1721  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1722  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1723  --with-subdir=DIR       change default subdirectory used for installs
1724  --with-cyrus-sasl	  with Cyrus SASL support [auto]
1725  --with-fetch		  with fetch(3) URL support [auto]
1726  --with-threads	  with threads [auto]
1727  --with-tls		  with TLS/SSL support auto|openssl|gnutls|moznss [auto]
1728  --with-yielding-select  with implicitly yielding select [auto]
1729  --with-mp               with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
1730  --with-odbc             with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
1731  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1732  --with-pic              try to use only PIC/non-PIC objects [default=use
1733                          both]
1734  --with-tags[=TAGS]      include additional configurations [automatic]
1735
1736See INSTALL file for further details.
1737
1738Some influential environment variables:
1739  CC          C compiler command
1740  CFLAGS      C compiler flags
1741  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1742              nonstandard directory <lib dir>
1743  LIBS        libraries to pass to the linker, e.g. -l<library>
1744  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1745              you have headers in a nonstandard directory <include dir>
1746  CPP         C preprocessor
1747
1748Use these variables to override the choices made by `configure' or to help
1749it to find libraries and programs with nonstandard names/locations.
1750
1751Report bugs to the package provider.
1752_ACEOF
1753ac_status=$?
1754fi
1755
1756if test "$ac_init_help" = "recursive"; then
1757  # If there are subdirs, report their specific --help.
1758  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1759    test -d "$ac_dir" ||
1760      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1761      continue
1762    ac_builddir=.
1763
1764case "$ac_dir" in
1765.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1766*)
1767  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1768  # A ".." for each directory in $ac_dir_suffix.
1769  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1770  case $ac_top_builddir_sub in
1771  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1772  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1773  esac ;;
1774esac
1775ac_abs_top_builddir=$ac_pwd
1776ac_abs_builddir=$ac_pwd$ac_dir_suffix
1777# for backward compatibility:
1778ac_top_builddir=$ac_top_build_prefix
1779
1780case $srcdir in
1781  .)  # We are building in place.
1782    ac_srcdir=.
1783    ac_top_srcdir=$ac_top_builddir_sub
1784    ac_abs_top_srcdir=$ac_pwd ;;
1785  [\\/]* | ?:[\\/]* )  # Absolute name.
1786    ac_srcdir=$srcdir$ac_dir_suffix;
1787    ac_top_srcdir=$srcdir
1788    ac_abs_top_srcdir=$srcdir ;;
1789  *) # Relative name.
1790    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1791    ac_top_srcdir=$ac_top_build_prefix$srcdir
1792    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1793esac
1794ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1795
1796    cd "$ac_dir" || { ac_status=$?; continue; }
1797    # Check for guested configure.
1798    if test -f "$ac_srcdir/configure.gnu"; then
1799      echo &&
1800      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1801    elif test -f "$ac_srcdir/configure"; then
1802      echo &&
1803      $SHELL "$ac_srcdir/configure" --help=recursive
1804    else
1805      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1806    fi || ac_status=$?
1807    cd "$ac_pwd" || { ac_status=$?; break; }
1808  done
1809fi
1810
1811test -n "$ac_init_help" && exit $ac_status
1812if $ac_init_version; then
1813  cat <<\_ACEOF
1814configure
1815generated by GNU Autoconf 2.65
1816
1817Copyright (C) 2009 Free Software Foundation, Inc.
1818This configure script is free software; the Free Software Foundation
1819gives unlimited permission to copy, distribute and modify it.
1820
1821Copyright 1998-2021 The OpenLDAP Foundation. All rights reserved.
1822Restrictions apply, see COPYRIGHT and LICENSE files.
1823_ACEOF
1824  exit
1825fi
1826
1827## ------------------------ ##
1828## Autoconf initialization. ##
1829## ------------------------ ##
1830
1831# ac_fn_c_try_compile LINENO
1832# --------------------------
1833# Try to compile conftest.$ac_ext, and return whether this succeeded.
1834ac_fn_c_try_compile ()
1835{
1836  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837  rm -f conftest.$ac_objext
1838  if { { ac_try="$ac_compile"
1839case "(($ac_try" in
1840  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841  *) ac_try_echo=$ac_try;;
1842esac
1843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844$as_echo "$ac_try_echo"; } >&5
1845  (eval "$ac_compile") 2>conftest.err
1846  ac_status=$?
1847  if test -s conftest.err; then
1848    grep -v '^ *+' conftest.err >conftest.er1
1849    cat conftest.er1 >&5
1850    mv -f conftest.er1 conftest.err
1851  fi
1852  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853  test $ac_status = 0; } && {
1854	 test -z "$ac_c_werror_flag" ||
1855	 test ! -s conftest.err
1856       } && test -s conftest.$ac_objext; then :
1857  ac_retval=0
1858else
1859  $as_echo "$as_me: failed program was:" >&5
1860sed 's/^/| /' conftest.$ac_ext >&5
1861
1862	ac_retval=1
1863fi
1864  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1865  as_fn_set_status $ac_retval
1866
1867} # ac_fn_c_try_compile
1868
1869# ac_fn_c_try_link LINENO
1870# -----------------------
1871# Try to link conftest.$ac_ext, and return whether this succeeded.
1872ac_fn_c_try_link ()
1873{
1874  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875  rm -f conftest.$ac_objext conftest$ac_exeext
1876  if { { ac_try="$ac_link"
1877case "(($ac_try" in
1878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879  *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883  (eval "$ac_link") 2>conftest.err
1884  ac_status=$?
1885  if test -s conftest.err; then
1886    grep -v '^ *+' conftest.err >conftest.er1
1887    cat conftest.er1 >&5
1888    mv -f conftest.er1 conftest.err
1889  fi
1890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891  test $ac_status = 0; } && {
1892	 test -z "$ac_c_werror_flag" ||
1893	 test ! -s conftest.err
1894       } && test -s conftest$ac_exeext && {
1895	 test "$cross_compiling" = yes ||
1896	 $as_test_x conftest$ac_exeext
1897       }; then :
1898  ac_retval=0
1899else
1900  $as_echo "$as_me: failed program was:" >&5
1901sed 's/^/| /' conftest.$ac_ext >&5
1902
1903	ac_retval=1
1904fi
1905  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1906  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1907  # interfere with the next link command; also delete a directory that is
1908  # left behind by Apple's compiler.  We do this before executing the actions.
1909  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1910  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1911  as_fn_set_status $ac_retval
1912
1913} # ac_fn_c_try_link
1914
1915# ac_fn_c_try_cpp LINENO
1916# ----------------------
1917# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1918ac_fn_c_try_cpp ()
1919{
1920  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1921  if { { ac_try="$ac_cpp conftest.$ac_ext"
1922case "(($ac_try" in
1923  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924  *) ac_try_echo=$ac_try;;
1925esac
1926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1927$as_echo "$ac_try_echo"; } >&5
1928  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1929  ac_status=$?
1930  if test -s conftest.err; then
1931    grep -v '^ *+' conftest.err >conftest.er1
1932    cat conftest.er1 >&5
1933    mv -f conftest.er1 conftest.err
1934  fi
1935  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1936  test $ac_status = 0; } >/dev/null && {
1937	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1938	 test ! -s conftest.err
1939       }; then :
1940  ac_retval=0
1941else
1942  $as_echo "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1945    ac_retval=1
1946fi
1947  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1948  as_fn_set_status $ac_retval
1949
1950} # ac_fn_c_try_cpp
1951
1952# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1953# -------------------------------------------------------
1954# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1955# the include files in INCLUDES and setting the cache variable VAR
1956# accordingly.
1957ac_fn_c_check_header_mongrel ()
1958{
1959  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960  if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1962$as_echo_n "checking for $2... " >&6; }
1963if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
1964  $as_echo_n "(cached) " >&6
1965fi
1966eval ac_res=\$$3
1967	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968$as_echo "$ac_res" >&6; }
1969else
1970  # Is the header compilable?
1971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1972$as_echo_n "checking $2 usability... " >&6; }
1973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1974/* end confdefs.h.  */
1975$4
1976#include <$2>
1977_ACEOF
1978if ac_fn_c_try_compile "$LINENO"; then :
1979  ac_header_compiler=yes
1980else
1981  ac_header_compiler=no
1982fi
1983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1985$as_echo "$ac_header_compiler" >&6; }
1986
1987# Is the header present?
1988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1989$as_echo_n "checking $2 presence... " >&6; }
1990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1991/* end confdefs.h.  */
1992#include <$2>
1993_ACEOF
1994if ac_fn_c_try_cpp "$LINENO"; then :
1995  ac_header_preproc=yes
1996else
1997  ac_header_preproc=no
1998fi
1999rm -f conftest.err conftest.$ac_ext
2000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2001$as_echo "$ac_header_preproc" >&6; }
2002
2003# So?  What about this header?
2004case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2005  yes:no: )
2006    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2007$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2008    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2009$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2010    ;;
2011  no:yes:* )
2012    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2013$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2014    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2015$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2016    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2017$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2018    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2019$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2020    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2021$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2022( cat <<\_ASBOX
2023## --------------------------------------------- ##
2024## Report this to <http://www.openldap.org/its/> ##
2025## --------------------------------------------- ##
2026_ASBOX
2027     ) | sed "s/^/$as_me: WARNING:     /" >&2
2028    ;;
2029esac
2030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2031$as_echo_n "checking for $2... " >&6; }
2032if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2033  $as_echo_n "(cached) " >&6
2034else
2035  eval "$3=\$ac_header_compiler"
2036fi
2037eval ac_res=\$$3
2038	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2039$as_echo "$ac_res" >&6; }
2040fi
2041  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2042
2043} # ac_fn_c_check_header_mongrel
2044
2045# ac_fn_c_try_run LINENO
2046# ----------------------
2047# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2048# that executables *can* be run.
2049ac_fn_c_try_run ()
2050{
2051  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2052  if { { ac_try="$ac_link"
2053case "(($ac_try" in
2054  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2055  *) ac_try_echo=$ac_try;;
2056esac
2057eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2058$as_echo "$ac_try_echo"; } >&5
2059  (eval "$ac_link") 2>&5
2060  ac_status=$?
2061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2062  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2063  { { case "(($ac_try" in
2064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2065  *) ac_try_echo=$ac_try;;
2066esac
2067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2068$as_echo "$ac_try_echo"; } >&5
2069  (eval "$ac_try") 2>&5
2070  ac_status=$?
2071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2072  test $ac_status = 0; }; }; then :
2073  ac_retval=0
2074else
2075  $as_echo "$as_me: program exited with status $ac_status" >&5
2076       $as_echo "$as_me: failed program was:" >&5
2077sed 's/^/| /' conftest.$ac_ext >&5
2078
2079       ac_retval=$ac_status
2080fi
2081  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2082  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2083  as_fn_set_status $ac_retval
2084
2085} # ac_fn_c_try_run
2086
2087# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2088# -------------------------------------------------------
2089# Tests whether HEADER exists and can be compiled using the include files in
2090# INCLUDES, setting the cache variable VAR accordingly.
2091ac_fn_c_check_header_compile ()
2092{
2093  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2094  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2095$as_echo_n "checking for $2... " >&6; }
2096if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2097  $as_echo_n "(cached) " >&6
2098else
2099  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h.  */
2101$4
2102#include <$2>
2103_ACEOF
2104if ac_fn_c_try_compile "$LINENO"; then :
2105  eval "$3=yes"
2106else
2107  eval "$3=no"
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110fi
2111eval ac_res=\$$3
2112	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2113$as_echo "$ac_res" >&6; }
2114  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2115
2116} # ac_fn_c_check_header_compile
2117
2118# ac_fn_c_check_func LINENO FUNC VAR
2119# ----------------------------------
2120# Tests whether FUNC exists, setting the cache variable VAR accordingly
2121ac_fn_c_check_func ()
2122{
2123  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2125$as_echo_n "checking for $2... " >&6; }
2126if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2127  $as_echo_n "(cached) " >&6
2128else
2129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h.  */
2131/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2132   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2133#define $2 innocuous_$2
2134
2135/* System header to define __stub macros and hopefully few prototypes,
2136    which can conflict with char $2 (); below.
2137    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2138    <limits.h> exists even on freestanding compilers.  */
2139
2140#ifdef __STDC__
2141# include <limits.h>
2142#else
2143# include <assert.h>
2144#endif
2145
2146#undef $2
2147
2148/* Override any GCC internal prototype to avoid an error.
2149   Use char because int might match the return type of a GCC
2150   builtin and then its argument prototype would still apply.  */
2151#ifdef __cplusplus
2152extern "C"
2153#endif
2154char $2 ();
2155/* The GNU C library defines this for functions which it implements
2156    to always fail with ENOSYS.  Some functions are actually named
2157    something starting with __ and the normal name is an alias.  */
2158#if defined __stub_$2 || defined __stub___$2
2159choke me
2160#endif
2161
2162int
2163main ()
2164{
2165return $2 ();
2166  ;
2167  return 0;
2168}
2169_ACEOF
2170if ac_fn_c_try_link "$LINENO"; then :
2171  eval "$3=yes"
2172else
2173  eval "$3=no"
2174fi
2175rm -f core conftest.err conftest.$ac_objext \
2176    conftest$ac_exeext conftest.$ac_ext
2177fi
2178eval ac_res=\$$3
2179	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2180$as_echo "$ac_res" >&6; }
2181  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2182
2183} # ac_fn_c_check_func
2184
2185# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2186# -------------------------------------------
2187# Tests whether TYPE exists after having included INCLUDES, setting cache
2188# variable VAR accordingly.
2189ac_fn_c_check_type ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
2194if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2195  $as_echo_n "(cached) " >&6
2196else
2197  eval "$3=no"
2198  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2199/* end confdefs.h.  */
2200$4
2201int
2202main ()
2203{
2204if (sizeof ($2))
2205	 return 0;
2206  ;
2207  return 0;
2208}
2209_ACEOF
2210if ac_fn_c_try_compile "$LINENO"; then :
2211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h.  */
2213$4
2214int
2215main ()
2216{
2217if (sizeof (($2)))
2218	    return 0;
2219  ;
2220  return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_compile "$LINENO"; then :
2224
2225else
2226  eval "$3=yes"
2227fi
2228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2229fi
2230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
2235  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2236
2237} # ac_fn_c_check_type
2238
2239# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2240# ----------------------------------------------------
2241# Tries to find if the field MEMBER exists in type AGGR, after including
2242# INCLUDES, setting cache variable VAR accordingly.
2243ac_fn_c_check_member ()
2244{
2245  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2247$as_echo_n "checking for $2.$3... " >&6; }
2248if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2249  $as_echo_n "(cached) " >&6
2250else
2251  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h.  */
2253$5
2254int
2255main ()
2256{
2257static $2 ac_aggr;
2258if (ac_aggr.$3)
2259return 0;
2260  ;
2261  return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265  eval "$4=yes"
2266else
2267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2268/* end confdefs.h.  */
2269$5
2270int
2271main ()
2272{
2273static $2 ac_aggr;
2274if (sizeof ac_aggr.$3)
2275return 0;
2276  ;
2277  return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_compile "$LINENO"; then :
2281  eval "$4=yes"
2282else
2283  eval "$4=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2286fi
2287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2288fi
2289eval ac_res=\$$4
2290	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2291$as_echo "$ac_res" >&6; }
2292  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2293
2294} # ac_fn_c_check_member
2295
2296# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2297# --------------------------------------------
2298# Tries to find the compile-time value of EXPR in a program that includes
2299# INCLUDES, setting VAR accordingly. Returns whether the value could be
2300# computed
2301ac_fn_c_compute_int ()
2302{
2303  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2304  if test "$cross_compiling" = yes; then
2305    # Depending upon the size, compute the lo and hi bounds.
2306cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h.  */
2308$4
2309int
2310main ()
2311{
2312static int test_array [1 - 2 * !(($2) >= 0)];
2313test_array [0] = 0
2314
2315  ;
2316  return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320  ac_lo=0 ac_mid=0
2321  while :; do
2322    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h.  */
2324$4
2325int
2326main ()
2327{
2328static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2329test_array [0] = 0
2330
2331  ;
2332  return 0;
2333}
2334_ACEOF
2335if ac_fn_c_try_compile "$LINENO"; then :
2336  ac_hi=$ac_mid; break
2337else
2338  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2339			if test $ac_lo -le $ac_mid; then
2340			  ac_lo= ac_hi=
2341			  break
2342			fi
2343			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346  done
2347else
2348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2349/* end confdefs.h.  */
2350$4
2351int
2352main ()
2353{
2354static int test_array [1 - 2 * !(($2) < 0)];
2355test_array [0] = 0
2356
2357  ;
2358  return 0;
2359}
2360_ACEOF
2361if ac_fn_c_try_compile "$LINENO"; then :
2362  ac_hi=-1 ac_mid=-1
2363  while :; do
2364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2371test_array [0] = 0
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378  ac_lo=$ac_mid; break
2379else
2380  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2381			if test $ac_mid -le $ac_hi; then
2382			  ac_lo= ac_hi=
2383			  break
2384			fi
2385			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388  done
2389else
2390  ac_lo= ac_hi=
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395# Binary search between lo and hi bounds.
2396while test "x$ac_lo" != "x$ac_hi"; do
2397  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2399/* end confdefs.h.  */
2400$4
2401int
2402main ()
2403{
2404static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2405test_array [0] = 0
2406
2407  ;
2408  return 0;
2409}
2410_ACEOF
2411if ac_fn_c_try_compile "$LINENO"; then :
2412  ac_hi=$ac_mid
2413else
2414  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417done
2418case $ac_lo in #((
2419?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2420'') ac_retval=1 ;;
2421esac
2422  else
2423    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425$4
2426static long int longval () { return $2; }
2427static unsigned long int ulongval () { return $2; }
2428#include <stdio.h>
2429#include <stdlib.h>
2430int
2431main ()
2432{
2433
2434  FILE *f = fopen ("conftest.val", "w");
2435  if (! f)
2436    return 1;
2437  if (($2) < 0)
2438    {
2439      long int i = longval ();
2440      if (i != ($2))
2441	return 1;
2442      fprintf (f, "%ld", i);
2443    }
2444  else
2445    {
2446      unsigned long int i = ulongval ();
2447      if (i != ($2))
2448	return 1;
2449      fprintf (f, "%lu", i);
2450    }
2451  /* Do not output a trailing newline, as this causes \r\n confusion
2452     on some platforms.  */
2453  return ferror (f) || fclose (f) != 0;
2454
2455  ;
2456  return 0;
2457}
2458_ACEOF
2459if ac_fn_c_try_run "$LINENO"; then :
2460  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2461else
2462  ac_retval=1
2463fi
2464rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2465  conftest.$ac_objext conftest.beam conftest.$ac_ext
2466rm -f conftest.val
2467
2468  fi
2469  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2470  as_fn_set_status $ac_retval
2471
2472} # ac_fn_c_compute_int
2473cat >config.log <<_ACEOF
2474This file contains any messages produced by compilers while
2475running configure, to aid debugging if configure makes a mistake.
2476
2477It was created by $as_me, which was
2478generated by GNU Autoconf 2.65.  Invocation command line was
2479
2480  $ $0 $@
2481
2482_ACEOF
2483exec 5>>config.log
2484{
2485cat <<_ASUNAME
2486## --------- ##
2487## Platform. ##
2488## --------- ##
2489
2490hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2491uname -m = `(uname -m) 2>/dev/null || echo unknown`
2492uname -r = `(uname -r) 2>/dev/null || echo unknown`
2493uname -s = `(uname -s) 2>/dev/null || echo unknown`
2494uname -v = `(uname -v) 2>/dev/null || echo unknown`
2495
2496/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2497/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2498
2499/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2500/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2501/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2502/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2503/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2504/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2505/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2506
2507_ASUNAME
2508
2509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2510for as_dir in $PATH
2511do
2512  IFS=$as_save_IFS
2513  test -z "$as_dir" && as_dir=.
2514    $as_echo "PATH: $as_dir"
2515  done
2516IFS=$as_save_IFS
2517
2518} >&5
2519
2520cat >&5 <<_ACEOF
2521
2522
2523## ----------- ##
2524## Core tests. ##
2525## ----------- ##
2526
2527_ACEOF
2528
2529
2530# Keep a trace of the command line.
2531# Strip out --no-create and --no-recursion so they do not pile up.
2532# Strip out --silent because we don't want to record it for future runs.
2533# Also quote any args containing shell meta-characters.
2534# Make two passes to allow for proper duplicate-argument suppression.
2535ac_configure_args=
2536ac_configure_args0=
2537ac_configure_args1=
2538ac_must_keep_next=false
2539for ac_pass in 1 2
2540do
2541  for ac_arg
2542  do
2543    case $ac_arg in
2544    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2545    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2546    | -silent | --silent | --silen | --sile | --sil)
2547      continue ;;
2548    *\'*)
2549      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2550    esac
2551    case $ac_pass in
2552    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2553    2)
2554      as_fn_append ac_configure_args1 " '$ac_arg'"
2555      if test $ac_must_keep_next = true; then
2556	ac_must_keep_next=false # Got value, back to normal.
2557      else
2558	case $ac_arg in
2559	  *=* | --config-cache | -C | -disable-* | --disable-* \
2560	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2561	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2562	  | -with-* | --with-* | -without-* | --without-* | --x)
2563	    case "$ac_configure_args0 " in
2564	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2565	    esac
2566	    ;;
2567	  -* ) ac_must_keep_next=true ;;
2568	esac
2569      fi
2570      as_fn_append ac_configure_args " '$ac_arg'"
2571      ;;
2572    esac
2573  done
2574done
2575{ ac_configure_args0=; unset ac_configure_args0;}
2576{ ac_configure_args1=; unset ac_configure_args1;}
2577
2578# When interrupted or exit'd, cleanup temporary files, and complete
2579# config.log.  We remove comments because anyway the quotes in there
2580# would cause problems or look ugly.
2581# WARNING: Use '\'' to represent an apostrophe within the trap.
2582# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2583trap 'exit_status=$?
2584  # Save into config.log some information that might help in debugging.
2585  {
2586    echo
2587
2588    cat <<\_ASBOX
2589## ---------------- ##
2590## Cache variables. ##
2591## ---------------- ##
2592_ASBOX
2593    echo
2594    # The following way of writing the cache mishandles newlines in values,
2595(
2596  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2597    eval ac_val=\$$ac_var
2598    case $ac_val in #(
2599    *${as_nl}*)
2600      case $ac_var in #(
2601      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2602$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2603      esac
2604      case $ac_var in #(
2605      _ | IFS | as_nl) ;; #(
2606      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2607      *) { eval $ac_var=; unset $ac_var;} ;;
2608      esac ;;
2609    esac
2610  done
2611  (set) 2>&1 |
2612    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2613    *${as_nl}ac_space=\ *)
2614      sed -n \
2615	"s/'\''/'\''\\\\'\'''\''/g;
2616	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2617      ;; #(
2618    *)
2619      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2620      ;;
2621    esac |
2622    sort
2623)
2624    echo
2625
2626    cat <<\_ASBOX
2627## ----------------- ##
2628## Output variables. ##
2629## ----------------- ##
2630_ASBOX
2631    echo
2632    for ac_var in $ac_subst_vars
2633    do
2634      eval ac_val=\$$ac_var
2635      case $ac_val in
2636      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2637      esac
2638      $as_echo "$ac_var='\''$ac_val'\''"
2639    done | sort
2640    echo
2641
2642    if test -n "$ac_subst_files"; then
2643      cat <<\_ASBOX
2644## ------------------- ##
2645## File substitutions. ##
2646## ------------------- ##
2647_ASBOX
2648      echo
2649      for ac_var in $ac_subst_files
2650      do
2651	eval ac_val=\$$ac_var
2652	case $ac_val in
2653	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2654	esac
2655	$as_echo "$ac_var='\''$ac_val'\''"
2656      done | sort
2657      echo
2658    fi
2659
2660    if test -s confdefs.h; then
2661      cat <<\_ASBOX
2662## ----------- ##
2663## confdefs.h. ##
2664## ----------- ##
2665_ASBOX
2666      echo
2667      cat confdefs.h
2668      echo
2669    fi
2670    test "$ac_signal" != 0 &&
2671      $as_echo "$as_me: caught signal $ac_signal"
2672    $as_echo "$as_me: exit $exit_status"
2673  } >&5
2674  rm -f core *.core core.conftest.* &&
2675    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2676    exit $exit_status
2677' 0
2678for ac_signal in 1 2 13 15; do
2679  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2680done
2681ac_signal=0
2682
2683# confdefs.h avoids OS command line length limits that DEFS can exceed.
2684rm -f -r conftest* confdefs.h
2685
2686$as_echo "/* confdefs.h */" > confdefs.h
2687
2688# Predefined preprocessor variables.
2689
2690cat >>confdefs.h <<_ACEOF
2691#define PACKAGE_NAME "$PACKAGE_NAME"
2692_ACEOF
2693
2694cat >>confdefs.h <<_ACEOF
2695#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2696_ACEOF
2697
2698cat >>confdefs.h <<_ACEOF
2699#define PACKAGE_VERSION "$PACKAGE_VERSION"
2700_ACEOF
2701
2702cat >>confdefs.h <<_ACEOF
2703#define PACKAGE_STRING "$PACKAGE_STRING"
2704_ACEOF
2705
2706cat >>confdefs.h <<_ACEOF
2707#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2708_ACEOF
2709
2710cat >>confdefs.h <<_ACEOF
2711#define PACKAGE_URL "$PACKAGE_URL"
2712_ACEOF
2713
2714
2715# Let the site file select an alternate cache file if it wants to.
2716# Prefer an explicitly selected file to automatically selected ones.
2717ac_site_file1=NONE
2718ac_site_file2=NONE
2719if test -n "$CONFIG_SITE"; then
2720  ac_site_file1=$CONFIG_SITE
2721elif test "x$prefix" != xNONE; then
2722  ac_site_file1=$prefix/share/config.site
2723  ac_site_file2=$prefix/etc/config.site
2724else
2725  ac_site_file1=$ac_default_prefix/share/config.site
2726  ac_site_file2=$ac_default_prefix/etc/config.site
2727fi
2728for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2729do
2730  test "x$ac_site_file" = xNONE && continue
2731  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2732    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2733$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2734    sed 's/^/| /' "$ac_site_file" >&5
2735    . "$ac_site_file"
2736  fi
2737done
2738
2739
2740# Check that the precious variables saved in the cache have kept the same
2741# value.
2742ac_cache_corrupted=false
2743for ac_var in $ac_precious_vars; do
2744  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2745  eval ac_new_set=\$ac_env_${ac_var}_set
2746  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2747  eval ac_new_val=\$ac_env_${ac_var}_value
2748  case $ac_old_set,$ac_new_set in
2749    set,)
2750      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2751$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2752      ac_cache_corrupted=: ;;
2753    ,set)
2754      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2755$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2756      ac_cache_corrupted=: ;;
2757    ,);;
2758    *)
2759      if test "x$ac_old_val" != "x$ac_new_val"; then
2760	# differences in whitespace do not lead to failure.
2761	ac_old_val_w=`echo x $ac_old_val`
2762	ac_new_val_w=`echo x $ac_new_val`
2763	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2764	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2765$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2766	  ac_cache_corrupted=:
2767	else
2768	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2769$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2770	  eval $ac_var=\$ac_old_val
2771	fi
2772	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2773$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2774	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2775$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2776      fi;;
2777  esac
2778  # Pass precious variables to config.status.
2779  if test "$ac_new_set" = set; then
2780    case $ac_new_val in
2781    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2782    *) ac_arg=$ac_var=$ac_new_val ;;
2783    esac
2784    case " $ac_configure_args " in
2785      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2786      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2787    esac
2788  fi
2789done
2790if $ac_cache_corrupted; then
2791  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2792$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2793  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2794$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2795  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2796fi
2797## -------------------- ##
2798## Main body of script. ##
2799## -------------------- ##
2800
2801ac_ext=c
2802ac_cpp='$CPP $CPPFLAGS'
2803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2805ac_compiler_gnu=$ac_cv_c_compiler_gnu
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833ac_aux_dir=
2834for ac_dir in build "$srcdir"/build; do
2835  for ac_t in install-sh install.sh shtool; do
2836    if test -f "$ac_dir/$ac_t"; then
2837      ac_aux_dir=$ac_dir
2838      ac_install_sh="$ac_aux_dir/$ac_t -c"
2839      break 2
2840    fi
2841  done
2842done
2843if test -z "$ac_aux_dir"; then
2844  as_fn_error "cannot find install-sh, install.sh, or shtool in build \"$srcdir\"/build" "$LINENO" 5
2845fi
2846
2847# These three variables are undocumented and unsupported,
2848# and are intended to be withdrawn in a future Autoconf release.
2849# They can cause serious problems if a builder's source tree is in a directory
2850# whose full name contains unusual characters.
2851ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2852ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2853ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2854
2855
2856eval `$ac_aux_dir/version.sh`
2857if test -z "$OL_STRING"; then
2858	as_fn_error "could not determine version" "$LINENO" 5
2859fi
2860
2861if test -f "$ac_aux_dir/shtool" && test ! -d $ac_aux_dir/shtool; then
2862	ac_cv_shtool="$ac_aux_dir/shtool"
2863else
2864	as_fn_error "no shtool found in $ac_aux_dir" "$LINENO" 5
2865fi
2866
2867SHTOOL="$ac_cv_shtool"
2868
2869TB="" TN=""
2870if test -t 1; then
2871	TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
2872	TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
2873fi
2874
2875OPENLDAP_REPO=""
2876if test -d $ac_aux_dir/../.git; then
2877	OPENLDAP_REPO="(from Git clone) "
2878elif test -d $ac_aux_dir/CVS; then
2879	OPENLDAP_REPO="(from CVS checkout) "
2880fi
2881
2882echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_REPO}..."
2883
2884# Make sure we can run config.sub.
2885$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2886  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2887
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2889$as_echo_n "checking build system type... " >&6; }
2890if test "${ac_cv_build+set}" = set; then :
2891  $as_echo_n "(cached) " >&6
2892else
2893  ac_build_alias=$build_alias
2894test "x$ac_build_alias" = x &&
2895  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2896test "x$ac_build_alias" = x &&
2897  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
2898ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2899  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2900
2901fi
2902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2903$as_echo "$ac_cv_build" >&6; }
2904case $ac_cv_build in
2905*-*-*) ;;
2906*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
2907esac
2908build=$ac_cv_build
2909ac_save_IFS=$IFS; IFS='-'
2910set x $ac_cv_build
2911shift
2912build_cpu=$1
2913build_vendor=$2
2914shift; shift
2915# Remember, the first character of IFS is used to create $*,
2916# except with old shells:
2917build_os=$*
2918IFS=$ac_save_IFS
2919case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2920
2921
2922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2923$as_echo_n "checking host system type... " >&6; }
2924if test "${ac_cv_host+set}" = set; then :
2925  $as_echo_n "(cached) " >&6
2926else
2927  if test "x$host_alias" = x; then
2928  ac_cv_host=$ac_cv_build
2929else
2930  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2931    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932fi
2933
2934fi
2935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2936$as_echo "$ac_cv_host" >&6; }
2937case $ac_cv_host in
2938*-*-*) ;;
2939*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
2940esac
2941host=$ac_cv_host
2942ac_save_IFS=$IFS; IFS='-'
2943set x $ac_cv_host
2944shift
2945host_cpu=$1
2946host_vendor=$2
2947shift; shift
2948# Remember, the first character of IFS is used to create $*,
2949# except with old shells:
2950host_os=$*
2951IFS=$ac_save_IFS
2952case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953
2954
2955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2956$as_echo_n "checking target system type... " >&6; }
2957if test "${ac_cv_target+set}" = set; then :
2958  $as_echo_n "(cached) " >&6
2959else
2960  if test "x$target_alias" = x; then
2961  ac_cv_target=$ac_cv_host
2962else
2963  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
2964    as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
2965fi
2966
2967fi
2968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2969$as_echo "$ac_cv_target" >&6; }
2970case $ac_cv_target in
2971*-*-*) ;;
2972*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
2973esac
2974target=$ac_cv_target
2975ac_save_IFS=$IFS; IFS='-'
2976set x $ac_cv_target
2977shift
2978target_cpu=$1
2979target_vendor=$2
2980shift; shift
2981# Remember, the first character of IFS is used to create $*,
2982# except with old shells:
2983target_os=$*
2984IFS=$ac_save_IFS
2985case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2986
2987
2988# The aliases save the names the user supplied, while $host etc.
2989# will get canonicalized.
2990test -n "$target_alias" &&
2991  test "$program_prefix$program_suffix$program_transform_name" = \
2992    NONENONEs,x,x, &&
2993  program_prefix=${target_alias}-
2994
2995am__api_version="1.9"
2996# Find a good install program.  We prefer a C program (faster),
2997# so one script is as good as another.  But avoid the broken or
2998# incompatible versions:
2999# SysV /etc/install, /usr/sbin/install
3000# SunOS /usr/etc/install
3001# IRIX /sbin/install
3002# AIX /bin/install
3003# AmigaOS /C/install, which installs bootblocks on floppy discs
3004# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3005# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3006# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3007# OS/2's system install, which has a completely different semantic
3008# ./install, which can be erroneously created by make from ./install.sh.
3009# Reject install programs that cannot install multiple files.
3010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3011$as_echo_n "checking for a BSD-compatible install... " >&6; }
3012if test -z "$INSTALL"; then
3013if test "${ac_cv_path_install+set}" = set; then :
3014  $as_echo_n "(cached) " >&6
3015else
3016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3017for as_dir in $PATH
3018do
3019  IFS=$as_save_IFS
3020  test -z "$as_dir" && as_dir=.
3021    # Account for people who put trailing slashes in PATH elements.
3022case $as_dir/ in #((
3023  ./ | .// | /[cC]/* | \
3024  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3025  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3026  /usr/ucb/* ) ;;
3027  *)
3028    # OSF1 and SCO ODT 3.0 have their own names for install.
3029    # Don't use installbsd from OSF since it installs stuff as root
3030    # by default.
3031    for ac_prog in ginstall scoinst install; do
3032      for ac_exec_ext in '' $ac_executable_extensions; do
3033	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3034	  if test $ac_prog = install &&
3035	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3036	    # AIX install.  It has an incompatible calling convention.
3037	    :
3038	  elif test $ac_prog = install &&
3039	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3040	    # program-specific install script used by HP pwplus--don't use.
3041	    :
3042	  else
3043	    rm -rf conftest.one conftest.two conftest.dir
3044	    echo one > conftest.one
3045	    echo two > conftest.two
3046	    mkdir conftest.dir
3047	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3048	      test -s conftest.one && test -s conftest.two &&
3049	      test -s conftest.dir/conftest.one &&
3050	      test -s conftest.dir/conftest.two
3051	    then
3052	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3053	      break 3
3054	    fi
3055	  fi
3056	fi
3057      done
3058    done
3059    ;;
3060esac
3061
3062  done
3063IFS=$as_save_IFS
3064
3065rm -rf conftest.one conftest.two conftest.dir
3066
3067fi
3068  if test "${ac_cv_path_install+set}" = set; then
3069    INSTALL=$ac_cv_path_install
3070  else
3071    # As a last resort, use the slow shell script.  Don't cache a
3072    # value for INSTALL within a source directory, because that will
3073    # break other packages using the cache if that directory is
3074    # removed, or if the value is a relative name.
3075    INSTALL=$ac_install_sh
3076  fi
3077fi
3078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3079$as_echo "$INSTALL" >&6; }
3080
3081# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3082# It thinks the first close brace ends the variable substitution.
3083test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3084
3085test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3086
3087test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3088
3089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3090$as_echo_n "checking whether build environment is sane... " >&6; }
3091# Just in case
3092sleep 1
3093echo timestamp > conftest.file
3094# Do `set' in a subshell so we don't clobber the current shell's
3095# arguments.  Must try -L first in case configure is actually a
3096# symlink; some systems play weird games with the mod time of symlinks
3097# (eg FreeBSD returns the mod time of the symlink's containing
3098# directory).
3099if (
3100   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
3101   if test "$*" = "X"; then
3102      # -L didn't work.
3103      set X `ls -t $srcdir/configure conftest.file`
3104   fi
3105   rm -f conftest.file
3106   if test "$*" != "X $srcdir/configure conftest.file" \
3107      && test "$*" != "X conftest.file $srcdir/configure"; then
3108
3109      # If neither matched, then we have a broken ls.  This can happen
3110      # if, for instance, CONFIG_SHELL is bash and it inherits a
3111      # broken ls alias from the environment.  This has actually
3112      # happened.  Such a system could not be considered "sane".
3113      as_fn_error "ls -t appears to fail.  Make sure there is not a broken
3114alias in your environment" "$LINENO" 5
3115   fi
3116
3117   test "$2" = conftest.file
3118   )
3119then
3120   # Ok.
3121   :
3122else
3123   as_fn_error "newly created file is older than distributed files!
3124Check your system clock" "$LINENO" 5
3125fi
3126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3127$as_echo "yes" >&6; }
3128test "$program_prefix" != NONE &&
3129  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3130# Use a double $ so make ignores it.
3131test "$program_suffix" != NONE &&
3132  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3133# Double any \ or $.
3134# By default was `s,x,x', remove it if useless.
3135ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3136program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3137
3138# expand $ac_aux_dir to an absolute path
3139am_aux_dir=`cd $ac_aux_dir && pwd`
3140
3141test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
3142# Use eval to expand $SHELL
3143if eval "$MISSING --run true"; then
3144  am_missing_run="$MISSING --run "
3145else
3146  am_missing_run=
3147  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3148$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3149fi
3150
3151if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
3152  # We used to keeping the `.' as first argument, in order to
3153  # allow $(mkdir_p) to be used without argument.  As in
3154  #   $(mkdir_p) $(somedir)
3155  # where $(somedir) is conditionally defined.  However this is wrong
3156  # for two reasons:
3157  #  1. if the package is installed by a user who cannot write `.'
3158  #     make install will fail,
3159  #  2. the above comment should most certainly read
3160  #     $(mkdir_p) $(DESTDIR)$(somedir)
3161  #     so it does not work when $(somedir) is undefined and
3162  #     $(DESTDIR) is not.
3163  #  To support the latter case, we have to write
3164  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
3165  #  so the `.' trick is pointless.
3166  mkdir_p='mkdir -p --'
3167else
3168  # On NextStep and OpenStep, the `mkdir' command does not
3169  # recognize any option.  It will interpret all options as
3170  # directories to create, and then abort because `.' already
3171  # exists.
3172  for d in ./-p ./--version;
3173  do
3174    test -d $d && rmdir $d
3175  done
3176  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
3177  if test -f "$ac_aux_dir/mkinstalldirs"; then
3178    mkdir_p='$(mkinstalldirs)'
3179  else
3180    mkdir_p='$(install_sh) -d'
3181  fi
3182fi
3183
3184for ac_prog in gawk mawk nawk awk
3185do
3186  # Extract the first word of "$ac_prog", so it can be a program name with args.
3187set dummy $ac_prog; ac_word=$2
3188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3189$as_echo_n "checking for $ac_word... " >&6; }
3190if test "${ac_cv_prog_AWK+set}" = set; then :
3191  $as_echo_n "(cached) " >&6
3192else
3193  if test -n "$AWK"; then
3194  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3195else
3196as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3197for as_dir in $PATH
3198do
3199  IFS=$as_save_IFS
3200  test -z "$as_dir" && as_dir=.
3201    for ac_exec_ext in '' $ac_executable_extensions; do
3202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3203    ac_cv_prog_AWK="$ac_prog"
3204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3205    break 2
3206  fi
3207done
3208  done
3209IFS=$as_save_IFS
3210
3211fi
3212fi
3213AWK=$ac_cv_prog_AWK
3214if test -n "$AWK"; then
3215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3216$as_echo "$AWK" >&6; }
3217else
3218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3219$as_echo "no" >&6; }
3220fi
3221
3222
3223  test -n "$AWK" && break
3224done
3225
3226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3227$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3228set x ${MAKE-make}
3229ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3230if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3231  $as_echo_n "(cached) " >&6
3232else
3233  cat >conftest.make <<\_ACEOF
3234SHELL = /bin/sh
3235all:
3236	@echo '@@@%%%=$(MAKE)=@@@%%%'
3237_ACEOF
3238# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3239case `${MAKE-make} -f conftest.make 2>/dev/null` in
3240  *@@@%%%=?*=@@@%%%*)
3241    eval ac_cv_prog_make_${ac_make}_set=yes;;
3242  *)
3243    eval ac_cv_prog_make_${ac_make}_set=no;;
3244esac
3245rm -f conftest.make
3246fi
3247if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3249$as_echo "yes" >&6; }
3250  SET_MAKE=
3251else
3252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3253$as_echo "no" >&6; }
3254  SET_MAKE="MAKE=${MAKE-make}"
3255fi
3256
3257rm -rf .tst 2>/dev/null
3258mkdir .tst 2>/dev/null
3259if test -d .tst; then
3260  am__leading_dot=.
3261else
3262  am__leading_dot=_
3263fi
3264rmdir .tst 2>/dev/null
3265
3266# test to see if srcdir already configured
3267if test "`cd $srcdir && pwd`" != "`pwd`" &&
3268   test -f $srcdir/config.status; then
3269  as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3270fi
3271
3272# test whether we have cygpath
3273if test -z "$CYGPATH_W"; then
3274  if (cygpath --version) >/dev/null 2>/dev/null; then
3275    CYGPATH_W='cygpath -w'
3276  else
3277    CYGPATH_W=echo
3278  fi
3279fi
3280
3281
3282# Define the identity of the package.
3283 PACKAGE=$OL_PACKAGE
3284 VERSION=$OL_VERSION
3285
3286
3287# Some tools Automake needs.
3288
3289ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3290
3291
3292AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3293
3294
3295AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3296
3297
3298AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3299
3300
3301MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3302
3303install_sh=${install_sh-"$am_aux_dir/install-sh"}
3304
3305# Installed binaries are usually stripped using `strip' when the user
3306# run `make install-strip'.  However `strip' might not be the right
3307# tool to use in cross-compilation environments, therefore Automake
3308# will honor the `STRIP' environment variable to overrule this program.
3309if test "$cross_compiling" != no; then
3310  if test -n "$ac_tool_prefix"; then
3311  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3312set dummy ${ac_tool_prefix}strip; ac_word=$2
3313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3314$as_echo_n "checking for $ac_word... " >&6; }
3315if test "${ac_cv_prog_STRIP+set}" = set; then :
3316  $as_echo_n "(cached) " >&6
3317else
3318  if test -n "$STRIP"; then
3319  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3320else
3321as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3322for as_dir in $PATH
3323do
3324  IFS=$as_save_IFS
3325  test -z "$as_dir" && as_dir=.
3326    for ac_exec_ext in '' $ac_executable_extensions; do
3327  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3328    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3330    break 2
3331  fi
3332done
3333  done
3334IFS=$as_save_IFS
3335
3336fi
3337fi
3338STRIP=$ac_cv_prog_STRIP
3339if test -n "$STRIP"; then
3340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3341$as_echo "$STRIP" >&6; }
3342else
3343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3344$as_echo "no" >&6; }
3345fi
3346
3347
3348fi
3349if test -z "$ac_cv_prog_STRIP"; then
3350  ac_ct_STRIP=$STRIP
3351  # Extract the first word of "strip", so it can be a program name with args.
3352set dummy strip; ac_word=$2
3353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3354$as_echo_n "checking for $ac_word... " >&6; }
3355if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
3356  $as_echo_n "(cached) " >&6
3357else
3358  if test -n "$ac_ct_STRIP"; then
3359  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3360else
3361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362for as_dir in $PATH
3363do
3364  IFS=$as_save_IFS
3365  test -z "$as_dir" && as_dir=.
3366    for ac_exec_ext in '' $ac_executable_extensions; do
3367  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3368    ac_cv_prog_ac_ct_STRIP="strip"
3369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3370    break 2
3371  fi
3372done
3373  done
3374IFS=$as_save_IFS
3375
3376fi
3377fi
3378ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3379if test -n "$ac_ct_STRIP"; then
3380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3381$as_echo "$ac_ct_STRIP" >&6; }
3382else
3383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3384$as_echo "no" >&6; }
3385fi
3386
3387  if test "x$ac_ct_STRIP" = x; then
3388    STRIP=":"
3389  else
3390    case $cross_compiling:$ac_tool_warned in
3391yes:)
3392{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3393$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3394ac_tool_warned=yes ;;
3395esac
3396    STRIP=$ac_ct_STRIP
3397  fi
3398else
3399  STRIP="$ac_cv_prog_STRIP"
3400fi
3401
3402fi
3403INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
3404
3405# We need awk for the "check" target.  The system "awk" is bad on
3406# some platforms.
3407# Always define AMTAR for backward compatibility.
3408
3409AMTAR=${AMTAR-"${am_missing_run}tar"}
3410
3411am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
3412
3413
3414
3415
3416
3417cat >>confdefs.h <<_ACEOF
3418#define OPENLDAP_PACKAGE "$PACKAGE"
3419_ACEOF
3420
3421
3422cat >>confdefs.h <<_ACEOF
3423#define OPENLDAP_VERSION "$VERSION"
3424_ACEOF
3425
3426
3427
3428cat >>confdefs.h <<_ACEOF
3429#define LDAP_VENDOR_VERSION $OL_API_INC
3430_ACEOF
3431
3432
3433cat >>confdefs.h <<_ACEOF
3434#define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
3435_ACEOF
3436
3437
3438cat >>confdefs.h <<_ACEOF
3439#define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
3440_ACEOF
3441
3442
3443cat >>confdefs.h <<_ACEOF
3444#define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
3445_ACEOF
3446
3447
3448OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
3449
3450OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
3451
3452OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
3453
3454
3455
3456
3457
3458ac_config_headers="$ac_config_headers include/portable.h:include/portable.hin"
3459
3460ac_config_headers="$ac_config_headers include/ldap_features.h:include/ldap_features.hin"
3461
3462ac_config_headers="$ac_config_headers include/lber_types.h:include/lber_types.hin"
3463
3464
3465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking configure arguments" >&5
3466$as_echo_n "checking configure arguments... " >&6; }
3467
3468
3469top_builddir=`pwd`
3470
3471ldap_subdir="/openldap"
3472
3473
3474# Check whether --with-subdir was given.
3475if test "${with_subdir+set}" = set; then :
3476  withval=$with_subdir; case "$withval" in
3477	no) ldap_subdir=""
3478		;;
3479	yes)
3480		;;
3481	/*|\\*)
3482		ldap_subdir="$withval"
3483		;;
3484	*)
3485		ldap_subdir="/$withval"
3486		;;
3487esac
3488
3489fi
3490
3491
3492# OpenLDAP --enable-debug
3493
3494	# Check whether --enable-debug was given.
3495if test "${enable_debug+set}" = set; then :
3496  enableval=$enable_debug;
3497	ol_arg=invalid
3498	for ol_val in no yes traditional ; do
3499		if test "$enableval" = "$ol_val" ; then
3500			ol_arg="$ol_val"
3501		fi
3502	done
3503	if test "$ol_arg" = "invalid" ; then
3504		as_fn_error "bad value $enableval for --enable-debug" "$LINENO" 5
3505	fi
3506	ol_enable_debug="$ol_arg"
3507
3508else
3509  	ol_enable_debug=yes
3510fi
3511
3512# end --enable-debug
3513# OpenLDAP --enable-dynamic
3514
3515	# Check whether --enable-dynamic was given.
3516if test "${enable_dynamic+set}" = set; then :
3517  enableval=$enable_dynamic;
3518	ol_arg=invalid
3519	for ol_val in auto yes no ; do
3520		if test "$enableval" = "$ol_val" ; then
3521			ol_arg="$ol_val"
3522		fi
3523	done
3524	if test "$ol_arg" = "invalid" ; then
3525		as_fn_error "bad value $enableval for --enable-dynamic" "$LINENO" 5
3526	fi
3527	ol_enable_dynamic="$ol_arg"
3528
3529else
3530  	ol_enable_dynamic=no
3531fi
3532
3533# end --enable-dynamic
3534# OpenLDAP --enable-syslog
3535
3536	# Check whether --enable-syslog was given.
3537if test "${enable_syslog+set}" = set; then :
3538  enableval=$enable_syslog;
3539	ol_arg=invalid
3540	for ol_val in auto yes no ; do
3541		if test "$enableval" = "$ol_val" ; then
3542			ol_arg="$ol_val"
3543		fi
3544	done
3545	if test "$ol_arg" = "invalid" ; then
3546		as_fn_error "bad value $enableval for --enable-syslog" "$LINENO" 5
3547	fi
3548	ol_enable_syslog="$ol_arg"
3549
3550else
3551  	ol_enable_syslog=auto
3552fi
3553
3554# end --enable-syslog
3555# OpenLDAP --enable-proctitle
3556
3557	# Check whether --enable-proctitle was given.
3558if test "${enable_proctitle+set}" = set; then :
3559  enableval=$enable_proctitle;
3560	ol_arg=invalid
3561	for ol_val in auto yes no ; do
3562		if test "$enableval" = "$ol_val" ; then
3563			ol_arg="$ol_val"
3564		fi
3565	done
3566	if test "$ol_arg" = "invalid" ; then
3567		as_fn_error "bad value $enableval for --enable-proctitle" "$LINENO" 5
3568	fi
3569	ol_enable_proctitle="$ol_arg"
3570
3571else
3572  	ol_enable_proctitle=yes
3573fi
3574
3575# end --enable-proctitle
3576ol_enable_referrals=${ol_enable_referrals-no}
3577# OpenLDAP --enable-ipv6
3578
3579	# Check whether --enable-ipv6 was given.
3580if test "${enable_ipv6+set}" = set; then :
3581  enableval=$enable_ipv6;
3582	ol_arg=invalid
3583	for ol_val in auto yes no ; do
3584		if test "$enableval" = "$ol_val" ; then
3585			ol_arg="$ol_val"
3586		fi
3587	done
3588	if test "$ol_arg" = "invalid" ; then
3589		as_fn_error "bad value $enableval for --enable-ipv6" "$LINENO" 5
3590	fi
3591	ol_enable_ipv6="$ol_arg"
3592
3593else
3594  	ol_enable_ipv6=auto
3595fi
3596
3597# end --enable-ipv6
3598# OpenLDAP --enable-local
3599
3600	# Check whether --enable-local was given.
3601if test "${enable_local+set}" = set; then :
3602  enableval=$enable_local;
3603	ol_arg=invalid
3604	for ol_val in auto yes no ; do
3605		if test "$enableval" = "$ol_val" ; then
3606			ol_arg="$ol_val"
3607		fi
3608	done
3609	if test "$ol_arg" = "invalid" ; then
3610		as_fn_error "bad value $enableval for --enable-local" "$LINENO" 5
3611	fi
3612	ol_enable_local="$ol_arg"
3613
3614else
3615  	ol_enable_local=auto
3616fi
3617
3618# end --enable-local
3619
3620# OpenLDAP --with-cyrus_sasl
3621
3622# Check whether --with-cyrus_sasl was given.
3623if test "${with_cyrus_sasl+set}" = set; then :
3624  withval=$with_cyrus_sasl;
3625	ol_arg=invalid
3626	for ol_val in auto yes no  ; do
3627		if test "$withval" = "$ol_val" ; then
3628			ol_arg="$ol_val"
3629		fi
3630	done
3631	if test "$ol_arg" = "invalid" ; then
3632		as_fn_error "bad value $withval for --with-cyrus_sasl" "$LINENO" 5
3633	fi
3634	ol_with_cyrus_sasl="$ol_arg"
3635
3636else
3637  	ol_with_cyrus_sasl="auto"
3638fi
3639# end --with-cyrus_sasl
3640
3641# OpenLDAP --with-fetch
3642
3643# Check whether --with-fetch was given.
3644if test "${with_fetch+set}" = set; then :
3645  withval=$with_fetch;
3646	ol_arg=invalid
3647	for ol_val in auto yes no  ; do
3648		if test "$withval" = "$ol_val" ; then
3649			ol_arg="$ol_val"
3650		fi
3651	done
3652	if test "$ol_arg" = "invalid" ; then
3653		as_fn_error "bad value $withval for --with-fetch" "$LINENO" 5
3654	fi
3655	ol_with_fetch="$ol_arg"
3656
3657else
3658  	ol_with_fetch="auto"
3659fi
3660# end --with-fetch
3661
3662# OpenLDAP --with-threads
3663
3664# Check whether --with-threads was given.
3665if test "${with_threads+set}" = set; then :
3666  withval=$with_threads;
3667	ol_arg=invalid
3668	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
3669		if test "$withval" = "$ol_val" ; then
3670			ol_arg="$ol_val"
3671		fi
3672	done
3673	if test "$ol_arg" = "invalid" ; then
3674		as_fn_error "bad value $withval for --with-threads" "$LINENO" 5
3675	fi
3676	ol_with_threads="$ol_arg"
3677
3678else
3679  	ol_with_threads="auto"
3680fi
3681# end --with-threads
3682
3683# OpenLDAP --with-tls
3684
3685# Check whether --with-tls was given.
3686if test "${with_tls+set}" = set; then :
3687  withval=$with_tls;
3688	ol_arg=invalid
3689	for ol_val in auto openssl gnutls moznss yes no  ; do
3690		if test "$withval" = "$ol_val" ; then
3691			ol_arg="$ol_val"
3692		fi
3693	done
3694	if test "$ol_arg" = "invalid" ; then
3695		as_fn_error "bad value $withval for --with-tls" "$LINENO" 5
3696	fi
3697	ol_with_tls="$ol_arg"
3698
3699else
3700  	ol_with_tls="auto"
3701fi
3702# end --with-tls
3703
3704# OpenLDAP --with-yielding_select
3705
3706# Check whether --with-yielding_select was given.
3707if test "${with_yielding_select+set}" = set; then :
3708  withval=$with_yielding_select;
3709	ol_arg=invalid
3710	for ol_val in auto yes no manual  ; do
3711		if test "$withval" = "$ol_val" ; then
3712			ol_arg="$ol_val"
3713		fi
3714	done
3715	if test "$ol_arg" = "invalid" ; then
3716		as_fn_error "bad value $withval for --with-yielding_select" "$LINENO" 5
3717	fi
3718	ol_with_yielding_select="$ol_arg"
3719
3720else
3721  	ol_with_yielding_select="auto"
3722fi
3723# end --with-yielding_select
3724
3725# OpenLDAP --with-mp
3726
3727# Check whether --with-mp was given.
3728if test "${with_mp+set}" = set; then :
3729  withval=$with_mp;
3730	ol_arg=invalid
3731	for ol_val in auto longlong long bignum gmp yes no ; do
3732		if test "$withval" = "$ol_val" ; then
3733			ol_arg="$ol_val"
3734		fi
3735	done
3736	if test "$ol_arg" = "invalid" ; then
3737		as_fn_error "bad value $withval for --with-mp" "$LINENO" 5
3738	fi
3739	ol_with_mp="$ol_arg"
3740
3741else
3742  	ol_with_mp="auto"
3743fi
3744# end --with-mp
3745
3746# OpenLDAP --with-odbc
3747
3748# Check whether --with-odbc was given.
3749if test "${with_odbc+set}" = set; then :
3750  withval=$with_odbc;
3751	ol_arg=invalid
3752	for ol_val in auto iodbc unixodbc odbc32  ; do
3753		if test "$withval" = "$ol_val" ; then
3754			ol_arg="$ol_val"
3755		fi
3756	done
3757	if test "$ol_arg" = "invalid" ; then
3758		as_fn_error "bad value $withval for --with-odbc" "$LINENO" 5
3759	fi
3760	ol_with_odbc="$ol_arg"
3761
3762else
3763  	ol_with_odbc="auto"
3764fi
3765# end --with-odbc
3766
3767
3768
3769# Check whether --enable-xxslapdoptions was given.
3770if test "${enable_xxslapdoptions+set}" = set; then :
3771  enableval=$enable_xxslapdoptions;
3772fi
3773
3774# OpenLDAP --enable-slapd
3775
3776	# Check whether --enable-slapd was given.
3777if test "${enable_slapd+set}" = set; then :
3778  enableval=$enable_slapd;
3779	ol_arg=invalid
3780	for ol_val in auto yes no ; do
3781		if test "$enableval" = "$ol_val" ; then
3782			ol_arg="$ol_val"
3783		fi
3784	done
3785	if test "$ol_arg" = "invalid" ; then
3786		as_fn_error "bad value $enableval for --enable-slapd" "$LINENO" 5
3787	fi
3788	ol_enable_slapd="$ol_arg"
3789
3790else
3791  	ol_enable_slapd=yes
3792fi
3793
3794# end --enable-slapd
3795# OpenLDAP --enable-dynacl
3796
3797	# Check whether --enable-dynacl was given.
3798if test "${enable_dynacl+set}" = set; then :
3799  enableval=$enable_dynacl;
3800	ol_arg=invalid
3801	for ol_val in auto yes no ; do
3802		if test "$enableval" = "$ol_val" ; then
3803			ol_arg="$ol_val"
3804		fi
3805	done
3806	if test "$ol_arg" = "invalid" ; then
3807		as_fn_error "bad value $enableval for --enable-dynacl" "$LINENO" 5
3808	fi
3809	ol_enable_dynacl="$ol_arg"
3810
3811else
3812  	ol_enable_dynacl=no
3813fi
3814
3815# end --enable-dynacl
3816# OpenLDAP --enable-aci
3817
3818	# Check whether --enable-aci was given.
3819if test "${enable_aci+set}" = set; then :
3820  enableval=$enable_aci;
3821	ol_arg=invalid
3822	for ol_val in no yes mod ; do
3823		if test "$enableval" = "$ol_val" ; then
3824			ol_arg="$ol_val"
3825		fi
3826	done
3827	if test "$ol_arg" = "invalid" ; then
3828		as_fn_error "bad value $enableval for --enable-aci" "$LINENO" 5
3829	fi
3830	ol_enable_aci="$ol_arg"
3831
3832else
3833  	ol_enable_aci=no
3834fi
3835
3836# end --enable-aci
3837# OpenLDAP --enable-cleartext
3838
3839	# Check whether --enable-cleartext was given.
3840if test "${enable_cleartext+set}" = set; then :
3841  enableval=$enable_cleartext;
3842	ol_arg=invalid
3843	for ol_val in auto yes no ; do
3844		if test "$enableval" = "$ol_val" ; then
3845			ol_arg="$ol_val"
3846		fi
3847	done
3848	if test "$ol_arg" = "invalid" ; then
3849		as_fn_error "bad value $enableval for --enable-cleartext" "$LINENO" 5
3850	fi
3851	ol_enable_cleartext="$ol_arg"
3852
3853else
3854  	ol_enable_cleartext=yes
3855fi
3856
3857# end --enable-cleartext
3858# OpenLDAP --enable-crypt
3859
3860	# Check whether --enable-crypt was given.
3861if test "${enable_crypt+set}" = set; then :
3862  enableval=$enable_crypt;
3863	ol_arg=invalid
3864	for ol_val in auto yes no ; do
3865		if test "$enableval" = "$ol_val" ; then
3866			ol_arg="$ol_val"
3867		fi
3868	done
3869	if test "$ol_arg" = "invalid" ; then
3870		as_fn_error "bad value $enableval for --enable-crypt" "$LINENO" 5
3871	fi
3872	ol_enable_crypt="$ol_arg"
3873
3874else
3875  	ol_enable_crypt=no
3876fi
3877
3878# end --enable-crypt
3879# OpenLDAP --enable-lmpasswd
3880
3881	# Check whether --enable-lmpasswd was given.
3882if test "${enable_lmpasswd+set}" = set; then :
3883  enableval=$enable_lmpasswd;
3884	ol_arg=invalid
3885	for ol_val in auto yes no ; do
3886		if test "$enableval" = "$ol_val" ; then
3887			ol_arg="$ol_val"
3888		fi
3889	done
3890	if test "$ol_arg" = "invalid" ; then
3891		as_fn_error "bad value $enableval for --enable-lmpasswd" "$LINENO" 5
3892	fi
3893	ol_enable_lmpasswd="$ol_arg"
3894
3895else
3896  	ol_enable_lmpasswd=no
3897fi
3898
3899# end --enable-lmpasswd
3900# OpenLDAP --enable-spasswd
3901
3902	# Check whether --enable-spasswd was given.
3903if test "${enable_spasswd+set}" = set; then :
3904  enableval=$enable_spasswd;
3905	ol_arg=invalid
3906	for ol_val in auto yes no ; do
3907		if test "$enableval" = "$ol_val" ; then
3908			ol_arg="$ol_val"
3909		fi
3910	done
3911	if test "$ol_arg" = "invalid" ; then
3912		as_fn_error "bad value $enableval for --enable-spasswd" "$LINENO" 5
3913	fi
3914	ol_enable_spasswd="$ol_arg"
3915
3916else
3917  	ol_enable_spasswd=no
3918fi
3919
3920# end --enable-spasswd
3921# OpenLDAP --enable-modules
3922
3923	# Check whether --enable-modules was given.
3924if test "${enable_modules+set}" = set; then :
3925  enableval=$enable_modules;
3926	ol_arg=invalid
3927	for ol_val in auto yes no ; do
3928		if test "$enableval" = "$ol_val" ; then
3929			ol_arg="$ol_val"
3930		fi
3931	done
3932	if test "$ol_arg" = "invalid" ; then
3933		as_fn_error "bad value $enableval for --enable-modules" "$LINENO" 5
3934	fi
3935	ol_enable_modules="$ol_arg"
3936
3937else
3938  	ol_enable_modules=no
3939fi
3940
3941# end --enable-modules
3942# OpenLDAP --enable-rewrite
3943
3944	# Check whether --enable-rewrite was given.
3945if test "${enable_rewrite+set}" = set; then :
3946  enableval=$enable_rewrite;
3947	ol_arg=invalid
3948	for ol_val in auto yes no ; do
3949		if test "$enableval" = "$ol_val" ; then
3950			ol_arg="$ol_val"
3951		fi
3952	done
3953	if test "$ol_arg" = "invalid" ; then
3954		as_fn_error "bad value $enableval for --enable-rewrite" "$LINENO" 5
3955	fi
3956	ol_enable_rewrite="$ol_arg"
3957
3958else
3959  	ol_enable_rewrite=auto
3960fi
3961
3962# end --enable-rewrite
3963# OpenLDAP --enable-rlookups
3964
3965	# Check whether --enable-rlookups was given.
3966if test "${enable_rlookups+set}" = set; then :
3967  enableval=$enable_rlookups;
3968	ol_arg=invalid
3969	for ol_val in auto yes no ; do
3970		if test "$enableval" = "$ol_val" ; then
3971			ol_arg="$ol_val"
3972		fi
3973	done
3974	if test "$ol_arg" = "invalid" ; then
3975		as_fn_error "bad value $enableval for --enable-rlookups" "$LINENO" 5
3976	fi
3977	ol_enable_rlookups="$ol_arg"
3978
3979else
3980  	ol_enable_rlookups=no
3981fi
3982
3983# end --enable-rlookups
3984# OpenLDAP --enable-slapi
3985
3986	# Check whether --enable-slapi was given.
3987if test "${enable_slapi+set}" = set; then :
3988  enableval=$enable_slapi;
3989	ol_arg=invalid
3990	for ol_val in auto yes no ; do
3991		if test "$enableval" = "$ol_val" ; then
3992			ol_arg="$ol_val"
3993		fi
3994	done
3995	if test "$ol_arg" = "invalid" ; then
3996		as_fn_error "bad value $enableval for --enable-slapi" "$LINENO" 5
3997	fi
3998	ol_enable_slapi="$ol_arg"
3999
4000else
4001  	ol_enable_slapi=no
4002fi
4003
4004# end --enable-slapi
4005# OpenLDAP --enable-slp
4006
4007	# Check whether --enable-slp was given.
4008if test "${enable_slp+set}" = set; then :
4009  enableval=$enable_slp;
4010	ol_arg=invalid
4011	for ol_val in auto yes no ; do
4012		if test "$enableval" = "$ol_val" ; then
4013			ol_arg="$ol_val"
4014		fi
4015	done
4016	if test "$ol_arg" = "invalid" ; then
4017		as_fn_error "bad value $enableval for --enable-slp" "$LINENO" 5
4018	fi
4019	ol_enable_slp="$ol_arg"
4020
4021else
4022  	ol_enable_slp=no
4023fi
4024
4025# end --enable-slp
4026# OpenLDAP --enable-wrappers
4027
4028	# Check whether --enable-wrappers was given.
4029if test "${enable_wrappers+set}" = set; then :
4030  enableval=$enable_wrappers;
4031	ol_arg=invalid
4032	for ol_val in auto yes no ; do
4033		if test "$enableval" = "$ol_val" ; then
4034			ol_arg="$ol_val"
4035		fi
4036	done
4037	if test "$ol_arg" = "invalid" ; then
4038		as_fn_error "bad value $enableval for --enable-wrappers" "$LINENO" 5
4039	fi
4040	ol_enable_wrappers="$ol_arg"
4041
4042else
4043  	ol_enable_wrappers=no
4044fi
4045
4046# end --enable-wrappers
4047
4048Backends="bdb \
4049	dnssrv \
4050	hdb \
4051	ldap \
4052	mdb \
4053	meta \
4054	monitor \
4055	ndb \
4056	null \
4057	passwd \
4058	perl \
4059	relay \
4060	shell \
4061	sock \
4062	sql"
4063
4064# Check whether --enable-xxslapbackends was given.
4065if test "${enable_xxslapbackends+set}" = set; then :
4066  enableval=$enable_xxslapbackends;
4067fi
4068
4069
4070# OpenLDAP --enable-backends
4071
4072	# Check whether --enable-backends was given.
4073if test "${enable_backends+set}" = set; then :
4074  enableval=$enable_backends;
4075	ol_arg=invalid
4076	for ol_val in no yes mod ; do
4077		if test "$enableval" = "$ol_val" ; then
4078			ol_arg="$ol_val"
4079		fi
4080	done
4081	if test "$ol_arg" = "invalid" ; then
4082		as_fn_error "bad value $enableval for --enable-backends" "$LINENO" 5
4083	fi
4084	ol_enable_backends="$ol_arg"
4085
4086fi
4087
4088# end --enable-backends
4089# OpenLDAP --enable-bdb
4090
4091	# Check whether --enable-bdb was given.
4092if test "${enable_bdb+set}" = set; then :
4093  enableval=$enable_bdb;
4094	ol_arg=invalid
4095	for ol_val in no yes mod ; do
4096		if test "$enableval" = "$ol_val" ; then
4097			ol_arg="$ol_val"
4098		fi
4099	done
4100	if test "$ol_arg" = "invalid" ; then
4101		as_fn_error "bad value $enableval for --enable-bdb" "$LINENO" 5
4102	fi
4103	ol_enable_bdb="$ol_arg"
4104
4105else
4106  	ol_enable_bdb=${ol_enable_backends:-yes}
4107fi
4108
4109# end --enable-bdb
4110# OpenLDAP --enable-dnssrv
4111
4112	# Check whether --enable-dnssrv was given.
4113if test "${enable_dnssrv+set}" = set; then :
4114  enableval=$enable_dnssrv;
4115	ol_arg=invalid
4116	for ol_val in no yes mod ; do
4117		if test "$enableval" = "$ol_val" ; then
4118			ol_arg="$ol_val"
4119		fi
4120	done
4121	if test "$ol_arg" = "invalid" ; then
4122		as_fn_error "bad value $enableval for --enable-dnssrv" "$LINENO" 5
4123	fi
4124	ol_enable_dnssrv="$ol_arg"
4125
4126else
4127  	ol_enable_dnssrv=${ol_enable_backends:-no}
4128fi
4129
4130# end --enable-dnssrv
4131# OpenLDAP --enable-hdb
4132
4133	# Check whether --enable-hdb was given.
4134if test "${enable_hdb+set}" = set; then :
4135  enableval=$enable_hdb;
4136	ol_arg=invalid
4137	for ol_val in no yes mod ; do
4138		if test "$enableval" = "$ol_val" ; then
4139			ol_arg="$ol_val"
4140		fi
4141	done
4142	if test "$ol_arg" = "invalid" ; then
4143		as_fn_error "bad value $enableval for --enable-hdb" "$LINENO" 5
4144	fi
4145	ol_enable_hdb="$ol_arg"
4146
4147else
4148  	ol_enable_hdb=${ol_enable_backends:-yes}
4149fi
4150
4151# end --enable-hdb
4152# OpenLDAP --enable-ldap
4153
4154	# Check whether --enable-ldap was given.
4155if test "${enable_ldap+set}" = set; then :
4156  enableval=$enable_ldap;
4157	ol_arg=invalid
4158	for ol_val in no yes mod ; do
4159		if test "$enableval" = "$ol_val" ; then
4160			ol_arg="$ol_val"
4161		fi
4162	done
4163	if test "$ol_arg" = "invalid" ; then
4164		as_fn_error "bad value $enableval for --enable-ldap" "$LINENO" 5
4165	fi
4166	ol_enable_ldap="$ol_arg"
4167
4168else
4169  	ol_enable_ldap=${ol_enable_backends:-no}
4170fi
4171
4172# end --enable-ldap
4173# OpenLDAP --enable-mdb
4174
4175	# Check whether --enable-mdb was given.
4176if test "${enable_mdb+set}" = set; then :
4177  enableval=$enable_mdb;
4178	ol_arg=invalid
4179	for ol_val in no yes mod ; do
4180		if test "$enableval" = "$ol_val" ; then
4181			ol_arg="$ol_val"
4182		fi
4183	done
4184	if test "$ol_arg" = "invalid" ; then
4185		as_fn_error "bad value $enableval for --enable-mdb" "$LINENO" 5
4186	fi
4187	ol_enable_mdb="$ol_arg"
4188
4189else
4190  	ol_enable_mdb=${ol_enable_backends:-yes}
4191fi
4192
4193# end --enable-mdb
4194# OpenLDAP --enable-meta
4195
4196	# Check whether --enable-meta was given.
4197if test "${enable_meta+set}" = set; then :
4198  enableval=$enable_meta;
4199	ol_arg=invalid
4200	for ol_val in no yes mod ; do
4201		if test "$enableval" = "$ol_val" ; then
4202			ol_arg="$ol_val"
4203		fi
4204	done
4205	if test "$ol_arg" = "invalid" ; then
4206		as_fn_error "bad value $enableval for --enable-meta" "$LINENO" 5
4207	fi
4208	ol_enable_meta="$ol_arg"
4209
4210else
4211  	ol_enable_meta=${ol_enable_backends:-no}
4212fi
4213
4214# end --enable-meta
4215# OpenLDAP --enable-monitor
4216
4217	# Check whether --enable-monitor was given.
4218if test "${enable_monitor+set}" = set; then :
4219  enableval=$enable_monitor;
4220	ol_arg=invalid
4221	for ol_val in no yes mod ; do
4222		if test "$enableval" = "$ol_val" ; then
4223			ol_arg="$ol_val"
4224		fi
4225	done
4226	if test "$ol_arg" = "invalid" ; then
4227		as_fn_error "bad value $enableval for --enable-monitor" "$LINENO" 5
4228	fi
4229	ol_enable_monitor="$ol_arg"
4230
4231else
4232  	ol_enable_monitor=${ol_enable_backends:-yes}
4233fi
4234
4235# end --enable-monitor
4236# OpenLDAP --enable-ndb
4237
4238	# Check whether --enable-ndb was given.
4239if test "${enable_ndb+set}" = set; then :
4240  enableval=$enable_ndb;
4241	ol_arg=invalid
4242	for ol_val in no yes mod ; do
4243		if test "$enableval" = "$ol_val" ; then
4244			ol_arg="$ol_val"
4245		fi
4246	done
4247	if test "$ol_arg" = "invalid" ; then
4248		as_fn_error "bad value $enableval for --enable-ndb" "$LINENO" 5
4249	fi
4250	ol_enable_ndb="$ol_arg"
4251
4252else
4253  	ol_enable_ndb=${ol_enable_backends:-no}
4254fi
4255
4256# end --enable-ndb
4257# OpenLDAP --enable-null
4258
4259	# Check whether --enable-null was given.
4260if test "${enable_null+set}" = set; then :
4261  enableval=$enable_null;
4262	ol_arg=invalid
4263	for ol_val in no yes mod ; do
4264		if test "$enableval" = "$ol_val" ; then
4265			ol_arg="$ol_val"
4266		fi
4267	done
4268	if test "$ol_arg" = "invalid" ; then
4269		as_fn_error "bad value $enableval for --enable-null" "$LINENO" 5
4270	fi
4271	ol_enable_null="$ol_arg"
4272
4273else
4274  	ol_enable_null=${ol_enable_backends:-no}
4275fi
4276
4277# end --enable-null
4278# OpenLDAP --enable-passwd
4279
4280	# Check whether --enable-passwd was given.
4281if test "${enable_passwd+set}" = set; then :
4282  enableval=$enable_passwd;
4283	ol_arg=invalid
4284	for ol_val in no yes mod ; do
4285		if test "$enableval" = "$ol_val" ; then
4286			ol_arg="$ol_val"
4287		fi
4288	done
4289	if test "$ol_arg" = "invalid" ; then
4290		as_fn_error "bad value $enableval for --enable-passwd" "$LINENO" 5
4291	fi
4292	ol_enable_passwd="$ol_arg"
4293
4294else
4295  	ol_enable_passwd=${ol_enable_backends:-no}
4296fi
4297
4298# end --enable-passwd
4299# OpenLDAP --enable-perl
4300
4301	# Check whether --enable-perl was given.
4302if test "${enable_perl+set}" = set; then :
4303  enableval=$enable_perl;
4304	ol_arg=invalid
4305	for ol_val in no yes mod ; do
4306		if test "$enableval" = "$ol_val" ; then
4307			ol_arg="$ol_val"
4308		fi
4309	done
4310	if test "$ol_arg" = "invalid" ; then
4311		as_fn_error "bad value $enableval for --enable-perl" "$LINENO" 5
4312	fi
4313	ol_enable_perl="$ol_arg"
4314
4315else
4316  	ol_enable_perl=${ol_enable_backends:-no}
4317fi
4318
4319# end --enable-perl
4320# OpenLDAP --enable-relay
4321
4322	# Check whether --enable-relay was given.
4323if test "${enable_relay+set}" = set; then :
4324  enableval=$enable_relay;
4325	ol_arg=invalid
4326	for ol_val in no yes mod ; do
4327		if test "$enableval" = "$ol_val" ; then
4328			ol_arg="$ol_val"
4329		fi
4330	done
4331	if test "$ol_arg" = "invalid" ; then
4332		as_fn_error "bad value $enableval for --enable-relay" "$LINENO" 5
4333	fi
4334	ol_enable_relay="$ol_arg"
4335
4336else
4337  	ol_enable_relay=${ol_enable_backends:-yes}
4338fi
4339
4340# end --enable-relay
4341# OpenLDAP --enable-shell
4342
4343	# Check whether --enable-shell was given.
4344if test "${enable_shell+set}" = set; then :
4345  enableval=$enable_shell;
4346	ol_arg=invalid
4347	for ol_val in no yes mod ; do
4348		if test "$enableval" = "$ol_val" ; then
4349			ol_arg="$ol_val"
4350		fi
4351	done
4352	if test "$ol_arg" = "invalid" ; then
4353		as_fn_error "bad value $enableval for --enable-shell" "$LINENO" 5
4354	fi
4355	ol_enable_shell="$ol_arg"
4356
4357else
4358  	ol_enable_shell=${ol_enable_backends:-no}
4359fi
4360
4361# end --enable-shell
4362# OpenLDAP --enable-sock
4363
4364	# Check whether --enable-sock was given.
4365if test "${enable_sock+set}" = set; then :
4366  enableval=$enable_sock;
4367	ol_arg=invalid
4368	for ol_val in no yes mod ; do
4369		if test "$enableval" = "$ol_val" ; then
4370			ol_arg="$ol_val"
4371		fi
4372	done
4373	if test "$ol_arg" = "invalid" ; then
4374		as_fn_error "bad value $enableval for --enable-sock" "$LINENO" 5
4375	fi
4376	ol_enable_sock="$ol_arg"
4377
4378else
4379  	ol_enable_sock=${ol_enable_backends:-no}
4380fi
4381
4382# end --enable-sock
4383# OpenLDAP --enable-sql
4384
4385	# Check whether --enable-sql was given.
4386if test "${enable_sql+set}" = set; then :
4387  enableval=$enable_sql;
4388	ol_arg=invalid
4389	for ol_val in no yes mod ; do
4390		if test "$enableval" = "$ol_val" ; then
4391			ol_arg="$ol_val"
4392		fi
4393	done
4394	if test "$ol_arg" = "invalid" ; then
4395		as_fn_error "bad value $enableval for --enable-sql" "$LINENO" 5
4396	fi
4397	ol_enable_sql="$ol_arg"
4398
4399else
4400  	ol_enable_sql=${ol_enable_backends:-no}
4401fi
4402
4403# end --enable-sql
4404
4405Overlays="accesslog \
4406	auditlog \
4407	collect \
4408	constraint \
4409	dds \
4410	deref \
4411	dyngroup \
4412	dynlist \
4413	memberof \
4414	ppolicy \
4415	proxycache \
4416	refint \
4417	retcode \
4418	rwm \
4419	seqmod \
4420	sssvlv \
4421	syncprov \
4422	translucent \
4423	unique \
4424	valsort"
4425
4426# Check whether --enable-xxslapoverlays was given.
4427if test "${enable_xxslapoverlays+set}" = set; then :
4428  enableval=$enable_xxslapoverlays;
4429fi
4430
4431
4432# OpenLDAP --enable-overlays
4433
4434	# Check whether --enable-overlays was given.
4435if test "${enable_overlays+set}" = set; then :
4436  enableval=$enable_overlays;
4437	ol_arg=invalid
4438	for ol_val in no yes mod ; do
4439		if test "$enableval" = "$ol_val" ; then
4440			ol_arg="$ol_val"
4441		fi
4442	done
4443	if test "$ol_arg" = "invalid" ; then
4444		as_fn_error "bad value $enableval for --enable-overlays" "$LINENO" 5
4445	fi
4446	ol_enable_overlays="$ol_arg"
4447
4448fi
4449
4450# end --enable-overlays
4451# OpenLDAP --enable-accesslog
4452
4453	# Check whether --enable-accesslog was given.
4454if test "${enable_accesslog+set}" = set; then :
4455  enableval=$enable_accesslog;
4456	ol_arg=invalid
4457	for ol_val in no yes mod ; do
4458		if test "$enableval" = "$ol_val" ; then
4459			ol_arg="$ol_val"
4460		fi
4461	done
4462	if test "$ol_arg" = "invalid" ; then
4463		as_fn_error "bad value $enableval for --enable-accesslog" "$LINENO" 5
4464	fi
4465	ol_enable_accesslog="$ol_arg"
4466
4467else
4468  	ol_enable_accesslog=${ol_enable_overlays:-no}
4469fi
4470
4471# end --enable-accesslog
4472
4473# OpenLDAP --enable-auditlog
4474
4475	# Check whether --enable-auditlog was given.
4476if test "${enable_auditlog+set}" = set; then :
4477  enableval=$enable_auditlog;
4478	ol_arg=invalid
4479	for ol_val in no yes mod ; do
4480		if test "$enableval" = "$ol_val" ; then
4481			ol_arg="$ol_val"
4482		fi
4483	done
4484	if test "$ol_arg" = "invalid" ; then
4485		as_fn_error "bad value $enableval for --enable-auditlog" "$LINENO" 5
4486	fi
4487	ol_enable_auditlog="$ol_arg"
4488
4489else
4490  	ol_enable_auditlog=${ol_enable_overlays:-no}
4491fi
4492
4493# end --enable-auditlog
4494
4495# OpenLDAP --enable-collect
4496
4497	# Check whether --enable-collect was given.
4498if test "${enable_collect+set}" = set; then :
4499  enableval=$enable_collect;
4500	ol_arg=invalid
4501	for ol_val in no yes mod ; do
4502		if test "$enableval" = "$ol_val" ; then
4503			ol_arg="$ol_val"
4504		fi
4505	done
4506	if test "$ol_arg" = "invalid" ; then
4507		as_fn_error "bad value $enableval for --enable-collect" "$LINENO" 5
4508	fi
4509	ol_enable_collect="$ol_arg"
4510
4511else
4512  	ol_enable_collect=${ol_enable_overlays:-no}
4513fi
4514
4515# end --enable-collect
4516
4517# OpenLDAP --enable-constraint
4518
4519	# Check whether --enable-constraint was given.
4520if test "${enable_constraint+set}" = set; then :
4521  enableval=$enable_constraint;
4522	ol_arg=invalid
4523	for ol_val in no yes mod ; do
4524		if test "$enableval" = "$ol_val" ; then
4525			ol_arg="$ol_val"
4526		fi
4527	done
4528	if test "$ol_arg" = "invalid" ; then
4529		as_fn_error "bad value $enableval for --enable-constraint" "$LINENO" 5
4530	fi
4531	ol_enable_constraint="$ol_arg"
4532
4533else
4534  	ol_enable_constraint=${ol_enable_overlays:-no}
4535fi
4536
4537# end --enable-constraint
4538
4539# OpenLDAP --enable-dds
4540
4541	# Check whether --enable-dds was given.
4542if test "${enable_dds+set}" = set; then :
4543  enableval=$enable_dds;
4544	ol_arg=invalid
4545	for ol_val in no yes mod ; do
4546		if test "$enableval" = "$ol_val" ; then
4547			ol_arg="$ol_val"
4548		fi
4549	done
4550	if test "$ol_arg" = "invalid" ; then
4551		as_fn_error "bad value $enableval for --enable-dds" "$LINENO" 5
4552	fi
4553	ol_enable_dds="$ol_arg"
4554
4555else
4556  	ol_enable_dds=${ol_enable_overlays:-no}
4557fi
4558
4559# end --enable-dds
4560
4561# OpenLDAP --enable-deref
4562
4563	# Check whether --enable-deref was given.
4564if test "${enable_deref+set}" = set; then :
4565  enableval=$enable_deref;
4566	ol_arg=invalid
4567	for ol_val in no yes mod ; do
4568		if test "$enableval" = "$ol_val" ; then
4569			ol_arg="$ol_val"
4570		fi
4571	done
4572	if test "$ol_arg" = "invalid" ; then
4573		as_fn_error "bad value $enableval for --enable-deref" "$LINENO" 5
4574	fi
4575	ol_enable_deref="$ol_arg"
4576
4577else
4578  	ol_enable_deref=${ol_enable_overlays:-no}
4579fi
4580
4581# end --enable-deref
4582
4583# OpenLDAP --enable-dyngroup
4584
4585	# Check whether --enable-dyngroup was given.
4586if test "${enable_dyngroup+set}" = set; then :
4587  enableval=$enable_dyngroup;
4588	ol_arg=invalid
4589	for ol_val in no yes mod ; do
4590		if test "$enableval" = "$ol_val" ; then
4591			ol_arg="$ol_val"
4592		fi
4593	done
4594	if test "$ol_arg" = "invalid" ; then
4595		as_fn_error "bad value $enableval for --enable-dyngroup" "$LINENO" 5
4596	fi
4597	ol_enable_dyngroup="$ol_arg"
4598
4599else
4600  	ol_enable_dyngroup=${ol_enable_overlays:-no}
4601fi
4602
4603# end --enable-dyngroup
4604
4605# OpenLDAP --enable-dynlist
4606
4607	# Check whether --enable-dynlist was given.
4608if test "${enable_dynlist+set}" = set; then :
4609  enableval=$enable_dynlist;
4610	ol_arg=invalid
4611	for ol_val in no yes mod ; do
4612		if test "$enableval" = "$ol_val" ; then
4613			ol_arg="$ol_val"
4614		fi
4615	done
4616	if test "$ol_arg" = "invalid" ; then
4617		as_fn_error "bad value $enableval for --enable-dynlist" "$LINENO" 5
4618	fi
4619	ol_enable_dynlist="$ol_arg"
4620
4621else
4622  	ol_enable_dynlist=${ol_enable_overlays:-no}
4623fi
4624
4625# end --enable-dynlist
4626
4627# OpenLDAP --enable-memberof
4628
4629	# Check whether --enable-memberof was given.
4630if test "${enable_memberof+set}" = set; then :
4631  enableval=$enable_memberof;
4632	ol_arg=invalid
4633	for ol_val in no yes mod ; do
4634		if test "$enableval" = "$ol_val" ; then
4635			ol_arg="$ol_val"
4636		fi
4637	done
4638	if test "$ol_arg" = "invalid" ; then
4639		as_fn_error "bad value $enableval for --enable-memberof" "$LINENO" 5
4640	fi
4641	ol_enable_memberof="$ol_arg"
4642
4643else
4644  	ol_enable_memberof=${ol_enable_overlays:-no}
4645fi
4646
4647# end --enable-memberof
4648
4649# OpenLDAP --enable-ppolicy
4650
4651	# Check whether --enable-ppolicy was given.
4652if test "${enable_ppolicy+set}" = set; then :
4653  enableval=$enable_ppolicy;
4654	ol_arg=invalid
4655	for ol_val in no yes mod ; do
4656		if test "$enableval" = "$ol_val" ; then
4657			ol_arg="$ol_val"
4658		fi
4659	done
4660	if test "$ol_arg" = "invalid" ; then
4661		as_fn_error "bad value $enableval for --enable-ppolicy" "$LINENO" 5
4662	fi
4663	ol_enable_ppolicy="$ol_arg"
4664
4665else
4666  	ol_enable_ppolicy=${ol_enable_overlays:-no}
4667fi
4668
4669# end --enable-ppolicy
4670
4671# OpenLDAP --enable-proxycache
4672
4673	# Check whether --enable-proxycache was given.
4674if test "${enable_proxycache+set}" = set; then :
4675  enableval=$enable_proxycache;
4676	ol_arg=invalid
4677	for ol_val in no yes mod ; do
4678		if test "$enableval" = "$ol_val" ; then
4679			ol_arg="$ol_val"
4680		fi
4681	done
4682	if test "$ol_arg" = "invalid" ; then
4683		as_fn_error "bad value $enableval for --enable-proxycache" "$LINENO" 5
4684	fi
4685	ol_enable_proxycache="$ol_arg"
4686
4687else
4688  	ol_enable_proxycache=${ol_enable_overlays:-no}
4689fi
4690
4691# end --enable-proxycache
4692
4693# OpenLDAP --enable-refint
4694
4695	# Check whether --enable-refint was given.
4696if test "${enable_refint+set}" = set; then :
4697  enableval=$enable_refint;
4698	ol_arg=invalid
4699	for ol_val in no yes mod ; do
4700		if test "$enableval" = "$ol_val" ; then
4701			ol_arg="$ol_val"
4702		fi
4703	done
4704	if test "$ol_arg" = "invalid" ; then
4705		as_fn_error "bad value $enableval for --enable-refint" "$LINENO" 5
4706	fi
4707	ol_enable_refint="$ol_arg"
4708
4709else
4710  	ol_enable_refint=${ol_enable_overlays:-no}
4711fi
4712
4713# end --enable-refint
4714
4715# OpenLDAP --enable-retcode
4716
4717	# Check whether --enable-retcode was given.
4718if test "${enable_retcode+set}" = set; then :
4719  enableval=$enable_retcode;
4720	ol_arg=invalid
4721	for ol_val in no yes mod ; do
4722		if test "$enableval" = "$ol_val" ; then
4723			ol_arg="$ol_val"
4724		fi
4725	done
4726	if test "$ol_arg" = "invalid" ; then
4727		as_fn_error "bad value $enableval for --enable-retcode" "$LINENO" 5
4728	fi
4729	ol_enable_retcode="$ol_arg"
4730
4731else
4732  	ol_enable_retcode=${ol_enable_overlays:-no}
4733fi
4734
4735# end --enable-retcode
4736
4737# OpenLDAP --enable-rwm
4738
4739	# Check whether --enable-rwm was given.
4740if test "${enable_rwm+set}" = set; then :
4741  enableval=$enable_rwm;
4742	ol_arg=invalid
4743	for ol_val in no yes mod ; do
4744		if test "$enableval" = "$ol_val" ; then
4745			ol_arg="$ol_val"
4746		fi
4747	done
4748	if test "$ol_arg" = "invalid" ; then
4749		as_fn_error "bad value $enableval for --enable-rwm" "$LINENO" 5
4750	fi
4751	ol_enable_rwm="$ol_arg"
4752
4753else
4754  	ol_enable_rwm=${ol_enable_overlays:-no}
4755fi
4756
4757# end --enable-rwm
4758
4759# OpenLDAP --enable-seqmod
4760
4761	# Check whether --enable-seqmod was given.
4762if test "${enable_seqmod+set}" = set; then :
4763  enableval=$enable_seqmod;
4764	ol_arg=invalid
4765	for ol_val in no yes mod ; do
4766		if test "$enableval" = "$ol_val" ; then
4767			ol_arg="$ol_val"
4768		fi
4769	done
4770	if test "$ol_arg" = "invalid" ; then
4771		as_fn_error "bad value $enableval for --enable-seqmod" "$LINENO" 5
4772	fi
4773	ol_enable_seqmod="$ol_arg"
4774
4775else
4776  	ol_enable_seqmod=${ol_enable_overlays:-no}
4777fi
4778
4779# end --enable-seqmod
4780
4781# OpenLDAP --enable-sssvlv
4782
4783	# Check whether --enable-sssvlv was given.
4784if test "${enable_sssvlv+set}" = set; then :
4785  enableval=$enable_sssvlv;
4786	ol_arg=invalid
4787	for ol_val in no yes mod ; do
4788		if test "$enableval" = "$ol_val" ; then
4789			ol_arg="$ol_val"
4790		fi
4791	done
4792	if test "$ol_arg" = "invalid" ; then
4793		as_fn_error "bad value $enableval for --enable-sssvlv" "$LINENO" 5
4794	fi
4795	ol_enable_sssvlv="$ol_arg"
4796
4797else
4798  	ol_enable_sssvlv=${ol_enable_overlays:-no}
4799fi
4800
4801# end --enable-sssvlv
4802
4803# OpenLDAP --enable-syncprov
4804
4805	# Check whether --enable-syncprov was given.
4806if test "${enable_syncprov+set}" = set; then :
4807  enableval=$enable_syncprov;
4808	ol_arg=invalid
4809	for ol_val in no yes mod ; do
4810		if test "$enableval" = "$ol_val" ; then
4811			ol_arg="$ol_val"
4812		fi
4813	done
4814	if test "$ol_arg" = "invalid" ; then
4815		as_fn_error "bad value $enableval for --enable-syncprov" "$LINENO" 5
4816	fi
4817	ol_enable_syncprov="$ol_arg"
4818
4819else
4820  	ol_enable_syncprov=${ol_enable_overlays:-yes}
4821fi
4822
4823# end --enable-syncprov
4824
4825# OpenLDAP --enable-translucent
4826
4827	# Check whether --enable-translucent was given.
4828if test "${enable_translucent+set}" = set; then :
4829  enableval=$enable_translucent;
4830	ol_arg=invalid
4831	for ol_val in no yes mod ; do
4832		if test "$enableval" = "$ol_val" ; then
4833			ol_arg="$ol_val"
4834		fi
4835	done
4836	if test "$ol_arg" = "invalid" ; then
4837		as_fn_error "bad value $enableval for --enable-translucent" "$LINENO" 5
4838	fi
4839	ol_enable_translucent="$ol_arg"
4840
4841else
4842  	ol_enable_translucent=${ol_enable_overlays:-no}
4843fi
4844
4845# end --enable-translucent
4846
4847# OpenLDAP --enable-unique
4848
4849	# Check whether --enable-unique was given.
4850if test "${enable_unique+set}" = set; then :
4851  enableval=$enable_unique;
4852	ol_arg=invalid
4853	for ol_val in no yes mod ; do
4854		if test "$enableval" = "$ol_val" ; then
4855			ol_arg="$ol_val"
4856		fi
4857	done
4858	if test "$ol_arg" = "invalid" ; then
4859		as_fn_error "bad value $enableval for --enable-unique" "$LINENO" 5
4860	fi
4861	ol_enable_unique="$ol_arg"
4862
4863else
4864  	ol_enable_unique=${ol_enable_overlays:-no}
4865fi
4866
4867# end --enable-unique
4868
4869# OpenLDAP --enable-valsort
4870
4871	# Check whether --enable-valsort was given.
4872if test "${enable_valsort+set}" = set; then :
4873  enableval=$enable_valsort;
4874	ol_arg=invalid
4875	for ol_val in no yes mod ; do
4876		if test "$enableval" = "$ol_val" ; then
4877			ol_arg="$ol_val"
4878		fi
4879	done
4880	if test "$ol_arg" = "invalid" ; then
4881		as_fn_error "bad value $enableval for --enable-valsort" "$LINENO" 5
4882	fi
4883	ol_enable_valsort="$ol_arg"
4884
4885else
4886  	ol_enable_valsort=${ol_enable_overlays:-no}
4887fi
4888
4889# end --enable-valsort
4890
4891
4892# Check whether --enable-xxliboptions was given.
4893if test "${enable_xxliboptions+set}" = set; then :
4894  enableval=$enable_xxliboptions;
4895fi
4896
4897# Check whether --enable-static was given.
4898if test "${enable_static+set}" = set; then :
4899  enableval=$enable_static; p=${PACKAGE-default}
4900    case $enableval in
4901    yes) enable_static=yes ;;
4902    no) enable_static=no ;;
4903    *)
4904     enable_static=no
4905      # Look at the argument we got.  We use all the common list separators.
4906      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4907      for pkg in $enableval; do
4908	IFS="$lt_save_ifs"
4909	if test "X$pkg" = "X$p"; then
4910	  enable_static=yes
4911	fi
4912      done
4913      IFS="$lt_save_ifs"
4914      ;;
4915    esac
4916else
4917  enable_static=yes
4918fi
4919
4920
4921# Check whether --enable-shared was given.
4922if test "${enable_shared+set}" = set; then :
4923  enableval=$enable_shared; p=${PACKAGE-default}
4924    case $enableval in
4925    yes) enable_shared=yes ;;
4926    no) enable_shared=no ;;
4927    *)
4928      enable_shared=no
4929      # Look at the argument we got.  We use all the common list separators.
4930      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
4931      for pkg in $enableval; do
4932	IFS="$lt_save_ifs"
4933	if test "X$pkg" = "X$p"; then
4934	  enable_shared=yes
4935	fi
4936      done
4937      IFS="$lt_save_ifs"
4938      ;;
4939    esac
4940else
4941  enable_shared=yes
4942fi
4943
4944
4945
4946
4947# validate options
4948if test $ol_enable_slapd = no ; then
4949		if test $ol_enable_slapi = yes ; then
4950		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-slapi argument" >&5
4951$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-slapi argument" >&2;}
4952	fi
4953	case "$ol_enable_backends" in yes | mod)
4954		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-backends argument" >&5
4955$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-backends argument" >&2;}
4956	esac
4957	for i in $Backends; do
4958		eval "ol_tmp=\$ol_enable_$i"
4959		if test $ol_tmp != no ; then
4960			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4961$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4962			eval "ol_enable_$i=no"
4963		fi
4964	done
4965	if test $ol_enable_modules = yes ; then
4966		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-modules argument" >&5
4967$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-modules argument" >&2;}
4968	fi
4969	if test $ol_enable_wrappers = yes ; then
4970		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&5
4971$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-wrappers argument" >&2;}
4972	fi
4973	if test $ol_enable_rlookups = yes ; then
4974		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&5
4975$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rlookups argument" >&2;}
4976	fi
4977	if test $ol_enable_dynacl = yes ; then
4978		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&5
4979$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-dynacl argument" >&2;}
4980	fi
4981	if test $ol_enable_aci != no ; then
4982		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-aci argument" >&5
4983$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-aci argument" >&2;}
4984	fi
4985	if test $ol_enable_rewrite = yes ; then
4986		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&5
4987$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-rewrite argument" >&2;}
4988	fi
4989		case "$ol_enable_overlays" in yes | mod)
4990		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-overlays argument" >&5
4991$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-overlays argument" >&2;}
4992	esac
4993	for i in $Overlays; do
4994		eval "ol_tmp=\$ol_enable_$i"
4995		if test $ol_tmp != no ; then
4996			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: slapd disabled, ignoring --enable-$i argument" >&5
4997$as_echo "$as_me: WARNING: slapd disabled, ignoring --enable-$i argument" >&2;}
4998			eval "ol_enable_$i=no"
4999		fi
5000	done
5001
5002	# force settings to no
5003	ol_enable_slapi=no
5004
5005	ol_enable_backends=
5006	ol_enable_overlays=
5007	ol_enable_modules=no
5008	ol_enable_rlookups=no
5009	ol_enable_dynacl=no
5010	ol_enable_aci=no
5011	ol_enable_wrappers=no
5012
5013	ol_enable_rewrite=no
5014
5015elif test $ol_enable_modules != yes &&
5016	test $ol_enable_bdb = no &&
5017	test $ol_enable_dnssrv = no &&
5018	test $ol_enable_hdb = no &&
5019	test $ol_enable_ldap = no &&
5020	test $ol_enable_mdb = no &&
5021	test $ol_enable_meta = no &&
5022	test $ol_enable_monitor = no &&
5023	test $ol_enable_ndb = no &&
5024	test $ol_enable_null = no &&
5025	test $ol_enable_passwd = no &&
5026	test $ol_enable_perl = no &&
5027	test $ol_enable_relay = no &&
5028	test $ol_enable_shell = no &&
5029	test $ol_enable_sock = no &&
5030	test $ol_enable_sql = no ; then
5031
5032	if test $ol_enable_slapd = yes ; then
5033		as_fn_error "slapd requires a backend" "$LINENO" 5
5034	else
5035		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping slapd, no backend specified" >&5
5036$as_echo "$as_me: WARNING: skipping slapd, no backend specified" >&2;}
5037		ol_enable_slapd=no
5038	fi
5039fi
5040
5041if test $ol_enable_meta/$ol_enable_ldap = yes/no ; then
5042	as_fn_error "--enable-meta requires --enable-ldap" "$LINENO" 5
5043fi
5044
5045if test $ol_enable_lmpasswd = yes ; then
5046	if test $ol_with_tls = no ; then
5047		as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
5048	fi
5049fi
5050
5051if test $ol_enable_spasswd = yes ; then
5052	if test $ol_with_cyrus_sasl = no ; then
5053		as_fn_error "options require --with-cyrus-sasl" "$LINENO" 5
5054	fi
5055	ol_with_cyrus_sasl=yes
5056fi
5057
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
5059$as_echo "done" >&6; }
5060
5061LDAP_LIBS=
5062BDB_LIBS=
5063SLAPD_NDB_LIBS=
5064SLAPD_NDB_INCS=
5065LTHREAD_LIBS=
5066LUTIL_LIBS=
5067
5068SLAPD_LIBS=
5069
5070BUILD_SLAPD=no
5071
5072BUILD_THREAD=no
5073
5074BUILD_SLAPI=no
5075SLAPD_SLAPI_DEPEND=
5076
5077BUILD_BDB=no
5078BUILD_DNSSRV=no
5079BUILD_HDB=no
5080BUILD_LDAP=no
5081BUILD_MDB=no
5082BUILD_META=no
5083BUILD_MONITOR=no
5084BUILD_NDB=no
5085BUILD_NULL=no
5086BUILD_PASSWD=no
5087BUILD_PERL=no
5088BUILD_RELAY=no
5089BUILD_SHELL=no
5090BUILD_SOCK=no
5091BUILD_SQL=no
5092
5093BUILD_ACCESSLOG=no
5094BUILD_AUDITLOG=no
5095BUILD_CONSTRAINT=no
5096BUILD_DDS=no
5097BUILD_DENYOP=no
5098BUILD_DEREF=no
5099BUILD_DYNGROUP=no
5100BUILD_DYNLIST=no
5101BUILD_LASTMOD=no
5102BUILD_MEMBEROF=no
5103BUILD_PPOLICY=no
5104BUILD_PROXYCACHE=no
5105BUILD_REFINT=no
5106BUILD_RETCODE=no
5107BUILD_RWM=no
5108BUILD_SEQMOD=no
5109BUILD_SSSVLV=no
5110BUILD_SYNCPROV=no
5111BUILD_TRANSLUCENT=no
5112BUILD_UNIQUE=no
5113BUILD_VALSORT=no
5114
5115SLAPD_STATIC_OVERLAYS=
5116SLAPD_DYNAMIC_OVERLAYS=
5117
5118SLAPD_MODULES_LDFLAGS=
5119SLAPD_MODULES_CPPFLAGS=
5120
5121SLAPD_STATIC_BACKENDS=back-ldif
5122SLAPD_DYNAMIC_BACKENDS=
5123
5124SLAPD_PERL_LDFLAGS=
5125MOD_PERL_LDFLAGS=
5126PERL_CPPFLAGS=
5127
5128SLAPD_SQL_LDFLAGS=
5129SLAPD_SQL_LIBS=
5130SLAPD_SQL_INCLUDES=
5131
5132KRB4_LIBS=
5133KRB5_LIBS=
5134SASL_LIBS=
5135TLS_LIBS=
5136MODULES_LIBS=
5137SLAPI_LIBS=
5138LIBSLAPI=
5139AUTH_LIBS=
5140
5141SLAPD_SLP_LIBS=
5142SLAPD_GMP_LIBS=
5143
5144
5145
5146$as_echo "#define HAVE_MKVERSION 1" >>confdefs.h
5147
5148
5149
5150
5151ol_aix_threads=no
5152case "$target" in
5153*-*-aix*) 	if test -z "$CC" ; then
5154		case "$ol_with_threads" in
5155		auto | yes |  posix) ol_aix_threads=yes ;;
5156		esac
5157	fi
5158;;
5159esac
5160
5161if test $ol_aix_threads = yes ; then
5162	if test -z "${CC}" ; then
5163		for ac_prog in cc_r xlc_r cc
5164do
5165  # Extract the first word of "$ac_prog", so it can be a program name with args.
5166set dummy $ac_prog; ac_word=$2
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
5169if test "${ac_cv_prog_CC+set}" = set; then :
5170  $as_echo_n "(cached) " >&6
5171else
5172  if test -n "$CC"; then
5173  ac_cv_prog_CC="$CC" # Let the user override the test.
5174else
5175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5176for as_dir in $PATH
5177do
5178  IFS=$as_save_IFS
5179  test -z "$as_dir" && as_dir=.
5180    for ac_exec_ext in '' $ac_executable_extensions; do
5181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5182    ac_cv_prog_CC="$ac_prog"
5183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5184    break 2
5185  fi
5186done
5187  done
5188IFS=$as_save_IFS
5189
5190fi
5191fi
5192CC=$ac_cv_prog_CC
5193if test -n "$CC"; then
5194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5195$as_echo "$CC" >&6; }
5196else
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5198$as_echo "no" >&6; }
5199fi
5200
5201
5202  test -n "$CC" && break
5203done
5204
5205
5206		if test "$CC" = cc ; then
5207						if test $ol_with_threads != auto ; then
5208				as_fn_error "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
5209			else
5210				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
5211$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
5212			fi
5213			ol_with_threads=no
5214  		fi
5215	fi
5216
5217	case ${CC} in cc_r | xlc_r)
5218		ol_with_threads=posix
5219		ol_cv_pthread_create=yes
5220		;;
5221	esac
5222fi
5223
5224if test -z "${CC}"; then
5225	for ac_prog in cc gcc
5226do
5227  # Extract the first word of "$ac_prog", so it can be a program name with args.
5228set dummy $ac_prog; ac_word=$2
5229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5230$as_echo_n "checking for $ac_word... " >&6; }
5231if test "${ac_cv_prog_CC+set}" = set; then :
5232  $as_echo_n "(cached) " >&6
5233else
5234  if test -n "$CC"; then
5235  ac_cv_prog_CC="$CC" # Let the user override the test.
5236else
5237as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5238for as_dir in $PATH
5239do
5240  IFS=$as_save_IFS
5241  test -z "$as_dir" && as_dir=.
5242    for ac_exec_ext in '' $ac_executable_extensions; do
5243  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5244    ac_cv_prog_CC="$ac_prog"
5245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5246    break 2
5247  fi
5248done
5249  done
5250IFS=$as_save_IFS
5251
5252fi
5253fi
5254CC=$ac_cv_prog_CC
5255if test -n "$CC"; then
5256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5257$as_echo "$CC" >&6; }
5258else
5259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260$as_echo "no" >&6; }
5261fi
5262
5263
5264  test -n "$CC" && break
5265done
5266test -n "$CC" || CC="missing"
5267
5268
5269	if test "${CC}" = "missing" ; then
5270		as_fn_error "Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." "$LINENO" 5
5271	fi
5272fi
5273
5274if test -z "${AR}"; then
5275	for ac_prog in ar gar
5276do
5277  # Extract the first word of "$ac_prog", so it can be a program name with args.
5278set dummy $ac_prog; ac_word=$2
5279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5280$as_echo_n "checking for $ac_word... " >&6; }
5281if test "${ac_cv_prog_AR+set}" = set; then :
5282  $as_echo_n "(cached) " >&6
5283else
5284  if test -n "$AR"; then
5285  ac_cv_prog_AR="$AR" # Let the user override the test.
5286else
5287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5288for as_dir in $PATH
5289do
5290  IFS=$as_save_IFS
5291  test -z "$as_dir" && as_dir=.
5292    for ac_exec_ext in '' $ac_executable_extensions; do
5293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5294    ac_cv_prog_AR="$ac_prog"
5295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5296    break 2
5297  fi
5298done
5299  done
5300IFS=$as_save_IFS
5301
5302fi
5303fi
5304AR=$ac_cv_prog_AR
5305if test -n "$AR"; then
5306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5307$as_echo "$AR" >&6; }
5308else
5309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5310$as_echo "no" >&6; }
5311fi
5312
5313
5314  test -n "$AR" && break
5315done
5316test -n "$AR" || AR="missing"
5317
5318
5319	if test "${AR}" = "missing" ; then
5320		as_fn_error "Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." "$LINENO" 5
5321	fi
5322fi
5323
5324
5325
5326
5327
5328# Check whether --enable-fast-install was given.
5329if test "${enable_fast_install+set}" = set; then :
5330  enableval=$enable_fast_install; p=${PACKAGE-default}
5331    case $enableval in
5332    yes) enable_fast_install=yes ;;
5333    no) enable_fast_install=no ;;
5334    *)
5335      enable_fast_install=no
5336      # Look at the argument we got.  We use all the common list separators.
5337      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
5338      for pkg in $enableval; do
5339	IFS="$lt_save_ifs"
5340	if test "X$pkg" = "X$p"; then
5341	  enable_fast_install=yes
5342	fi
5343      done
5344      IFS="$lt_save_ifs"
5345      ;;
5346    esac
5347else
5348  enable_fast_install=yes
5349fi
5350
5351
5352DEPDIR="${am__leading_dot}deps"
5353
5354ac_config_commands="$ac_config_commands depfiles"
5355
5356
5357am_make=${MAKE-make}
5358cat > confinc << 'END'
5359am__doit:
5360	@echo done
5361.PHONY: am__doit
5362END
5363# If we don't find an include directive, just comment out the code.
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5365$as_echo_n "checking for style of include used by $am_make... " >&6; }
5366am__include="#"
5367am__quote=
5368_am_result=none
5369# First try GNU make style include.
5370echo "include confinc" > confmf
5371# We grep out `Entering directory' and `Leaving directory'
5372# messages which can occur if `w' ends up in MAKEFLAGS.
5373# In particular we don't look at `^make:' because GNU make might
5374# be invoked under some other name (usually "gmake"), in which
5375# case it prints its new name instead of `make'.
5376if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
5377   am__include=include
5378   am__quote=
5379   _am_result=GNU
5380fi
5381# Now try BSD make style include.
5382if test "$am__include" = "#"; then
5383   echo '.include "confinc"' > confmf
5384   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
5385      am__include=.include
5386      am__quote="\""
5387      _am_result=BSD
5388   fi
5389fi
5390
5391
5392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5393$as_echo "$_am_result" >&6; }
5394rm -f confinc confmf
5395
5396# Check whether --enable-dependency-tracking was given.
5397if test "${enable_dependency_tracking+set}" = set; then :
5398  enableval=$enable_dependency_tracking;
5399fi
5400
5401if test "x$enable_dependency_tracking" != xno; then
5402  am_depcomp="$ac_aux_dir/depcomp"
5403  AMDEPBACKSLASH='\'
5404fi
5405
5406
5407if test "x$enable_dependency_tracking" != xno; then
5408  AMDEP_TRUE=
5409  AMDEP_FALSE='#'
5410else
5411  AMDEP_TRUE='#'
5412  AMDEP_FALSE=
5413fi
5414
5415
5416
5417ac_ext=c
5418ac_cpp='$CPP $CPPFLAGS'
5419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5421ac_compiler_gnu=$ac_cv_c_compiler_gnu
5422if test -n "$ac_tool_prefix"; then
5423  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
5424set dummy ${ac_tool_prefix}gcc; ac_word=$2
5425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5426$as_echo_n "checking for $ac_word... " >&6; }
5427if test "${ac_cv_prog_CC+set}" = set; then :
5428  $as_echo_n "(cached) " >&6
5429else
5430  if test -n "$CC"; then
5431  ac_cv_prog_CC="$CC" # Let the user override the test.
5432else
5433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5434for as_dir in $PATH
5435do
5436  IFS=$as_save_IFS
5437  test -z "$as_dir" && as_dir=.
5438    for ac_exec_ext in '' $ac_executable_extensions; do
5439  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5440    ac_cv_prog_CC="${ac_tool_prefix}gcc"
5441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5442    break 2
5443  fi
5444done
5445  done
5446IFS=$as_save_IFS
5447
5448fi
5449fi
5450CC=$ac_cv_prog_CC
5451if test -n "$CC"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5453$as_echo "$CC" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460fi
5461if test -z "$ac_cv_prog_CC"; then
5462  ac_ct_CC=$CC
5463  # Extract the first word of "gcc", so it can be a program name with args.
5464set dummy 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; }
5467if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5468  $as_echo_n "(cached) " >&6
5469else
5470  if test -n "$ac_ct_CC"; then
5471  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5472else
5473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474for as_dir in $PATH
5475do
5476  IFS=$as_save_IFS
5477  test -z "$as_dir" && as_dir=.
5478    for ac_exec_ext in '' $ac_executable_extensions; do
5479  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5480    ac_cv_prog_ac_ct_CC="gcc"
5481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482    break 2
5483  fi
5484done
5485  done
5486IFS=$as_save_IFS
5487
5488fi
5489fi
5490ac_ct_CC=$ac_cv_prog_ac_ct_CC
5491if test -n "$ac_ct_CC"; then
5492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5493$as_echo "$ac_ct_CC" >&6; }
5494else
5495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5496$as_echo "no" >&6; }
5497fi
5498
5499  if test "x$ac_ct_CC" = x; then
5500    CC=""
5501  else
5502    case $cross_compiling:$ac_tool_warned in
5503yes:)
5504{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5505$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5506ac_tool_warned=yes ;;
5507esac
5508    CC=$ac_ct_CC
5509  fi
5510else
5511  CC="$ac_cv_prog_CC"
5512fi
5513
5514if test -z "$CC"; then
5515          if test -n "$ac_tool_prefix"; then
5516    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
5517set dummy ${ac_tool_prefix}cc; ac_word=$2
5518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5519$as_echo_n "checking for $ac_word... " >&6; }
5520if test "${ac_cv_prog_CC+set}" = set; then :
5521  $as_echo_n "(cached) " >&6
5522else
5523  if test -n "$CC"; then
5524  ac_cv_prog_CC="$CC" # Let the user override the test.
5525else
5526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5527for as_dir in $PATH
5528do
5529  IFS=$as_save_IFS
5530  test -z "$as_dir" && as_dir=.
5531    for ac_exec_ext in '' $ac_executable_extensions; do
5532  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5533    ac_cv_prog_CC="${ac_tool_prefix}cc"
5534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5535    break 2
5536  fi
5537done
5538  done
5539IFS=$as_save_IFS
5540
5541fi
5542fi
5543CC=$ac_cv_prog_CC
5544if test -n "$CC"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5546$as_echo "$CC" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553  fi
5554fi
5555if test -z "$CC"; then
5556  # Extract the first word of "cc", so it can be a program name with args.
5557set dummy 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; }
5560if test "${ac_cv_prog_CC+set}" = set; then :
5561  $as_echo_n "(cached) " >&6
5562else
5563  if test -n "$CC"; then
5564  ac_cv_prog_CC="$CC" # Let the user override the test.
5565else
5566  ac_prog_rejected=no
5567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570  IFS=$as_save_IFS
5571  test -z "$as_dir" && as_dir=.
5572    for ac_exec_ext in '' $ac_executable_extensions; do
5573  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5574    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
5575       ac_prog_rejected=yes
5576       continue
5577     fi
5578    ac_cv_prog_CC="cc"
5579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5580    break 2
5581  fi
5582done
5583  done
5584IFS=$as_save_IFS
5585
5586if test $ac_prog_rejected = yes; then
5587  # We found a bogon in the path, so make sure we never use it.
5588  set dummy $ac_cv_prog_CC
5589  shift
5590  if test $# != 0; then
5591    # We chose a different compiler from the bogus one.
5592    # However, it has the same basename, so the bogon will be chosen
5593    # first if we set CC to just the basename; use the full file name.
5594    shift
5595    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
5596  fi
5597fi
5598fi
5599fi
5600CC=$ac_cv_prog_CC
5601if test -n "$CC"; then
5602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5603$as_echo "$CC" >&6; }
5604else
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5606$as_echo "no" >&6; }
5607fi
5608
5609
5610fi
5611if test -z "$CC"; then
5612  if test -n "$ac_tool_prefix"; then
5613  for ac_prog in cl.exe
5614  do
5615    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618$as_echo_n "checking for $ac_word... " >&6; }
5619if test "${ac_cv_prog_CC+set}" = set; then :
5620  $as_echo_n "(cached) " >&6
5621else
5622  if test -n "$CC"; then
5623  ac_cv_prog_CC="$CC" # Let the user override the test.
5624else
5625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628  IFS=$as_save_IFS
5629  test -z "$as_dir" && as_dir=.
5630    for ac_exec_ext in '' $ac_executable_extensions; do
5631  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5632    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
5633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634    break 2
5635  fi
5636done
5637  done
5638IFS=$as_save_IFS
5639
5640fi
5641fi
5642CC=$ac_cv_prog_CC
5643if test -n "$CC"; then
5644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5645$as_echo "$CC" >&6; }
5646else
5647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5648$as_echo "no" >&6; }
5649fi
5650
5651
5652    test -n "$CC" && break
5653  done
5654fi
5655if test -z "$CC"; then
5656  ac_ct_CC=$CC
5657  for ac_prog in cl.exe
5658do
5659  # Extract the first word of "$ac_prog", so it can be a program name with args.
5660set dummy $ac_prog; ac_word=$2
5661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5662$as_echo_n "checking for $ac_word... " >&6; }
5663if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
5664  $as_echo_n "(cached) " >&6
5665else
5666  if test -n "$ac_ct_CC"; then
5667  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5668else
5669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5670for as_dir in $PATH
5671do
5672  IFS=$as_save_IFS
5673  test -z "$as_dir" && as_dir=.
5674    for ac_exec_ext in '' $ac_executable_extensions; do
5675  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5676    ac_cv_prog_ac_ct_CC="$ac_prog"
5677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5678    break 2
5679  fi
5680done
5681  done
5682IFS=$as_save_IFS
5683
5684fi
5685fi
5686ac_ct_CC=$ac_cv_prog_ac_ct_CC
5687if test -n "$ac_ct_CC"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5689$as_echo "$ac_ct_CC" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$ac_ct_CC" && break
5697done
5698
5699  if test "x$ac_ct_CC" = x; then
5700    CC=""
5701  else
5702    case $cross_compiling:$ac_tool_warned in
5703yes:)
5704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5706ac_tool_warned=yes ;;
5707esac
5708    CC=$ac_ct_CC
5709  fi
5710fi
5711
5712fi
5713
5714
5715test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5716$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5717as_fn_error "no acceptable C compiler found in \$PATH
5718See \`config.log' for more details." "$LINENO" 5; }
5719
5720# Provide some information about the compiler.
5721$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5722set X $ac_compile
5723ac_compiler=$2
5724for ac_option in --version -v -V -qversion; do
5725  { { ac_try="$ac_compiler $ac_option >&5"
5726case "(($ac_try" in
5727  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5728  *) ac_try_echo=$ac_try;;
5729esac
5730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5731$as_echo "$ac_try_echo"; } >&5
5732  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5733  ac_status=$?
5734  if test -s conftest.err; then
5735    sed '10a\
5736... rest of stderr output deleted ...
5737         10q' conftest.err >conftest.er1
5738    cat conftest.er1 >&5
5739  fi
5740  rm -f conftest.er1 conftest.err
5741  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5742  test $ac_status = 0; }
5743done
5744
5745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5746/* end confdefs.h.  */
5747
5748int
5749main ()
5750{
5751
5752  ;
5753  return 0;
5754}
5755_ACEOF
5756ac_clean_files_save=$ac_clean_files
5757ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5758# Try to create an executable without -o first, disregard a.out.
5759# It will help us diagnose broken compilers, and finding out an intuition
5760# of exeext.
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5762$as_echo_n "checking whether the C compiler works... " >&6; }
5763ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5764
5765# The possible output files:
5766ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5767
5768ac_rmfiles=
5769for ac_file in $ac_files
5770do
5771  case $ac_file in
5772    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5773    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5774  esac
5775done
5776rm -f $ac_rmfiles
5777
5778if { { ac_try="$ac_link_default"
5779case "(($ac_try" in
5780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5781  *) ac_try_echo=$ac_try;;
5782esac
5783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5784$as_echo "$ac_try_echo"; } >&5
5785  (eval "$ac_link_default") 2>&5
5786  ac_status=$?
5787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5788  test $ac_status = 0; }; then :
5789  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5790# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5791# in a Makefile.  We should not override ac_cv_exeext if it was cached,
5792# so that the user can short-circuit this test for compilers unknown to
5793# Autoconf.
5794for ac_file in $ac_files ''
5795do
5796  test -f "$ac_file" || continue
5797  case $ac_file in
5798    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5799	;;
5800    [ab].out )
5801	# We found the default executable, but exeext='' is most
5802	# certainly right.
5803	break;;
5804    *.* )
5805	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
5806	then :; else
5807	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5808	fi
5809	# We set ac_cv_exeext here because the later test for it is not
5810	# safe: cross compilers may not add the suffix if given an `-o'
5811	# argument, so we may need to know it at that point already.
5812	# Even if this section looks crufty: it has the advantage of
5813	# actually working.
5814	break;;
5815    * )
5816	break;;
5817  esac
5818done
5819test "$ac_cv_exeext" = no && ac_cv_exeext=
5820
5821else
5822  ac_file=''
5823fi
5824if test -z "$ac_file"; then :
5825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5826$as_echo "no" >&6; }
5827$as_echo "$as_me: failed program was:" >&5
5828sed 's/^/| /' conftest.$ac_ext >&5
5829
5830{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5832{ as_fn_set_status 77
5833as_fn_error "C compiler cannot create executables
5834See \`config.log' for more details." "$LINENO" 5; }; }
5835else
5836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5837$as_echo "yes" >&6; }
5838fi
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5840$as_echo_n "checking for C compiler default output file name... " >&6; }
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5842$as_echo "$ac_file" >&6; }
5843ac_exeext=$ac_cv_exeext
5844
5845rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5846ac_clean_files=$ac_clean_files_save
5847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5848$as_echo_n "checking for suffix of executables... " >&6; }
5849if { { ac_try="$ac_link"
5850case "(($ac_try" in
5851  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5852  *) ac_try_echo=$ac_try;;
5853esac
5854eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5855$as_echo "$ac_try_echo"; } >&5
5856  (eval "$ac_link") 2>&5
5857  ac_status=$?
5858  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5859  test $ac_status = 0; }; then :
5860  # If both `conftest.exe' and `conftest' are `present' (well, observable)
5861# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
5862# work properly (i.e., refer to `conftest.exe'), while it won't with
5863# `rm'.
5864for ac_file in conftest.exe conftest conftest.*; do
5865  test -f "$ac_file" || continue
5866  case $ac_file in
5867    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5868    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5869	  break;;
5870    * ) break;;
5871  esac
5872done
5873else
5874  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5876as_fn_error "cannot compute suffix of executables: cannot compile and link
5877See \`config.log' for more details." "$LINENO" 5; }
5878fi
5879rm -f conftest conftest$ac_cv_exeext
5880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5881$as_echo "$ac_cv_exeext" >&6; }
5882
5883rm -f conftest.$ac_ext
5884EXEEXT=$ac_cv_exeext
5885ac_exeext=$EXEEXT
5886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5887/* end confdefs.h.  */
5888#include <stdio.h>
5889int
5890main ()
5891{
5892FILE *f = fopen ("conftest.out", "w");
5893 return ferror (f) || fclose (f) != 0;
5894
5895  ;
5896  return 0;
5897}
5898_ACEOF
5899ac_clean_files="$ac_clean_files conftest.out"
5900# Check that the compiler produces executables we can run.  If not, either
5901# the compiler is broken, or we cross compile.
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5903$as_echo_n "checking whether we are cross compiling... " >&6; }
5904if test "$cross_compiling" != yes; then
5905  { { ac_try="$ac_link"
5906case "(($ac_try" in
5907  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5908  *) ac_try_echo=$ac_try;;
5909esac
5910eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5911$as_echo "$ac_try_echo"; } >&5
5912  (eval "$ac_link") 2>&5
5913  ac_status=$?
5914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5915  test $ac_status = 0; }
5916  if { ac_try='./conftest$ac_cv_exeext'
5917  { { case "(($ac_try" in
5918  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5919  *) ac_try_echo=$ac_try;;
5920esac
5921eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5922$as_echo "$ac_try_echo"; } >&5
5923  (eval "$ac_try") 2>&5
5924  ac_status=$?
5925  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5926  test $ac_status = 0; }; }; then
5927    cross_compiling=no
5928  else
5929    if test "$cross_compiling" = maybe; then
5930	cross_compiling=yes
5931    else
5932	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5933$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5934as_fn_error "cannot run C compiled programs.
5935If you meant to cross compile, use \`--host'.
5936See \`config.log' for more details." "$LINENO" 5; }
5937    fi
5938  fi
5939fi
5940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5941$as_echo "$cross_compiling" >&6; }
5942
5943rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5944ac_clean_files=$ac_clean_files_save
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5946$as_echo_n "checking for suffix of object files... " >&6; }
5947if test "${ac_cv_objext+set}" = set; then :
5948  $as_echo_n "(cached) " >&6
5949else
5950  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5951/* end confdefs.h.  */
5952
5953int
5954main ()
5955{
5956
5957  ;
5958  return 0;
5959}
5960_ACEOF
5961rm -f conftest.o conftest.obj
5962if { { ac_try="$ac_compile"
5963case "(($ac_try" in
5964  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5965  *) ac_try_echo=$ac_try;;
5966esac
5967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5968$as_echo "$ac_try_echo"; } >&5
5969  (eval "$ac_compile") 2>&5
5970  ac_status=$?
5971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5972  test $ac_status = 0; }; then :
5973  for ac_file in conftest.o conftest.obj conftest.*; do
5974  test -f "$ac_file" || continue;
5975  case $ac_file in
5976    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5977    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5978       break;;
5979  esac
5980done
5981else
5982  $as_echo "$as_me: failed program was:" >&5
5983sed 's/^/| /' conftest.$ac_ext >&5
5984
5985{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5987as_fn_error "cannot compute suffix of object files: cannot compile
5988See \`config.log' for more details." "$LINENO" 5; }
5989fi
5990rm -f conftest.$ac_cv_objext conftest.$ac_ext
5991fi
5992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5993$as_echo "$ac_cv_objext" >&6; }
5994OBJEXT=$ac_cv_objext
5995ac_objext=$OBJEXT
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
5997$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
5998if test "${ac_cv_c_compiler_gnu+set}" = set; then :
5999  $as_echo_n "(cached) " >&6
6000else
6001  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6002/* end confdefs.h.  */
6003
6004int
6005main ()
6006{
6007#ifndef __GNUC__
6008       choke me
6009#endif
6010
6011  ;
6012  return 0;
6013}
6014_ACEOF
6015if ac_fn_c_try_compile "$LINENO"; then :
6016  ac_compiler_gnu=yes
6017else
6018  ac_compiler_gnu=no
6019fi
6020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6021ac_cv_c_compiler_gnu=$ac_compiler_gnu
6022
6023fi
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
6025$as_echo "$ac_cv_c_compiler_gnu" >&6; }
6026if test $ac_compiler_gnu = yes; then
6027  GCC=yes
6028else
6029  GCC=
6030fi
6031ac_test_CFLAGS=${CFLAGS+set}
6032ac_save_CFLAGS=$CFLAGS
6033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
6034$as_echo_n "checking whether $CC accepts -g... " >&6; }
6035if test "${ac_cv_prog_cc_g+set}" = set; then :
6036  $as_echo_n "(cached) " >&6
6037else
6038  ac_save_c_werror_flag=$ac_c_werror_flag
6039   ac_c_werror_flag=yes
6040   ac_cv_prog_cc_g=no
6041   CFLAGS="-g"
6042   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6043/* end confdefs.h.  */
6044
6045int
6046main ()
6047{
6048
6049  ;
6050  return 0;
6051}
6052_ACEOF
6053if ac_fn_c_try_compile "$LINENO"; then :
6054  ac_cv_prog_cc_g=yes
6055else
6056  CFLAGS=""
6057      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058/* end confdefs.h.  */
6059
6060int
6061main ()
6062{
6063
6064  ;
6065  return 0;
6066}
6067_ACEOF
6068if ac_fn_c_try_compile "$LINENO"; then :
6069
6070else
6071  ac_c_werror_flag=$ac_save_c_werror_flag
6072	 CFLAGS="-g"
6073	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6074/* end confdefs.h.  */
6075
6076int
6077main ()
6078{
6079
6080  ;
6081  return 0;
6082}
6083_ACEOF
6084if ac_fn_c_try_compile "$LINENO"; then :
6085  ac_cv_prog_cc_g=yes
6086fi
6087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6088fi
6089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6090fi
6091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6092   ac_c_werror_flag=$ac_save_c_werror_flag
6093fi
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
6095$as_echo "$ac_cv_prog_cc_g" >&6; }
6096if test "$ac_test_CFLAGS" = set; then
6097  CFLAGS=$ac_save_CFLAGS
6098elif test $ac_cv_prog_cc_g = yes; then
6099  if test "$GCC" = yes; then
6100    CFLAGS="-g -O2"
6101  else
6102    CFLAGS="-g"
6103  fi
6104else
6105  if test "$GCC" = yes; then
6106    CFLAGS="-O2"
6107  else
6108    CFLAGS=
6109  fi
6110fi
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6112$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6113if test "${ac_cv_prog_cc_c89+set}" = set; then :
6114  $as_echo_n "(cached) " >&6
6115else
6116  ac_cv_prog_cc_c89=no
6117ac_save_CC=$CC
6118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6119/* end confdefs.h.  */
6120#include <stdarg.h>
6121#include <stdio.h>
6122#include <sys/types.h>
6123#include <sys/stat.h>
6124/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
6125struct buf { int x; };
6126FILE * (*rcsopen) (struct buf *, struct stat *, int);
6127static char *e (p, i)
6128     char **p;
6129     int i;
6130{
6131  return p[i];
6132}
6133static char *f (char * (*g) (char **, int), char **p, ...)
6134{
6135  char *s;
6136  va_list v;
6137  va_start (v,p);
6138  s = g (p, va_arg (v,int));
6139  va_end (v);
6140  return s;
6141}
6142
6143/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
6144   function prototypes and stuff, but not '\xHH' hex character constants.
6145   These don't provoke an error unfortunately, instead are silently treated
6146   as 'x'.  The following induces an error, until -std is added to get
6147   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
6148   array size at least.  It's necessary to write '\x00'==0 to get something
6149   that's true only with -std.  */
6150int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6151
6152/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6153   inside strings and character constants.  */
6154#define FOO(x) 'x'
6155int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6156
6157int test (int i, double x);
6158struct s1 {int (*f) (int a);};
6159struct s2 {int (*f) (double a);};
6160int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6161int argc;
6162char **argv;
6163int
6164main ()
6165{
6166return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
6167  ;
6168  return 0;
6169}
6170_ACEOF
6171for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6172	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6173do
6174  CC="$ac_save_CC $ac_arg"
6175  if ac_fn_c_try_compile "$LINENO"; then :
6176  ac_cv_prog_cc_c89=$ac_arg
6177fi
6178rm -f core conftest.err conftest.$ac_objext
6179  test "x$ac_cv_prog_cc_c89" != "xno" && break
6180done
6181rm -f conftest.$ac_ext
6182CC=$ac_save_CC
6183
6184fi
6185# AC_CACHE_VAL
6186case "x$ac_cv_prog_cc_c89" in
6187  x)
6188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6189$as_echo "none needed" >&6; } ;;
6190  xno)
6191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6192$as_echo "unsupported" >&6; } ;;
6193  *)
6194    CC="$CC $ac_cv_prog_cc_c89"
6195    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6196$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6197esac
6198if test "x$ac_cv_prog_cc_c89" != xno; then :
6199
6200fi
6201
6202ac_ext=c
6203ac_cpp='$CPP $CPPFLAGS'
6204ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6205ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6206ac_compiler_gnu=$ac_cv_c_compiler_gnu
6207
6208depcc="$CC"   am_compiler_list=
6209
6210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6211$as_echo_n "checking dependency style of $depcc... " >&6; }
6212if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
6213  $as_echo_n "(cached) " >&6
6214else
6215  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6216  # We make a subdir and do the tests there.  Otherwise we can end up
6217  # making bogus files that we don't know about and never remove.  For
6218  # instance it was reported that on HP-UX the gcc test will end up
6219  # making a dummy file named `D' -- because `-MD' means `put the output
6220  # in D'.
6221  mkdir conftest.dir
6222  # Copy depcomp to subdir because otherwise we won't find it if we're
6223  # using a relative directory.
6224  cp "$am_depcomp" conftest.dir
6225  cd conftest.dir
6226  # We will build objects and dependencies in a subdirectory because
6227  # it helps to detect inapplicable dependency modes.  For instance
6228  # both Tru64's cc and ICC support -MD to output dependencies as a
6229  # side effect of compilation, but ICC will put the dependencies in
6230  # the current directory while Tru64 will put them in the object
6231  # directory.
6232  mkdir sub
6233
6234  am_cv_CC_dependencies_compiler_type=none
6235  if test "$am_compiler_list" = ""; then
6236     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6237  fi
6238  for depmode in $am_compiler_list; do
6239    # Setup a source with many dependencies, because some compilers
6240    # like to wrap large dependency lists on column 80 (with \), and
6241    # we should not choose a depcomp mode which is confused by this.
6242    #
6243    # We need to recreate these files for each test, as the compiler may
6244    # overwrite some of them when testing with obscure command lines.
6245    # This happens at least with the AIX C compiler.
6246    : > sub/conftest.c
6247    for i in 1 2 3 4 5 6; do
6248      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6249      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6250      # Solaris 8's {/usr,}/bin/sh.
6251      touch sub/conftst$i.h
6252    done
6253    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6254
6255    case $depmode in
6256    nosideeffect)
6257      # after this tag, mechanisms are not by side-effect, so they'll
6258      # only be used when explicitly requested
6259      if test "x$enable_dependency_tracking" = xyes; then
6260	continue
6261      else
6262	break
6263      fi
6264      ;;
6265    none) break ;;
6266    esac
6267    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6268    # mode.  It turns out that the SunPro C++ compiler does not properly
6269    # handle `-M -o', and we need to detect this.
6270    if depmode=$depmode \
6271       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6272       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6273       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6274         >/dev/null 2>conftest.err &&
6275       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6276       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6277       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6278      # icc doesn't choke on unknown options, it will just issue warnings
6279      # or remarks (even with -Werror).  So we grep stderr for any message
6280      # that says an option was ignored or not supported.
6281      # When given -MP, icc 7.0 and 7.1 complain thusly:
6282      #   icc: Command line warning: ignoring option '-M'; no argument required
6283      # The diagnosis changed in icc 8.0:
6284      #   icc: Command line remark: option '-MP' not supported
6285      if (grep 'ignoring option' conftest.err ||
6286          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6287        am_cv_CC_dependencies_compiler_type=$depmode
6288        break
6289      fi
6290    fi
6291  done
6292
6293  cd ..
6294  rm -rf conftest.dir
6295else
6296  am_cv_CC_dependencies_compiler_type=none
6297fi
6298
6299fi
6300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6301$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6302CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6303
6304
6305
6306if
6307  test "x$enable_dependency_tracking" != xno \
6308  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
6309  am__fastdepCC_TRUE=
6310  am__fastdepCC_FALSE='#'
6311else
6312  am__fastdepCC_TRUE='#'
6313  am__fastdepCC_FALSE=
6314fi
6315
6316
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6318$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6319if test "${lt_cv_path_SED+set}" = set; then :
6320  $as_echo_n "(cached) " >&6
6321else
6322  # Loop through the user's path and test for sed and gsed.
6323# Then use that list of sed's as ones to test for truncation.
6324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6325for as_dir in $PATH
6326do
6327  IFS=$as_save_IFS
6328  test -z "$as_dir" && as_dir=.
6329  for lt_ac_prog in sed gsed; do
6330    for ac_exec_ext in '' $ac_executable_extensions; do
6331      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6332        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6333      fi
6334    done
6335  done
6336done
6337lt_ac_max=0
6338lt_ac_count=0
6339# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6340# along with /bin/sed that truncates output.
6341for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6342  test ! -f $lt_ac_sed && continue
6343  cat /dev/null > conftest.in
6344  lt_ac_count=0
6345  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6346  # Check for GNU sed and select it if it is found.
6347  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6348    lt_cv_path_SED=$lt_ac_sed
6349    break
6350  fi
6351  while true; do
6352    cat conftest.in conftest.in >conftest.tmp
6353    mv conftest.tmp conftest.in
6354    cp conftest.in conftest.nl
6355    echo >>conftest.nl
6356    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6357    cmp -s conftest.out conftest.nl || break
6358    # 10000 chars as input seems more than enough
6359    test $lt_ac_count -gt 10 && break
6360    lt_ac_count=`expr $lt_ac_count + 1`
6361    if test $lt_ac_count -gt $lt_ac_max; then
6362      lt_ac_max=$lt_ac_count
6363      lt_cv_path_SED=$lt_ac_sed
6364    fi
6365  done
6366done
6367
6368fi
6369
6370SED=$lt_cv_path_SED
6371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
6372$as_echo "$SED" >&6; }
6373
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6375$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6376if test "${ac_cv_path_GREP+set}" = set; then :
6377  $as_echo_n "(cached) " >&6
6378else
6379  if test -z "$GREP"; then
6380  ac_path_GREP_found=false
6381  # Loop through the user's path and test for each of PROGNAME-LIST
6382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6384do
6385  IFS=$as_save_IFS
6386  test -z "$as_dir" && as_dir=.
6387    for ac_prog in grep ggrep; do
6388    for ac_exec_ext in '' $ac_executable_extensions; do
6389      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6390      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6391# Check for GNU ac_path_GREP and select it if it is found.
6392  # Check for GNU $ac_path_GREP
6393case `"$ac_path_GREP" --version 2>&1` in
6394*GNU*)
6395  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6396*)
6397  ac_count=0
6398  $as_echo_n 0123456789 >"conftest.in"
6399  while :
6400  do
6401    cat "conftest.in" "conftest.in" >"conftest.tmp"
6402    mv "conftest.tmp" "conftest.in"
6403    cp "conftest.in" "conftest.nl"
6404    $as_echo 'GREP' >> "conftest.nl"
6405    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6406    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6407    as_fn_arith $ac_count + 1 && ac_count=$as_val
6408    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6409      # Best one so far, save it but keep looking for a better one
6410      ac_cv_path_GREP="$ac_path_GREP"
6411      ac_path_GREP_max=$ac_count
6412    fi
6413    # 10*(2^10) chars as input seems more than enough
6414    test $ac_count -gt 10 && break
6415  done
6416  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6417esac
6418
6419      $ac_path_GREP_found && break 3
6420    done
6421  done
6422  done
6423IFS=$as_save_IFS
6424  if test -z "$ac_cv_path_GREP"; then
6425    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6426  fi
6427else
6428  ac_cv_path_GREP=$GREP
6429fi
6430
6431fi
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6433$as_echo "$ac_cv_path_GREP" >&6; }
6434 GREP="$ac_cv_path_GREP"
6435
6436
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6438$as_echo_n "checking for egrep... " >&6; }
6439if test "${ac_cv_path_EGREP+set}" = set; then :
6440  $as_echo_n "(cached) " >&6
6441else
6442  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6443   then ac_cv_path_EGREP="$GREP -E"
6444   else
6445     if test -z "$EGREP"; then
6446  ac_path_EGREP_found=false
6447  # Loop through the user's path and test for each of PROGNAME-LIST
6448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6450do
6451  IFS=$as_save_IFS
6452  test -z "$as_dir" && as_dir=.
6453    for ac_prog in egrep; do
6454    for ac_exec_ext in '' $ac_executable_extensions; do
6455      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6456      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6457# Check for GNU ac_path_EGREP and select it if it is found.
6458  # Check for GNU $ac_path_EGREP
6459case `"$ac_path_EGREP" --version 2>&1` in
6460*GNU*)
6461  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6462*)
6463  ac_count=0
6464  $as_echo_n 0123456789 >"conftest.in"
6465  while :
6466  do
6467    cat "conftest.in" "conftest.in" >"conftest.tmp"
6468    mv "conftest.tmp" "conftest.in"
6469    cp "conftest.in" "conftest.nl"
6470    $as_echo 'EGREP' >> "conftest.nl"
6471    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6472    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6473    as_fn_arith $ac_count + 1 && ac_count=$as_val
6474    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6475      # Best one so far, save it but keep looking for a better one
6476      ac_cv_path_EGREP="$ac_path_EGREP"
6477      ac_path_EGREP_max=$ac_count
6478    fi
6479    # 10*(2^10) chars as input seems more than enough
6480    test $ac_count -gt 10 && break
6481  done
6482  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6483esac
6484
6485      $ac_path_EGREP_found && break 3
6486    done
6487  done
6488  done
6489IFS=$as_save_IFS
6490  if test -z "$ac_cv_path_EGREP"; then
6491    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6492  fi
6493else
6494  ac_cv_path_EGREP=$EGREP
6495fi
6496
6497   fi
6498fi
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6500$as_echo "$ac_cv_path_EGREP" >&6; }
6501 EGREP="$ac_cv_path_EGREP"
6502
6503
6504
6505# Check whether --with-gnu-ld was given.
6506if test "${with_gnu_ld+set}" = set; then :
6507  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
6508else
6509  with_gnu_ld=no
6510fi
6511
6512ac_prog=ld
6513if test "$GCC" = yes; then
6514  # Check if gcc -print-prog-name=ld gives a path.
6515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6516$as_echo_n "checking for ld used by $CC... " >&6; }
6517  case $host in
6518  *-*-mingw*)
6519    # gcc leaves a trailing carriage return which upsets mingw
6520    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6521  *)
6522    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6523  esac
6524  case $ac_prog in
6525    # Accept absolute paths.
6526    [\\/]* | ?:[\\/]*)
6527      re_direlt='/[^/][^/]*/\.\./'
6528      # Canonicalize the pathname of ld
6529      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
6530      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
6531	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
6532      done
6533      test -z "$LD" && LD="$ac_prog"
6534      ;;
6535  "")
6536    # If it fails, then pretend we aren't using GCC.
6537    ac_prog=ld
6538    ;;
6539  *)
6540    # If it is relative, then search for the first ld in PATH.
6541    with_gnu_ld=unknown
6542    ;;
6543  esac
6544elif test "$with_gnu_ld" = yes; then
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6546$as_echo_n "checking for GNU ld... " >&6; }
6547else
6548  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6549$as_echo_n "checking for non-GNU ld... " >&6; }
6550fi
6551if test "${lt_cv_path_LD+set}" = set; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  if test -z "$LD"; then
6555  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6556  for ac_dir in $PATH; do
6557    IFS="$lt_save_ifs"
6558    test -z "$ac_dir" && ac_dir=.
6559    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6560      lt_cv_path_LD="$ac_dir/$ac_prog"
6561      # Check to see if the program is GNU ld.  I'd rather use --version,
6562      # but apparently some variants of GNU ld only accept -v.
6563      # Break only if it was the GNU/non-GNU ld that we prefer.
6564      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6565      *GNU* | *'with BFD'*)
6566	test "$with_gnu_ld" != no && break
6567	;;
6568      *)
6569	test "$with_gnu_ld" != yes && break
6570	;;
6571      esac
6572    fi
6573  done
6574  IFS="$lt_save_ifs"
6575else
6576  lt_cv_path_LD="$LD" # Let the user override the test with a path.
6577fi
6578fi
6579
6580LD="$lt_cv_path_LD"
6581if test -n "$LD"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6583$as_echo "$LD" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
6589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6590$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
6591if test "${lt_cv_prog_gnu_ld+set}" = set; then :
6592  $as_echo_n "(cached) " >&6
6593else
6594  # I'd rather use --version here, but apparently some GNU lds only accept -v.
6595case `$LD -v 2>&1 </dev/null` in
6596*GNU* | *'with BFD'*)
6597  lt_cv_prog_gnu_ld=yes
6598  ;;
6599*)
6600  lt_cv_prog_gnu_ld=no
6601  ;;
6602esac
6603fi
6604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6605$as_echo "$lt_cv_prog_gnu_ld" >&6; }
6606with_gnu_ld=$lt_cv_prog_gnu_ld
6607
6608
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6610$as_echo_n "checking for $LD option to reload object files... " >&6; }
6611if test "${lt_cv_ld_reload_flag+set}" = set; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  lt_cv_ld_reload_flag='-r'
6615fi
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6617$as_echo "$lt_cv_ld_reload_flag" >&6; }
6618reload_flag=$lt_cv_ld_reload_flag
6619case $reload_flag in
6620"" | " "*) ;;
6621*) reload_flag=" $reload_flag" ;;
6622esac
6623reload_cmds='$LD$reload_flag -o $output$reload_objs'
6624case $host_os in
6625  darwin*)
6626    if test "$GCC" = yes; then
6627      reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
6628    else
6629      reload_cmds='$LD$reload_flag -o $output$reload_objs'
6630    fi
6631    ;;
6632esac
6633
6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
6635$as_echo_n "checking for BSD-compatible nm... " >&6; }
6636if test "${lt_cv_path_NM+set}" = set; then :
6637  $as_echo_n "(cached) " >&6
6638else
6639  if test -n "$NM"; then
6640  # Let the user override the test.
6641  lt_cv_path_NM="$NM"
6642else
6643  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
6644  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
6645    IFS="$lt_save_ifs"
6646    test -z "$ac_dir" && ac_dir=.
6647    tmp_nm="$ac_dir/${ac_tool_prefix}nm"
6648    if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
6649      # Check to see if the nm accepts a BSD-compat flag.
6650      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
6651      #   nm: unknown option "B" ignored
6652      # Tru64's nm complains that /dev/null is an invalid object file
6653      case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
6654      */dev/null* | *'Invalid file or object type'*)
6655	lt_cv_path_NM="$tmp_nm -B"
6656	break
6657        ;;
6658      *)
6659	case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
6660	*/dev/null*)
6661	  lt_cv_path_NM="$tmp_nm -p"
6662	  break
6663	  ;;
6664	*)
6665	  lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6666	  continue # so that we can try to find one that supports BSD flags
6667	  ;;
6668	esac
6669      esac
6670    fi
6671  done
6672  IFS="$lt_save_ifs"
6673  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
6674fi
6675fi
6676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6677$as_echo "$lt_cv_path_NM" >&6; }
6678NM="$lt_cv_path_NM"
6679
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6681$as_echo_n "checking whether ln -s works... " >&6; }
6682LN_S=$as_ln_s
6683if test "$LN_S" = "ln -s"; then
6684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6685$as_echo "yes" >&6; }
6686else
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6688$as_echo "no, using $LN_S" >&6; }
6689fi
6690
6691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognise dependent libraries" >&5
6692$as_echo_n "checking how to recognise dependent libraries... " >&6; }
6693if test "${lt_cv_deplibs_check_method+set}" = set; then :
6694  $as_echo_n "(cached) " >&6
6695else
6696  lt_cv_file_magic_cmd='$MAGIC_CMD'
6697lt_cv_file_magic_test_file=
6698lt_cv_deplibs_check_method='unknown'
6699# Need to set the preceding variable on all platforms that support
6700# interlibrary dependencies.
6701# 'none' -- dependencies not supported.
6702# `unknown' -- same as none, but documents that we really don't know.
6703# 'pass_all' -- all dependencies passed with no checks.
6704# 'test_compile' -- check by making test program.
6705# 'file_magic [[regex]]' -- check by looking for files in library path
6706# which responds to the $file_magic_cmd with a given extended regex.
6707# If you have `file' or equivalent on your system and you're not sure
6708# whether `pass_all' will *always* work, you probably want this one.
6709
6710case $host_os in
6711aix4* | aix5*)
6712  lt_cv_deplibs_check_method=pass_all
6713  ;;
6714
6715beos*)
6716  lt_cv_deplibs_check_method=pass_all
6717  ;;
6718
6719bsdi[45]*)
6720  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6721  lt_cv_file_magic_cmd='/usr/bin/file -L'
6722  lt_cv_file_magic_test_file=/shlib/libc.so
6723  ;;
6724
6725cygwin*)
6726  # func_win32_libid is a shell function defined in ltmain.sh
6727  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6728  lt_cv_file_magic_cmd='func_win32_libid'
6729  ;;
6730
6731mingw* | pw32*)
6732  # Base MSYS/MinGW do not provide the 'file' command needed by
6733  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
6734  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
6735  lt_cv_file_magic_cmd='$OBJDUMP -f'
6736  ;;
6737
6738darwin* | rhapsody*)
6739  lt_cv_deplibs_check_method=pass_all
6740  ;;
6741
6742freebsd* | kfreebsd*-gnu | dragonfly*)
6743  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6744    case $host_cpu in
6745    i*86 )
6746      # Not sure whether the presence of OpenBSD here was a mistake.
6747      # Let's accept both of them until this is cleared up.
6748      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6749      lt_cv_file_magic_cmd=/usr/bin/file
6750      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6751      ;;
6752    esac
6753  else
6754    lt_cv_deplibs_check_method=pass_all
6755  fi
6756  ;;
6757
6758gnu*)
6759  lt_cv_deplibs_check_method=pass_all
6760  ;;
6761
6762hpux10.20* | hpux11*)
6763  lt_cv_file_magic_cmd=/usr/bin/file
6764  case $host_cpu in
6765  ia64*)
6766    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6767    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6768    ;;
6769  hppa*64*)
6770    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]'
6771    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6772    ;;
6773  *)
6774    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
6775    lt_cv_file_magic_test_file=/usr/lib/libc.sl
6776    ;;
6777  esac
6778  ;;
6779
6780irix5* | irix6* | nonstopux*)
6781  case $LD in
6782  *-32|*"-32 ") libmagic=32-bit;;
6783  *-n32|*"-n32 ") libmagic=N32;;
6784  *-64|*"-64 ") libmagic=64-bit;;
6785  *) libmagic=never-match;;
6786  esac
6787  lt_cv_deplibs_check_method=pass_all
6788  ;;
6789
6790# This must be Linux ELF.
6791linux*)
6792  lt_cv_deplibs_check_method=pass_all
6793  ;;
6794
6795netbsd*)
6796  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
6797    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6798  else
6799    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6800  fi
6801  ;;
6802
6803newos6*)
6804  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6805  lt_cv_file_magic_cmd=/usr/bin/file
6806  lt_cv_file_magic_test_file=/usr/lib/libnls.so
6807  ;;
6808
6809nto-qnx*)
6810  lt_cv_deplibs_check_method=unknown
6811  ;;
6812
6813openbsd*)
6814  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6815    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6816  else
6817    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6818  fi
6819  ;;
6820
6821osf3* | osf4* | osf5*)
6822  lt_cv_deplibs_check_method=pass_all
6823  ;;
6824
6825sco3.2v5*)
6826  lt_cv_deplibs_check_method=pass_all
6827  ;;
6828
6829solaris*)
6830  lt_cv_deplibs_check_method=pass_all
6831  ;;
6832
6833sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6834  case $host_vendor in
6835  motorola)
6836    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]'
6837    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6838    ;;
6839  ncr)
6840    lt_cv_deplibs_check_method=pass_all
6841    ;;
6842  sequent)
6843    lt_cv_file_magic_cmd='/bin/file'
6844    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6845    ;;
6846  sni)
6847    lt_cv_file_magic_cmd='/bin/file'
6848    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6849    lt_cv_file_magic_test_file=/lib/libc.so
6850    ;;
6851  siemens)
6852    lt_cv_deplibs_check_method=pass_all
6853    ;;
6854  esac
6855  ;;
6856
6857sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
6858  lt_cv_deplibs_check_method=pass_all
6859  ;;
6860esac
6861
6862fi
6863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
6864$as_echo "$lt_cv_deplibs_check_method" >&6; }
6865file_magic_cmd=$lt_cv_file_magic_cmd
6866deplibs_check_method=$lt_cv_deplibs_check_method
6867test -z "$deplibs_check_method" && deplibs_check_method=unknown
6868
6869
6870
6871
6872# If no C compiler was specified, use CC.
6873LTCC=${LTCC-"$CC"}
6874
6875# Allow CC to be a program name with arguments.
6876compiler=$CC
6877
6878
6879# Check whether --enable-libtool-lock was given.
6880if test "${enable_libtool_lock+set}" = set; then :
6881  enableval=$enable_libtool_lock;
6882fi
6883
6884test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
6885
6886# Some flags need to be propagated to the compiler or linker for good
6887# libtool support.
6888case $host in
6889ia64-*-hpux*)
6890  # Find out which ABI we are using.
6891  echo 'int i;' > conftest.$ac_ext
6892  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6893  (eval $ac_compile) 2>&5
6894  ac_status=$?
6895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6896  test $ac_status = 0; }; then
6897    case `/usr/bin/file conftest.$ac_objext` in
6898    *ELF-32*)
6899      HPUX_IA64_MODE="32"
6900      ;;
6901    *ELF-64*)
6902      HPUX_IA64_MODE="64"
6903      ;;
6904    esac
6905  fi
6906  rm -rf conftest*
6907  ;;
6908*-*-irix6*)
6909  # Find out which ABI we are using.
6910  echo '#line 6910 "configure"' > conftest.$ac_ext
6911  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6912  (eval $ac_compile) 2>&5
6913  ac_status=$?
6914  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6915  test $ac_status = 0; }; then
6916   if test "$lt_cv_prog_gnu_ld" = yes; then
6917    case `/usr/bin/file conftest.$ac_objext` in
6918    *32-bit*)
6919      LD="${LD-ld} -melf32bsmip"
6920      ;;
6921    *N32*)
6922      LD="${LD-ld} -melf32bmipn32"
6923      ;;
6924    *64-bit*)
6925      LD="${LD-ld} -melf64bmip"
6926      ;;
6927    esac
6928   else
6929    case `/usr/bin/file conftest.$ac_objext` in
6930    *32-bit*)
6931      LD="${LD-ld} -32"
6932      ;;
6933    *N32*)
6934      LD="${LD-ld} -n32"
6935      ;;
6936    *64-bit*)
6937      LD="${LD-ld} -64"
6938      ;;
6939    esac
6940   fi
6941  fi
6942  rm -rf conftest*
6943  ;;
6944
6945x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
6946  # Find out which ABI we are using.
6947  echo 'int i;' > conftest.$ac_ext
6948  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
6949  (eval $ac_compile) 2>&5
6950  ac_status=$?
6951  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6952  test $ac_status = 0; }; then
6953    case `/usr/bin/file conftest.o` in
6954    *32-bit*)
6955      case $host in
6956        x86_64-*linux*)
6957          LD="${LD-ld} -m elf_i386"
6958          ;;
6959        ppc64-*linux*|powerpc64-*linux*)
6960          LD="${LD-ld} -m elf32ppclinux"
6961          ;;
6962        s390x-*linux*)
6963          LD="${LD-ld} -m elf_s390"
6964          ;;
6965        sparc64-*linux*)
6966          LD="${LD-ld} -m elf32_sparc"
6967          ;;
6968      esac
6969      ;;
6970    *64-bit*)
6971      case $host in
6972        x86_64-*linux*)
6973          LD="${LD-ld} -m elf_x86_64"
6974          ;;
6975        ppc*-*linux*|powerpc*-*linux*)
6976          LD="${LD-ld} -m elf64ppc"
6977          ;;
6978        s390*-*linux*)
6979          LD="${LD-ld} -m elf64_s390"
6980          ;;
6981        sparc*-*linux*)
6982          LD="${LD-ld} -m elf64_sparc"
6983          ;;
6984      esac
6985      ;;
6986    esac
6987  fi
6988  rm -rf conftest*
6989  ;;
6990
6991*-*-sco3.2v5*)
6992  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
6993  SAVE_CFLAGS="$CFLAGS"
6994  CFLAGS="$CFLAGS -belf"
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
6996$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
6997if test "${lt_cv_cc_needs_belf+set}" = set; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  ac_ext=c
7001ac_cpp='$CPP $CPPFLAGS'
7002ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7003ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7004ac_compiler_gnu=$ac_cv_c_compiler_gnu
7005
7006     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7007/* end confdefs.h.  */
7008
7009int
7010main ()
7011{
7012
7013  ;
7014  return 0;
7015}
7016_ACEOF
7017if ac_fn_c_try_link "$LINENO"; then :
7018  lt_cv_cc_needs_belf=yes
7019else
7020  lt_cv_cc_needs_belf=no
7021fi
7022rm -f core conftest.err conftest.$ac_objext \
7023    conftest$ac_exeext conftest.$ac_ext
7024     ac_ext=c
7025ac_cpp='$CPP $CPPFLAGS'
7026ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7027ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7028ac_compiler_gnu=$ac_cv_c_compiler_gnu
7029
7030fi
7031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
7032$as_echo "$lt_cv_cc_needs_belf" >&6; }
7033  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
7034    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
7035    CFLAGS="$SAVE_CFLAGS"
7036  fi
7037  ;;
7038*-*-cygwin* | *-*-mingw* | *-*-pw32*)
7039  if test -n "$ac_tool_prefix"; then
7040  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7041set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7043$as_echo_n "checking for $ac_word... " >&6; }
7044if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
7045  $as_echo_n "(cached) " >&6
7046else
7047  if test -n "$DLLTOOL"; then
7048  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7049else
7050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7051for as_dir in $PATH
7052do
7053  IFS=$as_save_IFS
7054  test -z "$as_dir" && as_dir=.
7055    for ac_exec_ext in '' $ac_executable_extensions; do
7056  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7057    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7059    break 2
7060  fi
7061done
7062  done
7063IFS=$as_save_IFS
7064
7065fi
7066fi
7067DLLTOOL=$ac_cv_prog_DLLTOOL
7068if test -n "$DLLTOOL"; then
7069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7070$as_echo "$DLLTOOL" >&6; }
7071else
7072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7073$as_echo "no" >&6; }
7074fi
7075
7076
7077fi
7078if test -z "$ac_cv_prog_DLLTOOL"; then
7079  ac_ct_DLLTOOL=$DLLTOOL
7080  # Extract the first word of "dlltool", so it can be a program name with args.
7081set dummy dlltool; ac_word=$2
7082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7083$as_echo_n "checking for $ac_word... " >&6; }
7084if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
7085  $as_echo_n "(cached) " >&6
7086else
7087  if test -n "$ac_ct_DLLTOOL"; then
7088  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7089else
7090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7091for as_dir in $PATH
7092do
7093  IFS=$as_save_IFS
7094  test -z "$as_dir" && as_dir=.
7095    for ac_exec_ext in '' $ac_executable_extensions; do
7096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7097    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7099    break 2
7100  fi
7101done
7102  done
7103IFS=$as_save_IFS
7104
7105fi
7106fi
7107ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7108if test -n "$ac_ct_DLLTOOL"; then
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7110$as_echo "$ac_ct_DLLTOOL" >&6; }
7111else
7112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113$as_echo "no" >&6; }
7114fi
7115
7116  if test "x$ac_ct_DLLTOOL" = x; then
7117    DLLTOOL="false"
7118  else
7119    case $cross_compiling:$ac_tool_warned in
7120yes:)
7121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7123ac_tool_warned=yes ;;
7124esac
7125    DLLTOOL=$ac_ct_DLLTOOL
7126  fi
7127else
7128  DLLTOOL="$ac_cv_prog_DLLTOOL"
7129fi
7130
7131  if test -n "$ac_tool_prefix"; then
7132  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
7133set dummy ${ac_tool_prefix}as; ac_word=$2
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135$as_echo_n "checking for $ac_word... " >&6; }
7136if test "${ac_cv_prog_AS+set}" = set; then :
7137  $as_echo_n "(cached) " >&6
7138else
7139  if test -n "$AS"; then
7140  ac_cv_prog_AS="$AS" # Let the user override the test.
7141else
7142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7143for as_dir in $PATH
7144do
7145  IFS=$as_save_IFS
7146  test -z "$as_dir" && as_dir=.
7147    for ac_exec_ext in '' $ac_executable_extensions; do
7148  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7149    ac_cv_prog_AS="${ac_tool_prefix}as"
7150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7151    break 2
7152  fi
7153done
7154  done
7155IFS=$as_save_IFS
7156
7157fi
7158fi
7159AS=$ac_cv_prog_AS
7160if test -n "$AS"; then
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
7162$as_echo "$AS" >&6; }
7163else
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
7166fi
7167
7168
7169fi
7170if test -z "$ac_cv_prog_AS"; then
7171  ac_ct_AS=$AS
7172  # Extract the first word of "as", so it can be a program name with args.
7173set dummy as; ac_word=$2
7174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7175$as_echo_n "checking for $ac_word... " >&6; }
7176if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
7177  $as_echo_n "(cached) " >&6
7178else
7179  if test -n "$ac_ct_AS"; then
7180  ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
7181else
7182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7183for as_dir in $PATH
7184do
7185  IFS=$as_save_IFS
7186  test -z "$as_dir" && as_dir=.
7187    for ac_exec_ext in '' $ac_executable_extensions; do
7188  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7189    ac_cv_prog_ac_ct_AS="as"
7190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7191    break 2
7192  fi
7193done
7194  done
7195IFS=$as_save_IFS
7196
7197fi
7198fi
7199ac_ct_AS=$ac_cv_prog_ac_ct_AS
7200if test -n "$ac_ct_AS"; then
7201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
7202$as_echo "$ac_ct_AS" >&6; }
7203else
7204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7205$as_echo "no" >&6; }
7206fi
7207
7208  if test "x$ac_ct_AS" = x; then
7209    AS="false"
7210  else
7211    case $cross_compiling:$ac_tool_warned in
7212yes:)
7213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7215ac_tool_warned=yes ;;
7216esac
7217    AS=$ac_ct_AS
7218  fi
7219else
7220  AS="$ac_cv_prog_AS"
7221fi
7222
7223  if test -n "$ac_tool_prefix"; then
7224  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7225set dummy ${ac_tool_prefix}objdump; ac_word=$2
7226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7227$as_echo_n "checking for $ac_word... " >&6; }
7228if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
7229  $as_echo_n "(cached) " >&6
7230else
7231  if test -n "$OBJDUMP"; then
7232  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7233else
7234as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7235for as_dir in $PATH
7236do
7237  IFS=$as_save_IFS
7238  test -z "$as_dir" && as_dir=.
7239    for ac_exec_ext in '' $ac_executable_extensions; do
7240  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7241    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7243    break 2
7244  fi
7245done
7246  done
7247IFS=$as_save_IFS
7248
7249fi
7250fi
7251OBJDUMP=$ac_cv_prog_OBJDUMP
7252if test -n "$OBJDUMP"; then
7253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7254$as_echo "$OBJDUMP" >&6; }
7255else
7256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257$as_echo "no" >&6; }
7258fi
7259
7260
7261fi
7262if test -z "$ac_cv_prog_OBJDUMP"; then
7263  ac_ct_OBJDUMP=$OBJDUMP
7264  # Extract the first word of "objdump", so it can be a program name with args.
7265set dummy objdump; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  if test -n "$ac_ct_OBJDUMP"; then
7272  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7273else
7274as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7275for as_dir in $PATH
7276do
7277  IFS=$as_save_IFS
7278  test -z "$as_dir" && as_dir=.
7279    for ac_exec_ext in '' $ac_executable_extensions; do
7280  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7281    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7283    break 2
7284  fi
7285done
7286  done
7287IFS=$as_save_IFS
7288
7289fi
7290fi
7291ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7292if test -n "$ac_ct_OBJDUMP"; then
7293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7294$as_echo "$ac_ct_OBJDUMP" >&6; }
7295else
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7297$as_echo "no" >&6; }
7298fi
7299
7300  if test "x$ac_ct_OBJDUMP" = x; then
7301    OBJDUMP="false"
7302  else
7303    case $cross_compiling:$ac_tool_warned in
7304yes:)
7305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7307ac_tool_warned=yes ;;
7308esac
7309    OBJDUMP=$ac_ct_OBJDUMP
7310  fi
7311else
7312  OBJDUMP="$ac_cv_prog_OBJDUMP"
7313fi
7314
7315  ;;
7316
7317esac
7318
7319need_locks="$enable_libtool_lock"
7320
7321
7322ac_ext=c
7323ac_cpp='$CPP $CPPFLAGS'
7324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7326ac_compiler_gnu=$ac_cv_c_compiler_gnu
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7328$as_echo_n "checking how to run the C preprocessor... " >&6; }
7329# On Suns, sometimes $CPP names a directory.
7330if test -n "$CPP" && test -d "$CPP"; then
7331  CPP=
7332fi
7333if test -z "$CPP"; then
7334  if test "${ac_cv_prog_CPP+set}" = set; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337      # Double quotes because CPP needs to be expanded
7338    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7339    do
7340      ac_preproc_ok=false
7341for ac_c_preproc_warn_flag in '' yes
7342do
7343  # Use a header file that comes with gcc, so configuring glibc
7344  # with a fresh cross-compiler works.
7345  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7346  # <limits.h> exists even on freestanding compilers.
7347  # On the NeXT, cc -E runs the code through the compiler's parser,
7348  # not just through cpp. "Syntax error" is here to catch this case.
7349  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7350/* end confdefs.h.  */
7351#ifdef __STDC__
7352# include <limits.h>
7353#else
7354# include <assert.h>
7355#endif
7356		     Syntax error
7357_ACEOF
7358if ac_fn_c_try_cpp "$LINENO"; then :
7359
7360else
7361  # Broken: fails on valid input.
7362continue
7363fi
7364rm -f conftest.err conftest.$ac_ext
7365
7366  # OK, works on sane cases.  Now check whether nonexistent headers
7367  # can be detected and how.
7368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7369/* end confdefs.h.  */
7370#include <ac_nonexistent.h>
7371_ACEOF
7372if ac_fn_c_try_cpp "$LINENO"; then :
7373  # Broken: success on invalid input.
7374continue
7375else
7376  # Passes both tests.
7377ac_preproc_ok=:
7378break
7379fi
7380rm -f conftest.err conftest.$ac_ext
7381
7382done
7383# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7384rm -f conftest.err conftest.$ac_ext
7385if $ac_preproc_ok; then :
7386  break
7387fi
7388
7389    done
7390    ac_cv_prog_CPP=$CPP
7391
7392fi
7393  CPP=$ac_cv_prog_CPP
7394else
7395  ac_cv_prog_CPP=$CPP
7396fi
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7398$as_echo "$CPP" >&6; }
7399ac_preproc_ok=false
7400for ac_c_preproc_warn_flag in '' yes
7401do
7402  # Use a header file that comes with gcc, so configuring glibc
7403  # with a fresh cross-compiler works.
7404  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7405  # <limits.h> exists even on freestanding compilers.
7406  # On the NeXT, cc -E runs the code through the compiler's parser,
7407  # not just through cpp. "Syntax error" is here to catch this case.
7408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7409/* end confdefs.h.  */
7410#ifdef __STDC__
7411# include <limits.h>
7412#else
7413# include <assert.h>
7414#endif
7415		     Syntax error
7416_ACEOF
7417if ac_fn_c_try_cpp "$LINENO"; then :
7418
7419else
7420  # Broken: fails on valid input.
7421continue
7422fi
7423rm -f conftest.err conftest.$ac_ext
7424
7425  # OK, works on sane cases.  Now check whether nonexistent headers
7426  # can be detected and how.
7427  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7428/* end confdefs.h.  */
7429#include <ac_nonexistent.h>
7430_ACEOF
7431if ac_fn_c_try_cpp "$LINENO"; then :
7432  # Broken: success on invalid input.
7433continue
7434else
7435  # Passes both tests.
7436ac_preproc_ok=:
7437break
7438fi
7439rm -f conftest.err conftest.$ac_ext
7440
7441done
7442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7443rm -f conftest.err conftest.$ac_ext
7444if $ac_preproc_ok; then :
7445
7446else
7447  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7449as_fn_error "C preprocessor \"$CPP\" fails sanity check
7450See \`config.log' for more details." "$LINENO" 5; }
7451fi
7452
7453ac_ext=c
7454ac_cpp='$CPP $CPPFLAGS'
7455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7457ac_compiler_gnu=$ac_cv_c_compiler_gnu
7458
7459
7460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7461$as_echo_n "checking for ANSI C header files... " >&6; }
7462if test "${ac_cv_header_stdc+set}" = set; then :
7463  $as_echo_n "(cached) " >&6
7464else
7465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466/* end confdefs.h.  */
7467#include <stdlib.h>
7468#include <stdarg.h>
7469#include <string.h>
7470#include <float.h>
7471
7472int
7473main ()
7474{
7475
7476  ;
7477  return 0;
7478}
7479_ACEOF
7480if ac_fn_c_try_compile "$LINENO"; then :
7481  ac_cv_header_stdc=yes
7482else
7483  ac_cv_header_stdc=no
7484fi
7485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7486
7487if test $ac_cv_header_stdc = yes; then
7488  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7490/* end confdefs.h.  */
7491#include <string.h>
7492
7493_ACEOF
7494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7495  $EGREP "memchr" >/dev/null 2>&1; then :
7496
7497else
7498  ac_cv_header_stdc=no
7499fi
7500rm -f conftest*
7501
7502fi
7503
7504if test $ac_cv_header_stdc = yes; then
7505  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7507/* end confdefs.h.  */
7508#include <stdlib.h>
7509
7510_ACEOF
7511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7512  $EGREP "free" >/dev/null 2>&1; then :
7513
7514else
7515  ac_cv_header_stdc=no
7516fi
7517rm -f conftest*
7518
7519fi
7520
7521if test $ac_cv_header_stdc = yes; then
7522  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7523  if test "$cross_compiling" = yes; then :
7524  :
7525else
7526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7527/* end confdefs.h.  */
7528#include <ctype.h>
7529#include <stdlib.h>
7530#if ((' ' & 0x0FF) == 0x020)
7531# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7532# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7533#else
7534# define ISLOWER(c) \
7535		   (('a' <= (c) && (c) <= 'i') \
7536		     || ('j' <= (c) && (c) <= 'r') \
7537		     || ('s' <= (c) && (c) <= 'z'))
7538# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7539#endif
7540
7541#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7542int
7543main ()
7544{
7545  int i;
7546  for (i = 0; i < 256; i++)
7547    if (XOR (islower (i), ISLOWER (i))
7548	|| toupper (i) != TOUPPER (i))
7549      return 2;
7550  return 0;
7551}
7552_ACEOF
7553if ac_fn_c_try_run "$LINENO"; then :
7554
7555else
7556  ac_cv_header_stdc=no
7557fi
7558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559  conftest.$ac_objext conftest.beam conftest.$ac_ext
7560fi
7561
7562fi
7563fi
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7565$as_echo "$ac_cv_header_stdc" >&6; }
7566if test $ac_cv_header_stdc = yes; then
7567
7568$as_echo "#define STDC_HEADERS 1" >>confdefs.h
7569
7570fi
7571
7572# On IRIX 5.3, sys/types and inttypes.h are conflicting.
7573for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
7574		  inttypes.h stdint.h unistd.h
7575do :
7576  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7577ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7578"
7579eval as_val=\$$as_ac_Header
7580   if test "x$as_val" = x""yes; then :
7581  cat >>confdefs.h <<_ACEOF
7582#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7583_ACEOF
7584
7585fi
7586
7587done
7588
7589
7590for ac_header in dlfcn.h
7591do :
7592  ac_fn_c_check_header_mongrel "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
7593if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
7594  cat >>confdefs.h <<_ACEOF
7595#define HAVE_DLFCN_H 1
7596_ACEOF
7597
7598fi
7599
7600done
7601
7602
7603# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
7604
7605# find the maximum length of command line arguments
7606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7607$as_echo_n "checking the maximum length of command line arguments... " >&6; }
7608if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
7609  $as_echo_n "(cached) " >&6
7610else
7611    i=0
7612  teststring="ABCD"
7613
7614  case $build_os in
7615  msdosdjgpp*)
7616    # On DJGPP, this test can blow up pretty badly due to problems in libc
7617    # (any single argument exceeding 2000 bytes causes a buffer overrun
7618    # during glob expansion).  Even if it were fixed, the result of this
7619    # check would be larger than it should be.
7620    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7621    ;;
7622
7623  gnu*)
7624    # Under GNU Hurd, this test is not required because there is
7625    # no limit to the length of command line arguments.
7626    # Libtool will interpret -1 as no limit whatsoever
7627    lt_cv_sys_max_cmd_len=-1;
7628    ;;
7629
7630  cygwin* | mingw*)
7631    # On Win9x/ME, this test blows up -- it succeeds, but takes
7632    # about 5 minutes as the teststring grows exponentially.
7633    # Worse, since 9x/ME are not pre-emptively multitasking,
7634    # you end up with a "frozen" computer, even though with patience
7635    # the test eventually succeeds (with a max line length of 256k).
7636    # Instead, let's just punt: use the minimum linelength reported by
7637    # all of the supported platforms: 8192 (on NT/2K/XP).
7638    lt_cv_sys_max_cmd_len=8192;
7639    ;;
7640
7641  amigaos*)
7642    # On AmigaOS with pdksh, this test takes hours, literally.
7643    # So we just punt and use a minimum line length of 8192.
7644    lt_cv_sys_max_cmd_len=8192;
7645    ;;
7646
7647  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
7648    # This has been around since 386BSD, at least.  Likely further.
7649    if test -x /sbin/sysctl; then
7650      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7651    elif test -x /usr/sbin/sysctl; then
7652      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7653    else
7654      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7655    fi
7656    # And add a safety zone
7657    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7658    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7659    ;;
7660  osf*)
7661    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7662    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7663    # nice to cause kernel panics so lets avoid the loop below.
7664    # First set a reasonable default.
7665    lt_cv_sys_max_cmd_len=16384
7666    #
7667    if test -x /sbin/sysconfig; then
7668      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7669        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7670      esac
7671    fi
7672    ;;
7673  *)
7674    # If test is not a shell built-in, we'll probably end up computing a
7675    # maximum length that is only half of the actual maximum length, but
7676    # we can't tell.
7677    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7678    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
7679	       = "XX$teststring") >/dev/null 2>&1 &&
7680	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
7681	    lt_cv_sys_max_cmd_len=$new_result &&
7682	    test $i != 17 # 1/2 MB should be enough
7683    do
7684      i=`expr $i + 1`
7685      teststring=$teststring$teststring
7686    done
7687    teststring=
7688    # Add a significant safety factor because C++ compilers can tack on massive
7689    # amounts of additional arguments before passing them to the linker.
7690    # It appears as though 1/2 is a usable value.
7691    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7692    ;;
7693  esac
7694
7695fi
7696
7697if test -n $lt_cv_sys_max_cmd_len ; then
7698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7699$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
7700else
7701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
7702$as_echo "none" >&6; }
7703fi
7704
7705
7706
7707
7708# Check for command to grab the raw symbol name followed by C symbol from nm.
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7710$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
7711if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
7712  $as_echo_n "(cached) " >&6
7713else
7714
7715# These are sane defaults that work on at least a few old systems.
7716# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
7717
7718# Character class describing NM global symbol codes.
7719symcode='[BCDEGRST]'
7720
7721# Regexp to match symbols that can be accessed directly from C.
7722sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7723
7724# Transform an extracted symbol line into a proper C declaration
7725lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
7726
7727# Transform an extracted symbol line into symbol name and symbol address
7728lt_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'"
7729
7730# Define system-specific variables.
7731case $host_os in
7732aix*)
7733  symcode='[BCDT]'
7734  ;;
7735cygwin* | mingw* | pw32*)
7736  symcode='[ABCDGISTW]'
7737  ;;
7738hpux*) # Its linker distinguishes data from code symbols
7739  if test "$host_cpu" = ia64; then
7740    symcode='[ABCDEGRST]'
7741  fi
7742  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7743  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'"
7744  ;;
7745linux*)
7746  if test "$host_cpu" = ia64; then
7747    symcode='[ABCDGIRSTW]'
7748    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
7749    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'"
7750  fi
7751  ;;
7752irix* | nonstopux*)
7753  symcode='[BCDEGRST]'
7754  ;;
7755osf*)
7756  symcode='[BCDEGQRST]'
7757  ;;
7758solaris* | sysv5*)
7759  symcode='[BDRT]'
7760  ;;
7761sysv4)
7762  symcode='[DFNSTU]'
7763  ;;
7764esac
7765
7766# Handle CRLF in mingw tool chain
7767opt_cr=
7768case $build_os in
7769mingw*)
7770  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7771  ;;
7772esac
7773
7774# If we're using GNU nm, then use its standard symbol codes.
7775case `$NM -V 2>&1` in
7776*GNU* | *'with BFD'*)
7777  symcode='[ABCDGIRSTW]' ;;
7778esac
7779
7780# Try without a prefix undercore, then with it.
7781for ac_symprfx in "" "_"; do
7782
7783  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7784  symxfrm="\\1 $ac_symprfx\\2 \\2"
7785
7786  # Write the raw and C identifiers.
7787  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7788
7789  # Check to see that the pipe works correctly.
7790  pipe_works=no
7791
7792  rm -f conftest*
7793  cat > conftest.$ac_ext <<EOF
7794#ifdef __cplusplus
7795extern "C" {
7796#endif
7797char nm_test_var;
7798void nm_test_func(){}
7799#ifdef __cplusplus
7800}
7801#endif
7802int main(){nm_test_var='a';nm_test_func();return(0);}
7803EOF
7804
7805  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7806  (eval $ac_compile) 2>&5
7807  ac_status=$?
7808  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7809  test $ac_status = 0; }; then
7810    # Now try to grab the symbols.
7811    nlist=conftest.nm
7812    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
7813  (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
7814  ac_status=$?
7815  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7816  test $ac_status = 0; } && test -s "$nlist"; then
7817      # Try sorting and uniquifying the output.
7818      if sort "$nlist" | uniq > "$nlist"T; then
7819	mv -f "$nlist"T "$nlist"
7820      else
7821	rm -f "$nlist"T
7822      fi
7823
7824      # Make sure that we snagged all the symbols we need.
7825      if grep ' nm_test_var$' "$nlist" >/dev/null; then
7826	if grep ' nm_test_func$' "$nlist" >/dev/null; then
7827	  cat <<EOF > conftest.$ac_ext
7828#ifdef __cplusplus
7829extern "C" {
7830#endif
7831
7832EOF
7833	  # Now generate the symbol file.
7834	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
7835
7836	  cat <<EOF >> conftest.$ac_ext
7837#if defined (__STDC__) && __STDC__
7838# define lt_ptr_t void *
7839#else
7840# define lt_ptr_t char *
7841# define const
7842#endif
7843
7844/* The mapping between symbol names and symbols. */
7845const struct {
7846  const char *name;
7847  lt_ptr_t address;
7848}
7849lt_preloaded_symbols[] =
7850{
7851EOF
7852	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
7853	  cat <<\EOF >> conftest.$ac_ext
7854  {0, (lt_ptr_t) 0}
7855};
7856
7857#ifdef __cplusplus
7858}
7859#endif
7860EOF
7861	  # Now try linking the two files.
7862	  mv conftest.$ac_objext conftstm.$ac_objext
7863	  lt_save_LIBS="$LIBS"
7864	  lt_save_CFLAGS="$CFLAGS"
7865	  LIBS="conftstm.$ac_objext"
7866	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7867	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7868  (eval $ac_link) 2>&5
7869  ac_status=$?
7870  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7871  test $ac_status = 0; } && test -s conftest${ac_exeext}; then
7872	    pipe_works=yes
7873	  fi
7874	  LIBS="$lt_save_LIBS"
7875	  CFLAGS="$lt_save_CFLAGS"
7876	else
7877	  echo "cannot find nm_test_func in $nlist" >&5
7878	fi
7879      else
7880	echo "cannot find nm_test_var in $nlist" >&5
7881      fi
7882    else
7883      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7884    fi
7885  else
7886    echo "$progname: failed program was:" >&5
7887    cat conftest.$ac_ext >&5
7888  fi
7889  rm -f conftest* conftst*
7890
7891  # Do not use the global_symbol_pipe unless it works.
7892  if test "$pipe_works" = yes; then
7893    break
7894  else
7895    lt_cv_sys_global_symbol_pipe=
7896  fi
7897done
7898
7899fi
7900
7901if test -z "$lt_cv_sys_global_symbol_pipe"; then
7902  lt_cv_sys_global_symbol_to_cdecl=
7903fi
7904if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
7905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
7906$as_echo "failed" >&6; }
7907else
7908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
7909$as_echo "ok" >&6; }
7910fi
7911
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
7913$as_echo_n "checking for objdir... " >&6; }
7914if test "${lt_cv_objdir+set}" = set; then :
7915  $as_echo_n "(cached) " >&6
7916else
7917  rm -f .libs 2>/dev/null
7918mkdir .libs 2>/dev/null
7919if test -d .libs; then
7920  lt_cv_objdir=.libs
7921else
7922  # MS-DOS does not allow filenames that begin with a dot.
7923  lt_cv_objdir=_libs
7924fi
7925rmdir .libs 2>/dev/null
7926fi
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
7928$as_echo "$lt_cv_objdir" >&6; }
7929objdir=$lt_cv_objdir
7930
7931
7932
7933
7934
7935case $host_os in
7936aix3*)
7937  # AIX sometimes has problems with the GCC collect2 program.  For some
7938  # reason, if we set the COLLECT_NAMES environment variable, the problems
7939  # vanish in a puff of smoke.
7940  if test "X${COLLECT_NAMES+set}" != Xset; then
7941    COLLECT_NAMES=
7942    export COLLECT_NAMES
7943  fi
7944  ;;
7945esac
7946
7947# Sed substitution that helps us do robust quoting.  It backslashifies
7948# metacharacters that are still active within double-quoted strings.
7949Xsed='sed -e 1s/^X//'
7950sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
7951
7952# Same as above, but do not quote variable references.
7953double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
7954
7955# Sed substitution to delay expansion of an escaped shell variable in a
7956# double_quote_subst'ed string.
7957delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7958
7959# Sed substitution to avoid accidental globbing in evaled expressions
7960no_glob_subst='s/\*/\\\*/g'
7961
7962# Constants:
7963rm="rm -f"
7964
7965# Global variables:
7966default_ofile=libtool
7967can_build_shared=yes
7968
7969# All known linkers require a `.a' archive for static linking (except MSVC,
7970# which needs '.lib').
7971libext=a
7972ltmain="$ac_aux_dir/ltmain.sh"
7973ofile="$default_ofile"
7974with_gnu_ld="$lt_cv_prog_gnu_ld"
7975
7976if test -n "$ac_tool_prefix"; then
7977  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7978set dummy ${ac_tool_prefix}ar; ac_word=$2
7979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7980$as_echo_n "checking for $ac_word... " >&6; }
7981if test "${ac_cv_prog_AR+set}" = set; then :
7982  $as_echo_n "(cached) " >&6
7983else
7984  if test -n "$AR"; then
7985  ac_cv_prog_AR="$AR" # Let the user override the test.
7986else
7987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7988for as_dir in $PATH
7989do
7990  IFS=$as_save_IFS
7991  test -z "$as_dir" && as_dir=.
7992    for ac_exec_ext in '' $ac_executable_extensions; do
7993  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7994    ac_cv_prog_AR="${ac_tool_prefix}ar"
7995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7996    break 2
7997  fi
7998done
7999  done
8000IFS=$as_save_IFS
8001
8002fi
8003fi
8004AR=$ac_cv_prog_AR
8005if test -n "$AR"; then
8006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8007$as_echo "$AR" >&6; }
8008else
8009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8010$as_echo "no" >&6; }
8011fi
8012
8013
8014fi
8015if test -z "$ac_cv_prog_AR"; then
8016  ac_ct_AR=$AR
8017  # Extract the first word of "ar", so it can be a program name with args.
8018set dummy ar; ac_word=$2
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8020$as_echo_n "checking for $ac_word... " >&6; }
8021if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
8022  $as_echo_n "(cached) " >&6
8023else
8024  if test -n "$ac_ct_AR"; then
8025  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8026else
8027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8028for as_dir in $PATH
8029do
8030  IFS=$as_save_IFS
8031  test -z "$as_dir" && as_dir=.
8032    for ac_exec_ext in '' $ac_executable_extensions; do
8033  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8034    ac_cv_prog_ac_ct_AR="ar"
8035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8036    break 2
8037  fi
8038done
8039  done
8040IFS=$as_save_IFS
8041
8042fi
8043fi
8044ac_ct_AR=$ac_cv_prog_ac_ct_AR
8045if test -n "$ac_ct_AR"; then
8046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8047$as_echo "$ac_ct_AR" >&6; }
8048else
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8050$as_echo "no" >&6; }
8051fi
8052
8053  if test "x$ac_ct_AR" = x; then
8054    AR="false"
8055  else
8056    case $cross_compiling:$ac_tool_warned in
8057yes:)
8058{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8059$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8060ac_tool_warned=yes ;;
8061esac
8062    AR=$ac_ct_AR
8063  fi
8064else
8065  AR="$ac_cv_prog_AR"
8066fi
8067
8068if test -n "$ac_tool_prefix"; then
8069  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8070set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8072$as_echo_n "checking for $ac_word... " >&6; }
8073if test "${ac_cv_prog_RANLIB+set}" = set; then :
8074  $as_echo_n "(cached) " >&6
8075else
8076  if test -n "$RANLIB"; then
8077  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8078else
8079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8080for as_dir in $PATH
8081do
8082  IFS=$as_save_IFS
8083  test -z "$as_dir" && as_dir=.
8084    for ac_exec_ext in '' $ac_executable_extensions; do
8085  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8086    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8088    break 2
8089  fi
8090done
8091  done
8092IFS=$as_save_IFS
8093
8094fi
8095fi
8096RANLIB=$ac_cv_prog_RANLIB
8097if test -n "$RANLIB"; then
8098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8099$as_echo "$RANLIB" >&6; }
8100else
8101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8102$as_echo "no" >&6; }
8103fi
8104
8105
8106fi
8107if test -z "$ac_cv_prog_RANLIB"; then
8108  ac_ct_RANLIB=$RANLIB
8109  # Extract the first word of "ranlib", so it can be a program name with args.
8110set dummy ranlib; ac_word=$2
8111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8112$as_echo_n "checking for $ac_word... " >&6; }
8113if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
8114  $as_echo_n "(cached) " >&6
8115else
8116  if test -n "$ac_ct_RANLIB"; then
8117  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8118else
8119as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8120for as_dir in $PATH
8121do
8122  IFS=$as_save_IFS
8123  test -z "$as_dir" && as_dir=.
8124    for ac_exec_ext in '' $ac_executable_extensions; do
8125  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8126    ac_cv_prog_ac_ct_RANLIB="ranlib"
8127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8128    break 2
8129  fi
8130done
8131  done
8132IFS=$as_save_IFS
8133
8134fi
8135fi
8136ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8137if test -n "$ac_ct_RANLIB"; then
8138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8139$as_echo "$ac_ct_RANLIB" >&6; }
8140else
8141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8142$as_echo "no" >&6; }
8143fi
8144
8145  if test "x$ac_ct_RANLIB" = x; then
8146    RANLIB=":"
8147  else
8148    case $cross_compiling:$ac_tool_warned in
8149yes:)
8150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8152ac_tool_warned=yes ;;
8153esac
8154    RANLIB=$ac_ct_RANLIB
8155  fi
8156else
8157  RANLIB="$ac_cv_prog_RANLIB"
8158fi
8159
8160if test -n "$ac_tool_prefix"; then
8161  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8162set dummy ${ac_tool_prefix}strip; ac_word=$2
8163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8164$as_echo_n "checking for $ac_word... " >&6; }
8165if test "${ac_cv_prog_STRIP+set}" = set; then :
8166  $as_echo_n "(cached) " >&6
8167else
8168  if test -n "$STRIP"; then
8169  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8170else
8171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8172for as_dir in $PATH
8173do
8174  IFS=$as_save_IFS
8175  test -z "$as_dir" && as_dir=.
8176    for ac_exec_ext in '' $ac_executable_extensions; do
8177  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8178    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8180    break 2
8181  fi
8182done
8183  done
8184IFS=$as_save_IFS
8185
8186fi
8187fi
8188STRIP=$ac_cv_prog_STRIP
8189if test -n "$STRIP"; then
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8191$as_echo "$STRIP" >&6; }
8192else
8193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
8195fi
8196
8197
8198fi
8199if test -z "$ac_cv_prog_STRIP"; then
8200  ac_ct_STRIP=$STRIP
8201  # Extract the first word of "strip", so it can be a program name with args.
8202set dummy strip; ac_word=$2
8203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8204$as_echo_n "checking for $ac_word... " >&6; }
8205if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
8206  $as_echo_n "(cached) " >&6
8207else
8208  if test -n "$ac_ct_STRIP"; then
8209  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8210else
8211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8212for as_dir in $PATH
8213do
8214  IFS=$as_save_IFS
8215  test -z "$as_dir" && as_dir=.
8216    for ac_exec_ext in '' $ac_executable_extensions; do
8217  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8218    ac_cv_prog_ac_ct_STRIP="strip"
8219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8220    break 2
8221  fi
8222done
8223  done
8224IFS=$as_save_IFS
8225
8226fi
8227fi
8228ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8229if test -n "$ac_ct_STRIP"; then
8230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8231$as_echo "$ac_ct_STRIP" >&6; }
8232else
8233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8234$as_echo "no" >&6; }
8235fi
8236
8237  if test "x$ac_ct_STRIP" = x; then
8238    STRIP=":"
8239  else
8240    case $cross_compiling:$ac_tool_warned in
8241yes:)
8242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8244ac_tool_warned=yes ;;
8245esac
8246    STRIP=$ac_ct_STRIP
8247  fi
8248else
8249  STRIP="$ac_cv_prog_STRIP"
8250fi
8251
8252
8253old_CC="$CC"
8254old_CFLAGS="$CFLAGS"
8255
8256# Set sane defaults for various variables
8257test -z "$AR" && AR=ar
8258test -z "$AR_FLAGS" && AR_FLAGS=cru
8259test -z "$AS" && AS=as
8260test -z "$CC" && CC=cc
8261test -z "$LTCC" && LTCC=$CC
8262test -z "$DLLTOOL" && DLLTOOL=dlltool
8263test -z "$LD" && LD=ld
8264test -z "$LN_S" && LN_S="ln -s"
8265test -z "$MAGIC_CMD" && MAGIC_CMD=file
8266test -z "$NM" && NM=nm
8267test -z "$SED" && SED=sed
8268test -z "$OBJDUMP" && OBJDUMP=objdump
8269test -z "$RANLIB" && RANLIB=:
8270test -z "$STRIP" && STRIP=:
8271test -z "$ac_objext" && ac_objext=o
8272
8273# Determine commands to create old-style static archives.
8274old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
8275old_postinstall_cmds='chmod 644 $oldlib'
8276old_postuninstall_cmds=
8277
8278if test -n "$RANLIB"; then
8279  case $host_os in
8280  openbsd*)
8281    old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
8282    ;;
8283  *)
8284    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
8285    ;;
8286  esac
8287  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
8288fi
8289
8290for cc_temp in $compiler""; do
8291  case $cc_temp in
8292    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8293    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8294    \-*) ;;
8295    *) break;;
8296  esac
8297done
8298cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
8299
8300
8301# Only perform the check for file, if the check method requires it
8302case $deplibs_check_method in
8303file_magic*)
8304  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
8305    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
8306$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
8307if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8308  $as_echo_n "(cached) " >&6
8309else
8310  case $MAGIC_CMD in
8311[\\/*] |  ?:[\\/]*)
8312  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8313  ;;
8314*)
8315  lt_save_MAGIC_CMD="$MAGIC_CMD"
8316  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8317  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8318  for ac_dir in $ac_dummy; do
8319    IFS="$lt_save_ifs"
8320    test -z "$ac_dir" && ac_dir=.
8321    if test -f $ac_dir/${ac_tool_prefix}file; then
8322      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
8323      if test -n "$file_magic_test_file"; then
8324	case $deplibs_check_method in
8325	"file_magic "*)
8326	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8327	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8328	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8329	    $EGREP "$file_magic_regex" > /dev/null; then
8330	    :
8331	  else
8332	    cat <<EOF 1>&2
8333
8334*** Warning: the command libtool uses to detect shared libraries,
8335*** $file_magic_cmd, produces output that libtool cannot recognize.
8336*** The result is that libtool may fail to recognize shared libraries
8337*** as such.  This will affect the creation of libtool libraries that
8338*** depend on shared libraries, but programs linked with such libtool
8339*** libraries will work regardless of this problem.  Nevertheless, you
8340*** may want to report the problem to your system manager and/or to
8341*** bug-libtool@gnu.org
8342
8343EOF
8344	  fi ;;
8345	esac
8346      fi
8347      break
8348    fi
8349  done
8350  IFS="$lt_save_ifs"
8351  MAGIC_CMD="$lt_save_MAGIC_CMD"
8352  ;;
8353esac
8354fi
8355
8356MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8357if test -n "$MAGIC_CMD"; then
8358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8359$as_echo "$MAGIC_CMD" >&6; }
8360else
8361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8362$as_echo "no" >&6; }
8363fi
8364
8365if test -z "$lt_cv_path_MAGIC_CMD"; then
8366  if test -n "$ac_tool_prefix"; then
8367    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
8368$as_echo_n "checking for file... " >&6; }
8369if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
8370  $as_echo_n "(cached) " >&6
8371else
8372  case $MAGIC_CMD in
8373[\\/*] |  ?:[\\/]*)
8374  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
8375  ;;
8376*)
8377  lt_save_MAGIC_CMD="$MAGIC_CMD"
8378  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
8379  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
8380  for ac_dir in $ac_dummy; do
8381    IFS="$lt_save_ifs"
8382    test -z "$ac_dir" && ac_dir=.
8383    if test -f $ac_dir/file; then
8384      lt_cv_path_MAGIC_CMD="$ac_dir/file"
8385      if test -n "$file_magic_test_file"; then
8386	case $deplibs_check_method in
8387	"file_magic "*)
8388	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
8389	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8390	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
8391	    $EGREP "$file_magic_regex" > /dev/null; then
8392	    :
8393	  else
8394	    cat <<EOF 1>&2
8395
8396*** Warning: the command libtool uses to detect shared libraries,
8397*** $file_magic_cmd, produces output that libtool cannot recognize.
8398*** The result is that libtool may fail to recognize shared libraries
8399*** as such.  This will affect the creation of libtool libraries that
8400*** depend on shared libraries, but programs linked with such libtool
8401*** libraries will work regardless of this problem.  Nevertheless, you
8402*** may want to report the problem to your system manager and/or to
8403*** bug-libtool@gnu.org
8404
8405EOF
8406	  fi ;;
8407	esac
8408      fi
8409      break
8410    fi
8411  done
8412  IFS="$lt_save_ifs"
8413  MAGIC_CMD="$lt_save_MAGIC_CMD"
8414  ;;
8415esac
8416fi
8417
8418MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
8419if test -n "$MAGIC_CMD"; then
8420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
8421$as_echo "$MAGIC_CMD" >&6; }
8422else
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8424$as_echo "no" >&6; }
8425fi
8426
8427  else
8428    MAGIC_CMD=:
8429  fi
8430fi
8431
8432  fi
8433  ;;
8434esac
8435
8436enable_dlopen=yes
8437enable_win32_dll=yes
8438
8439# Check whether --enable-libtool-lock was given.
8440if test "${enable_libtool_lock+set}" = set; then :
8441  enableval=$enable_libtool_lock;
8442fi
8443
8444test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
8445
8446
8447# Check whether --with-pic was given.
8448if test "${with_pic+set}" = set; then :
8449  withval=$with_pic; pic_mode="$withval"
8450else
8451  pic_mode=default
8452fi
8453
8454test -z "$pic_mode" && pic_mode=default
8455
8456# Use C for the default configuration in the libtool script
8457tagname=
8458lt_save_CC="$CC"
8459ac_ext=c
8460ac_cpp='$CPP $CPPFLAGS'
8461ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8462ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8463ac_compiler_gnu=$ac_cv_c_compiler_gnu
8464
8465
8466# Source file extension for C test sources.
8467ac_ext=c
8468
8469# Object file extension for compiled C test sources.
8470objext=o
8471objext=$objext
8472
8473# Code to be used in simple compile tests
8474lt_simple_compile_test_code="int some_variable = 0;\n"
8475
8476# Code to be used in simple link tests
8477lt_simple_link_test_code='int main(){return(0);}\n'
8478
8479
8480# If no C compiler was specified, use CC.
8481LTCC=${LTCC-"$CC"}
8482
8483# Allow CC to be a program name with arguments.
8484compiler=$CC
8485
8486
8487# save warnings/boilerplate of simple test code
8488ac_outfile=conftest.$ac_objext
8489printf "$lt_simple_compile_test_code" >conftest.$ac_ext
8490eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8491_lt_compiler_boilerplate=`cat conftest.err`
8492$rm conftest*
8493
8494ac_outfile=conftest.$ac_objext
8495printf "$lt_simple_link_test_code" >conftest.$ac_ext
8496eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
8497_lt_linker_boilerplate=`cat conftest.err`
8498$rm conftest*
8499
8500
8501#
8502# Check for any special shared library compilation flags.
8503#
8504lt_prog_cc_shlib=
8505if test "$GCC" = no; then
8506  case $host_os in
8507  sco3.2v5*)
8508    lt_prog_cc_shlib='-belf'
8509    ;;
8510  esac
8511fi
8512if test -n "$lt_prog_cc_shlib"; then
8513  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
8514$as_echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
8515  if echo "$old_CC $old_CFLAGS " | grep "[ 	]$lt_prog_cc_shlib[ 	]" >/dev/null; then :
8516  else
8517    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
8518$as_echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
8519    lt_cv_prog_cc_can_build_shared=no
8520  fi
8521fi
8522
8523
8524#
8525# Check to make sure the static flag actually works.
8526#
8527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_prog_compiler_static works" >&5
8528$as_echo_n "checking if $compiler static flag $lt_prog_compiler_static works... " >&6; }
8529if test "${lt_prog_compiler_static_works+set}" = set; then :
8530  $as_echo_n "(cached) " >&6
8531else
8532  lt_prog_compiler_static_works=no
8533   save_LDFLAGS="$LDFLAGS"
8534   LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
8535   printf "$lt_simple_link_test_code" > conftest.$ac_ext
8536   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
8537     # The linker can only warn and ignore the option if not recognized
8538     # So say no if there are warnings
8539     if test -s conftest.err; then
8540       # Append any errors to the config.log.
8541       cat conftest.err 1>&5
8542       $echo "X$_lt_linker_boilerplate" | $Xsed > conftest.exp
8543       $SED '/^$/d' conftest.err >conftest.er2
8544       if diff conftest.exp conftest.er2 >/dev/null; then
8545         lt_prog_compiler_static_works=yes
8546       fi
8547     else
8548       lt_prog_compiler_static_works=yes
8549     fi
8550   fi
8551   $rm conftest*
8552   LDFLAGS="$save_LDFLAGS"
8553
8554fi
8555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_static_works" >&5
8556$as_echo "$lt_prog_compiler_static_works" >&6; }
8557
8558if test x"$lt_prog_compiler_static_works" = xyes; then
8559    :
8560else
8561    lt_prog_compiler_static=
8562fi
8563
8564
8565
8566
8567lt_prog_compiler_no_builtin_flag=
8568
8569if test "$GCC" = yes; then
8570  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
8571
8572
8573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
8574$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
8575if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
8576  $as_echo_n "(cached) " >&6
8577else
8578  lt_cv_prog_compiler_rtti_exceptions=no
8579  ac_outfile=conftest.$ac_objext
8580   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8581   lt_compiler_flag="-fno-rtti -fno-exceptions"
8582   # Insert the option either (1) after the last *FLAGS variable, or
8583   # (2) before a word containing "conftest.", or (3) at the end.
8584   # Note that $ac_compile itself does not contain backslashes and begins
8585   # with a dollar sign (not a hyphen), so the echo should work correctly.
8586   # The option is referenced via a variable to avoid confusing sed.
8587   lt_compile=`echo "$ac_compile" | $SED \
8588   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8589   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8590   -e 's:$: $lt_compiler_flag:'`
8591   (eval echo "\"\$as_me:8591: $lt_compile\"" >&5)
8592   (eval "$lt_compile" 2>conftest.err)
8593   ac_status=$?
8594   cat conftest.err >&5
8595   echo "$as_me:8595: \$? = $ac_status" >&5
8596   if (exit $ac_status) && test -s "$ac_outfile"; then
8597     # The compiler can only warn and ignore the option if not recognized
8598     # So say no if there are warnings other than the usual output.
8599     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8600     $SED '/^$/d' conftest.err >conftest.er2
8601     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8602       lt_cv_prog_compiler_rtti_exceptions=yes
8603     fi
8604   fi
8605   $rm conftest*
8606
8607fi
8608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
8609$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
8610
8611if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
8612    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
8613else
8614    :
8615fi
8616
8617fi
8618
8619lt_prog_compiler_wl=
8620lt_prog_compiler_pic=
8621lt_prog_compiler_static=
8622
8623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
8624$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
8625
8626  if test "$GCC" = yes; then
8627    lt_prog_compiler_wl='-Wl,'
8628    lt_prog_compiler_static='-static'
8629
8630    case $host_os in
8631      aix*)
8632      # All AIX code is PIC.
8633      if test "$host_cpu" = ia64; then
8634	# AIX 5 now supports IA64 processor
8635	lt_prog_compiler_static='-Bstatic'
8636      fi
8637      ;;
8638
8639    amigaos*)
8640      # FIXME: we need at least 68020 code to build shared libraries, but
8641      # adding the `-m68020' flag to GCC prevents building anything better,
8642      # like `-m68040'.
8643      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
8644      ;;
8645
8646    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
8647      # PIC is the default for these OSes.
8648      ;;
8649
8650    mingw* | pw32* | os2*)
8651      # This hack is so that the source file can tell whether it is being
8652      # built for inclusion in a dll (and should export symbols for example).
8653      lt_prog_compiler_pic='-DDLL_EXPORT'
8654      ;;
8655
8656    darwin* | rhapsody*)
8657      # PIC is the default on this platform
8658      # Common symbols not allowed in MH_DYLIB files
8659      lt_prog_compiler_pic='-fno-common'
8660      ;;
8661
8662    msdosdjgpp*)
8663      # Just because we use GCC doesn't mean we suddenly get shared libraries
8664      # on systems that don't support them.
8665      lt_prog_compiler_can_build_shared=no
8666      enable_shared=no
8667      ;;
8668
8669    sysv4*MP*)
8670      if test -d /usr/nec; then
8671	lt_prog_compiler_pic=-Kconform_pic
8672      fi
8673      ;;
8674
8675    hpux*)
8676      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8677      # not for PA HP-UX.
8678      case $host_cpu in
8679      hppa*64*|ia64*)
8680	# +Z the default
8681	;;
8682      *)
8683	lt_prog_compiler_pic='-fPIC'
8684	;;
8685      esac
8686      ;;
8687
8688    *)
8689      lt_prog_compiler_pic='-fPIC'
8690      ;;
8691    esac
8692  else
8693    # PORTME Check for flag to pass linker flags through the system compiler.
8694    case $host_os in
8695    aix*)
8696      lt_prog_compiler_wl='-Wl,'
8697      if test "$host_cpu" = ia64; then
8698	# AIX 5 now supports IA64 processor
8699	lt_prog_compiler_static='-Bstatic'
8700      else
8701	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
8702      fi
8703      ;;
8704      darwin*)
8705        # PIC is the default on this platform
8706        # Common symbols not allowed in MH_DYLIB files
8707       case $cc_basename in
8708         xlc*)
8709         lt_prog_compiler_pic='-qnocommon'
8710         lt_prog_compiler_wl='-Wl,'
8711         ;;
8712       esac
8713       ;;
8714
8715    mingw* | pw32* | os2*)
8716      # This hack is so that the source file can tell whether it is being
8717      # built for inclusion in a dll (and should export symbols for example).
8718      lt_prog_compiler_pic='-DDLL_EXPORT'
8719      ;;
8720
8721    hpux9* | hpux10* | hpux11*)
8722      lt_prog_compiler_wl='-Wl,'
8723      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
8724      # not for PA HP-UX.
8725      case $host_cpu in
8726      hppa*64*|ia64*)
8727	# +Z the default
8728	;;
8729      *)
8730	lt_prog_compiler_pic='+Z'
8731	;;
8732      esac
8733      # Is there a better lt_prog_compiler_static that works with the bundled CC?
8734      lt_prog_compiler_static='${wl}-a ${wl}archive'
8735      ;;
8736
8737    irix5* | irix6* | nonstopux*)
8738      lt_prog_compiler_wl='-Wl,'
8739      # PIC (with -KPIC) is the default.
8740      lt_prog_compiler_static='-non_shared'
8741      ;;
8742
8743    newsos6)
8744      lt_prog_compiler_pic='-KPIC'
8745      lt_prog_compiler_static='-Bstatic'
8746      ;;
8747
8748    linux*)
8749      case $cc_basename in
8750      icc* | ecc*)
8751	lt_prog_compiler_wl='-Wl,'
8752	lt_prog_compiler_pic='-KPIC'
8753	lt_prog_compiler_static='-static'
8754        ;;
8755      pgcc* | pgf77* | pgf90* | pgf95*)
8756        # Portland Group compilers (*not* the Pentium gcc compiler,
8757	# which looks to be a dead project)
8758	lt_prog_compiler_wl='-Wl,'
8759	lt_prog_compiler_pic='-fpic'
8760	lt_prog_compiler_static='-Bstatic'
8761        ;;
8762      ccc*)
8763        lt_prog_compiler_wl='-Wl,'
8764        # All Alpha code is PIC.
8765        lt_prog_compiler_static='-non_shared'
8766        ;;
8767      esac
8768      ;;
8769
8770    osf3* | osf4* | osf5*)
8771      lt_prog_compiler_wl='-Wl,'
8772      # All OSF/1 code is PIC.
8773      lt_prog_compiler_static='-non_shared'
8774      ;;
8775
8776    sco3.2v5*)
8777      lt_prog_compiler_pic='-Kpic'
8778      lt_prog_compiler_static='-dn'
8779      ;;
8780
8781    solaris*)
8782      lt_prog_compiler_pic='-KPIC'
8783      lt_prog_compiler_static='-Bstatic'
8784      case $cc_basename in
8785      f77* | f90* | f95*)
8786	lt_prog_compiler_wl='-Qoption ld ';;
8787      *)
8788	lt_prog_compiler_wl='-Wl,';;
8789      esac
8790      ;;
8791
8792    sunos4*)
8793      lt_prog_compiler_wl='-Qoption ld '
8794      lt_prog_compiler_pic='-PIC'
8795      lt_prog_compiler_static='-Bstatic'
8796      ;;
8797
8798    sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
8799      lt_prog_compiler_wl='-Wl,'
8800      lt_prog_compiler_pic='-KPIC'
8801      lt_prog_compiler_static='-Bstatic'
8802      ;;
8803
8804    sysv4*MP*)
8805      if test -d /usr/nec ;then
8806	lt_prog_compiler_pic='-Kconform_pic'
8807	lt_prog_compiler_static='-Bstatic'
8808      fi
8809      ;;
8810
8811    unicos*)
8812      lt_prog_compiler_wl='-Wl,'
8813      lt_prog_compiler_can_build_shared=no
8814      ;;
8815
8816    uts4*)
8817      lt_prog_compiler_pic='-pic'
8818      lt_prog_compiler_static='-Bstatic'
8819      ;;
8820
8821    *)
8822      lt_prog_compiler_can_build_shared=no
8823      ;;
8824    esac
8825  fi
8826
8827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
8828$as_echo "$lt_prog_compiler_pic" >&6; }
8829
8830#
8831# Check to make sure the PIC flag actually works.
8832#
8833if test -n "$lt_prog_compiler_pic"; then
8834
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
8836$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
8837if test "${lt_prog_compiler_pic_works+set}" = set; then :
8838  $as_echo_n "(cached) " >&6
8839else
8840  lt_prog_compiler_pic_works=no
8841  ac_outfile=conftest.$ac_objext
8842   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8843   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
8844   # Insert the option either (1) after the last *FLAGS variable, or
8845   # (2) before a word containing "conftest.", or (3) at the end.
8846   # Note that $ac_compile itself does not contain backslashes and begins
8847   # with a dollar sign (not a hyphen), so the echo should work correctly.
8848   # The option is referenced via a variable to avoid confusing sed.
8849   lt_compile=`echo "$ac_compile" | $SED \
8850   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8851   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8852   -e 's:$: $lt_compiler_flag:'`
8853   (eval echo "\"\$as_me:8853: $lt_compile\"" >&5)
8854   (eval "$lt_compile" 2>conftest.err)
8855   ac_status=$?
8856   cat conftest.err >&5
8857   echo "$as_me:8857: \$? = $ac_status" >&5
8858   if (exit $ac_status) && test -s "$ac_outfile"; then
8859     # The compiler can only warn and ignore the option if not recognized
8860     # So say no if there are warnings other than the usual output.
8861     $echo "X$_lt_compiler_boilerplate" | $Xsed >conftest.exp
8862     $SED '/^$/d' conftest.err >conftest.er2
8863     if test ! -s conftest.err || diff conftest.exp conftest.er2 >/dev/null; then
8864       lt_prog_compiler_pic_works=yes
8865     fi
8866   fi
8867   $rm conftest*
8868
8869fi
8870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_works" >&5
8871$as_echo "$lt_prog_compiler_pic_works" >&6; }
8872
8873if test x"$lt_prog_compiler_pic_works" = xyes; then
8874    case $lt_prog_compiler_pic in
8875     "" | " "*) ;;
8876     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
8877     esac
8878else
8879    lt_prog_compiler_pic=
8880     lt_prog_compiler_can_build_shared=no
8881fi
8882
8883fi
8884case $host_os in
8885  # For platforms which do not support PIC, -DPIC is meaningless:
8886  *djgpp*)
8887    lt_prog_compiler_pic=
8888    ;;
8889  *)
8890    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
8891    ;;
8892esac
8893
8894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
8895$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
8896if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
8897  $as_echo_n "(cached) " >&6
8898else
8899  lt_cv_prog_compiler_c_o=no
8900   $rm -r conftest 2>/dev/null
8901   mkdir conftest
8902   cd conftest
8903   mkdir out
8904   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
8905
8906   lt_compiler_flag="-o out/conftest2.$ac_objext"
8907   # Insert the option either (1) after the last *FLAGS variable, or
8908   # (2) before a word containing "conftest.", or (3) at the end.
8909   # Note that $ac_compile itself does not contain backslashes and begins
8910   # with a dollar sign (not a hyphen), so the echo should work correctly.
8911   lt_compile=`echo "$ac_compile" | $SED \
8912   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8913   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8914   -e 's:$: $lt_compiler_flag:'`
8915   (eval echo "\"\$as_me:8915: $lt_compile\"" >&5)
8916   (eval "$lt_compile" 2>out/conftest.err)
8917   ac_status=$?
8918   cat out/conftest.err >&5
8919   echo "$as_me:8919: \$? = $ac_status" >&5
8920   if (exit $ac_status) && test -s out/conftest2.$ac_objext
8921   then
8922     # The compiler can only warn and ignore the option if not recognized
8923     # So say no if there are warnings
8924     $echo "X$_lt_compiler_boilerplate" | $Xsed > out/conftest.exp
8925     $SED '/^$/d' out/conftest.err >out/conftest.er2
8926     if test ! -s out/conftest.err || diff out/conftest.exp out/conftest.er2 >/dev/null; then
8927       lt_cv_prog_compiler_c_o=yes
8928     fi
8929   fi
8930   chmod u+w . 2>&5
8931   $rm conftest*
8932   # SGI C++ compiler will create directory out/ii_files/ for
8933   # template instantiation
8934   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
8935   $rm out/* && rmdir out
8936   cd ..
8937   rmdir conftest
8938   $rm conftest*
8939
8940fi
8941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
8942$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
8943
8944
8945hard_links="nottested"
8946if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
8947  # do not overwrite the value of need_locks provided by the user
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
8949$as_echo_n "checking if we can lock with hard links... " >&6; }
8950  hard_links=yes
8951  $rm conftest*
8952  ln conftest.a conftest.b 2>/dev/null && hard_links=no
8953  touch conftest.a
8954  ln conftest.a conftest.b 2>&5 || hard_links=no
8955  ln conftest.a conftest.b 2>/dev/null && hard_links=no
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
8957$as_echo "$hard_links" >&6; }
8958  if test "$hard_links" = no; then
8959    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
8960$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
8961    need_locks=warn
8962  fi
8963else
8964  need_locks=no
8965fi
8966
8967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
8968$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
8969
8970  runpath_var=
8971  allow_undefined_flag=
8972  enable_shared_with_static_runtimes=no
8973  archive_cmds=
8974  archive_expsym_cmds=
8975  old_archive_From_new_cmds=
8976  old_archive_from_expsyms_cmds=
8977  export_dynamic_flag_spec=
8978  whole_archive_flag_spec=
8979  thread_safe_flag_spec=
8980  hardcode_libdir_flag_spec=
8981  hardcode_libdir_flag_spec_ld=
8982  hardcode_libdir_separator=
8983  hardcode_direct=no
8984  hardcode_minus_L=no
8985  hardcode_shlibpath_var=unsupported
8986  link_all_deplibs=unknown
8987  hardcode_automatic=no
8988  module_cmds=
8989  module_expsym_cmds=
8990  always_export_symbols=no
8991  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
8992  # include_expsyms should be a list of space-separated symbols to be *always*
8993  # included in the symbol list
8994  include_expsyms=
8995  # exclude_expsyms can be an extended regexp of symbols to exclude
8996  # it will be wrapped by ` (' and `)$', so one must not match beginning or
8997  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
8998  # as well as any symbol that contains `d'.
8999  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
9000  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
9001  # platforms (ab)use it in PIC code, but their linkers get confused if
9002  # the symbol is explicitly referenced.  Since portable code cannot
9003  # rely on this symbol name, it's probably fine to never include it in
9004  # preloaded symbol tables.
9005  extract_expsyms_cmds=
9006  # Just being paranoid about ensuring that cc_basename is set.
9007  for cc_temp in $compiler""; do
9008  case $cc_temp in
9009    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9010    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9011    \-*) ;;
9012    *) break;;
9013  esac
9014done
9015cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
9016
9017  case $host_os in
9018  cygwin* | mingw* | pw32*)
9019    # FIXME: the MSVC++ port hasn't been tested in a loooong time
9020    # When not using gcc, we currently assume that we are using
9021    # Microsoft Visual C++.
9022    if test "$GCC" != yes; then
9023      with_gnu_ld=no
9024    fi
9025    ;;
9026  openbsd*)
9027    with_gnu_ld=no
9028    ;;
9029  esac
9030
9031  ld_shlibs=yes
9032  if test "$with_gnu_ld" = yes; then
9033    # If archive_cmds runs LD, not CC, wlarc should be empty
9034    wlarc='${wl}'
9035
9036    # Set some defaults for GNU ld with shared library support. These
9037    # are reset later if shared libraries are not supported. Putting them
9038    # here allows them to be overridden if necessary.
9039    runpath_var=LD_RUN_PATH
9040    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
9041    export_dynamic_flag_spec='${wl}--export-dynamic'
9042    # ancient GNU ld didn't support --whole-archive et. al.
9043    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
9044	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
9045      else
9046  	whole_archive_flag_spec=
9047    fi
9048    supports_anon_versioning=no
9049    case `$LD -v 2>/dev/null` in
9050      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
9051      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
9052      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
9053      *\ 2.11.*) ;; # other 2.11 versions
9054      *) supports_anon_versioning=yes ;;
9055    esac
9056
9057    # See if GNU ld supports shared libraries.
9058    case $host_os in
9059    aix3* | aix4* | aix5*)
9060      # On AIX/PPC, the GNU linker is very broken
9061      if test "$host_cpu" != ia64; then
9062	ld_shlibs=no
9063	cat <<EOF 1>&2
9064
9065*** Warning: the GNU linker, at least up to release 2.9.1, is reported
9066*** to be unable to reliably create shared libraries on AIX.
9067*** Therefore, libtool is disabling shared libraries support.  If you
9068*** really care for shared libraries, you may want to modify your PATH
9069*** so that a non-GNU linker is found, and then restart.
9070
9071EOF
9072      fi
9073      ;;
9074
9075    amigaos*)
9076      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)'
9077      hardcode_libdir_flag_spec='-L$libdir'
9078      hardcode_minus_L=yes
9079
9080      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
9081      # that the semantics of dynamic libraries on AmigaOS, at least up
9082      # to version 4, is to share data among multiple programs linked
9083      # with the same dynamic library.  Since this doesn't match the
9084      # behavior of shared libraries on other platforms, we can't use
9085      # them.
9086      ld_shlibs=no
9087      ;;
9088
9089    beos*)
9090      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9091	allow_undefined_flag=unsupported
9092	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
9093	# support --undefined.  This deserves some investigation.  FIXME
9094	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9095      else
9096	ld_shlibs=no
9097      fi
9098      ;;
9099
9100    cygwin* | mingw* | pw32*)
9101      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
9102      # as there is no search path for DLLs.
9103      hardcode_libdir_flag_spec='-L$libdir'
9104      allow_undefined_flag=unsupported
9105      always_export_symbols=no
9106      enable_shared_with_static_runtimes=yes
9107      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
9108
9109      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
9110        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
9111	# If the export-symbols file already is a .def file (1st line
9112	# is EXPORTS), use it as is; otherwise, prepend...
9113	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
9114	  cp $export_symbols $output_objdir/$soname.def;
9115	else
9116	  echo EXPORTS > $output_objdir/$soname.def;
9117	  cat $export_symbols >> $output_objdir/$soname.def;
9118	fi~
9119	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
9120      else
9121	ld_shlibs=no
9122      fi
9123      ;;
9124
9125    linux*)
9126      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9127	tmp_addflag=
9128	case $cc_basename,$host_cpu in
9129	pgcc*)				# Portland Group C compiler
9130	  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'
9131	  tmp_addflag=' $pic_flag'
9132	  ;;
9133	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
9134	  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'
9135	  tmp_addflag=' $pic_flag -Mnomain' ;;
9136	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
9137	  tmp_addflag=' -i_dynamic' ;;
9138	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
9139	  tmp_addflag=' -i_dynamic -nofor_main' ;;
9140	ifc* | ifort*)			# Intel Fortran compiler
9141	  tmp_addflag=' -nofor_main' ;;
9142	esac
9143	archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9144
9145	if test $supports_anon_versioning = yes; then
9146	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
9147  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
9148  $echo "local: *; };" >> $output_objdir/$libname.ver~
9149	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
9150	fi
9151      else
9152	ld_shlibs=no
9153      fi
9154      ;;
9155
9156    netbsd*)
9157      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9158	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
9159	wlarc=
9160      else
9161	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9162	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9163      fi
9164      ;;
9165
9166    solaris* | sysv5*)
9167      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
9168	ld_shlibs=no
9169	cat <<EOF 1>&2
9170
9171*** Warning: The releases 2.8.* of the GNU linker cannot reliably
9172*** create shared libraries on Solaris systems.  Therefore, libtool
9173*** is disabling shared libraries support.  We urge you to upgrade GNU
9174*** binutils to release 2.9.1 or newer.  Another option is to modify
9175*** your PATH or compiler configuration so that the native linker is
9176*** used, and then restart.
9177
9178EOF
9179      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9180	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9181	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9182      else
9183	ld_shlibs=no
9184      fi
9185      ;;
9186
9187    sunos4*)
9188      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9189      wlarc=
9190      hardcode_direct=yes
9191      hardcode_shlibpath_var=no
9192      ;;
9193
9194    *)
9195      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
9196	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
9197	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
9198      else
9199	ld_shlibs=no
9200      fi
9201      ;;
9202    esac
9203
9204    if test "$ld_shlibs" = no; then
9205      runpath_var=
9206      hardcode_libdir_flag_spec=
9207      export_dynamic_flag_spec=
9208      whole_archive_flag_spec=
9209    fi
9210  else
9211    # PORTME fill in a description of your system's linker (not GNU ld)
9212    case $host_os in
9213    aix3*)
9214      allow_undefined_flag=unsupported
9215      always_export_symbols=yes
9216      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'
9217      # Note: this linker hardcodes the directories in LIBPATH if there
9218      # are no directories specified by -L.
9219      hardcode_minus_L=yes
9220      if test "$GCC" = yes && test -z "$link_static_flag"; then
9221	# Neither direct hardcoding nor static linking is supported with a
9222	# broken collect2.
9223	hardcode_direct=unsupported
9224      fi
9225      ;;
9226
9227    aix4* | aix5*)
9228      if test "$host_cpu" = ia64; then
9229	# On IA64, the linker does run time linking by default, so we don't
9230	# have to do anything special.
9231	aix_use_runtimelinking=no
9232	exp_sym_flag='-Bexport'
9233	no_entry_flag=""
9234      else
9235	# If we're using GNU nm, then we don't want the "-C" option.
9236	# -C means demangle to AIX nm, but means don't demangle with GNU nm
9237	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
9238	  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'
9239	else
9240	  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'
9241	fi
9242	aix_use_runtimelinking=no
9243
9244	# Test if we are trying to use run time linking or normal
9245	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
9246	# need to do runtime linking.
9247	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
9248	  for ld_flag in $LDFLAGS; do
9249  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
9250  	    aix_use_runtimelinking=yes
9251  	    break
9252  	  fi
9253	  done
9254	esac
9255
9256	exp_sym_flag='-bexport'
9257	no_entry_flag='-bnoentry'
9258      fi
9259
9260      # When large executables or shared objects are built, AIX ld can
9261      # have problems creating the table of contents.  If linking a library
9262      # or program results in "error TOC overflow" add -mminimal-toc to
9263      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
9264      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
9265
9266      archive_cmds=''
9267      hardcode_direct=yes
9268      hardcode_libdir_separator=':'
9269      link_all_deplibs=yes
9270
9271      if test "$GCC" = yes; then
9272	case $host_os in aix4.[012]|aix4.[012].*)
9273	# We only want to do this on AIX 4.2 and lower, the check
9274	# below for broken collect2 doesn't work under 4.3+
9275	  collect2name=`${CC} -print-prog-name=collect2`
9276	  if test -f "$collect2name" && \
9277  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
9278	  then
9279  	  # We have reworked collect2
9280  	  hardcode_direct=yes
9281	  else
9282  	  # We have old collect2
9283  	  hardcode_direct=unsupported
9284  	  # It fails to find uninstalled libraries when the uninstalled
9285  	  # path is not listed in the libpath.  Setting hardcode_minus_L
9286  	  # to unsupported forces relinking
9287  	  hardcode_minus_L=yes
9288  	  hardcode_libdir_flag_spec='-L$libdir'
9289  	  hardcode_libdir_separator=
9290	  fi
9291	esac
9292	shared_flag='-shared'
9293	if test "$aix_use_runtimelinking" = yes; then
9294	  shared_flag="$shared_flag "'${wl}-G'
9295	fi
9296      else
9297	# not using gcc
9298	if test "$host_cpu" = ia64; then
9299  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
9300  	# chokes on -Wl,-G. The following line is correct:
9301	  shared_flag='-G'
9302	else
9303  	if test "$aix_use_runtimelinking" = yes; then
9304	    shared_flag='${wl}-G'
9305	  else
9306	    shared_flag='${wl}-bM:SRE'
9307  	fi
9308	fi
9309      fi
9310
9311      # It seems that -bexpall does not export symbols beginning with
9312      # underscore (_), so it is better to generate a list of symbols to export.
9313      always_export_symbols=yes
9314      if test "$aix_use_runtimelinking" = yes; then
9315	# Warning - without using the other runtime loading flags (-brtl),
9316	# -berok will link without error, but may produce a broken library.
9317	allow_undefined_flag='-berok'
9318       # Determine the default libpath from the value encoded in an empty executable.
9319       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9320/* end confdefs.h.  */
9321
9322int
9323main ()
9324{
9325
9326  ;
9327  return 0;
9328}
9329_ACEOF
9330if ac_fn_c_try_link "$LINENO"; then :
9331
9332aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9333}'`
9334# Check for a 64-bit object if we didn't find anything.
9335if 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; }
9336}'`; fi
9337fi
9338rm -f core conftest.err conftest.$ac_objext \
9339    conftest$ac_exeext conftest.$ac_ext
9340if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9341
9342       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9343	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"
9344       else
9345	if test "$host_cpu" = ia64; then
9346	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
9347	  allow_undefined_flag="-z nodefs"
9348	  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"
9349	else
9350	 # Determine the default libpath from the value encoded in an empty executable.
9351	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9352/* end confdefs.h.  */
9353
9354int
9355main ()
9356{
9357
9358  ;
9359  return 0;
9360}
9361_ACEOF
9362if ac_fn_c_try_link "$LINENO"; then :
9363
9364aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
9365}'`
9366# Check for a 64-bit object if we didn't find anything.
9367if 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; }
9368}'`; fi
9369fi
9370rm -f core conftest.err conftest.$ac_objext \
9371    conftest$ac_exeext conftest.$ac_ext
9372if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
9373
9374	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
9375	  # Warning - without using the other run time loading flags,
9376	  # -berok will link without error, but may produce a broken library.
9377	  no_undefined_flag=' ${wl}-bernotok'
9378	  allow_undefined_flag=' ${wl}-berok'
9379	  # -bexpall does not export symbols beginning with underscore (_)
9380	  always_export_symbols=yes
9381	  # Exported symbols can be pulled into shared objects from archives
9382	  whole_archive_flag_spec=' '
9383	  archive_cmds_need_lc=yes
9384	  # This is similar to how AIX traditionally builds its shared libraries.
9385	  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'
9386	fi
9387      fi
9388      ;;
9389
9390    amigaos*)
9391      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)'
9392      hardcode_libdir_flag_spec='-L$libdir'
9393      hardcode_minus_L=yes
9394      # see comment about different semantics on the GNU ld section
9395      ld_shlibs=no
9396      ;;
9397
9398    bsdi[45]*)
9399      export_dynamic_flag_spec=-rdynamic
9400      ;;
9401
9402    cygwin* | mingw* | pw32*)
9403      # When not using gcc, we currently assume that we are using
9404      # Microsoft Visual C++.
9405      # hardcode_libdir_flag_spec is actually meaningless, as there is
9406      # no search path for DLLs.
9407      hardcode_libdir_flag_spec=' '
9408      allow_undefined_flag=unsupported
9409      # Tell ltmain to make .lib files, not .a files.
9410      libext=lib
9411      # Tell ltmain to make .dll files, not .so files.
9412      shrext_cmds=".dll"
9413      # FIXME: Setting linknames here is a bad hack.
9414      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
9415      # The linker will automatically build a .lib file if we build a DLL.
9416      old_archive_From_new_cmds='true'
9417      # FIXME: Should let the user specify the lib program.
9418      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
9419      fix_srcfile_path='`cygpath -w "$srcfile"`'
9420      enable_shared_with_static_runtimes=yes
9421      ;;
9422
9423    darwin* | rhapsody*)
9424      case $host_os in
9425        rhapsody* | darwin1.[012])
9426         allow_undefined_flag='${wl}-undefined ${wl}suppress'
9427         ;;
9428       *) # Darwin 1.3 on
9429         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
9430           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9431         else
9432           case ${MACOSX_DEPLOYMENT_TARGET} in
9433             10.[012])
9434               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
9435               ;;
9436             10.*)
9437               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
9438               ;;
9439           esac
9440         fi
9441         ;;
9442      esac
9443      archive_cmds_need_lc=no
9444      hardcode_direct=no
9445      hardcode_automatic=yes
9446      hardcode_shlibpath_var=unsupported
9447      whole_archive_flag_spec=''
9448      link_all_deplibs=yes
9449    if test "$GCC" = yes ; then
9450    	output_verbose_link_cmd='echo'
9451        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
9452      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9453      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9454      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}'
9455      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}'
9456    else
9457      case $cc_basename in
9458        xlc*)
9459         output_verbose_link_cmd='echo'
9460         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
9461         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
9462          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
9463         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}'
9464          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}'
9465          ;;
9466       *)
9467         ld_shlibs=no
9468          ;;
9469      esac
9470    fi
9471      ;;
9472
9473    dgux*)
9474      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9475      hardcode_libdir_flag_spec='-L$libdir'
9476      hardcode_shlibpath_var=no
9477      ;;
9478
9479    freebsd1*)
9480      ld_shlibs=no
9481      ;;
9482
9483    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
9484    # support.  Future versions do this automatically, but an explicit c++rt0.o
9485    # does not break anything, and helps significantly (at the cost of a little
9486    # extra space).
9487    freebsd2.2*)
9488      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
9489      hardcode_libdir_flag_spec='-R$libdir'
9490      hardcode_direct=yes
9491      hardcode_shlibpath_var=no
9492      ;;
9493
9494    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
9495    freebsd2*)
9496      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9497      hardcode_direct=yes
9498      hardcode_minus_L=yes
9499      hardcode_shlibpath_var=no
9500      ;;
9501
9502    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
9503    freebsd* | kfreebsd*-gnu | dragonfly*)
9504      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
9505      hardcode_libdir_flag_spec='-R$libdir'
9506      hardcode_direct=yes
9507      hardcode_shlibpath_var=no
9508      ;;
9509
9510    hpux9*)
9511      if test "$GCC" = yes; then
9512	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'
9513      else
9514	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'
9515      fi
9516      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9517      hardcode_libdir_separator=:
9518      hardcode_direct=yes
9519
9520      # hardcode_minus_L: Not really in the search PATH,
9521      # but as the default location of the library.
9522      hardcode_minus_L=yes
9523      export_dynamic_flag_spec='${wl}-E'
9524      ;;
9525
9526    hpux10* | hpux11*)
9527      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
9528	case $host_cpu in
9529	hppa*64*|ia64*)
9530	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9531	  ;;
9532	*)
9533	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
9534	  ;;
9535	esac
9536      else
9537	case $host_cpu in
9538	hppa*64*|ia64*)
9539	  archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
9540	  ;;
9541	*)
9542	  archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
9543	  ;;
9544	esac
9545      fi
9546      if test "$with_gnu_ld" = no; then
9547	case $host_cpu in
9548	hppa*64*)
9549	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9550	  hardcode_libdir_flag_spec_ld='+b $libdir'
9551	  hardcode_libdir_separator=:
9552	  hardcode_direct=no
9553	  hardcode_shlibpath_var=no
9554	  ;;
9555	ia64*)
9556	  hardcode_libdir_flag_spec='-L$libdir'
9557	  hardcode_direct=no
9558	  hardcode_shlibpath_var=no
9559
9560	  # hardcode_minus_L: Not really in the search PATH,
9561	  # but as the default location of the library.
9562	  hardcode_minus_L=yes
9563	  ;;
9564	*)
9565	  hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
9566	  hardcode_libdir_separator=:
9567	  hardcode_direct=yes
9568	  export_dynamic_flag_spec='${wl}-E'
9569
9570	  # hardcode_minus_L: Not really in the search PATH,
9571	  # but as the default location of the library.
9572	  hardcode_minus_L=yes
9573	  ;;
9574	esac
9575      fi
9576      ;;
9577
9578    irix5* | irix6* | nonstopux*)
9579      if test "$GCC" = yes; then
9580	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'
9581      else
9582	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'
9583	hardcode_libdir_flag_spec_ld='-rpath $libdir'
9584      fi
9585      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9586      hardcode_libdir_separator=:
9587      link_all_deplibs=yes
9588      ;;
9589
9590    netbsd*)
9591      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
9592	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
9593      else
9594	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
9595      fi
9596      hardcode_libdir_flag_spec='-R$libdir'
9597      hardcode_direct=yes
9598      hardcode_shlibpath_var=no
9599      ;;
9600
9601    newsos6)
9602      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9603      hardcode_direct=yes
9604      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9605      hardcode_libdir_separator=:
9606      hardcode_shlibpath_var=no
9607      ;;
9608
9609    openbsd*)
9610      hardcode_direct=yes
9611      hardcode_shlibpath_var=no
9612      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
9613	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9614	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
9615	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9616	export_dynamic_flag_spec='${wl}-E'
9617      else
9618       case $host_os in
9619	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
9620	   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
9621	   hardcode_libdir_flag_spec='-R$libdir'
9622	   ;;
9623	 *)
9624	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
9625	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
9626	   ;;
9627       esac
9628      fi
9629      ;;
9630
9631    os2*)
9632      hardcode_libdir_flag_spec='-L$libdir'
9633      hardcode_minus_L=yes
9634      allow_undefined_flag=unsupported
9635      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'
9636      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
9637      ;;
9638
9639    osf3*)
9640      if test "$GCC" = yes; then
9641	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9642	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'
9643      else
9644	allow_undefined_flag=' -expect_unresolved \*'
9645	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'
9646      fi
9647      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9648      hardcode_libdir_separator=:
9649      ;;
9650
9651    osf4* | osf5*)	# as osf3* with the addition of -msym flag
9652      if test "$GCC" = yes; then
9653	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
9654	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'
9655	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
9656      else
9657	allow_undefined_flag=' -expect_unresolved \*'
9658	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'
9659	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
9660	$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'
9661
9662	# Both c and cxx compiler support -rpath directly
9663	hardcode_libdir_flag_spec='-rpath $libdir'
9664      fi
9665      hardcode_libdir_separator=:
9666      ;;
9667
9668    sco3.2v5*)
9669      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9670      hardcode_shlibpath_var=no
9671      export_dynamic_flag_spec='${wl}-Bexport'
9672      runpath_var=LD_RUN_PATH
9673      hardcode_runpath_var=yes
9674      ;;
9675
9676    solaris*)
9677      no_undefined_flag=' -z text'
9678      if test "$GCC" = yes; then
9679	wlarc='${wl}'
9680	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9681	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9682	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
9683      else
9684	wlarc=''
9685	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9686	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9687  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9688      fi
9689      hardcode_libdir_flag_spec='-R$libdir'
9690      hardcode_shlibpath_var=no
9691      case $host_os in
9692      solaris2.[0-5] | solaris2.[0-5].*) ;;
9693      *)
9694 	# The compiler driver will combine linker options so we
9695 	# cannot just pass the convience library names through
9696 	# without $wl, iff we do not link with $LD.
9697 	# Luckily, gcc supports the same syntax we need for Sun Studio.
9698 	# Supported since Solaris 2.6 (maybe 2.5.1?)
9699 	case $wlarc in
9700 	'')
9701 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
9702 	*)
9703 	  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' ;;
9704 	esac ;;
9705      esac
9706      link_all_deplibs=yes
9707      ;;
9708
9709    sunos4*)
9710      if test "x$host_vendor" = xsequent; then
9711	# Use $CC to link under sequent, because it throws in some extra .o
9712	# files that make .init and .fini sections work.
9713	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
9714      else
9715	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
9716      fi
9717      hardcode_libdir_flag_spec='-L$libdir'
9718      hardcode_direct=yes
9719      hardcode_minus_L=yes
9720      hardcode_shlibpath_var=no
9721      ;;
9722
9723    sysv4)
9724      case $host_vendor in
9725	sni)
9726	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9727	  hardcode_direct=yes # is this really true???
9728	;;
9729	siemens)
9730	  ## LD is ld it makes a PLAMLIB
9731	  ## CC just makes a GrossModule.
9732	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9733	  reload_cmds='$CC -r -o $output$reload_objs'
9734	  hardcode_direct=no
9735        ;;
9736	motorola)
9737	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9738	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
9739	;;
9740      esac
9741      runpath_var='LD_RUN_PATH'
9742      hardcode_shlibpath_var=no
9743      ;;
9744
9745    sysv4.3*)
9746      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9747      hardcode_shlibpath_var=no
9748      export_dynamic_flag_spec='-Bexport'
9749      ;;
9750
9751    sysv4*MP*)
9752      if test -d /usr/nec; then
9753	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9754	hardcode_shlibpath_var=no
9755	runpath_var=LD_RUN_PATH
9756	hardcode_runpath_var=yes
9757	ld_shlibs=yes
9758      fi
9759      ;;
9760
9761    sysv4.2uw2*)
9762      archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
9763      hardcode_direct=yes
9764      hardcode_minus_L=no
9765      hardcode_shlibpath_var=no
9766      hardcode_runpath_var=yes
9767      runpath_var=LD_RUN_PATH
9768      ;;
9769
9770   sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[78]* | unixware7*)
9771      no_undefined_flag='${wl}-z ${wl}text'
9772      if test "$GCC" = yes; then
9773	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9774      else
9775	archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
9776      fi
9777      runpath_var='LD_RUN_PATH'
9778      hardcode_shlibpath_var=no
9779      ;;
9780
9781    sysv5*)
9782      no_undefined_flag=' -z text'
9783      # $CC -shared without GNU ld will not create a library from C++
9784      # object files and a static libstdc++, better avoid it by now
9785      archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
9786      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
9787  		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
9788      hardcode_libdir_flag_spec=
9789      hardcode_shlibpath_var=no
9790      runpath_var='LD_RUN_PATH'
9791      ;;
9792
9793    uts4*)
9794      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
9795      hardcode_libdir_flag_spec='-L$libdir'
9796      hardcode_shlibpath_var=no
9797      ;;
9798
9799    *)
9800      ld_shlibs=no
9801      ;;
9802    esac
9803  fi
9804
9805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
9806$as_echo "$ld_shlibs" >&6; }
9807test "$ld_shlibs" = no && can_build_shared=no
9808
9809variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
9810if test "$GCC" = yes; then
9811  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
9812fi
9813
9814#
9815# Do we need to explicitly link libc?
9816#
9817case "x$archive_cmds_need_lc" in
9818x|xyes)
9819  # Assume -lc should be added
9820  archive_cmds_need_lc=yes
9821
9822  if test "$enable_shared" = yes && test "$GCC" = yes; then
9823    case $archive_cmds in
9824    *'~'*)
9825      # FIXME: we may have to deal with multi-command sequences.
9826      ;;
9827    '$CC '*)
9828      # Test whether the compiler implicitly links with -lc since on some
9829      # systems, -lgcc has to come before -lc. If gcc already passes -lc
9830      # to ld, don't add -lc before -lgcc.
9831      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
9832$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
9833      $rm conftest*
9834      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
9835
9836      if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9837  (eval $ac_compile) 2>&5
9838  ac_status=$?
9839  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9840  test $ac_status = 0; } 2>conftest.err; then
9841        soname=conftest
9842        lib=conftest
9843        libobjs=conftest.$ac_objext
9844        deplibs=
9845        wl=$lt_prog_compiler_wl
9846        compiler_flags=-v
9847        linker_flags=-v
9848        verstring=
9849        output_objdir=.
9850        libname=conftest
9851        lt_save_allow_undefined_flag=$allow_undefined_flag
9852        allow_undefined_flag=
9853        if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\""; } >&5
9854  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
9855  ac_status=$?
9856  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9857  test $ac_status = 0; }
9858        then
9859	  archive_cmds_need_lc=no
9860        else
9861	  archive_cmds_need_lc=yes
9862        fi
9863        allow_undefined_flag=$lt_save_allow_undefined_flag
9864      else
9865        cat conftest.err 1>&5
9866      fi
9867      $rm conftest*
9868      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
9869$as_echo "$archive_cmds_need_lc" >&6; }
9870      ;;
9871    esac
9872  fi
9873  ;;
9874esac
9875
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
9877$as_echo_n "checking dynamic linker characteristics... " >&6; }
9878library_names_spec=
9879libname_spec='lib$name'
9880soname_spec=
9881shrext_cmds=".so"
9882postinstall_cmds=
9883postuninstall_cmds=
9884finish_cmds=
9885finish_eval=
9886shlibpath_var=
9887shlibpath_overrides_runpath=unknown
9888version_type=none
9889dynamic_linker="$host_os ld.so"
9890sys_lib_dlsearch_path_spec="/lib /usr/lib"
9891if test "$GCC" = yes; then
9892  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
9893  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
9894    # if the path contains ";" then we assume it to be the separator
9895    # otherwise default to the standard path separator (i.e. ":") - it is
9896    # assumed that no part of a normal pathname contains ";" but that should
9897    # okay in the real world where ";" in dirpaths is itself problematic.
9898    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
9899  else
9900    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
9901  fi
9902else
9903  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
9904fi
9905need_lib_prefix=unknown
9906hardcode_into_libs=no
9907
9908# when you set need_version to no, make sure it does not cause -set_version
9909# flags to be left without arguments
9910need_version=unknown
9911
9912case $host_os in
9913aix3*)
9914  version_type=linux
9915  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
9916  shlibpath_var=LIBPATH
9917
9918  # AIX 3 has no versioning support, so we append a major version to the name.
9919  soname_spec='${libname}${release}${shared_ext}$major'
9920  ;;
9921
9922aix4* | aix5*)
9923  version_type=linux
9924  need_lib_prefix=no
9925  need_version=no
9926  hardcode_into_libs=yes
9927  if test "$host_cpu" = ia64; then
9928    # AIX 5 supports IA64
9929    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
9930    shlibpath_var=LD_LIBRARY_PATH
9931  else
9932    # With GCC up to 2.95.x, collect2 would create an import file
9933    # for dependence libraries.  The import file would start with
9934    # the line `#! .'.  This would cause the generated library to
9935    # depend on `.', always an invalid library.  This was fixed in
9936    # development snapshots of GCC prior to 3.0.
9937    case $host_os in
9938      aix4 | aix4.[01] | aix4.[01].*)
9939      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
9940	   echo ' yes '
9941	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
9942	:
9943      else
9944	can_build_shared=no
9945      fi
9946      ;;
9947    esac
9948    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
9949    # soname into executable. Probably we can add versioning support to
9950    # collect2, so additional links can be useful in future.
9951    if test "$aix_use_runtimelinking" = yes; then
9952      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
9953      # instead of lib<name>.a to let people know that these are not
9954      # typical AIX shared libraries.
9955      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9956    else
9957      # We preserve .a as extension for shared libraries through AIX4.2
9958      # and later when we are not doing run time linking.
9959      library_names_spec='${libname}${release}.a $libname.a'
9960      soname_spec='${libname}${release}${shared_ext}$major'
9961    fi
9962    shlibpath_var=LIBPATH
9963  fi
9964  ;;
9965
9966amigaos*)
9967  library_names_spec='$libname.ixlibrary $libname.a'
9968  # Create ${libname}_ixlibrary.a entries in /sys/libs.
9969  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'
9970  ;;
9971
9972beos*)
9973  library_names_spec='${libname}${shared_ext}'
9974  dynamic_linker="$host_os ld.so"
9975  shlibpath_var=LIBRARY_PATH
9976  ;;
9977
9978bsdi[45]*)
9979  version_type=linux
9980  need_version=no
9981  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
9982  soname_spec='${libname}${release}${shared_ext}$major'
9983  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
9984  shlibpath_var=LD_LIBRARY_PATH
9985  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
9986  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
9987  # the default ld.so.conf also contains /usr/contrib/lib and
9988  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
9989  # libtool to hard-code these into programs
9990  ;;
9991
9992cygwin* | mingw* | pw32*)
9993  version_type=windows
9994  shrext_cmds=".dll"
9995  need_version=no
9996  need_lib_prefix=no
9997
9998  case $GCC,$host_os in
9999  yes,cygwin* | yes,mingw* | yes,pw32*)
10000    library_names_spec='$libname.dll.a'
10001    # DLL is installed to $(libdir)/../bin by postinstall_cmds
10002    postinstall_cmds='base_file=`basename \${file}`~
10003      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
10004      dldir=$destdir/`dirname \$dlpath`~
10005      test -d \$dldir || mkdir -p \$dldir~
10006      $install_prog $dir/$dlname \$dldir/$dlname~
10007      chmod a+x \$dldir/$dlname'
10008    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
10009      dlpath=$dir/\$dldll~
10010       $rm \$dlpath'
10011    shlibpath_overrides_runpath=yes
10012
10013    case $host_os in
10014    cygwin*)
10015      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
10016      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10017      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
10018      ;;
10019    mingw*)
10020      # MinGW DLLs use traditional 'lib' prefix
10021      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10022      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
10023      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
10024        # It is most probably a Windows format PATH printed by
10025        # mingw gcc, but we are running on Cygwin. Gcc prints its search
10026        # path with ; separators, and with drive letters. We can handle the
10027        # drive letters (cygwin fileutils understands them), so leave them,
10028        # especially as we might pass files found there to a mingw objdump,
10029        # which wouldn't understand a cygwinified path. Ahh.
10030        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
10031      else
10032        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
10033      fi
10034      ;;
10035    pw32*)
10036      # pw32 DLLs use 'pw' prefix rather than 'lib'
10037      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
10038      ;;
10039    esac
10040    ;;
10041
10042  *)
10043    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
10044    ;;
10045  esac
10046  dynamic_linker='Win32 ld.exe'
10047  # FIXME: first we should search . and the directory the executable is in
10048  shlibpath_var=PATH
10049  ;;
10050
10051darwin* | rhapsody*)
10052  dynamic_linker="$host_os dyld"
10053  version_type=darwin
10054  need_lib_prefix=no
10055  need_version=no
10056  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
10057  soname_spec='${libname}${release}${major}$shared_ext'
10058  shlibpath_overrides_runpath=yes
10059  shlibpath_var=DYLD_LIBRARY_PATH
10060  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
10061  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
10062  if test "$GCC" = yes; then
10063    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"`
10064  else
10065    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
10066  fi
10067  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
10068  ;;
10069
10070dgux*)
10071  version_type=linux
10072  need_lib_prefix=no
10073  need_version=no
10074  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
10075  soname_spec='${libname}${release}${shared_ext}$major'
10076  shlibpath_var=LD_LIBRARY_PATH
10077  ;;
10078
10079freebsd1*)
10080  dynamic_linker=no
10081  ;;
10082
10083kfreebsd*-gnu)
10084  version_type=linux
10085  need_lib_prefix=no
10086  need_version=no
10087  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10088  soname_spec='${libname}${release}${shared_ext}$major'
10089  shlibpath_var=LD_LIBRARY_PATH
10090  shlibpath_overrides_runpath=no
10091  hardcode_into_libs=yes
10092  dynamic_linker='GNU ld.so'
10093  ;;
10094
10095freebsd* | dragonfly*)
10096  # DragonFly does not have aout.  When/if they implement a new
10097  # versioning mechanism, adjust this.
10098  if test -x /usr/bin/objformat; then
10099    objformat=`/usr/bin/objformat`
10100  else
10101    case $host_os in
10102    freebsd[123]*) objformat=aout ;;
10103    *) objformat=elf ;;
10104    esac
10105  fi
10106  version_type=freebsd-$objformat
10107  case $version_type in
10108    freebsd-elf*)
10109      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
10110      need_version=no
10111      need_lib_prefix=no
10112      ;;
10113    freebsd-*)
10114      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
10115      need_version=yes
10116      ;;
10117  esac
10118  shlibpath_var=LD_LIBRARY_PATH
10119  case $host_os in
10120  freebsd2*)
10121    shlibpath_overrides_runpath=yes
10122    ;;
10123  freebsd3.[01]* | freebsdelf3.[01]*)
10124    shlibpath_overrides_runpath=yes
10125    hardcode_into_libs=yes
10126    ;;
10127  *) # from 3.2 on
10128    shlibpath_overrides_runpath=no
10129    hardcode_into_libs=yes
10130    ;;
10131  esac
10132  ;;
10133
10134gnu*)
10135  version_type=linux
10136  need_lib_prefix=no
10137  need_version=no
10138  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
10139  soname_spec='${libname}${release}${shared_ext}$major'
10140  shlibpath_var=LD_LIBRARY_PATH
10141  hardcode_into_libs=yes
10142  ;;
10143
10144hpux9* | hpux10* | hpux11*)
10145  # Give a soname corresponding to the major version so that dld.sl refuses to
10146  # link against other versions.
10147  version_type=sunos
10148  need_lib_prefix=no
10149  need_version=no
10150  case $host_cpu in
10151  ia64*)
10152    shrext_cmds='.so'
10153    hardcode_into_libs=yes
10154    dynamic_linker="$host_os dld.so"
10155    shlibpath_var=LD_LIBRARY_PATH
10156    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10157    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10158    soname_spec='${libname}${release}${shared_ext}$major'
10159    if test "X$HPUX_IA64_MODE" = X32; then
10160      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
10161    else
10162      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
10163    fi
10164    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10165    ;;
10166   hppa*64*)
10167     shrext_cmds='.sl'
10168     hardcode_into_libs=yes
10169     dynamic_linker="$host_os dld.sl"
10170     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
10171     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
10172     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10173     soname_spec='${libname}${release}${shared_ext}$major'
10174     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
10175     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
10176     ;;
10177   *)
10178    shrext_cmds='.sl'
10179    dynamic_linker="$host_os dld.sl"
10180    shlibpath_var=SHLIB_PATH
10181    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
10182    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10183    soname_spec='${libname}${release}${shared_ext}$major'
10184    ;;
10185  esac
10186  # HP-UX runs *really* slowly unless shared libraries are mode 555.
10187  postinstall_cmds='chmod 555 $lib'
10188  ;;
10189
10190irix5* | irix6* | nonstopux*)
10191  case $host_os in
10192    nonstopux*) version_type=nonstopux ;;
10193    *)
10194	if test "$lt_cv_prog_gnu_ld" = yes; then
10195		version_type=linux
10196	else
10197		version_type=irix
10198	fi ;;
10199  esac
10200  need_lib_prefix=no
10201  need_version=no
10202  soname_spec='${libname}${release}${shared_ext}$major'
10203  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
10204  case $host_os in
10205  irix5* | nonstopux*)
10206    libsuff= shlibsuff=
10207    ;;
10208  *)
10209    case $LD in # libtool.m4 will add one of these switches to LD
10210    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
10211      libsuff= shlibsuff= libmagic=32-bit;;
10212    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
10213      libsuff=32 shlibsuff=N32 libmagic=N32;;
10214    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
10215      libsuff=64 shlibsuff=64 libmagic=64-bit;;
10216    *) libsuff= shlibsuff= libmagic=never-match;;
10217    esac
10218    ;;
10219  esac
10220  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
10221  shlibpath_overrides_runpath=no
10222  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
10223  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
10224  hardcode_into_libs=yes
10225  ;;
10226
10227# No shared lib support for Linux oldld, aout, or coff.
10228linux*oldld* | linux*aout* | linux*coff*)
10229  dynamic_linker=no
10230  ;;
10231
10232# This must be Linux ELF.
10233linux*)
10234  version_type=linux
10235  need_lib_prefix=no
10236  need_version=no
10237  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10238  soname_spec='${libname}${release}${shared_ext}$major'
10239  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
10240  shlibpath_var=LD_LIBRARY_PATH
10241  shlibpath_overrides_runpath=no
10242  # This implies no fast_install, which is unacceptable.
10243  # Some rework will be needed to allow for fast_install
10244  # before this can be enabled.
10245  hardcode_into_libs=yes
10246
10247  # Append ld.so.conf contents to the search path
10248  if test -f /etc/ld.so.conf; then
10249    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' ' '`
10250    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
10251  fi
10252
10253  # We used to test for /lib/ld.so.1 and disable shared libraries on
10254  # powerpc, because MkLinux only supported shared libraries with the
10255  # GNU dynamic linker.  Since this was broken with cross compilers,
10256  # most powerpc-linux boxes support dynamic linking these days and
10257  # people can always --disable-shared, the test was removed, and we
10258  # assume the GNU/Linux dynamic linker is in use.
10259  dynamic_linker='GNU/Linux ld.so'
10260  ;;
10261
10262knetbsd*-gnu)
10263  version_type=linux
10264  need_lib_prefix=no
10265  need_version=no
10266  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10267  soname_spec='${libname}${release}${shared_ext}$major'
10268  shlibpath_var=LD_LIBRARY_PATH
10269  shlibpath_overrides_runpath=no
10270  hardcode_into_libs=yes
10271  dynamic_linker='GNU ld.so'
10272  ;;
10273
10274netbsd*)
10275  version_type=sunos
10276  need_lib_prefix=no
10277  need_version=no
10278  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
10279    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10280    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10281    dynamic_linker='NetBSD (a.out) ld.so'
10282  else
10283    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
10284    soname_spec='${libname}${release}${shared_ext}$major'
10285    dynamic_linker='NetBSD ld.elf_so'
10286  fi
10287  shlibpath_var=LD_LIBRARY_PATH
10288  shlibpath_overrides_runpath=yes
10289  hardcode_into_libs=yes
10290  ;;
10291
10292newsos6)
10293  version_type=linux
10294  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10295  shlibpath_var=LD_LIBRARY_PATH
10296  shlibpath_overrides_runpath=yes
10297  ;;
10298
10299nto-qnx*)
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=yes
10307  ;;
10308
10309openbsd*)
10310  version_type=sunos
10311  need_lib_prefix=no
10312  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
10313  case $host_os in
10314    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
10315    *)                         need_version=no  ;;
10316  esac
10317  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10318  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
10319  shlibpath_var=LD_LIBRARY_PATH
10320  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
10321    case $host_os in
10322      openbsd2.[89] | openbsd2.[89].*)
10323	shlibpath_overrides_runpath=no
10324	;;
10325      *)
10326	shlibpath_overrides_runpath=yes
10327	;;
10328      esac
10329  else
10330    shlibpath_overrides_runpath=yes
10331  fi
10332  ;;
10333
10334os2*)
10335  libname_spec='$name'
10336  shrext_cmds=".dll"
10337  need_lib_prefix=no
10338  library_names_spec='$libname${shared_ext} $libname.a'
10339  dynamic_linker='OS/2 ld.exe'
10340  shlibpath_var=LIBPATH
10341  ;;
10342
10343osf3* | osf4* | osf5*)
10344  version_type=osf
10345  need_lib_prefix=no
10346  need_version=no
10347  soname_spec='${libname}${release}${shared_ext}$major'
10348  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10349  shlibpath_var=LD_LIBRARY_PATH
10350  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
10351  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
10352  ;;
10353
10354sco3.2v5*)
10355  version_type=osf
10356  soname_spec='${libname}${release}${shared_ext}$major'
10357  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10358  shlibpath_var=LD_LIBRARY_PATH
10359  ;;
10360
10361solaris*)
10362  version_type=linux
10363  need_lib_prefix=no
10364  need_version=no
10365  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10366  soname_spec='${libname}${release}${shared_ext}$major'
10367  shlibpath_var=LD_LIBRARY_PATH
10368  shlibpath_overrides_runpath=yes
10369  hardcode_into_libs=yes
10370  # ldd complains unless libraries are executable
10371  postinstall_cmds='chmod +x $lib'
10372  ;;
10373
10374sunos4*)
10375  version_type=sunos
10376  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
10377  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
10378  shlibpath_var=LD_LIBRARY_PATH
10379  shlibpath_overrides_runpath=yes
10380  if test "$with_gnu_ld" = yes; then
10381    need_lib_prefix=no
10382  fi
10383  need_version=yes
10384  ;;
10385
10386sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
10387  version_type=linux
10388  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10389  soname_spec='${libname}${release}${shared_ext}$major'
10390  shlibpath_var=LD_LIBRARY_PATH
10391  case $host_vendor in
10392    sni)
10393      shlibpath_overrides_runpath=no
10394      need_lib_prefix=no
10395      export_dynamic_flag_spec='${wl}-Blargedynsym'
10396      runpath_var=LD_RUN_PATH
10397      ;;
10398    siemens)
10399      need_lib_prefix=no
10400      ;;
10401    motorola)
10402      need_lib_prefix=no
10403      need_version=no
10404      shlibpath_overrides_runpath=no
10405      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
10406      ;;
10407  esac
10408  ;;
10409
10410sysv4*MP*)
10411  if test -d /usr/nec ;then
10412    version_type=linux
10413    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
10414    soname_spec='$libname${shared_ext}.$major'
10415    shlibpath_var=LD_LIBRARY_PATH
10416  fi
10417  ;;
10418
10419uts4*)
10420  version_type=linux
10421  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
10422  soname_spec='${libname}${release}${shared_ext}$major'
10423  shlibpath_var=LD_LIBRARY_PATH
10424  ;;
10425
10426*)
10427  dynamic_linker=no
10428  ;;
10429esac
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
10431$as_echo "$dynamic_linker" >&6; }
10432test "$dynamic_linker" = no && can_build_shared=no
10433
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
10435$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
10436hardcode_action=
10437if test -n "$hardcode_libdir_flag_spec" || \
10438   test -n "$runpath_var" || \
10439   test "X$hardcode_automatic" = "Xyes" ; then
10440
10441  # We can hardcode non-existant directories.
10442  if test "$hardcode_direct" != no &&
10443     # If the only mechanism to avoid hardcoding is shlibpath_var, we
10444     # have to relink, otherwise we might link with an installed library
10445     # when we should be linking with a yet-to-be-installed one
10446     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
10447     test "$hardcode_minus_L" != no; then
10448    # Linking always hardcodes the temporary library directory.
10449    hardcode_action=relink
10450  else
10451    # We can link without hardcoding, and we can hardcode nonexisting dirs.
10452    hardcode_action=immediate
10453  fi
10454else
10455  # We cannot hardcode anything, or else we can only hardcode existing
10456  # directories.
10457  hardcode_action=unsupported
10458fi
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
10460$as_echo "$hardcode_action" >&6; }
10461
10462if test "$hardcode_action" = relink; then
10463  # Fast installation is not supported
10464  enable_fast_install=no
10465elif test "$shlibpath_overrides_runpath" = yes ||
10466     test "$enable_shared" = no; then
10467  # Fast installation is not necessary
10468  enable_fast_install=needless
10469fi
10470
10471striplib=
10472old_striplib=
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
10474$as_echo_n "checking whether stripping libraries is possible... " >&6; }
10475if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
10476  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
10477  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
10478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10479$as_echo "yes" >&6; }
10480else
10481# FIXME - insert some real tests, host_os isn't really good enough
10482  case $host_os in
10483   darwin*)
10484       if test -n "$STRIP" ; then
10485         striplib="$STRIP -x"
10486         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10487$as_echo "yes" >&6; }
10488       else
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10490$as_echo "no" >&6; }
10491fi
10492       ;;
10493   *)
10494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10495$as_echo "no" >&6; }
10496    ;;
10497  esac
10498fi
10499
10500if test "x$enable_dlopen" != xyes; then
10501  enable_dlopen=unknown
10502  enable_dlopen_self=unknown
10503  enable_dlopen_self_static=unknown
10504else
10505  lt_cv_dlopen=no
10506  lt_cv_dlopen_libs=
10507
10508  case $host_os in
10509  beos*)
10510    lt_cv_dlopen="load_add_on"
10511    lt_cv_dlopen_libs=
10512    lt_cv_dlopen_self=yes
10513    ;;
10514
10515  mingw* | pw32*)
10516    lt_cv_dlopen="LoadLibrary"
10517    lt_cv_dlopen_libs=
10518   ;;
10519
10520  cygwin*)
10521    lt_cv_dlopen="dlopen"
10522    lt_cv_dlopen_libs=
10523   ;;
10524
10525  darwin*)
10526  # if libdl is installed we need to link against it
10527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10528$as_echo_n "checking for dlopen in -ldl... " >&6; }
10529if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  ac_check_lib_save_LIBS=$LIBS
10533LIBS="-ldl  $LIBS"
10534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10535/* end confdefs.h.  */
10536
10537/* Override any GCC internal prototype to avoid an error.
10538   Use char because int might match the return type of a GCC
10539   builtin and then its argument prototype would still apply.  */
10540#ifdef __cplusplus
10541extern "C"
10542#endif
10543char dlopen ();
10544int
10545main ()
10546{
10547return dlopen ();
10548  ;
10549  return 0;
10550}
10551_ACEOF
10552if ac_fn_c_try_link "$LINENO"; then :
10553  ac_cv_lib_dl_dlopen=yes
10554else
10555  ac_cv_lib_dl_dlopen=no
10556fi
10557rm -f core conftest.err conftest.$ac_objext \
10558    conftest$ac_exeext conftest.$ac_ext
10559LIBS=$ac_check_lib_save_LIBS
10560fi
10561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10562$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10563if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10564  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10565else
10566
10567    lt_cv_dlopen="dyld"
10568    lt_cv_dlopen_libs=
10569    lt_cv_dlopen_self=yes
10570
10571fi
10572
10573   ;;
10574
10575  *)
10576    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
10577if test "x$ac_cv_func_shl_load" = x""yes; then :
10578  lt_cv_dlopen="shl_load"
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
10581$as_echo_n "checking for shl_load in -ldld... " >&6; }
10582if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
10583  $as_echo_n "(cached) " >&6
10584else
10585  ac_check_lib_save_LIBS=$LIBS
10586LIBS="-ldld  $LIBS"
10587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10588/* end confdefs.h.  */
10589
10590/* Override any GCC internal prototype to avoid an error.
10591   Use char because int might match the return type of a GCC
10592   builtin and then its argument prototype would still apply.  */
10593#ifdef __cplusplus
10594extern "C"
10595#endif
10596char shl_load ();
10597int
10598main ()
10599{
10600return shl_load ();
10601  ;
10602  return 0;
10603}
10604_ACEOF
10605if ac_fn_c_try_link "$LINENO"; then :
10606  ac_cv_lib_dld_shl_load=yes
10607else
10608  ac_cv_lib_dld_shl_load=no
10609fi
10610rm -f core conftest.err conftest.$ac_objext \
10611    conftest$ac_exeext conftest.$ac_ext
10612LIBS=$ac_check_lib_save_LIBS
10613fi
10614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
10615$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
10616if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
10617  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
10618else
10619  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
10620if test "x$ac_cv_func_dlopen" = x""yes; then :
10621  lt_cv_dlopen="dlopen"
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
10624$as_echo_n "checking for dlopen in -ldl... " >&6; }
10625if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
10626  $as_echo_n "(cached) " >&6
10627else
10628  ac_check_lib_save_LIBS=$LIBS
10629LIBS="-ldl  $LIBS"
10630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10631/* end confdefs.h.  */
10632
10633/* Override any GCC internal prototype to avoid an error.
10634   Use char because int might match the return type of a GCC
10635   builtin and then its argument prototype would still apply.  */
10636#ifdef __cplusplus
10637extern "C"
10638#endif
10639char dlopen ();
10640int
10641main ()
10642{
10643return dlopen ();
10644  ;
10645  return 0;
10646}
10647_ACEOF
10648if ac_fn_c_try_link "$LINENO"; then :
10649  ac_cv_lib_dl_dlopen=yes
10650else
10651  ac_cv_lib_dl_dlopen=no
10652fi
10653rm -f core conftest.err conftest.$ac_objext \
10654    conftest$ac_exeext conftest.$ac_ext
10655LIBS=$ac_check_lib_save_LIBS
10656fi
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
10658$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
10659if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
10660  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
10661else
10662  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
10663$as_echo_n "checking for dlopen in -lsvld... " >&6; }
10664if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
10665  $as_echo_n "(cached) " >&6
10666else
10667  ac_check_lib_save_LIBS=$LIBS
10668LIBS="-lsvld  $LIBS"
10669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10670/* end confdefs.h.  */
10671
10672/* Override any GCC internal prototype to avoid an error.
10673   Use char because int might match the return type of a GCC
10674   builtin and then its argument prototype would still apply.  */
10675#ifdef __cplusplus
10676extern "C"
10677#endif
10678char dlopen ();
10679int
10680main ()
10681{
10682return dlopen ();
10683  ;
10684  return 0;
10685}
10686_ACEOF
10687if ac_fn_c_try_link "$LINENO"; then :
10688  ac_cv_lib_svld_dlopen=yes
10689else
10690  ac_cv_lib_svld_dlopen=no
10691fi
10692rm -f core conftest.err conftest.$ac_objext \
10693    conftest$ac_exeext conftest.$ac_ext
10694LIBS=$ac_check_lib_save_LIBS
10695fi
10696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
10697$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
10698if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
10699  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
10700else
10701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
10702$as_echo_n "checking for dld_link in -ldld... " >&6; }
10703if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
10704  $as_echo_n "(cached) " >&6
10705else
10706  ac_check_lib_save_LIBS=$LIBS
10707LIBS="-ldld  $LIBS"
10708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709/* end confdefs.h.  */
10710
10711/* Override any GCC internal prototype to avoid an error.
10712   Use char because int might match the return type of a GCC
10713   builtin and then its argument prototype would still apply.  */
10714#ifdef __cplusplus
10715extern "C"
10716#endif
10717char dld_link ();
10718int
10719main ()
10720{
10721return dld_link ();
10722  ;
10723  return 0;
10724}
10725_ACEOF
10726if ac_fn_c_try_link "$LINENO"; then :
10727  ac_cv_lib_dld_dld_link=yes
10728else
10729  ac_cv_lib_dld_dld_link=no
10730fi
10731rm -f core conftest.err conftest.$ac_objext \
10732    conftest$ac_exeext conftest.$ac_ext
10733LIBS=$ac_check_lib_save_LIBS
10734fi
10735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
10736$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
10737if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
10738  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
10739fi
10740
10741
10742fi
10743
10744
10745fi
10746
10747
10748fi
10749
10750
10751fi
10752
10753
10754fi
10755
10756    ;;
10757  esac
10758
10759  if test "x$lt_cv_dlopen" != xno; then
10760    enable_dlopen=yes
10761  else
10762    enable_dlopen=no
10763  fi
10764
10765  case $lt_cv_dlopen in
10766  dlopen)
10767    save_CPPFLAGS="$CPPFLAGS"
10768    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
10769
10770    save_LDFLAGS="$LDFLAGS"
10771    eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
10772
10773    save_LIBS="$LIBS"
10774    LIBS="$lt_cv_dlopen_libs $LIBS"
10775
10776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
10777$as_echo_n "checking whether a program can dlopen itself... " >&6; }
10778if test "${lt_cv_dlopen_self+set}" = set; then :
10779  $as_echo_n "(cached) " >&6
10780else
10781  	  if test "$cross_compiling" = yes; then :
10782  lt_cv_dlopen_self=cross
10783else
10784  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10785  lt_status=$lt_dlunknown
10786  cat > conftest.$ac_ext <<EOF
10787#line 10787 "configure"
10788#include "confdefs.h"
10789
10790#if HAVE_DLFCN_H
10791#include <dlfcn.h>
10792#endif
10793
10794#include <stdio.h>
10795
10796#ifdef RTLD_GLOBAL
10797#  define LT_DLGLOBAL		RTLD_GLOBAL
10798#else
10799#  ifdef DL_GLOBAL
10800#    define LT_DLGLOBAL		DL_GLOBAL
10801#  else
10802#    define LT_DLGLOBAL		0
10803#  endif
10804#endif
10805
10806/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10807   find out it does not work in some platform. */
10808#ifndef LT_DLLAZY_OR_NOW
10809#  ifdef RTLD_LAZY
10810#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
10811#  else
10812#    ifdef DL_LAZY
10813#      define LT_DLLAZY_OR_NOW		DL_LAZY
10814#    else
10815#      ifdef RTLD_NOW
10816#        define LT_DLLAZY_OR_NOW	RTLD_NOW
10817#      else
10818#        ifdef DL_NOW
10819#          define LT_DLLAZY_OR_NOW	DL_NOW
10820#        else
10821#          define LT_DLLAZY_OR_NOW	0
10822#        endif
10823#      endif
10824#    endif
10825#  endif
10826#endif
10827
10828#ifdef __cplusplus
10829extern "C" void exit (int);
10830#endif
10831
10832void fnord() { int i=42;}
10833int main ()
10834{
10835  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10836  int status = $lt_dlunknown;
10837
10838  if (self)
10839    {
10840      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10841      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10842      /* dlclose (self); */
10843    }
10844
10845    exit (status);
10846}
10847EOF
10848  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10849  (eval $ac_link) 2>&5
10850  ac_status=$?
10851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10852  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10853    (./conftest; exit; ) >&5 2>/dev/null
10854    lt_status=$?
10855    case x$lt_status in
10856      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
10857      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
10858      x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
10859    esac
10860  else :
10861    # compilation failed
10862    lt_cv_dlopen_self=no
10863  fi
10864fi
10865rm -fr conftest*
10866
10867
10868fi
10869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
10870$as_echo "$lt_cv_dlopen_self" >&6; }
10871
10872    if test "x$lt_cv_dlopen_self" = xyes; then
10873      LDFLAGS="$LDFLAGS $link_static_flag"
10874      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
10875$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
10876if test "${lt_cv_dlopen_self_static+set}" = set; then :
10877  $as_echo_n "(cached) " >&6
10878else
10879  	  if test "$cross_compiling" = yes; then :
10880  lt_cv_dlopen_self_static=cross
10881else
10882  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
10883  lt_status=$lt_dlunknown
10884  cat > conftest.$ac_ext <<EOF
10885#line 10885 "configure"
10886#include "confdefs.h"
10887
10888#if HAVE_DLFCN_H
10889#include <dlfcn.h>
10890#endif
10891
10892#include <stdio.h>
10893
10894#ifdef RTLD_GLOBAL
10895#  define LT_DLGLOBAL		RTLD_GLOBAL
10896#else
10897#  ifdef DL_GLOBAL
10898#    define LT_DLGLOBAL		DL_GLOBAL
10899#  else
10900#    define LT_DLGLOBAL		0
10901#  endif
10902#endif
10903
10904/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
10905   find out it does not work in some platform. */
10906#ifndef LT_DLLAZY_OR_NOW
10907#  ifdef RTLD_LAZY
10908#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
10909#  else
10910#    ifdef DL_LAZY
10911#      define LT_DLLAZY_OR_NOW		DL_LAZY
10912#    else
10913#      ifdef RTLD_NOW
10914#        define LT_DLLAZY_OR_NOW	RTLD_NOW
10915#      else
10916#        ifdef DL_NOW
10917#          define LT_DLLAZY_OR_NOW	DL_NOW
10918#        else
10919#          define LT_DLLAZY_OR_NOW	0
10920#        endif
10921#      endif
10922#    endif
10923#  endif
10924#endif
10925
10926#ifdef __cplusplus
10927extern "C" void exit (int);
10928#endif
10929
10930void fnord() { int i=42;}
10931int main ()
10932{
10933  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
10934  int status = $lt_dlunknown;
10935
10936  if (self)
10937    {
10938      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
10939      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
10940      /* dlclose (self); */
10941    }
10942
10943    exit (status);
10944}
10945EOF
10946  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
10947  (eval $ac_link) 2>&5
10948  ac_status=$?
10949  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
10950  test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
10951    (./conftest; exit; ) >&5 2>/dev/null
10952    lt_status=$?
10953    case x$lt_status in
10954      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
10955      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
10956      x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
10957    esac
10958  else :
10959    # compilation failed
10960    lt_cv_dlopen_self_static=no
10961  fi
10962fi
10963rm -fr conftest*
10964
10965
10966fi
10967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
10968$as_echo "$lt_cv_dlopen_self_static" >&6; }
10969    fi
10970
10971    CPPFLAGS="$save_CPPFLAGS"
10972    LDFLAGS="$save_LDFLAGS"
10973    LIBS="$save_LIBS"
10974    ;;
10975  esac
10976
10977  case $lt_cv_dlopen_self in
10978  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
10979  *) enable_dlopen_self=unknown ;;
10980  esac
10981
10982  case $lt_cv_dlopen_self_static in
10983  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
10984  *) enable_dlopen_self_static=unknown ;;
10985  esac
10986fi
10987
10988
10989# Report which librarie types wil actually be built
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
10991$as_echo_n "checking if libtool supports shared libraries... " >&6; }
10992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
10993$as_echo "$can_build_shared" >&6; }
10994
10995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
10996$as_echo_n "checking whether to build shared libraries... " >&6; }
10997test "$can_build_shared" = "no" && enable_shared=no
10998
10999# On AIX, shared libraries and static libraries use the same namespace, and
11000# are all built from PIC.
11001case $host_os in
11002aix3*)
11003  test "$enable_shared" = yes && enable_static=no
11004  if test -n "$RANLIB"; then
11005    archive_cmds="$archive_cmds~\$RANLIB \$lib"
11006    postinstall_cmds='$RANLIB $lib'
11007  fi
11008  ;;
11009
11010aix4* | aix5*)
11011  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
11012    test "$enable_shared" = yes && enable_static=no
11013  fi
11014    ;;
11015esac
11016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
11017$as_echo "$enable_shared" >&6; }
11018
11019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
11020$as_echo_n "checking whether to build static libraries... " >&6; }
11021# Make sure either enable_shared or enable_static is yes.
11022test "$enable_shared" = yes || enable_static=yes
11023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
11024$as_echo "$enable_static" >&6; }
11025
11026# The else clause should only fire when bootstrapping the
11027# libtool distribution, otherwise you forgot to ship ltmain.sh
11028# with your package, and you will get complaints that there are
11029# no rules to generate ltmain.sh.
11030if test -f "$ltmain"; then
11031  # See if we are running on zsh, and set the options which allow our commands through
11032  # without removal of \ escapes.
11033  if test -n "${ZSH_VERSION+set}" ; then
11034    setopt NO_GLOB_SUBST
11035  fi
11036  # Now quote all the things that may contain metacharacters while being
11037  # careful not to overquote the AC_SUBSTed values.  We take copies of the
11038  # variables and quote the copies for generation of the libtool script.
11039  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11040    SED SHELL STRIP \
11041    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11042    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11043    deplibs_check_method reload_flag reload_cmds need_locks \
11044    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11045    lt_cv_sys_global_symbol_to_c_name_address \
11046    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11047    old_postinstall_cmds old_postuninstall_cmds \
11048    compiler \
11049    CC \
11050    LD \
11051    lt_prog_compiler_wl \
11052    lt_prog_compiler_pic \
11053    lt_prog_compiler_static \
11054    lt_prog_compiler_no_builtin_flag \
11055    export_dynamic_flag_spec \
11056    thread_safe_flag_spec \
11057    whole_archive_flag_spec \
11058    enable_shared_with_static_runtimes \
11059    old_archive_cmds \
11060    old_archive_from_new_cmds \
11061    predep_objects \
11062    postdep_objects \
11063    predeps \
11064    postdeps \
11065    compiler_lib_search_path \
11066    archive_cmds \
11067    archive_expsym_cmds \
11068    postinstall_cmds \
11069    postuninstall_cmds \
11070    old_archive_from_expsyms_cmds \
11071    allow_undefined_flag \
11072    no_undefined_flag \
11073    export_symbols_cmds \
11074    hardcode_libdir_flag_spec \
11075    hardcode_libdir_flag_spec_ld \
11076    hardcode_libdir_separator \
11077    hardcode_automatic \
11078    module_cmds \
11079    module_expsym_cmds \
11080    lt_cv_prog_compiler_c_o \
11081    exclude_expsyms \
11082    include_expsyms; do
11083
11084    case $var in
11085    old_archive_cmds | \
11086    old_archive_from_new_cmds | \
11087    archive_cmds | \
11088    archive_expsym_cmds | \
11089    module_cmds | \
11090    module_expsym_cmds | \
11091    old_archive_from_expsyms_cmds | \
11092    export_symbols_cmds | \
11093    extract_expsyms_cmds | reload_cmds | finish_cmds | \
11094    postinstall_cmds | postuninstall_cmds | \
11095    old_postinstall_cmds | old_postuninstall_cmds | \
11096    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11097      # Double-quote double-evaled strings.
11098      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11099      ;;
11100    *)
11101      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11102      ;;
11103    esac
11104  done
11105
11106  case $lt_echo in
11107  *'\$0 --fallback-echo"')
11108    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11109    ;;
11110  esac
11111
11112cfgfile="${ofile}T"
11113  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
11114  $rm -f "$cfgfile"
11115  { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ofile" >&5
11116$as_echo "$as_me: creating $ofile" >&6;}
11117
11118  cat <<__EOF__ >> "$cfgfile"
11119#! $SHELL
11120
11121# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
11122# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
11123# NOTE: Changes made to this file will be lost: look at ltmain.sh.
11124#
11125# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
11126# Free Software Foundation, Inc.
11127#
11128# This file is part of GNU Libtool:
11129# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
11130#
11131# This program is free software; you can redistribute it and/or modify
11132# it under the terms of the GNU General Public License as published by
11133# the Free Software Foundation; either version 2 of the License, or
11134# (at your option) any later version.
11135#
11136# This program is distributed in the hope that it will be useful, but
11137# WITHOUT ANY WARRANTY; without even the implied warranty of
11138# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11139# General Public License for more details.
11140#
11141# You should have received a copy of the GNU General Public License
11142# along with this program; if not, write to the Free Software
11143# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
11144#
11145# As a special exception to the GNU General Public License, if you
11146# distribute this file as part of a program that contains a
11147# configuration script generated by Autoconf, you may include it under
11148# the same distribution terms that you use for the rest of that program.
11149
11150# A sed program that does not truncate output.
11151SED=$lt_SED
11152
11153# Sed that helps us avoid accidentally triggering echo(1) options like -n.
11154Xsed="$SED -e 1s/^X//"
11155
11156# The HP-UX ksh and POSIX shell print the target directory to stdout
11157# if CDPATH is set.
11158(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11159
11160# The names of the tagged configurations supported by this script.
11161available_tags=
11162
11163# ### BEGIN LIBTOOL CONFIG
11164
11165# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11166
11167# Shell to use when invoking shell scripts.
11168SHELL=$lt_SHELL
11169
11170# Whether or not to build shared libraries.
11171build_libtool_libs=$enable_shared
11172
11173# Whether or not to build static libraries.
11174build_old_libs=$enable_static
11175
11176# Whether or not to add -lc for building shared libraries.
11177build_libtool_need_lc=$archive_cmds_need_lc
11178
11179# Whether or not to disallow shared libs when runtime libs are static
11180allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
11181
11182# Whether or not to optimize for fast installation.
11183fast_install=$enable_fast_install
11184
11185# The host system.
11186host_alias=$host_alias
11187host=$host
11188host_os=$host_os
11189
11190# The build system.
11191build_alias=$build_alias
11192build=$build
11193build_os=$build_os
11194
11195# An echo program that does not interpret backslashes.
11196echo=$lt_echo
11197
11198# The archiver.
11199AR=$lt_AR
11200AR_FLAGS=$lt_AR_FLAGS
11201
11202# A C compiler.
11203LTCC=$lt_LTCC
11204
11205# A language-specific compiler.
11206CC=$lt_compiler
11207
11208# Is the compiler the GNU C compiler?
11209with_gcc=$GCC
11210
11211# An ERE matcher.
11212EGREP=$lt_EGREP
11213
11214# The linker used to build libraries.
11215LD=$lt_LD
11216
11217# Whether we need hard or soft links.
11218LN_S=$lt_LN_S
11219
11220# A BSD-compatible nm program.
11221NM=$lt_NM
11222
11223# A symbol stripping program
11224STRIP=$lt_STRIP
11225
11226# Used to examine libraries when file_magic_cmd begins "file"
11227MAGIC_CMD=$MAGIC_CMD
11228
11229# Used on cygwin: DLL creation program.
11230DLLTOOL="$DLLTOOL"
11231
11232# Used on cygwin: object dumper.
11233OBJDUMP="$OBJDUMP"
11234
11235# Used on cygwin: assembler.
11236AS="$AS"
11237
11238# The name of the directory that contains temporary libtool files.
11239objdir=$objdir
11240
11241# How to create reloadable object files.
11242reload_flag=$lt_reload_flag
11243reload_cmds=$lt_reload_cmds
11244
11245# How to pass a linker flag through the compiler.
11246wl=$lt_lt_prog_compiler_wl
11247
11248# Object file suffix (normally "o").
11249objext="$ac_objext"
11250
11251# Old archive suffix (normally "a").
11252libext="$libext"
11253
11254# Shared library suffix (normally ".so").
11255shrext_cmds='$shrext_cmds'
11256
11257# Executable file suffix (normally "").
11258exeext="$exeext"
11259
11260# Additional compiler flags for building library objects.
11261pic_flag=$lt_lt_prog_compiler_pic
11262pic_mode=$pic_mode
11263
11264# What is the maximum length of a command?
11265max_cmd_len=$lt_cv_sys_max_cmd_len
11266
11267# Does compiler simultaneously support -c and -o options?
11268compiler_c_o=$lt_lt_cv_prog_compiler_c_o
11269
11270# Must we lock files when doing compilation?
11271need_locks=$lt_need_locks
11272
11273# Do we need the lib prefix for modules?
11274need_lib_prefix=$need_lib_prefix
11275
11276# Do we need a version for libraries?
11277need_version=$need_version
11278
11279# Whether dlopen is supported.
11280dlopen_support=$enable_dlopen
11281
11282# Whether dlopen of programs is supported.
11283dlopen_self=$enable_dlopen_self
11284
11285# Whether dlopen of statically linked programs is supported.
11286dlopen_self_static=$enable_dlopen_self_static
11287
11288# Compiler flag to prevent dynamic linking.
11289link_static_flag=$lt_lt_prog_compiler_static
11290
11291# Compiler flag to turn off builtin functions.
11292no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
11293
11294# Compiler flag to allow reflexive dlopens.
11295export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
11296
11297# Compiler flag to generate shared objects directly from archives.
11298whole_archive_flag_spec=$lt_whole_archive_flag_spec
11299
11300# Compiler flag to generate thread-safe objects.
11301thread_safe_flag_spec=$lt_thread_safe_flag_spec
11302
11303# Library versioning type.
11304version_type=$version_type
11305
11306# Format of library name prefix.
11307libname_spec=$lt_libname_spec
11308
11309# List of archive names.  First name is the real one, the rest are links.
11310# The last name is the one that the linker finds with -lNAME.
11311library_names_spec=$lt_library_names_spec
11312
11313# The coded name of the library, if different from the real name.
11314soname_spec=$lt_soname_spec
11315
11316# Commands used to build and install an old-style archive.
11317RANLIB=$lt_RANLIB
11318old_archive_cmds=$lt_old_archive_cmds
11319old_postinstall_cmds=$lt_old_postinstall_cmds
11320old_postuninstall_cmds=$lt_old_postuninstall_cmds
11321
11322# Create an old-style archive from a shared archive.
11323old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
11324
11325# Create a temporary old-style archive to link instead of a shared archive.
11326old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
11327
11328# Commands used to build and install a shared archive.
11329archive_cmds=$lt_archive_cmds
11330archive_expsym_cmds=$lt_archive_expsym_cmds
11331postinstall_cmds=$lt_postinstall_cmds
11332postuninstall_cmds=$lt_postuninstall_cmds
11333
11334# Commands used to build a loadable module (assumed same as above if empty)
11335module_cmds=$lt_module_cmds
11336module_expsym_cmds=$lt_module_expsym_cmds
11337
11338# Commands to strip libraries.
11339old_striplib=$lt_old_striplib
11340striplib=$lt_striplib
11341
11342# Dependencies to place before the objects being linked to create a
11343# shared library.
11344predep_objects=$lt_predep_objects
11345
11346# Dependencies to place after the objects being linked to create a
11347# shared library.
11348postdep_objects=$lt_postdep_objects
11349
11350# Dependencies to place before the objects being linked to create a
11351# shared library.
11352predeps=$lt_predeps
11353
11354# Dependencies to place after the objects being linked to create a
11355# shared library.
11356postdeps=$lt_postdeps
11357
11358# The library search path used internally by the compiler when linking
11359# a shared library.
11360compiler_lib_search_path=$lt_compiler_lib_search_path
11361
11362# Method to check whether dependent libraries are shared objects.
11363deplibs_check_method=$lt_deplibs_check_method
11364
11365# Command to use when deplibs_check_method == file_magic.
11366file_magic_cmd=$lt_file_magic_cmd
11367
11368# Flag that allows shared libraries with undefined symbols to be built.
11369allow_undefined_flag=$lt_allow_undefined_flag
11370
11371# Flag that forces no undefined symbols.
11372no_undefined_flag=$lt_no_undefined_flag
11373
11374# Commands used to finish a libtool library installation in a directory.
11375finish_cmds=$lt_finish_cmds
11376
11377# Same as above, but a single script fragment to be evaled but not shown.
11378finish_eval=$lt_finish_eval
11379
11380# Take the output of nm and produce a listing of raw symbols and C names.
11381global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11382
11383# Transform the output of nm in a proper C declaration
11384global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11385
11386# Transform the output of nm in a C name address pair
11387global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11388
11389# This is the shared library runtime path variable.
11390runpath_var=$runpath_var
11391
11392# This is the shared library path variable.
11393shlibpath_var=$shlibpath_var
11394
11395# Is shlibpath searched before the hard-coded library search path?
11396shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11397
11398# How to hardcode a shared library path into an executable.
11399hardcode_action=$hardcode_action
11400
11401# Whether we should hardcode library paths into libraries.
11402hardcode_into_libs=$hardcode_into_libs
11403
11404# Flag to hardcode \$libdir into a binary during linking.
11405# This must work even if \$libdir does not exist.
11406hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
11407
11408# If ld is used when linking, flag to hardcode \$libdir into
11409# a binary during linking. This must work even if \$libdir does
11410# not exist.
11411hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
11412
11413# Whether we need a single -rpath flag with a separated argument.
11414hardcode_libdir_separator=$lt_hardcode_libdir_separator
11415
11416# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11417# resulting binary.
11418hardcode_direct=$hardcode_direct
11419
11420# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11421# resulting binary.
11422hardcode_minus_L=$hardcode_minus_L
11423
11424# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11425# the resulting binary.
11426hardcode_shlibpath_var=$hardcode_shlibpath_var
11427
11428# Set to yes if building a shared library automatically hardcodes DIR into the library
11429# and all subsequent libraries and executables linked against it.
11430hardcode_automatic=$hardcode_automatic
11431
11432# Variables whose values should be saved in libtool wrapper scripts and
11433# restored at relink time.
11434variables_saved_for_relink="$variables_saved_for_relink"
11435
11436# Whether libtool must link a program against all its dependency libraries.
11437link_all_deplibs=$link_all_deplibs
11438
11439# Compile-time system search path for libraries
11440sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
11441
11442# Run-time system search path for libraries
11443sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
11444
11445# Fix the shell variable \$srcfile for the compiler.
11446fix_srcfile_path="$fix_srcfile_path"
11447
11448# Set to yes if exported symbols are required.
11449always_export_symbols=$always_export_symbols
11450
11451# The commands to list exported symbols.
11452export_symbols_cmds=$lt_export_symbols_cmds
11453
11454# The commands to extract the exported symbol list from a shared archive.
11455extract_expsyms_cmds=$lt_extract_expsyms_cmds
11456
11457# Symbols that should not be listed in the preloaded symbols.
11458exclude_expsyms=$lt_exclude_expsyms
11459
11460# Symbols that must always be exported.
11461include_expsyms=$lt_include_expsyms
11462
11463# ### END LIBTOOL CONFIG
11464
11465__EOF__
11466
11467
11468  case $host_os in
11469  aix3*)
11470    cat <<\EOF >> "$cfgfile"
11471
11472# AIX sometimes has problems with the GCC collect2 program.  For some
11473# reason, if we set the COLLECT_NAMES environment variable, the problems
11474# vanish in a puff of smoke.
11475if test "X${COLLECT_NAMES+set}" != Xset; then
11476  COLLECT_NAMES=
11477  export COLLECT_NAMES
11478fi
11479EOF
11480    ;;
11481  esac
11482
11483  # We use sed instead of cat because bash on DJGPP gets confused if
11484  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
11485  # text mode, it properly converts lines to CR/LF.  This bash problem
11486  # is reportedly fixed, but why not run on old versions too?
11487  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
11488
11489  mv -f "$cfgfile" "$ofile" || \
11490    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
11491  chmod +x "$ofile"
11492
11493else
11494  # If there is no Makefile yet, we rely on a make rule to execute
11495  # `config.status --recheck' to rerun these tests and create the
11496  # libtool script then.
11497  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
11498  if test -f "$ltmain_in"; then
11499    test -f Makefile && make "$ltmain"
11500  fi
11501fi
11502
11503
11504ac_ext=c
11505ac_cpp='$CPP $CPPFLAGS'
11506ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11507ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11508ac_compiler_gnu=$ac_cv_c_compiler_gnu
11509
11510CC="$lt_save_CC"
11511
11512
11513# Check whether --with-tags was given.
11514if test "${with_tags+set}" = set; then :
11515  withval=$with_tags; tagnames="$withval"
11516fi
11517
11518
11519if test -f "$ltmain" && test -n "$tagnames"; then
11520  if test ! -f "${ofile}"; then
11521    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not exist" >&5
11522$as_echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
11523  fi
11524
11525  if test -z "$LTCC"; then
11526    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
11527    if test -z "$LTCC"; then
11528      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: output file \`$ofile' does not look like a libtool script" >&5
11529$as_echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
11530    else
11531      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
11532$as_echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
11533    fi
11534  fi
11535
11536  # Extract list of available tagged configurations in $ofile.
11537  # Note that this assumes the entire list is on one line.
11538  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
11539
11540  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
11541  for tagname in $tagnames; do
11542    IFS="$lt_save_ifs"
11543    # Check whether tagname contains only valid characters
11544    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
11545    "") ;;
11546    *)  as_fn_error "invalid tag name: $tagname" "$LINENO" 5
11547	;;
11548    esac
11549
11550    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
11551    then
11552      as_fn_error "tag name \"$tagname\" already exists" "$LINENO" 5
11553    fi
11554
11555    # Update the list of available tags.
11556    if test -n "$tagname"; then
11557      echo appending configuration tag \"$tagname\" to $ofile
11558
11559      case $tagname in
11560      CXX)
11561	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
11562	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
11563	    (test "X$CXX" != "Xg++"))) ; then
11564	  :
11565	else
11566	  tagname=""
11567	fi
11568	;;
11569
11570      F77)
11571	if test -n "$F77" && test "X$F77" != "Xno"; then
11572	  :
11573	else
11574	  tagname=""
11575	fi
11576	;;
11577
11578      GCJ)
11579	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
11580	  :
11581	else
11582	  tagname=""
11583	fi
11584	;;
11585
11586      RC)
11587
11588
11589# Source file extension for RC test sources.
11590ac_ext=rc
11591
11592# Object file extension for compiled RC test sources.
11593objext=o
11594objext_RC=$objext
11595
11596# Code to be used in simple compile tests
11597lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
11598
11599# Code to be used in simple link tests
11600lt_simple_link_test_code="$lt_simple_compile_test_code"
11601
11602# ltmain only uses $CC for tagged configurations so make sure $CC is set.
11603
11604# If no C compiler was specified, use CC.
11605LTCC=${LTCC-"$CC"}
11606
11607# Allow CC to be a program name with arguments.
11608compiler=$CC
11609
11610
11611# save warnings/boilerplate of simple test code
11612ac_outfile=conftest.$ac_objext
11613printf "$lt_simple_compile_test_code" >conftest.$ac_ext
11614eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11615_lt_compiler_boilerplate=`cat conftest.err`
11616$rm conftest*
11617
11618ac_outfile=conftest.$ac_objext
11619printf "$lt_simple_link_test_code" >conftest.$ac_ext
11620eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d' >conftest.err
11621_lt_linker_boilerplate=`cat conftest.err`
11622$rm conftest*
11623
11624
11625# Allow CC to be a program name with arguments.
11626lt_save_CC="$CC"
11627CC=${RC-"windres"}
11628compiler=$CC
11629compiler_RC=$CC
11630for cc_temp in $compiler""; do
11631  case $cc_temp in
11632    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
11633    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
11634    \-*) ;;
11635    *) break;;
11636  esac
11637done
11638cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
11639
11640lt_cv_prog_compiler_c_o_RC=yes
11641
11642# The else clause should only fire when bootstrapping the
11643# libtool distribution, otherwise you forgot to ship ltmain.sh
11644# with your package, and you will get complaints that there are
11645# no rules to generate ltmain.sh.
11646if test -f "$ltmain"; then
11647  # See if we are running on zsh, and set the options which allow our commands through
11648  # without removal of \ escapes.
11649  if test -n "${ZSH_VERSION+set}" ; then
11650    setopt NO_GLOB_SUBST
11651  fi
11652  # Now quote all the things that may contain metacharacters while being
11653  # careful not to overquote the AC_SUBSTed values.  We take copies of the
11654  # variables and quote the copies for generation of the libtool script.
11655  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
11656    SED SHELL STRIP \
11657    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
11658    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
11659    deplibs_check_method reload_flag reload_cmds need_locks \
11660    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
11661    lt_cv_sys_global_symbol_to_c_name_address \
11662    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
11663    old_postinstall_cmds old_postuninstall_cmds \
11664    compiler_RC \
11665    CC_RC \
11666    LD_RC \
11667    lt_prog_compiler_wl_RC \
11668    lt_prog_compiler_pic_RC \
11669    lt_prog_compiler_static_RC \
11670    lt_prog_compiler_no_builtin_flag_RC \
11671    export_dynamic_flag_spec_RC \
11672    thread_safe_flag_spec_RC \
11673    whole_archive_flag_spec_RC \
11674    enable_shared_with_static_runtimes_RC \
11675    old_archive_cmds_RC \
11676    old_archive_from_new_cmds_RC \
11677    predep_objects_RC \
11678    postdep_objects_RC \
11679    predeps_RC \
11680    postdeps_RC \
11681    compiler_lib_search_path_RC \
11682    archive_cmds_RC \
11683    archive_expsym_cmds_RC \
11684    postinstall_cmds_RC \
11685    postuninstall_cmds_RC \
11686    old_archive_from_expsyms_cmds_RC \
11687    allow_undefined_flag_RC \
11688    no_undefined_flag_RC \
11689    export_symbols_cmds_RC \
11690    hardcode_libdir_flag_spec_RC \
11691    hardcode_libdir_flag_spec_ld_RC \
11692    hardcode_libdir_separator_RC \
11693    hardcode_automatic_RC \
11694    module_cmds_RC \
11695    module_expsym_cmds_RC \
11696    lt_cv_prog_compiler_c_o_RC \
11697    exclude_expsyms_RC \
11698    include_expsyms_RC; do
11699
11700    case $var in
11701    old_archive_cmds_RC | \
11702    old_archive_from_new_cmds_RC | \
11703    archive_cmds_RC | \
11704    archive_expsym_cmds_RC | \
11705    module_cmds_RC | \
11706    module_expsym_cmds_RC | \
11707    old_archive_from_expsyms_cmds_RC | \
11708    export_symbols_cmds_RC | \
11709    extract_expsyms_cmds | reload_cmds | finish_cmds | \
11710    postinstall_cmds | postuninstall_cmds | \
11711    old_postinstall_cmds | old_postuninstall_cmds | \
11712    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
11713      # Double-quote double-evaled strings.
11714      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
11715      ;;
11716    *)
11717      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
11718      ;;
11719    esac
11720  done
11721
11722  case $lt_echo in
11723  *'\$0 --fallback-echo"')
11724    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
11725    ;;
11726  esac
11727
11728cfgfile="$ofile"
11729
11730  cat <<__EOF__ >> "$cfgfile"
11731# ### BEGIN LIBTOOL TAG CONFIG: $tagname
11732
11733# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
11734
11735# Shell to use when invoking shell scripts.
11736SHELL=$lt_SHELL
11737
11738# Whether or not to build shared libraries.
11739build_libtool_libs=$enable_shared
11740
11741# Whether or not to build static libraries.
11742build_old_libs=$enable_static
11743
11744# Whether or not to add -lc for building shared libraries.
11745build_libtool_need_lc=$archive_cmds_need_lc_RC
11746
11747# Whether or not to disallow shared libs when runtime libs are static
11748allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
11749
11750# Whether or not to optimize for fast installation.
11751fast_install=$enable_fast_install
11752
11753# The host system.
11754host_alias=$host_alias
11755host=$host
11756host_os=$host_os
11757
11758# The build system.
11759build_alias=$build_alias
11760build=$build
11761build_os=$build_os
11762
11763# An echo program that does not interpret backslashes.
11764echo=$lt_echo
11765
11766# The archiver.
11767AR=$lt_AR
11768AR_FLAGS=$lt_AR_FLAGS
11769
11770# A C compiler.
11771LTCC=$lt_LTCC
11772
11773# A language-specific compiler.
11774CC=$lt_compiler_RC
11775
11776# Is the compiler the GNU C compiler?
11777with_gcc=$GCC_RC
11778
11779# An ERE matcher.
11780EGREP=$lt_EGREP
11781
11782# The linker used to build libraries.
11783LD=$lt_LD_RC
11784
11785# Whether we need hard or soft links.
11786LN_S=$lt_LN_S
11787
11788# A BSD-compatible nm program.
11789NM=$lt_NM
11790
11791# A symbol stripping program
11792STRIP=$lt_STRIP
11793
11794# Used to examine libraries when file_magic_cmd begins "file"
11795MAGIC_CMD=$MAGIC_CMD
11796
11797# Used on cygwin: DLL creation program.
11798DLLTOOL="$DLLTOOL"
11799
11800# Used on cygwin: object dumper.
11801OBJDUMP="$OBJDUMP"
11802
11803# Used on cygwin: assembler.
11804AS="$AS"
11805
11806# The name of the directory that contains temporary libtool files.
11807objdir=$objdir
11808
11809# How to create reloadable object files.
11810reload_flag=$lt_reload_flag
11811reload_cmds=$lt_reload_cmds
11812
11813# How to pass a linker flag through the compiler.
11814wl=$lt_lt_prog_compiler_wl_RC
11815
11816# Object file suffix (normally "o").
11817objext="$ac_objext"
11818
11819# Old archive suffix (normally "a").
11820libext="$libext"
11821
11822# Shared library suffix (normally ".so").
11823shrext_cmds='$shrext_cmds'
11824
11825# Executable file suffix (normally "").
11826exeext="$exeext"
11827
11828# Additional compiler flags for building library objects.
11829pic_flag=$lt_lt_prog_compiler_pic_RC
11830pic_mode=$pic_mode
11831
11832# What is the maximum length of a command?
11833max_cmd_len=$lt_cv_sys_max_cmd_len
11834
11835# Does compiler simultaneously support -c and -o options?
11836compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
11837
11838# Must we lock files when doing compilation?
11839need_locks=$lt_need_locks
11840
11841# Do we need the lib prefix for modules?
11842need_lib_prefix=$need_lib_prefix
11843
11844# Do we need a version for libraries?
11845need_version=$need_version
11846
11847# Whether dlopen is supported.
11848dlopen_support=$enable_dlopen
11849
11850# Whether dlopen of programs is supported.
11851dlopen_self=$enable_dlopen_self
11852
11853# Whether dlopen of statically linked programs is supported.
11854dlopen_self_static=$enable_dlopen_self_static
11855
11856# Compiler flag to prevent dynamic linking.
11857link_static_flag=$lt_lt_prog_compiler_static_RC
11858
11859# Compiler flag to turn off builtin functions.
11860no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
11861
11862# Compiler flag to allow reflexive dlopens.
11863export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
11864
11865# Compiler flag to generate shared objects directly from archives.
11866whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
11867
11868# Compiler flag to generate thread-safe objects.
11869thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
11870
11871# Library versioning type.
11872version_type=$version_type
11873
11874# Format of library name prefix.
11875libname_spec=$lt_libname_spec
11876
11877# List of archive names.  First name is the real one, the rest are links.
11878# The last name is the one that the linker finds with -lNAME.
11879library_names_spec=$lt_library_names_spec
11880
11881# The coded name of the library, if different from the real name.
11882soname_spec=$lt_soname_spec
11883
11884# Commands used to build and install an old-style archive.
11885RANLIB=$lt_RANLIB
11886old_archive_cmds=$lt_old_archive_cmds_RC
11887old_postinstall_cmds=$lt_old_postinstall_cmds
11888old_postuninstall_cmds=$lt_old_postuninstall_cmds
11889
11890# Create an old-style archive from a shared archive.
11891old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
11892
11893# Create a temporary old-style archive to link instead of a shared archive.
11894old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
11895
11896# Commands used to build and install a shared archive.
11897archive_cmds=$lt_archive_cmds_RC
11898archive_expsym_cmds=$lt_archive_expsym_cmds_RC
11899postinstall_cmds=$lt_postinstall_cmds
11900postuninstall_cmds=$lt_postuninstall_cmds
11901
11902# Commands used to build a loadable module (assumed same as above if empty)
11903module_cmds=$lt_module_cmds_RC
11904module_expsym_cmds=$lt_module_expsym_cmds_RC
11905
11906# Commands to strip libraries.
11907old_striplib=$lt_old_striplib
11908striplib=$lt_striplib
11909
11910# Dependencies to place before the objects being linked to create a
11911# shared library.
11912predep_objects=$lt_predep_objects_RC
11913
11914# Dependencies to place after the objects being linked to create a
11915# shared library.
11916postdep_objects=$lt_postdep_objects_RC
11917
11918# Dependencies to place before the objects being linked to create a
11919# shared library.
11920predeps=$lt_predeps_RC
11921
11922# Dependencies to place after the objects being linked to create a
11923# shared library.
11924postdeps=$lt_postdeps_RC
11925
11926# The library search path used internally by the compiler when linking
11927# a shared library.
11928compiler_lib_search_path=$lt_compiler_lib_search_path_RC
11929
11930# Method to check whether dependent libraries are shared objects.
11931deplibs_check_method=$lt_deplibs_check_method
11932
11933# Command to use when deplibs_check_method == file_magic.
11934file_magic_cmd=$lt_file_magic_cmd
11935
11936# Flag that allows shared libraries with undefined symbols to be built.
11937allow_undefined_flag=$lt_allow_undefined_flag_RC
11938
11939# Flag that forces no undefined symbols.
11940no_undefined_flag=$lt_no_undefined_flag_RC
11941
11942# Commands used to finish a libtool library installation in a directory.
11943finish_cmds=$lt_finish_cmds
11944
11945# Same as above, but a single script fragment to be evaled but not shown.
11946finish_eval=$lt_finish_eval
11947
11948# Take the output of nm and produce a listing of raw symbols and C names.
11949global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
11950
11951# Transform the output of nm in a proper C declaration
11952global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
11953
11954# Transform the output of nm in a C name address pair
11955global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
11956
11957# This is the shared library runtime path variable.
11958runpath_var=$runpath_var
11959
11960# This is the shared library path variable.
11961shlibpath_var=$shlibpath_var
11962
11963# Is shlibpath searched before the hard-coded library search path?
11964shlibpath_overrides_runpath=$shlibpath_overrides_runpath
11965
11966# How to hardcode a shared library path into an executable.
11967hardcode_action=$hardcode_action_RC
11968
11969# Whether we should hardcode library paths into libraries.
11970hardcode_into_libs=$hardcode_into_libs
11971
11972# Flag to hardcode \$libdir into a binary during linking.
11973# This must work even if \$libdir does not exist.
11974hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
11975
11976# If ld is used when linking, flag to hardcode \$libdir into
11977# a binary during linking. This must work even if \$libdir does
11978# not exist.
11979hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
11980
11981# Whether we need a single -rpath flag with a separated argument.
11982hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
11983
11984# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
11985# resulting binary.
11986hardcode_direct=$hardcode_direct_RC
11987
11988# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
11989# resulting binary.
11990hardcode_minus_L=$hardcode_minus_L_RC
11991
11992# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
11993# the resulting binary.
11994hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
11995
11996# Set to yes if building a shared library automatically hardcodes DIR into the library
11997# and all subsequent libraries and executables linked against it.
11998hardcode_automatic=$hardcode_automatic_RC
11999
12000# Variables whose values should be saved in libtool wrapper scripts and
12001# restored at relink time.
12002variables_saved_for_relink="$variables_saved_for_relink"
12003
12004# Whether libtool must link a program against all its dependency libraries.
12005link_all_deplibs=$link_all_deplibs_RC
12006
12007# Compile-time system search path for libraries
12008sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
12009
12010# Run-time system search path for libraries
12011sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
12012
12013# Fix the shell variable \$srcfile for the compiler.
12014fix_srcfile_path="$fix_srcfile_path_RC"
12015
12016# Set to yes if exported symbols are required.
12017always_export_symbols=$always_export_symbols_RC
12018
12019# The commands to list exported symbols.
12020export_symbols_cmds=$lt_export_symbols_cmds_RC
12021
12022# The commands to extract the exported symbol list from a shared archive.
12023extract_expsyms_cmds=$lt_extract_expsyms_cmds
12024
12025# Symbols that should not be listed in the preloaded symbols.
12026exclude_expsyms=$lt_exclude_expsyms_RC
12027
12028# Symbols that must always be exported.
12029include_expsyms=$lt_include_expsyms_RC
12030
12031# ### END LIBTOOL TAG CONFIG: $tagname
12032
12033__EOF__
12034
12035
12036else
12037  # If there is no Makefile yet, we rely on a make rule to execute
12038  # `config.status --recheck' to rerun these tests and create the
12039  # libtool script then.
12040  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
12041  if test -f "$ltmain_in"; then
12042    test -f Makefile && make "$ltmain"
12043  fi
12044fi
12045
12046
12047ac_ext=c
12048ac_cpp='$CPP $CPPFLAGS'
12049ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12050ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12051ac_compiler_gnu=$ac_cv_c_compiler_gnu
12052
12053CC="$lt_save_CC"
12054
12055	;;
12056
12057      *)
12058	as_fn_error "Unsupported tag name: $tagname" "$LINENO" 5
12059	;;
12060      esac
12061
12062      # Append the new tag name to the list of available tags.
12063      if test -n "$tagname" ; then
12064      available_tags="$available_tags $tagname"
12065    fi
12066    fi
12067  done
12068  IFS="$lt_save_ifs"
12069
12070  # Now substitute the updated list of available tags.
12071  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
12072    mv "${ofile}T" "$ofile"
12073    chmod +x "$ofile"
12074  else
12075    rm -f "${ofile}T"
12076    as_fn_error "unable to update list of available tagged configurations." "$LINENO" 5
12077  fi
12078fi
12079
12080
12081
12082# This can be used to rebuild libtool when needed
12083LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
12084
12085# Always use our own libtool.
12086LIBTOOL='$(SHELL) $(top_builddir)/libtool'
12087
12088# Prevent multiple expansion
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099ol_link_perl=no
12100if test $ol_enable_perl != no ; then
12101	# Extract the first word of "perl", so it can be a program name with args.
12102set dummy perl; ac_word=$2
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12104$as_echo_n "checking for $ac_word... " >&6; }
12105if test "${ac_cv_path_PERLBIN+set}" = set; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  case $PERLBIN in
12109  [\\/]* | ?:[\\/]*)
12110  ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
12111  ;;
12112  *)
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12120    ac_cv_path_PERLBIN="$as_dir/$ac_word$ac_exec_ext"
12121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12122    break 2
12123  fi
12124done
12125  done
12126IFS=$as_save_IFS
12127
12128  test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
12129  ;;
12130esac
12131fi
12132PERLBIN=$ac_cv_path_PERLBIN
12133if test -n "$PERLBIN"; then
12134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLBIN" >&5
12135$as_echo "$PERLBIN" >&6; }
12136else
12137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138$as_echo "no" >&6; }
12139fi
12140
12141
12142
12143	if test "no$PERLBIN" = "no" ; then
12144		if test $ol_enable_perl = yes ; then
12145			as_fn_error "could not locate perl" "$LINENO" 5
12146		fi
12147
12148	else
12149		PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
12150		PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
12151
12152		if test x"$ol_enable_perl" = "xyes" ; then
12153			SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
12154		else
12155			MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
12156		fi
12157				ol_link_perl=yes
12158	fi
12159fi
12160
12161ac_ext=c
12162ac_cpp='$CPP $CPPFLAGS'
12163ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12164ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12165ac_compiler_gnu=$ac_cv_c_compiler_gnu
12166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
12167$as_echo_n "checking how to run the C preprocessor... " >&6; }
12168# On Suns, sometimes $CPP names a directory.
12169if test -n "$CPP" && test -d "$CPP"; then
12170  CPP=
12171fi
12172if test -z "$CPP"; then
12173  if test "${ac_cv_prog_CPP+set}" = set; then :
12174  $as_echo_n "(cached) " >&6
12175else
12176      # Double quotes because CPP needs to be expanded
12177    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
12178    do
12179      ac_preproc_ok=false
12180for ac_c_preproc_warn_flag in '' yes
12181do
12182  # Use a header file that comes with gcc, so configuring glibc
12183  # with a fresh cross-compiler works.
12184  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12185  # <limits.h> exists even on freestanding compilers.
12186  # On the NeXT, cc -E runs the code through the compiler's parser,
12187  # not just through cpp. "Syntax error" is here to catch this case.
12188  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12189/* end confdefs.h.  */
12190#ifdef __STDC__
12191# include <limits.h>
12192#else
12193# include <assert.h>
12194#endif
12195		     Syntax error
12196_ACEOF
12197if ac_fn_c_try_cpp "$LINENO"; then :
12198
12199else
12200  # Broken: fails on valid input.
12201continue
12202fi
12203rm -f conftest.err conftest.$ac_ext
12204
12205  # OK, works on sane cases.  Now check whether nonexistent headers
12206  # can be detected and how.
12207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208/* end confdefs.h.  */
12209#include <ac_nonexistent.h>
12210_ACEOF
12211if ac_fn_c_try_cpp "$LINENO"; then :
12212  # Broken: success on invalid input.
12213continue
12214else
12215  # Passes both tests.
12216ac_preproc_ok=:
12217break
12218fi
12219rm -f conftest.err conftest.$ac_ext
12220
12221done
12222# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12223rm -f conftest.err conftest.$ac_ext
12224if $ac_preproc_ok; then :
12225  break
12226fi
12227
12228    done
12229    ac_cv_prog_CPP=$CPP
12230
12231fi
12232  CPP=$ac_cv_prog_CPP
12233else
12234  ac_cv_prog_CPP=$CPP
12235fi
12236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
12237$as_echo "$CPP" >&6; }
12238ac_preproc_ok=false
12239for ac_c_preproc_warn_flag in '' yes
12240do
12241  # Use a header file that comes with gcc, so configuring glibc
12242  # with a fresh cross-compiler works.
12243  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12244  # <limits.h> exists even on freestanding compilers.
12245  # On the NeXT, cc -E runs the code through the compiler's parser,
12246  # not just through cpp. "Syntax error" is here to catch this case.
12247  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248/* end confdefs.h.  */
12249#ifdef __STDC__
12250# include <limits.h>
12251#else
12252# include <assert.h>
12253#endif
12254		     Syntax error
12255_ACEOF
12256if ac_fn_c_try_cpp "$LINENO"; then :
12257
12258else
12259  # Broken: fails on valid input.
12260continue
12261fi
12262rm -f conftest.err conftest.$ac_ext
12263
12264  # OK, works on sane cases.  Now check whether nonexistent headers
12265  # can be detected and how.
12266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12267/* end confdefs.h.  */
12268#include <ac_nonexistent.h>
12269_ACEOF
12270if ac_fn_c_try_cpp "$LINENO"; then :
12271  # Broken: success on invalid input.
12272continue
12273else
12274  # Passes both tests.
12275ac_preproc_ok=:
12276break
12277fi
12278rm -f conftest.err conftest.$ac_ext
12279
12280done
12281# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12282rm -f conftest.err conftest.$ac_ext
12283if $ac_preproc_ok; then :
12284
12285else
12286  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12287$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12288as_fn_error "C preprocessor \"$CPP\" fails sanity check
12289See \`config.log' for more details." "$LINENO" 5; }
12290fi
12291
12292ac_ext=c
12293ac_cpp='$CPP $CPPFLAGS'
12294ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12295ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12296ac_compiler_gnu=$ac_cv_c_compiler_gnu
12297
12298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using MS Visual C++" >&5
12299$as_echo_n "checking whether we are using MS Visual C++... " >&6; }
12300if test "${ol_cv_msvc+set}" = set; then :
12301  $as_echo_n "(cached) " >&6
12302else
12303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12304/* end confdefs.h.  */
12305
12306#ifndef _MSC_VER
12307#include <__FOO__/generate_error.h>
12308#endif
12309
12310_ACEOF
12311if ac_fn_c_try_cpp "$LINENO"; then :
12312  ol_cv_msvc=yes
12313else
12314  ol_cv_msvc=no
12315fi
12316rm -f conftest.err conftest.$ac_ext
12317fi
12318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_msvc" >&5
12319$as_echo "$ol_cv_msvc" >&6; }
12320
12321case $host_os in
12322  *mingw32* ) ac_cv_mingw32=yes ;;
12323  *cygwin* ) ac_cv_cygwin=yes ;;
12324  *interix* ) ac_cv_interix=yes ;;
12325esac
12326
12327
12328
12329
12330cat >>confdefs.h <<_ACEOF
12331#define EXEEXT "${EXEEXT}"
12332_ACEOF
12333
12334
12335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for be_app in -lbe" >&5
12336$as_echo_n "checking for be_app in -lbe... " >&6; }
12337if test "${ac_cv_lib_be_be_app+set}" = set; then :
12338  $as_echo_n "(cached) " >&6
12339else
12340  ac_check_lib_save_LIBS=$LIBS
12341LIBS="-lbe -lroot -lnet $LIBS"
12342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343/* end confdefs.h.  */
12344
12345/* Override any GCC internal prototype to avoid an error.
12346   Use char because int might match the return type of a GCC
12347   builtin and then its argument prototype would still apply.  */
12348#ifdef __cplusplus
12349extern "C"
12350#endif
12351char be_app ();
12352int
12353main ()
12354{
12355return be_app ();
12356  ;
12357  return 0;
12358}
12359_ACEOF
12360if ac_fn_c_try_link "$LINENO"; then :
12361  ac_cv_lib_be_be_app=yes
12362else
12363  ac_cv_lib_be_be_app=no
12364fi
12365rm -f core conftest.err conftest.$ac_objext \
12366    conftest$ac_exeext conftest.$ac_ext
12367LIBS=$ac_check_lib_save_LIBS
12368fi
12369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_be_be_app" >&5
12370$as_echo "$ac_cv_lib_be_be_app" >&6; }
12371if test "x$ac_cv_lib_be_be_app" = x""yes; then :
12372  LIBS="$LIBS -lbe -lroot -lnet"
12373else
12374  :
12375fi
12376
12377
12378ac_ext=c
12379ac_cpp='$CPP $CPPFLAGS'
12380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12382ac_compiler_gnu=$ac_cv_c_compiler_gnu
12383if test -n "$ac_tool_prefix"; then
12384  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
12385set dummy ${ac_tool_prefix}gcc; ac_word=$2
12386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12387$as_echo_n "checking for $ac_word... " >&6; }
12388if test "${ac_cv_prog_CC+set}" = set; then :
12389  $as_echo_n "(cached) " >&6
12390else
12391  if test -n "$CC"; then
12392  ac_cv_prog_CC="$CC" # Let the user override the test.
12393else
12394as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12395for as_dir in $PATH
12396do
12397  IFS=$as_save_IFS
12398  test -z "$as_dir" && as_dir=.
12399    for ac_exec_ext in '' $ac_executable_extensions; do
12400  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12401    ac_cv_prog_CC="${ac_tool_prefix}gcc"
12402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12403    break 2
12404  fi
12405done
12406  done
12407IFS=$as_save_IFS
12408
12409fi
12410fi
12411CC=$ac_cv_prog_CC
12412if test -n "$CC"; then
12413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12414$as_echo "$CC" >&6; }
12415else
12416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12417$as_echo "no" >&6; }
12418fi
12419
12420
12421fi
12422if test -z "$ac_cv_prog_CC"; then
12423  ac_ct_CC=$CC
12424  # Extract the first word of "gcc", so it can be a program name with args.
12425set dummy gcc; ac_word=$2
12426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12427$as_echo_n "checking for $ac_word... " >&6; }
12428if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12429  $as_echo_n "(cached) " >&6
12430else
12431  if test -n "$ac_ct_CC"; then
12432  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12433else
12434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437  IFS=$as_save_IFS
12438  test -z "$as_dir" && as_dir=.
12439    for ac_exec_ext in '' $ac_executable_extensions; do
12440  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12441    ac_cv_prog_ac_ct_CC="gcc"
12442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12443    break 2
12444  fi
12445done
12446  done
12447IFS=$as_save_IFS
12448
12449fi
12450fi
12451ac_ct_CC=$ac_cv_prog_ac_ct_CC
12452if test -n "$ac_ct_CC"; then
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12454$as_echo "$ac_ct_CC" >&6; }
12455else
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12457$as_echo "no" >&6; }
12458fi
12459
12460  if test "x$ac_ct_CC" = x; then
12461    CC=""
12462  else
12463    case $cross_compiling:$ac_tool_warned in
12464yes:)
12465{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12466$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12467ac_tool_warned=yes ;;
12468esac
12469    CC=$ac_ct_CC
12470  fi
12471else
12472  CC="$ac_cv_prog_CC"
12473fi
12474
12475if test -z "$CC"; then
12476          if test -n "$ac_tool_prefix"; then
12477    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
12478set dummy ${ac_tool_prefix}cc; ac_word=$2
12479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12480$as_echo_n "checking for $ac_word... " >&6; }
12481if test "${ac_cv_prog_CC+set}" = set; then :
12482  $as_echo_n "(cached) " >&6
12483else
12484  if test -n "$CC"; then
12485  ac_cv_prog_CC="$CC" # Let the user override the test.
12486else
12487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488for as_dir in $PATH
12489do
12490  IFS=$as_save_IFS
12491  test -z "$as_dir" && as_dir=.
12492    for ac_exec_ext in '' $ac_executable_extensions; do
12493  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12494    ac_cv_prog_CC="${ac_tool_prefix}cc"
12495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12496    break 2
12497  fi
12498done
12499  done
12500IFS=$as_save_IFS
12501
12502fi
12503fi
12504CC=$ac_cv_prog_CC
12505if test -n "$CC"; then
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12507$as_echo "$CC" >&6; }
12508else
12509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12510$as_echo "no" >&6; }
12511fi
12512
12513
12514  fi
12515fi
12516if test -z "$CC"; then
12517  # Extract the first word of "cc", so it can be a program name with args.
12518set dummy cc; ac_word=$2
12519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12520$as_echo_n "checking for $ac_word... " >&6; }
12521if test "${ac_cv_prog_CC+set}" = set; then :
12522  $as_echo_n "(cached) " >&6
12523else
12524  if test -n "$CC"; then
12525  ac_cv_prog_CC="$CC" # Let the user override the test.
12526else
12527  ac_prog_rejected=no
12528as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12529for as_dir in $PATH
12530do
12531  IFS=$as_save_IFS
12532  test -z "$as_dir" && as_dir=.
12533    for ac_exec_ext in '' $ac_executable_extensions; do
12534  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12535    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
12536       ac_prog_rejected=yes
12537       continue
12538     fi
12539    ac_cv_prog_CC="cc"
12540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12541    break 2
12542  fi
12543done
12544  done
12545IFS=$as_save_IFS
12546
12547if test $ac_prog_rejected = yes; then
12548  # We found a bogon in the path, so make sure we never use it.
12549  set dummy $ac_cv_prog_CC
12550  shift
12551  if test $# != 0; then
12552    # We chose a different compiler from the bogus one.
12553    # However, it has the same basename, so the bogon will be chosen
12554    # first if we set CC to just the basename; use the full file name.
12555    shift
12556    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
12557  fi
12558fi
12559fi
12560fi
12561CC=$ac_cv_prog_CC
12562if test -n "$CC"; then
12563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12564$as_echo "$CC" >&6; }
12565else
12566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12567$as_echo "no" >&6; }
12568fi
12569
12570
12571fi
12572if test -z "$CC"; then
12573  if test -n "$ac_tool_prefix"; then
12574  for ac_prog in cl.exe
12575  do
12576    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12577set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12579$as_echo_n "checking for $ac_word... " >&6; }
12580if test "${ac_cv_prog_CC+set}" = set; then :
12581  $as_echo_n "(cached) " >&6
12582else
12583  if test -n "$CC"; then
12584  ac_cv_prog_CC="$CC" # Let the user override the test.
12585else
12586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12587for as_dir in $PATH
12588do
12589  IFS=$as_save_IFS
12590  test -z "$as_dir" && as_dir=.
12591    for ac_exec_ext in '' $ac_executable_extensions; do
12592  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12593    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
12594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12595    break 2
12596  fi
12597done
12598  done
12599IFS=$as_save_IFS
12600
12601fi
12602fi
12603CC=$ac_cv_prog_CC
12604if test -n "$CC"; then
12605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
12606$as_echo "$CC" >&6; }
12607else
12608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12609$as_echo "no" >&6; }
12610fi
12611
12612
12613    test -n "$CC" && break
12614  done
12615fi
12616if test -z "$CC"; then
12617  ac_ct_CC=$CC
12618  for ac_prog in cl.exe
12619do
12620  # Extract the first word of "$ac_prog", so it can be a program name with args.
12621set dummy $ac_prog; ac_word=$2
12622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12623$as_echo_n "checking for $ac_word... " >&6; }
12624if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
12625  $as_echo_n "(cached) " >&6
12626else
12627  if test -n "$ac_ct_CC"; then
12628  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
12629else
12630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12631for as_dir in $PATH
12632do
12633  IFS=$as_save_IFS
12634  test -z "$as_dir" && as_dir=.
12635    for ac_exec_ext in '' $ac_executable_extensions; do
12636  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12637    ac_cv_prog_ac_ct_CC="$ac_prog"
12638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12639    break 2
12640  fi
12641done
12642  done
12643IFS=$as_save_IFS
12644
12645fi
12646fi
12647ac_ct_CC=$ac_cv_prog_ac_ct_CC
12648if test -n "$ac_ct_CC"; then
12649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
12650$as_echo "$ac_ct_CC" >&6; }
12651else
12652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12653$as_echo "no" >&6; }
12654fi
12655
12656
12657  test -n "$ac_ct_CC" && break
12658done
12659
12660  if test "x$ac_ct_CC" = x; then
12661    CC=""
12662  else
12663    case $cross_compiling:$ac_tool_warned in
12664yes:)
12665{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
12666$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
12667ac_tool_warned=yes ;;
12668esac
12669    CC=$ac_ct_CC
12670  fi
12671fi
12672
12673fi
12674
12675
12676test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12678as_fn_error "no acceptable C compiler found in \$PATH
12679See \`config.log' for more details." "$LINENO" 5; }
12680
12681# Provide some information about the compiler.
12682$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
12683set X $ac_compile
12684ac_compiler=$2
12685for ac_option in --version -v -V -qversion; do
12686  { { ac_try="$ac_compiler $ac_option >&5"
12687case "(($ac_try" in
12688  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12689  *) ac_try_echo=$ac_try;;
12690esac
12691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
12692$as_echo "$ac_try_echo"; } >&5
12693  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
12694  ac_status=$?
12695  if test -s conftest.err; then
12696    sed '10a\
12697... rest of stderr output deleted ...
12698         10q' conftest.err >conftest.er1
12699    cat conftest.er1 >&5
12700  fi
12701  rm -f conftest.er1 conftest.err
12702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12703  test $ac_status = 0; }
12704done
12705
12706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
12707$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
12708if test "${ac_cv_c_compiler_gnu+set}" = set; then :
12709  $as_echo_n "(cached) " >&6
12710else
12711  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12712/* end confdefs.h.  */
12713
12714int
12715main ()
12716{
12717#ifndef __GNUC__
12718       choke me
12719#endif
12720
12721  ;
12722  return 0;
12723}
12724_ACEOF
12725if ac_fn_c_try_compile "$LINENO"; then :
12726  ac_compiler_gnu=yes
12727else
12728  ac_compiler_gnu=no
12729fi
12730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12731ac_cv_c_compiler_gnu=$ac_compiler_gnu
12732
12733fi
12734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
12735$as_echo "$ac_cv_c_compiler_gnu" >&6; }
12736if test $ac_compiler_gnu = yes; then
12737  GCC=yes
12738else
12739  GCC=
12740fi
12741ac_test_CFLAGS=${CFLAGS+set}
12742ac_save_CFLAGS=$CFLAGS
12743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
12744$as_echo_n "checking whether $CC accepts -g... " >&6; }
12745if test "${ac_cv_prog_cc_g+set}" = set; then :
12746  $as_echo_n "(cached) " >&6
12747else
12748  ac_save_c_werror_flag=$ac_c_werror_flag
12749   ac_c_werror_flag=yes
12750   ac_cv_prog_cc_g=no
12751   CFLAGS="-g"
12752   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12753/* end confdefs.h.  */
12754
12755int
12756main ()
12757{
12758
12759  ;
12760  return 0;
12761}
12762_ACEOF
12763if ac_fn_c_try_compile "$LINENO"; then :
12764  ac_cv_prog_cc_g=yes
12765else
12766  CFLAGS=""
12767      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12768/* end confdefs.h.  */
12769
12770int
12771main ()
12772{
12773
12774  ;
12775  return 0;
12776}
12777_ACEOF
12778if ac_fn_c_try_compile "$LINENO"; then :
12779
12780else
12781  ac_c_werror_flag=$ac_save_c_werror_flag
12782	 CFLAGS="-g"
12783	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12784/* end confdefs.h.  */
12785
12786int
12787main ()
12788{
12789
12790  ;
12791  return 0;
12792}
12793_ACEOF
12794if ac_fn_c_try_compile "$LINENO"; then :
12795  ac_cv_prog_cc_g=yes
12796fi
12797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12798fi
12799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12800fi
12801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12802   ac_c_werror_flag=$ac_save_c_werror_flag
12803fi
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
12805$as_echo "$ac_cv_prog_cc_g" >&6; }
12806if test "$ac_test_CFLAGS" = set; then
12807  CFLAGS=$ac_save_CFLAGS
12808elif test $ac_cv_prog_cc_g = yes; then
12809  if test "$GCC" = yes; then
12810    CFLAGS="-g -O2"
12811  else
12812    CFLAGS="-g"
12813  fi
12814else
12815  if test "$GCC" = yes; then
12816    CFLAGS="-O2"
12817  else
12818    CFLAGS=
12819  fi
12820fi
12821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
12822$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
12823if test "${ac_cv_prog_cc_c89+set}" = set; then :
12824  $as_echo_n "(cached) " >&6
12825else
12826  ac_cv_prog_cc_c89=no
12827ac_save_CC=$CC
12828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12829/* end confdefs.h.  */
12830#include <stdarg.h>
12831#include <stdio.h>
12832#include <sys/types.h>
12833#include <sys/stat.h>
12834/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12835struct buf { int x; };
12836FILE * (*rcsopen) (struct buf *, struct stat *, int);
12837static char *e (p, i)
12838     char **p;
12839     int i;
12840{
12841  return p[i];
12842}
12843static char *f (char * (*g) (char **, int), char **p, ...)
12844{
12845  char *s;
12846  va_list v;
12847  va_start (v,p);
12848  s = g (p, va_arg (v,int));
12849  va_end (v);
12850  return s;
12851}
12852
12853/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
12854   function prototypes and stuff, but not '\xHH' hex character constants.
12855   These don't provoke an error unfortunately, instead are silently treated
12856   as 'x'.  The following induces an error, until -std is added to get
12857   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
12858   array size at least.  It's necessary to write '\x00'==0 to get something
12859   that's true only with -std.  */
12860int osf4_cc_array ['\x00' == 0 ? 1 : -1];
12861
12862/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
12863   inside strings and character constants.  */
12864#define FOO(x) 'x'
12865int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
12866
12867int test (int i, double x);
12868struct s1 {int (*f) (int a);};
12869struct s2 {int (*f) (double a);};
12870int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12871int argc;
12872char **argv;
12873int
12874main ()
12875{
12876return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12877  ;
12878  return 0;
12879}
12880_ACEOF
12881for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
12882	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12883do
12884  CC="$ac_save_CC $ac_arg"
12885  if ac_fn_c_try_compile "$LINENO"; then :
12886  ac_cv_prog_cc_c89=$ac_arg
12887fi
12888rm -f core conftest.err conftest.$ac_objext
12889  test "x$ac_cv_prog_cc_c89" != "xno" && break
12890done
12891rm -f conftest.$ac_ext
12892CC=$ac_save_CC
12893
12894fi
12895# AC_CACHE_VAL
12896case "x$ac_cv_prog_cc_c89" in
12897  x)
12898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
12899$as_echo "none needed" >&6; } ;;
12900  xno)
12901    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
12902$as_echo "unsupported" >&6; } ;;
12903  *)
12904    CC="$CC $ac_cv_prog_cc_c89"
12905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
12906$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
12907esac
12908if test "x$ac_cv_prog_cc_c89" != xno; then :
12909
12910fi
12911
12912ac_ext=c
12913ac_cpp='$CPP $CPPFLAGS'
12914ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12915ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12916ac_compiler_gnu=$ac_cv_c_compiler_gnu
12917
12918depcc="$CC"   am_compiler_list=
12919
12920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
12921$as_echo_n "checking dependency style of $depcc... " >&6; }
12922if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
12923  $as_echo_n "(cached) " >&6
12924else
12925  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
12926  # We make a subdir and do the tests there.  Otherwise we can end up
12927  # making bogus files that we don't know about and never remove.  For
12928  # instance it was reported that on HP-UX the gcc test will end up
12929  # making a dummy file named `D' -- because `-MD' means `put the output
12930  # in D'.
12931  mkdir conftest.dir
12932  # Copy depcomp to subdir because otherwise we won't find it if we're
12933  # using a relative directory.
12934  cp "$am_depcomp" conftest.dir
12935  cd conftest.dir
12936  # We will build objects and dependencies in a subdirectory because
12937  # it helps to detect inapplicable dependency modes.  For instance
12938  # both Tru64's cc and ICC support -MD to output dependencies as a
12939  # side effect of compilation, but ICC will put the dependencies in
12940  # the current directory while Tru64 will put them in the object
12941  # directory.
12942  mkdir sub
12943
12944  am_cv_CC_dependencies_compiler_type=none
12945  if test "$am_compiler_list" = ""; then
12946     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
12947  fi
12948  for depmode in $am_compiler_list; do
12949    # Setup a source with many dependencies, because some compilers
12950    # like to wrap large dependency lists on column 80 (with \), and
12951    # we should not choose a depcomp mode which is confused by this.
12952    #
12953    # We need to recreate these files for each test, as the compiler may
12954    # overwrite some of them when testing with obscure command lines.
12955    # This happens at least with the AIX C compiler.
12956    : > sub/conftest.c
12957    for i in 1 2 3 4 5 6; do
12958      echo '#include "conftst'$i'.h"' >> sub/conftest.c
12959      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
12960      # Solaris 8's {/usr,}/bin/sh.
12961      touch sub/conftst$i.h
12962    done
12963    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
12964
12965    case $depmode in
12966    nosideeffect)
12967      # after this tag, mechanisms are not by side-effect, so they'll
12968      # only be used when explicitly requested
12969      if test "x$enable_dependency_tracking" = xyes; then
12970	continue
12971      else
12972	break
12973      fi
12974      ;;
12975    none) break ;;
12976    esac
12977    # We check with `-c' and `-o' for the sake of the "dashmstdout"
12978    # mode.  It turns out that the SunPro C++ compiler does not properly
12979    # handle `-M -o', and we need to detect this.
12980    if depmode=$depmode \
12981       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
12982       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
12983       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
12984         >/dev/null 2>conftest.err &&
12985       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
12986       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
12987       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
12988      # icc doesn't choke on unknown options, it will just issue warnings
12989      # or remarks (even with -Werror).  So we grep stderr for any message
12990      # that says an option was ignored or not supported.
12991      # When given -MP, icc 7.0 and 7.1 complain thusly:
12992      #   icc: Command line warning: ignoring option '-M'; no argument required
12993      # The diagnosis changed in icc 8.0:
12994      #   icc: Command line remark: option '-MP' not supported
12995      if (grep 'ignoring option' conftest.err ||
12996          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
12997        am_cv_CC_dependencies_compiler_type=$depmode
12998        break
12999      fi
13000    fi
13001  done
13002
13003  cd ..
13004  rm -rf conftest.dir
13005else
13006  am_cv_CC_dependencies_compiler_type=none
13007fi
13008
13009fi
13010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
13011$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
13012CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
13013
13014
13015
13016if
13017  test "x$enable_dependency_tracking" != xno \
13018  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
13019  am__fastdepCC_TRUE=
13020  am__fastdepCC_FALSE='#'
13021else
13022  am__fastdepCC_TRUE='#'
13023  am__fastdepCC_FALSE=
13024fi
13025
13026
13027if test "X${ac_cv_prog_cc_stdc}" = "Xno" ; then
13028	as_fn_error "OpenLDAP requires compiler to support STDC constructs." "$LINENO" 5
13029fi
13030
13031# test for make depend flag
13032OL_MKDEP=
13033OL_MKDEP_FLAGS=
13034if test -z "${MKDEP}"; then
13035	OL_MKDEP="${CC-cc}"
13036	if test -z "${MKDEP_FLAGS}"; then
13037		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${OL_MKDEP} depend flag" >&5
13038$as_echo_n "checking for ${OL_MKDEP} depend flag... " >&6; }
13039if test "${ol_cv_mkdep+set}" = set; then :
13040  $as_echo_n "(cached) " >&6
13041else
13042
13043			ol_cv_mkdep=no
13044			for flag in "-M" "-xM"; do
13045				cat > conftest.c <<EOF
13046 noCode;
13047EOF
13048				if { ac_try='$OL_MKDEP $flag conftest.c'
13049  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
13050  (eval $ac_try) 2>&5
13051  ac_status=$?
13052  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13053  test $ac_status = 0; }; } \
13054					| grep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
13055				then
13056					if test ! -f conftest."${ac_object}" ; then
13057						ol_cv_mkdep=$flag
13058						OL_MKDEP_FLAGS="$flag"
13059						break
13060					fi
13061				fi
13062			done
13063			rm -f conftest*
13064
13065fi
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_mkdep" >&5
13067$as_echo "$ol_cv_mkdep" >&6; }
13068		test "$ol_cv_mkdep" = no && OL_MKDEP=":"
13069	else
13070		cc_cv_mkdep=yes
13071		OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13072	fi
13073else
13074	cc_cv_mkdep=yes
13075	OL_MKDEP="${MKDEP}"
13076	OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
13077fi
13078
13079
13080
13081if test "${ol_cv_mkdep}" = no ; then
13082	# this will soon become an error
13083	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: do not know how to generate dependencies" >&5
13084$as_echo "$as_me: WARNING: do not know how to generate dependencies" >&2;}
13085fi
13086
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for afopen in -ls" >&5
13088$as_echo_n "checking for afopen in -ls... " >&6; }
13089if test "${ac_cv_lib_s_afopen+set}" = set; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092  ac_check_lib_save_LIBS=$LIBS
13093LIBS="-ls  $LIBS"
13094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13095/* end confdefs.h.  */
13096
13097/* Override any GCC internal prototype to avoid an error.
13098   Use char because int might match the return type of a GCC
13099   builtin and then its argument prototype would still apply.  */
13100#ifdef __cplusplus
13101extern "C"
13102#endif
13103char afopen ();
13104int
13105main ()
13106{
13107return afopen ();
13108  ;
13109  return 0;
13110}
13111_ACEOF
13112if ac_fn_c_try_link "$LINENO"; then :
13113  ac_cv_lib_s_afopen=yes
13114else
13115  ac_cv_lib_s_afopen=no
13116fi
13117rm -f core conftest.err conftest.$ac_objext \
13118    conftest$ac_exeext conftest.$ac_ext
13119LIBS=$ac_check_lib_save_LIBS
13120fi
13121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_afopen" >&5
13122$as_echo "$ac_cv_lib_s_afopen" >&6; }
13123if test "x$ac_cv_lib_s_afopen" = x""yes; then :
13124
13125	AUTH_LIBS=-ls
13126
13127$as_echo "#define HAVE_AIX_SECURITY 1" >>confdefs.h
13128
13129
13130fi
13131
13132
13133case "$target" in
13134*-ibm-openedition)
13135	ac_cv_func_getopt=no
13136
13137$as_echo "#define BOTH_STRINGS_H 1" >>confdefs.h
13138
13139	;;
13140esac
13141
13142ol_link_modules=no
13143WITH_MODULES_ENABLED=no
13144if test $ol_enable_modules != no ; then
13145	for ac_header in ltdl.h
13146do :
13147  ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
13148if test "x$ac_cv_header_ltdl_h" = x""yes; then :
13149  cat >>confdefs.h <<_ACEOF
13150#define HAVE_LTDL_H 1
13151_ACEOF
13152
13153fi
13154
13155done
13156
13157
13158	if test $ac_cv_header_ltdl_h = no ; then
13159		as_fn_error "could not locate libtool ltdl.h" "$LINENO" 5
13160	fi
13161
13162	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
13163$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
13164if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
13165  $as_echo_n "(cached) " >&6
13166else
13167  ac_check_lib_save_LIBS=$LIBS
13168LIBS="-lltdl  $LIBS"
13169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13170/* end confdefs.h.  */
13171
13172/* Override any GCC internal prototype to avoid an error.
13173   Use char because int might match the return type of a GCC
13174   builtin and then its argument prototype would still apply.  */
13175#ifdef __cplusplus
13176extern "C"
13177#endif
13178char lt_dlinit ();
13179int
13180main ()
13181{
13182return lt_dlinit ();
13183  ;
13184  return 0;
13185}
13186_ACEOF
13187if ac_fn_c_try_link "$LINENO"; then :
13188  ac_cv_lib_ltdl_lt_dlinit=yes
13189else
13190  ac_cv_lib_ltdl_lt_dlinit=no
13191fi
13192rm -f core conftest.err conftest.$ac_objext \
13193    conftest$ac_exeext conftest.$ac_ext
13194LIBS=$ac_check_lib_save_LIBS
13195fi
13196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
13197$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
13198if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
13199
13200		MODULES_LIBS=-lltdl
13201
13202$as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
13203
13204
13205fi
13206
13207
13208	if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
13209		as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
13210	fi
13211	ol_link_modules=yes
13212	WITH_MODULES_ENABLED=yes
13213
13214else
13215	for i in $Backends; do
13216		eval "ol_tmp=\$ol_enable_$i"
13217		if test $ol_tmp = mod ; then
13218			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i backend" >&5
13219$as_echo "$as_me: WARNING: building static $i backend" >&2;}
13220			eval "ol_enable_$i=yes"
13221		fi
13222	done
13223	for i in $Overlays; do
13224		eval "ol_tmp=\$ol_enable_$i"
13225		if test $ol_tmp = mod ; then
13226			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: building static $i overlay" >&5
13227$as_echo "$as_me: WARNING: building static $i overlay" >&2;}
13228			eval "ol_enable_$i=yes"
13229		fi
13230	done
13231fi
13232
13233# test for EBCDIC
13234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EBCDIC" >&5
13235$as_echo_n "checking for EBCDIC... " >&6; }
13236if test "${ol_cv_cpp_ebcdic+set}" = set; then :
13237  $as_echo_n "(cached) " >&6
13238else
13239
13240	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241/* end confdefs.h.  */
13242
13243#if !('M' == 0xd4)
13244#include <__ASCII__/generate_error.h>
13245#endif
13246
13247_ACEOF
13248if ac_fn_c_try_cpp "$LINENO"; then :
13249  ol_cv_cpp_ebcdic=yes
13250else
13251  ol_cv_cpp_ebcdic=no
13252fi
13253rm -f conftest.err conftest.$ac_ext
13254fi
13255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cpp_ebcdic" >&5
13256$as_echo "$ol_cv_cpp_ebcdic" >&6; }
13257if test $ol_cv_cpp_ebcdic = yes ; then
13258
13259$as_echo "#define HAVE_EBCDIC 1" >>confdefs.h
13260
13261fi
13262
13263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13264$as_echo_n "checking for ANSI C header files... " >&6; }
13265if test "${ol_cv_header_stdc+set}" = set; then :
13266  $as_echo_n "(cached) " >&6
13267else
13268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13269/* end confdefs.h.  */
13270#include <stdlib.h>
13271#include <stdarg.h>
13272#include <string.h>
13273#include <float.h>
13274_ACEOF
13275if ac_fn_c_try_cpp "$LINENO"; then :
13276  ol_cv_header_stdc=yes
13277else
13278  ol_cv_header_stdc=no
13279fi
13280rm -f conftest.err conftest.$ac_ext
13281
13282if test $ol_cv_header_stdc = yes; then
13283  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13284cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13285/* end confdefs.h.  */
13286#include <string.h>
13287
13288_ACEOF
13289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13290  $EGREP "memchr" >/dev/null 2>&1; then :
13291
13292else
13293  ol_cv_header_stdc=no
13294fi
13295rm -f conftest*
13296
13297fi
13298
13299if test $ol_cv_header_stdc = yes; then
13300  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302/* end confdefs.h.  */
13303#include <stdlib.h>
13304
13305_ACEOF
13306if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13307  $EGREP "free" >/dev/null 2>&1; then :
13308
13309else
13310  ol_cv_header_stdc=no
13311fi
13312rm -f conftest*
13313
13314fi
13315
13316if test $ol_cv_header_stdc = yes; then
13317  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13318if test "$cross_compiling" = yes; then :
13319  :
13320else
13321  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13322/* end confdefs.h.  */
13323#include <ctype.h>
13324#ifndef HAVE_EBCDIC
13325#	define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13326#	define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13327#else
13328#	define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13329		|| ('j' <= (c) && (c) <= 'r') \
13330		|| ('s' <= (c) && (c) <= 'z'))
13331#	define TOUPPER(c)	(ISLOWER(c) ? ((c) | 0x40) : (c))
13332#endif
13333#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13334int main () { int i; for (i = 0; i < 256; i++)
13335if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
13336exit (0); }
13337
13338_ACEOF
13339if ac_fn_c_try_run "$LINENO"; then :
13340
13341else
13342  ol_cv_header_stdc=no
13343fi
13344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13345  conftest.$ac_objext conftest.beam conftest.$ac_ext
13346fi
13347
13348fi
13349fi
13350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_stdc" >&5
13351$as_echo "$ol_cv_header_stdc" >&6; }
13352if test $ol_cv_header_stdc = yes; then
13353  $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13354
13355fi
13356ac_cv_header_stdc=disable
13357
13358
13359if test $ol_cv_header_stdc != yes; then
13360	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate Standard C compliant headers" >&5
13361$as_echo "$as_me: WARNING: could not locate Standard C compliant headers" >&2;}
13362fi
13363
13364ac_header_dirent=no
13365for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13366  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
13368$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
13369if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
13370  $as_echo_n "(cached) " >&6
13371else
13372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13373/* end confdefs.h.  */
13374#include <sys/types.h>
13375#include <$ac_hdr>
13376
13377int
13378main ()
13379{
13380if ((DIR *) 0)
13381return 0;
13382  ;
13383  return 0;
13384}
13385_ACEOF
13386if ac_fn_c_try_compile "$LINENO"; then :
13387  eval "$as_ac_Header=yes"
13388else
13389  eval "$as_ac_Header=no"
13390fi
13391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13392fi
13393eval ac_res=\$$as_ac_Header
13394	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13395$as_echo "$ac_res" >&6; }
13396eval as_val=\$$as_ac_Header
13397   if test "x$as_val" = x""yes; then :
13398  cat >>confdefs.h <<_ACEOF
13399#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13400_ACEOF
13401
13402ac_header_dirent=$ac_hdr; break
13403fi
13404
13405done
13406# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13407if test $ac_header_dirent = dirent.h; then
13408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13409$as_echo_n "checking for library containing opendir... " >&6; }
13410if test "${ac_cv_search_opendir+set}" = set; then :
13411  $as_echo_n "(cached) " >&6
13412else
13413  ac_func_search_save_LIBS=$LIBS
13414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13415/* end confdefs.h.  */
13416
13417/* Override any GCC internal prototype to avoid an error.
13418   Use char because int might match the return type of a GCC
13419   builtin and then its argument prototype would still apply.  */
13420#ifdef __cplusplus
13421extern "C"
13422#endif
13423char opendir ();
13424int
13425main ()
13426{
13427return opendir ();
13428  ;
13429  return 0;
13430}
13431_ACEOF
13432for ac_lib in '' dir; do
13433  if test -z "$ac_lib"; then
13434    ac_res="none required"
13435  else
13436    ac_res=-l$ac_lib
13437    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13438  fi
13439  if ac_fn_c_try_link "$LINENO"; then :
13440  ac_cv_search_opendir=$ac_res
13441fi
13442rm -f core conftest.err conftest.$ac_objext \
13443    conftest$ac_exeext
13444  if test "${ac_cv_search_opendir+set}" = set; then :
13445  break
13446fi
13447done
13448if test "${ac_cv_search_opendir+set}" = set; then :
13449
13450else
13451  ac_cv_search_opendir=no
13452fi
13453rm conftest.$ac_ext
13454LIBS=$ac_func_search_save_LIBS
13455fi
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13457$as_echo "$ac_cv_search_opendir" >&6; }
13458ac_res=$ac_cv_search_opendir
13459if test "$ac_res" != no; then :
13460  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13461
13462fi
13463
13464else
13465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
13466$as_echo_n "checking for library containing opendir... " >&6; }
13467if test "${ac_cv_search_opendir+set}" = set; then :
13468  $as_echo_n "(cached) " >&6
13469else
13470  ac_func_search_save_LIBS=$LIBS
13471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13472/* end confdefs.h.  */
13473
13474/* Override any GCC internal prototype to avoid an error.
13475   Use char because int might match the return type of a GCC
13476   builtin and then its argument prototype would still apply.  */
13477#ifdef __cplusplus
13478extern "C"
13479#endif
13480char opendir ();
13481int
13482main ()
13483{
13484return opendir ();
13485  ;
13486  return 0;
13487}
13488_ACEOF
13489for ac_lib in '' x; do
13490  if test -z "$ac_lib"; then
13491    ac_res="none required"
13492  else
13493    ac_res=-l$ac_lib
13494    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13495  fi
13496  if ac_fn_c_try_link "$LINENO"; then :
13497  ac_cv_search_opendir=$ac_res
13498fi
13499rm -f core conftest.err conftest.$ac_objext \
13500    conftest$ac_exeext
13501  if test "${ac_cv_search_opendir+set}" = set; then :
13502  break
13503fi
13504done
13505if test "${ac_cv_search_opendir+set}" = set; then :
13506
13507else
13508  ac_cv_search_opendir=no
13509fi
13510rm conftest.$ac_ext
13511LIBS=$ac_func_search_save_LIBS
13512fi
13513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
13514$as_echo "$ac_cv_search_opendir" >&6; }
13515ac_res=$ac_cv_search_opendir
13516if test "$ac_res" != no; then :
13517  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13518
13519fi
13520
13521fi
13522
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
13524$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
13525if test "${ac_cv_header_sys_wait_h+set}" = set; then :
13526  $as_echo_n "(cached) " >&6
13527else
13528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13529/* end confdefs.h.  */
13530#include <sys/types.h>
13531#include <sys/wait.h>
13532#ifndef WEXITSTATUS
13533# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
13534#endif
13535#ifndef WIFEXITED
13536# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
13537#endif
13538
13539int
13540main ()
13541{
13542  int s;
13543  wait (&s);
13544  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
13545  ;
13546  return 0;
13547}
13548_ACEOF
13549if ac_fn_c_try_compile "$LINENO"; then :
13550  ac_cv_header_sys_wait_h=yes
13551else
13552  ac_cv_header_sys_wait_h=no
13553fi
13554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13555fi
13556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
13557$as_echo "$ac_cv_header_sys_wait_h" >&6; }
13558if test $ac_cv_header_sys_wait_h = yes; then
13559
13560$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
13561
13562fi
13563
13564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5
13565$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
13566if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then :
13567  $as_echo_n "(cached) " >&6
13568else
13569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13570/* end confdefs.h.  */
13571#include <sys/types.h>
13572#include <termios.h>
13573#ifdef TIOCGWINSZ
13574  yes
13575#endif
13576
13577_ACEOF
13578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13579  $EGREP "yes" >/dev/null 2>&1; then :
13580  ac_cv_sys_tiocgwinsz_in_termios_h=yes
13581else
13582  ac_cv_sys_tiocgwinsz_in_termios_h=no
13583fi
13584rm -f conftest*
13585
13586fi
13587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
13588$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
13589
13590if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
13591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
13592$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
13593if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then :
13594  $as_echo_n "(cached) " >&6
13595else
13596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13597/* end confdefs.h.  */
13598#include <sys/types.h>
13599#include <sys/ioctl.h>
13600#ifdef TIOCGWINSZ
13601  yes
13602#endif
13603
13604_ACEOF
13605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13606  $EGREP "yes" >/dev/null 2>&1; then :
13607  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
13608else
13609  ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
13610fi
13611rm -f conftest*
13612
13613fi
13614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
13615$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
13616
13617  if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
13618
13619$as_echo "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h
13620
13621  fi
13622fi
13623
13624
13625for ac_header in \
13626	arpa/inet.h		\
13627	arpa/nameser.h	\
13628	assert.h		\
13629	bits/types.h	\
13630	conio.h			\
13631	crypt.h			\
13632	direct.h		\
13633	errno.h			\
13634	fcntl.h			\
13635	filio.h			\
13636	getopt.h		\
13637	grp.h			\
13638	io.h			\
13639	libutil.h		\
13640	limits.h		\
13641	locale.h		\
13642	malloc.h		\
13643	memory.h		\
13644	psap.h			\
13645	pwd.h			\
13646	process.h		\
13647	sgtty.h			\
13648	shadow.h		\
13649	stddef.h		\
13650	string.h		\
13651	strings.h		\
13652	sysexits.h		\
13653	sys/file.h		\
13654	sys/filio.h		\
13655	sys/fstyp.h		\
13656	sys/errno.h		\
13657	sys/ioctl.h		\
13658	sys/param.h		\
13659	sys/privgrp.h	\
13660	sys/resource.h	\
13661	sys/select.h	\
13662	sys/socket.h	\
13663	sys/stat.h		\
13664	sys/syslog.h	\
13665	sys/time.h		\
13666	sys/types.h		\
13667	sys/uio.h		\
13668	sys/vmount.h	\
13669	syslog.h		\
13670	termios.h		\
13671	unistd.h		\
13672	utime.h			\
13673
13674do :
13675  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13676ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13677eval as_val=\$$as_ac_Header
13678   if test "x$as_val" = x""yes; then :
13679  cat >>confdefs.h <<_ACEOF
13680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13681_ACEOF
13682
13683fi
13684
13685done
13686
13687
13688if test "$ac_cv_mingw32" = yes \
13689	-o "$ac_cv_interix" = yes \
13690	-o "$ol_cv_msvc" = yes
13691then
13692	for ac_header in winsock.h winsock2.h
13693do :
13694  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13695ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13696eval as_val=\$$as_ac_Header
13697   if test "x$as_val" = x""yes; then :
13698  cat >>confdefs.h <<_ACEOF
13699#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13700_ACEOF
13701
13702fi
13703
13704done
13705
13706fi
13707
13708for ac_header in resolv.h
13709do :
13710  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default
13711#include <netinet/in.h>
13712
13713"
13714if test "x$ac_cv_header_resolv_h" = x""yes; then :
13715  cat >>confdefs.h <<_ACEOF
13716#define HAVE_RESOLV_H 1
13717_ACEOF
13718
13719fi
13720
13721done
13722
13723
13724for ac_header in netinet/tcp.h
13725do :
13726  ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13727#include <netinet/in.h>
13728
13729"
13730if test "x$ac_cv_header_netinet_tcp_h" = x""yes; then :
13731  cat >>confdefs.h <<_ACEOF
13732#define HAVE_NETINET_TCP_H 1
13733_ACEOF
13734
13735fi
13736
13737done
13738
13739
13740for ac_header in sys/ucred.h
13741do :
13742  ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13743#ifdef HAVE_SYS_PARAM_H
13744#include <sys/param.h>
13745#endif
13746
13747"
13748if test "x$ac_cv_header_sys_ucred_h" = x""yes; then :
13749  cat >>confdefs.h <<_ACEOF
13750#define HAVE_SYS_UCRED_H 1
13751_ACEOF
13752
13753fi
13754
13755done
13756
13757
13758
13759for ac_func in sigaction sigset
13760do :
13761  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13762ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13763eval as_val=\$$as_ac_var
13764   if test "x$as_val" = x""yes; then :
13765  cat >>confdefs.h <<_ACEOF
13766#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13767_ACEOF
13768
13769fi
13770done
13771
13772
13773if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
13774	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigset in -lV3" >&5
13775$as_echo_n "checking for sigset in -lV3... " >&6; }
13776if test "${ac_cv_lib_V3_sigset+set}" = set; then :
13777  $as_echo_n "(cached) " >&6
13778else
13779  ac_check_lib_save_LIBS=$LIBS
13780LIBS="-lV3  $LIBS"
13781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h.  */
13783
13784/* Override any GCC internal prototype to avoid an error.
13785   Use char because int might match the return type of a GCC
13786   builtin and then its argument prototype would still apply.  */
13787#ifdef __cplusplus
13788extern "C"
13789#endif
13790char sigset ();
13791int
13792main ()
13793{
13794return sigset ();
13795  ;
13796  return 0;
13797}
13798_ACEOF
13799if ac_fn_c_try_link "$LINENO"; then :
13800  ac_cv_lib_V3_sigset=yes
13801else
13802  ac_cv_lib_V3_sigset=no
13803fi
13804rm -f core conftest.err conftest.$ac_objext \
13805    conftest$ac_exeext conftest.$ac_ext
13806LIBS=$ac_check_lib_save_LIBS
13807fi
13808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_V3_sigset" >&5
13809$as_echo "$ac_cv_lib_V3_sigset" >&6; }
13810if test "x$ac_cv_lib_V3_sigset" = x""yes; then :
13811  cat >>confdefs.h <<_ACEOF
13812#define HAVE_LIBV3 1
13813_ACEOF
13814
13815  LIBS="-lV3 $LIBS"
13816
13817fi
13818
13819fi
13820
13821if test $ol_cv_msvc = yes ; then
13822   ol_cv_winsock=yes
13823fi
13824
13825if test "$ac_cv_header_winsock_h" = yes; then
13826	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for winsock" >&5
13827$as_echo_n "checking for winsock... " >&6; }
13828if test "${ol_cv_winsock+set}" = set; then :
13829  $as_echo_n "(cached) " >&6
13830else
13831
13832	save_LIBS="$LIBS"
13833	for curlib in none ws2_32 wsock32; do
13834		if test $curlib != none ; then
13835	    	LIBS="$save_LIBS -l$curlib"
13836		fi
13837		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13838/* end confdefs.h.  */
13839#include <winsock.h>
13840
13841int
13842main ()
13843{
13844
13845			socket(0,0,0);
13846			select(0,NULL,NULL,NULL,NULL);
13847			closesocket(0);
13848			gethostname(NULL,0);
13849
13850  ;
13851  return 0;
13852}
13853_ACEOF
13854if ac_fn_c_try_link "$LINENO"; then :
13855  ol_cv_winsock=$curlib
13856else
13857  ol_cv_winsock=no
13858fi
13859rm -f core conftest.err conftest.$ac_objext \
13860    conftest$ac_exeext conftest.$ac_ext
13861
13862		test "$ol_cv_winsock" != no && break
13863	done
13864	LIBS="$save_LIBS"
13865
13866fi
13867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_winsock" >&5
13868$as_echo "$ol_cv_winsock" >&6; }
13869
13870	if test $ol_cv_winsock != no ; then
13871
13872$as_echo "#define HAVE_WINSOCK 1" >>confdefs.h
13873
13874    	ac_cv_func_socket=yes
13875    	ac_cv_func_select=yes
13876    	ac_cv_func_closesocket=yes
13877    	ac_cv_func_gethostname=yes
13878
13879		if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
13880        	LIBS="$LIBS -l$ol_cv_winsock"
13881		fi
13882
13883    	if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
13884
13885$as_echo "#define HAVE_WINSOCK2 1" >>confdefs.h
13886
13887    	fi
13888	fi
13889fi
13890
13891
13892ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
13893if test "x$ac_cv_func_socket" = x""yes; then :
13894  :
13895else
13896
13897	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
13898$as_echo_n "checking for main in -lsocket... " >&6; }
13899if test "${ac_cv_lib_socket_main+set}" = set; then :
13900  $as_echo_n "(cached) " >&6
13901else
13902  ac_check_lib_save_LIBS=$LIBS
13903LIBS="-lsocket  $LIBS"
13904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13905/* end confdefs.h.  */
13906
13907
13908int
13909main ()
13910{
13911return main ();
13912  ;
13913  return 0;
13914}
13915_ACEOF
13916if ac_fn_c_try_link "$LINENO"; then :
13917  ac_cv_lib_socket_main=yes
13918else
13919  ac_cv_lib_socket_main=no
13920fi
13921rm -f core conftest.err conftest.$ac_objext \
13922    conftest$ac_exeext conftest.$ac_ext
13923LIBS=$ac_check_lib_save_LIBS
13924fi
13925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
13926$as_echo "$ac_cv_lib_socket_main" >&6; }
13927if test "x$ac_cv_lib_socket_main" = x""yes; then :
13928  cat >>confdefs.h <<_ACEOF
13929#define HAVE_LIBSOCKET 1
13930_ACEOF
13931
13932  LIBS="-lsocket $LIBS"
13933
13934fi
13935
13936	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
13937$as_echo_n "checking for socket in -lnet... " >&6; }
13938if test "${ac_cv_lib_net_socket+set}" = set; then :
13939  $as_echo_n "(cached) " >&6
13940else
13941  ac_check_lib_save_LIBS=$LIBS
13942LIBS="-lnet  $LIBS"
13943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13944/* end confdefs.h.  */
13945
13946/* Override any GCC internal prototype to avoid an error.
13947   Use char because int might match the return type of a GCC
13948   builtin and then its argument prototype would still apply.  */
13949#ifdef __cplusplus
13950extern "C"
13951#endif
13952char socket ();
13953int
13954main ()
13955{
13956return socket ();
13957  ;
13958  return 0;
13959}
13960_ACEOF
13961if ac_fn_c_try_link "$LINENO"; then :
13962  ac_cv_lib_net_socket=yes
13963else
13964  ac_cv_lib_net_socket=no
13965fi
13966rm -f core conftest.err conftest.$ac_objext \
13967    conftest$ac_exeext conftest.$ac_ext
13968LIBS=$ac_check_lib_save_LIBS
13969fi
13970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
13971$as_echo "$ac_cv_lib_net_socket" >&6; }
13972if test "x$ac_cv_lib_net_socket" = x""yes; then :
13973  cat >>confdefs.h <<_ACEOF
13974#define HAVE_LIBNET 1
13975_ACEOF
13976
13977  LIBS="-lnet $LIBS"
13978
13979fi
13980
13981	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl_s" >&5
13982$as_echo_n "checking for main in -lnsl_s... " >&6; }
13983if test "${ac_cv_lib_nsl_s_main+set}" = set; then :
13984  $as_echo_n "(cached) " >&6
13985else
13986  ac_check_lib_save_LIBS=$LIBS
13987LIBS="-lnsl_s  $LIBS"
13988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13989/* end confdefs.h.  */
13990
13991
13992int
13993main ()
13994{
13995return main ();
13996  ;
13997  return 0;
13998}
13999_ACEOF
14000if ac_fn_c_try_link "$LINENO"; then :
14001  ac_cv_lib_nsl_s_main=yes
14002else
14003  ac_cv_lib_nsl_s_main=no
14004fi
14005rm -f core conftest.err conftest.$ac_objext \
14006    conftest$ac_exeext conftest.$ac_ext
14007LIBS=$ac_check_lib_save_LIBS
14008fi
14009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_main" >&5
14010$as_echo "$ac_cv_lib_nsl_s_main" >&6; }
14011if test "x$ac_cv_lib_nsl_s_main" = x""yes; then :
14012  cat >>confdefs.h <<_ACEOF
14013#define HAVE_LIBNSL_S 1
14014_ACEOF
14015
14016  LIBS="-lnsl_s $LIBS"
14017
14018fi
14019
14020	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
14021$as_echo_n "checking for main in -lnsl... " >&6; }
14022if test "${ac_cv_lib_nsl_main+set}" = set; then :
14023  $as_echo_n "(cached) " >&6
14024else
14025  ac_check_lib_save_LIBS=$LIBS
14026LIBS="-lnsl  $LIBS"
14027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14028/* end confdefs.h.  */
14029
14030
14031int
14032main ()
14033{
14034return main ();
14035  ;
14036  return 0;
14037}
14038_ACEOF
14039if ac_fn_c_try_link "$LINENO"; then :
14040  ac_cv_lib_nsl_main=yes
14041else
14042  ac_cv_lib_nsl_main=no
14043fi
14044rm -f core conftest.err conftest.$ac_objext \
14045    conftest$ac_exeext conftest.$ac_ext
14046LIBS=$ac_check_lib_save_LIBS
14047fi
14048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
14049$as_echo "$ac_cv_lib_nsl_main" >&6; }
14050if test "x$ac_cv_lib_nsl_main" = x""yes; then :
14051  cat >>confdefs.h <<_ACEOF
14052#define HAVE_LIBNSL 1
14053_ACEOF
14054
14055  LIBS="-lnsl $LIBS"
14056
14057fi
14058
14059	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -linet" >&5
14060$as_echo_n "checking for socket in -linet... " >&6; }
14061if test "${ac_cv_lib_inet_socket+set}" = set; then :
14062  $as_echo_n "(cached) " >&6
14063else
14064  ac_check_lib_save_LIBS=$LIBS
14065LIBS="-linet  $LIBS"
14066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14067/* end confdefs.h.  */
14068
14069/* Override any GCC internal prototype to avoid an error.
14070   Use char because int might match the return type of a GCC
14071   builtin and then its argument prototype would still apply.  */
14072#ifdef __cplusplus
14073extern "C"
14074#endif
14075char socket ();
14076int
14077main ()
14078{
14079return socket ();
14080  ;
14081  return 0;
14082}
14083_ACEOF
14084if ac_fn_c_try_link "$LINENO"; then :
14085  ac_cv_lib_inet_socket=yes
14086else
14087  ac_cv_lib_inet_socket=no
14088fi
14089rm -f core conftest.err conftest.$ac_objext \
14090    conftest$ac_exeext conftest.$ac_ext
14091LIBS=$ac_check_lib_save_LIBS
14092fi
14093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_socket" >&5
14094$as_echo "$ac_cv_lib_inet_socket" >&6; }
14095if test "x$ac_cv_lib_inet_socket" = x""yes; then :
14096  cat >>confdefs.h <<_ACEOF
14097#define HAVE_LIBINET 1
14098_ACEOF
14099
14100  LIBS="-linet $LIBS"
14101
14102fi
14103
14104	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgen" >&5
14105$as_echo_n "checking for main in -lgen... " >&6; }
14106if test "${ac_cv_lib_gen_main+set}" = set; then :
14107  $as_echo_n "(cached) " >&6
14108else
14109  ac_check_lib_save_LIBS=$LIBS
14110LIBS="-lgen  $LIBS"
14111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14112/* end confdefs.h.  */
14113
14114
14115int
14116main ()
14117{
14118return main ();
14119  ;
14120  return 0;
14121}
14122_ACEOF
14123if ac_fn_c_try_link "$LINENO"; then :
14124  ac_cv_lib_gen_main=yes
14125else
14126  ac_cv_lib_gen_main=no
14127fi
14128rm -f core conftest.err conftest.$ac_objext \
14129    conftest$ac_exeext conftest.$ac_ext
14130LIBS=$ac_check_lib_save_LIBS
14131fi
14132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_main" >&5
14133$as_echo "$ac_cv_lib_gen_main" >&6; }
14134if test "x$ac_cv_lib_gen_main" = x""yes; then :
14135  cat >>confdefs.h <<_ACEOF
14136#define HAVE_LIBGEN 1
14137_ACEOF
14138
14139  LIBS="-lgen $LIBS"
14140
14141fi
14142
14143
14144fi
14145
14146
14147ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
14148if test "x$ac_cv_func_select" = x""yes; then :
14149  :
14150else
14151  as_fn_error "select() required." "$LINENO" 5
14152fi
14153
14154
14155if test "${ac_cv_header_winsock_h}" != yes; then
14156				for ac_header in sys/select.h sys/socket.h
14157do :
14158  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14159ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14160eval as_val=\$$as_ac_Header
14161   if test "x$as_val" = x""yes; then :
14162  cat >>confdefs.h <<_ACEOF
14163#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14164_ACEOF
14165
14166fi
14167
14168done
14169
14170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5
14171$as_echo_n "checking types of arguments for select... " >&6; }
14172if test "${ac_cv_func_select_args+set}" = set; then :
14173  $as_echo_n "(cached) " >&6
14174else
14175  for ac_arg234 in 'fd_set *' 'int *' 'void *'; do
14176 for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do
14177  for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do
14178   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14179/* end confdefs.h.  */
14180$ac_includes_default
14181#ifdef HAVE_SYS_SELECT_H
14182# include <sys/select.h>
14183#endif
14184#ifdef HAVE_SYS_SOCKET_H
14185# include <sys/socket.h>
14186#endif
14187
14188int
14189main ()
14190{
14191extern int select ($ac_arg1,
14192					    $ac_arg234, $ac_arg234, $ac_arg234,
14193					    $ac_arg5);
14194  ;
14195  return 0;
14196}
14197_ACEOF
14198if ac_fn_c_try_compile "$LINENO"; then :
14199  ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3
14200fi
14201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14202  done
14203 done
14204done
14205# Provide a safe default value.
14206: ${ac_cv_func_select_args='int,int *,struct timeval *'}
14207
14208fi
14209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5
14210$as_echo "$ac_cv_func_select_args" >&6; }
14211ac_save_IFS=$IFS; IFS=','
14212set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
14213IFS=$ac_save_IFS
14214shift
14215
14216cat >>confdefs.h <<_ACEOF
14217#define SELECT_TYPE_ARG1 $1
14218_ACEOF
14219
14220
14221cat >>confdefs.h <<_ACEOF
14222#define SELECT_TYPE_ARG234 ($2)
14223_ACEOF
14224
14225
14226cat >>confdefs.h <<_ACEOF
14227#define SELECT_TYPE_ARG5 ($3)
14228_ACEOF
14229
14230rm -f conftest*
14231
14232fi
14233
14234
14235for ac_func in poll
14236do :
14237  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14238ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14239eval as_val=\$$as_ac_var
14240   if test "x$as_val" = x""yes; then :
14241  cat >>confdefs.h <<_ACEOF
14242#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14243_ACEOF
14244
14245fi
14246done
14247
14248if test $ac_cv_func_poll = yes; then
14249for ac_header in poll.h sys/poll.h
14250do :
14251  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14252ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14253eval as_val=\$$as_ac_Header
14254   if test "x$as_val" = x""yes; then :
14255  cat >>confdefs.h <<_ACEOF
14256#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14257_ACEOF
14258
14259fi
14260
14261done
14262
14263fi
14264
14265for ac_header in sys/epoll.h
14266do :
14267  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14268ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14269eval as_val=\$$as_ac_Header
14270   if test "x$as_val" = x""yes; then :
14271  cat >>confdefs.h <<_ACEOF
14272#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14273_ACEOF
14274
14275fi
14276
14277done
14278
14279if test "${ac_cv_header_sys_epoll_h}" = yes; then
14280	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll system call" >&5
14281$as_echo_n "checking for epoll system call... " >&6; }
14282	if test "$cross_compiling" = yes; then :
14283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14284$as_echo "no" >&6; }
14285else
14286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287/* end confdefs.h.  */
14288int main(int argc, char **argv)
14289{
14290	int epfd = epoll_create(256);
14291	exit (epfd == -1 ? 1 : 0);
14292}
14293_ACEOF
14294if ac_fn_c_try_run "$LINENO"; then :
14295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14296$as_echo "yes" >&6; }
14297
14298$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
14299
14300else
14301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14302$as_echo "no" >&6; }
14303fi
14304rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14305  conftest.$ac_objext conftest.beam conftest.$ac_ext
14306fi
14307
14308fi
14309
14310for ac_header in sys/devpoll.h
14311do :
14312  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14313ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14314eval as_val=\$$as_ac_Header
14315   if test "x$as_val" = x""yes; then :
14316  cat >>confdefs.h <<_ACEOF
14317#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14318_ACEOF
14319
14320fi
14321
14322done
14323
14324if test "${ac_cv_header_sys_devpoll_h}" = yes \
14325		-a "${ac_cv_header_poll_h}" = yes ; \
14326then
14327	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/poll" >&5
14328$as_echo_n "checking for /dev/poll... " >&6; }
14329	if test "$cross_compiling" = yes; then :
14330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14331$as_echo "no" >&6; }
14332else
14333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334/* end confdefs.h.  */
14335int main(int argc, char **argv)
14336{
14337	int devpollfd = open("/dev/poll", /* O_RDWR */ 2);
14338	exit (devpollfd == -1 ? 1 : 0);
14339}
14340_ACEOF
14341if ac_fn_c_try_run "$LINENO"; then :
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14343$as_echo "yes" >&6; }
14344
14345$as_echo "#define HAVE_DEVPOLL 1" >>confdefs.h
14346
14347else
14348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14349$as_echo "no" >&6; }
14350fi
14351rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14352  conftest.$ac_objext conftest.beam conftest.$ac_ext
14353fi
14354
14355fi
14356
14357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14358$as_echo_n "checking declaration of sys_errlist... " >&6; }
14359if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14360  $as_echo_n "(cached) " >&6
14361else
14362
14363	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364/* end confdefs.h.  */
14365
14366#include <stdio.h>
14367#include <sys/types.h>
14368#include <errno.h>
14369#ifdef _WIN32
14370#include <stdlib.h>
14371#endif
14372int
14373main ()
14374{
14375char *c = (char *) *sys_errlist
14376  ;
14377  return 0;
14378}
14379_ACEOF
14380if ac_fn_c_try_compile "$LINENO"; then :
14381  ol_cv_dcl_sys_errlist=yes
14382	ol_cv_have_sys_errlist=yes
14383else
14384  ol_cv_dcl_sys_errlist=no
14385fi
14386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14387fi
14388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14389$as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14390#
14391# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14392if test $ol_cv_dcl_sys_errlist = no ; then
14393
14394$as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14395
14396
14397	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14398$as_echo_n "checking existence of sys_errlist... " >&6; }
14399if test "${ol_cv_have_sys_errlist+set}" = set; then :
14400  $as_echo_n "(cached) " >&6
14401else
14402
14403		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14404/* end confdefs.h.  */
14405#include <errno.h>
14406int
14407main ()
14408{
14409char *c = (char *) *sys_errlist
14410  ;
14411  return 0;
14412}
14413_ACEOF
14414if ac_fn_c_try_link "$LINENO"; then :
14415  ol_cv_have_sys_errlist=yes
14416else
14417  ol_cv_have_sys_errlist=no
14418fi
14419rm -f core conftest.err conftest.$ac_objext \
14420    conftest$ac_exeext conftest.$ac_ext
14421fi
14422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14423$as_echo "$ol_cv_have_sys_errlist" >&6; }
14424fi
14425if test $ol_cv_have_sys_errlist = yes ; then
14426
14427$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14428
14429fi
14430 for ac_func in strerror strerror_r
14431do :
14432  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14433ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14434eval as_val=\$$as_ac_var
14435   if test "x$as_val" = x""yes; then :
14436  cat >>confdefs.h <<_ACEOF
14437#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14438_ACEOF
14439
14440fi
14441done
14442
14443ol_cv_func_strerror_r=no
14444if test "${ac_cv_func_strerror_r}" = yes ; then
14445	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking non-posix strerror_r" >&5
14446$as_echo_n "checking non-posix strerror_r... " >&6; }
14447if test "${ol_cv_nonposix_strerror_r+set}" = set; then :
14448  $as_echo_n "(cached) " >&6
14449else
14450
14451	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14452/* end confdefs.h.  */
14453#include <string.h>
14454_ACEOF
14455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14456  $EGREP "strerror_r" >/dev/null 2>&1; then :
14457  ol_decl_strerror_r=yes
14458else
14459  ol_decl_strerror_r=no
14460fi
14461rm -f conftest*
14462
14463	if test $ol_decl_strerror_r = yes ; then
14464		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14465/* end confdefs.h.  */
14466#include <string.h>
14467int
14468main ()
14469{
14470   /* from autoconf 2.59 */
14471				char buf[100];
14472				char x = *strerror_r (0, buf, sizeof buf);
14473				char *p = strerror_r (0, buf, sizeof buf);
14474
14475  ;
14476  return 0;
14477}
14478_ACEOF
14479if ac_fn_c_try_compile "$LINENO"; then :
14480  ol_cv_nonposix_strerror_r=yes
14481else
14482  ol_cv_nonposix_strerror_r=no
14483fi
14484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14485	else
14486		if test "$cross_compiling" = yes; then :
14487  ol_cv_nonposix_strerror=no
14488else
14489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14490/* end confdefs.h.  */
14491
14492			main() {
14493				char buf[100];
14494				buf[0] = 0;
14495				strerror_r( 1, buf, sizeof buf );
14496				exit( buf[0] == 0 );
14497			}
14498
14499_ACEOF
14500if ac_fn_c_try_run "$LINENO"; then :
14501  ol_cv_nonposix_strerror_r=yes
14502else
14503  ol_cv_nonposix_strerror=no
14504fi
14505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14506  conftest.$ac_objext conftest.beam conftest.$ac_ext
14507fi
14508
14509	fi
14510
14511fi
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_nonposix_strerror_r" >&5
14513$as_echo "$ol_cv_nonposix_strerror_r" >&6; }
14514if test $ol_cv_nonposix_strerror_r = yes ; then
14515
14516$as_echo "#define HAVE_NONPOSIX_STRERROR_R 1" >>confdefs.h
14517
14518fi
14519
14520elif test "${ac_cv_func_strerror}" = no ; then
14521	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of sys_errlist" >&5
14522$as_echo_n "checking declaration of sys_errlist... " >&6; }
14523if test "${ol_cv_dcl_sys_errlist+set}" = set; then :
14524  $as_echo_n "(cached) " >&6
14525else
14526
14527	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14528/* end confdefs.h.  */
14529
14530#include <stdio.h>
14531#include <sys/types.h>
14532#include <errno.h>
14533#ifdef _WIN32
14534#include <stdlib.h>
14535#endif
14536int
14537main ()
14538{
14539char *c = (char *) *sys_errlist
14540  ;
14541  return 0;
14542}
14543_ACEOF
14544if ac_fn_c_try_compile "$LINENO"; then :
14545  ol_cv_dcl_sys_errlist=yes
14546	ol_cv_have_sys_errlist=yes
14547else
14548  ol_cv_dcl_sys_errlist=no
14549fi
14550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551fi
14552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_dcl_sys_errlist" >&5
14553$as_echo "$ol_cv_dcl_sys_errlist" >&6; }
14554#
14555# It's possible (for near-UNIX clones) that sys_errlist doesn't exist
14556if test $ol_cv_dcl_sys_errlist = no ; then
14557
14558$as_echo "#define DECL_SYS_ERRLIST 1" >>confdefs.h
14559
14560
14561	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking existence of sys_errlist" >&5
14562$as_echo_n "checking existence of sys_errlist... " >&6; }
14563if test "${ol_cv_have_sys_errlist+set}" = set; then :
14564  $as_echo_n "(cached) " >&6
14565else
14566
14567		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14568/* end confdefs.h.  */
14569#include <errno.h>
14570int
14571main ()
14572{
14573char *c = (char *) *sys_errlist
14574  ;
14575  return 0;
14576}
14577_ACEOF
14578if ac_fn_c_try_link "$LINENO"; then :
14579  ol_cv_have_sys_errlist=yes
14580else
14581  ol_cv_have_sys_errlist=no
14582fi
14583rm -f core conftest.err conftest.$ac_objext \
14584    conftest$ac_exeext conftest.$ac_ext
14585fi
14586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_have_sys_errlist" >&5
14587$as_echo "$ol_cv_have_sys_errlist" >&6; }
14588fi
14589if test $ol_cv_have_sys_errlist = yes ; then
14590
14591$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
14592
14593fi
14594
14595fi
14596
14597
14598for ac_header in regex.h
14599do :
14600  ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default
14601#ifdef HAVE_SYS_TYPES_H
14602#include <sys/types.h>
14603#endif
14604
14605"
14606if test "x$ac_cv_header_regex_h" = x""yes; then :
14607  cat >>confdefs.h <<_ACEOF
14608#define HAVE_REGEX_H 1
14609_ACEOF
14610
14611fi
14612
14613done
14614
14615
14616if test "$ac_cv_header_regex_h" != yes ; then
14617	as_fn_error "POSIX regex.h required." "$LINENO" 5
14618fi
14619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regfree" >&5
14620$as_echo_n "checking for library containing regfree... " >&6; }
14621if test "${ac_cv_search_regfree+set}" = set; then :
14622  $as_echo_n "(cached) " >&6
14623else
14624  ac_func_search_save_LIBS=$LIBS
14625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14626/* end confdefs.h.  */
14627
14628/* Override any GCC internal prototype to avoid an error.
14629   Use char because int might match the return type of a GCC
14630   builtin and then its argument prototype would still apply.  */
14631#ifdef __cplusplus
14632extern "C"
14633#endif
14634char regfree ();
14635int
14636main ()
14637{
14638return regfree ();
14639  ;
14640  return 0;
14641}
14642_ACEOF
14643for ac_lib in '' regex gnuregex; do
14644  if test -z "$ac_lib"; then
14645    ac_res="none required"
14646  else
14647    ac_res=-l$ac_lib
14648    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14649  fi
14650  if ac_fn_c_try_link "$LINENO"; then :
14651  ac_cv_search_regfree=$ac_res
14652fi
14653rm -f core conftest.err conftest.$ac_objext \
14654    conftest$ac_exeext
14655  if test "${ac_cv_search_regfree+set}" = set; then :
14656  break
14657fi
14658done
14659if test "${ac_cv_search_regfree+set}" = set; then :
14660
14661else
14662  ac_cv_search_regfree=no
14663fi
14664rm conftest.$ac_ext
14665LIBS=$ac_func_search_save_LIBS
14666fi
14667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regfree" >&5
14668$as_echo "$ac_cv_search_regfree" >&6; }
14669ac_res=$ac_cv_search_regfree
14670if test "$ac_res" != no; then :
14671  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14672  :
14673else
14674  as_fn_error "POSIX regex required." "$LINENO" 5
14675fi
14676
14677
14678
14679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible POSIX regex" >&5
14680$as_echo_n "checking for compatible POSIX regex... " >&6; }
14681if test "${ol_cv_c_posix_regex+set}" = set; then :
14682  $as_echo_n "(cached) " >&6
14683else
14684
14685	if test "$cross_compiling" = yes; then :
14686  ol_cv_c_posix_regex=cross
14687else
14688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689/* end confdefs.h.  */
14690
14691#include <sys/types.h>
14692#include <regex.h>
14693static char *pattern, *string;
14694main()
14695{
14696	int rc;
14697	regex_t re;
14698
14699	pattern = "^A";
14700
14701	if(regcomp(&re, pattern, 0)) {
14702		return -1;
14703	}
14704
14705	string = "ALL MATCH";
14706
14707	rc = regexec(&re, string, 0, (void*)0, 0);
14708
14709	regfree(&re);
14710
14711	return rc;
14712}
14713_ACEOF
14714if ac_fn_c_try_run "$LINENO"; then :
14715  ol_cv_c_posix_regex=yes
14716else
14717  ol_cv_c_posix_regex=no
14718fi
14719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14720  conftest.$ac_objext conftest.beam conftest.$ac_ext
14721fi
14722
14723fi
14724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_posix_regex" >&5
14725$as_echo "$ol_cv_c_posix_regex" >&6; }
14726
14727if test "$ol_cv_c_posix_regex" = no ; then
14728	as_fn_error "broken POSIX regex!" "$LINENO" 5
14729fi
14730
14731
14732have_uuid=no
14733for ac_header in sys/uuid.h
14734do :
14735  ac_fn_c_check_header_mongrel "$LINENO" "sys/uuid.h" "ac_cv_header_sys_uuid_h" "$ac_includes_default"
14736if test "x$ac_cv_header_sys_uuid_h" = x""yes; then :
14737  cat >>confdefs.h <<_ACEOF
14738#define HAVE_SYS_UUID_H 1
14739_ACEOF
14740
14741fi
14742
14743done
14744
14745if test $ac_cv_header_sys_uuid_h = yes ; then
14746	save_LIBS="$LIBS"
14747	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_to_str" >&5
14748$as_echo_n "checking for library containing uuid_to_str... " >&6; }
14749if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14750  $as_echo_n "(cached) " >&6
14751else
14752  ac_func_search_save_LIBS=$LIBS
14753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14754/* end confdefs.h.  */
14755
14756/* Override any GCC internal prototype to avoid an error.
14757   Use char because int might match the return type of a GCC
14758   builtin and then its argument prototype would still apply.  */
14759#ifdef __cplusplus
14760extern "C"
14761#endif
14762char uuid_to_str ();
14763int
14764main ()
14765{
14766return uuid_to_str ();
14767  ;
14768  return 0;
14769}
14770_ACEOF
14771for ac_lib in '' uuid; do
14772  if test -z "$ac_lib"; then
14773    ac_res="none required"
14774  else
14775    ac_res=-l$ac_lib
14776    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14777  fi
14778  if ac_fn_c_try_link "$LINENO"; then :
14779  ac_cv_search_uuid_to_str=$ac_res
14780fi
14781rm -f core conftest.err conftest.$ac_objext \
14782    conftest$ac_exeext
14783  if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14784  break
14785fi
14786done
14787if test "${ac_cv_search_uuid_to_str+set}" = set; then :
14788
14789else
14790  ac_cv_search_uuid_to_str=no
14791fi
14792rm conftest.$ac_ext
14793LIBS=$ac_func_search_save_LIBS
14794fi
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_to_str" >&5
14796$as_echo "$ac_cv_search_uuid_to_str" >&6; }
14797ac_res=$ac_cv_search_uuid_to_str
14798if test "$ac_res" != no; then :
14799  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14800  have_uuid=yes
14801else
14802  :
14803fi
14804
14805	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_create" >&5
14806$as_echo_n "checking for library containing uuid_create... " >&6; }
14807if test "${ac_cv_search_uuid_create+set}" = set; then :
14808  $as_echo_n "(cached) " >&6
14809else
14810  ac_func_search_save_LIBS=$LIBS
14811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14812/* end confdefs.h.  */
14813
14814/* Override any GCC internal prototype to avoid an error.
14815   Use char because int might match the return type of a GCC
14816   builtin and then its argument prototype would still apply.  */
14817#ifdef __cplusplus
14818extern "C"
14819#endif
14820char uuid_create ();
14821int
14822main ()
14823{
14824return uuid_create ();
14825  ;
14826  return 0;
14827}
14828_ACEOF
14829for ac_lib in '' uuid; do
14830  if test -z "$ac_lib"; then
14831    ac_res="none required"
14832  else
14833    ac_res=-l$ac_lib
14834    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14835  fi
14836  if ac_fn_c_try_link "$LINENO"; then :
14837  ac_cv_search_uuid_create=$ac_res
14838fi
14839rm -f core conftest.err conftest.$ac_objext \
14840    conftest$ac_exeext
14841  if test "${ac_cv_search_uuid_create+set}" = set; then :
14842  break
14843fi
14844done
14845if test "${ac_cv_search_uuid_create+set}" = set; then :
14846
14847else
14848  ac_cv_search_uuid_create=no
14849fi
14850rm conftest.$ac_ext
14851LIBS=$ac_func_search_save_LIBS
14852fi
14853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_create" >&5
14854$as_echo "$ac_cv_search_uuid_create" >&6; }
14855ac_res=$ac_cv_search_uuid_create
14856if test "$ac_res" != no; then :
14857  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14858  :
14859else
14860  have_uuid=no
14861fi
14862
14863	LIBS="$save_LIBS"
14864
14865	if test $have_uuid = yes ; then
14866
14867$as_echo "#define HAVE_UUID_TO_STR 1" >>confdefs.h
14868
14869
14870		test "$ac_cv_search_uuid_to_str" = "none required" || \
14871			SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
14872	fi
14873fi
14874
14875if test $have_uuid = no ; then
14876	for ac_header in xxuuid/uuid.h
14877do :
14878  ac_fn_c_check_header_mongrel "$LINENO" "xxuuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14879if test "x$ac_cv_header_uuid_uuid_h" = x""yes; then :
14880  cat >>confdefs.h <<_ACEOF
14881#define HAVE_UUID_UUID_H 1
14882_ACEOF
14883
14884fi
14885
14886done
14887
14888	if test $ac_cv_header_uuid_uuid_h = yes ; then
14889		save_LIBS="$LIBS"
14890		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_generate" >&5
14891$as_echo_n "checking for library containing uuid_generate... " >&6; }
14892if test "${ac_cv_search_uuid_generate+set}" = set; then :
14893  $as_echo_n "(cached) " >&6
14894else
14895  ac_func_search_save_LIBS=$LIBS
14896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14897/* end confdefs.h.  */
14898
14899/* Override any GCC internal prototype to avoid an error.
14900   Use char because int might match the return type of a GCC
14901   builtin and then its argument prototype would still apply.  */
14902#ifdef __cplusplus
14903extern "C"
14904#endif
14905char uuid_generate ();
14906int
14907main ()
14908{
14909return uuid_generate ();
14910  ;
14911  return 0;
14912}
14913_ACEOF
14914for ac_lib in '' uuid; do
14915  if test -z "$ac_lib"; then
14916    ac_res="none required"
14917  else
14918    ac_res=-l$ac_lib
14919    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14920  fi
14921  if ac_fn_c_try_link "$LINENO"; then :
14922  ac_cv_search_uuid_generate=$ac_res
14923fi
14924rm -f core conftest.err conftest.$ac_objext \
14925    conftest$ac_exeext
14926  if test "${ac_cv_search_uuid_generate+set}" = set; then :
14927  break
14928fi
14929done
14930if test "${ac_cv_search_uuid_generate+set}" = set; then :
14931
14932else
14933  ac_cv_search_uuid_generate=no
14934fi
14935rm conftest.$ac_ext
14936LIBS=$ac_func_search_save_LIBS
14937fi
14938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_generate" >&5
14939$as_echo "$ac_cv_search_uuid_generate" >&6; }
14940ac_res=$ac_cv_search_uuid_generate
14941if test "$ac_res" != no; then :
14942  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14943  have_uuid=yes
14944else
14945  :
14946fi
14947
14948		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing uuid_unparse_lower" >&5
14949$as_echo_n "checking for library containing uuid_unparse_lower... " >&6; }
14950if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14951  $as_echo_n "(cached) " >&6
14952else
14953  ac_func_search_save_LIBS=$LIBS
14954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955/* end confdefs.h.  */
14956
14957/* Override any GCC internal prototype to avoid an error.
14958   Use char because int might match the return type of a GCC
14959   builtin and then its argument prototype would still apply.  */
14960#ifdef __cplusplus
14961extern "C"
14962#endif
14963char uuid_unparse_lower ();
14964int
14965main ()
14966{
14967return uuid_unparse_lower ();
14968  ;
14969  return 0;
14970}
14971_ACEOF
14972for ac_lib in '' uuid; do
14973  if test -z "$ac_lib"; then
14974    ac_res="none required"
14975  else
14976    ac_res=-l$ac_lib
14977    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14978  fi
14979  if ac_fn_c_try_link "$LINENO"; then :
14980  ac_cv_search_uuid_unparse_lower=$ac_res
14981fi
14982rm -f core conftest.err conftest.$ac_objext \
14983    conftest$ac_exeext
14984  if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14985  break
14986fi
14987done
14988if test "${ac_cv_search_uuid_unparse_lower+set}" = set; then :
14989
14990else
14991  ac_cv_search_uuid_unparse_lower=no
14992fi
14993rm conftest.$ac_ext
14994LIBS=$ac_func_search_save_LIBS
14995fi
14996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_uuid_unparse_lower" >&5
14997$as_echo "$ac_cv_search_uuid_unparse_lower" >&6; }
14998ac_res=$ac_cv_search_uuid_unparse_lower
14999if test "$ac_res" != no; then :
15000  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15001  :
15002else
15003  have_uuid=no
15004fi
15005
15006		LIBS="$save_LIBS"
15007
15008		if test $have_uuid = yes ; then
15009
15010$as_echo "#define HAVE_UUID_GENERATE 1" >>confdefs.h
15011
15012
15013			test "$ac_cv_search_uuid_generate" = "none required" || \
15014				SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_generate"
15015		fi
15016	fi
15017fi
15018
15019if test $have_uuid = no ; then
15020	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
15021$as_echo_n "checking to see if -lrpcrt4 is needed for win32 UUID support... " >&6; }
15022	save_LIBS="$LIBS"
15023	LIBS="$LIBS -lrpcrt4"
15024	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15025/* end confdefs.h.  */
15026
15027		int __stdcall UuidCreate(void *);
15028		int __stdcall UuidToStringA(void *,void **);
15029
15030int
15031main ()
15032{
15033
15034		UuidCreate(0);
15035		UuidToStringA(0,0);
15036
15037  ;
15038  return 0;
15039}
15040_ACEOF
15041if ac_fn_c_try_link "$LINENO"; then :
15042  need_rpcrt=yes
15043else
15044  need_rpcrt=no
15045fi
15046rm -f core conftest.err conftest.$ac_objext \
15047    conftest$ac_exeext conftest.$ac_ext
15048	if test $need_rpcrt = yes; then
15049		SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
15050	fi
15051	LIBS="$save_LIBS"
15052	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $need_rpcrt" >&5
15053$as_echo "$need_rpcrt" >&6; }
15054fi
15055
15056ol_cv_lib_resolver=no
15057if test $ol_cv_lib_resolver = no ; then
15058	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (default)" >&5
15059$as_echo_n "checking for resolver link (default)... " >&6; }
15060if test "${ol_cv_resolver_none+set}" = set; then :
15061  $as_echo_n "(cached) " >&6
15062else
15063
15064	ol_RESOLVER_LIB=
15065	ol_LIBS=$LIBS
15066	LIBS="$ol_RESOLVER_LIB $LIBS"
15067
15068	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15069/* end confdefs.h.  */
15070
15071#ifdef HAVE_SYS_TYPES_H
15072#	include <sys/types.h>
15073#endif
15074#include <netinet/in.h>
15075#ifdef HAVE_ARPA_NAMESER_H
15076#	include <arpa/nameser.h>
15077#endif
15078#ifdef HAVE_RESOLV_H
15079#	include <resolv.h>
15080#endif
15081
15082int
15083main ()
15084{
15085{
15086	int len, status;
15087	char *request = NULL;
15088	unsigned char reply[64*1024];
15089	unsigned char host[64*1024];
15090	unsigned char *p;
15091
15092#ifdef NS_HFIXEDSZ
15093	/* Bind 8/9 interface */
15094	len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15095#else
15096	/* Bind 4 interface */
15097# ifndef T_SRV
15098#  define T_SRV 33
15099# endif
15100	len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15101#endif
15102	p = reply;
15103#ifdef NS_HFIXEDSZ
15104	/* Bind 8/9 interface */
15105	p += NS_HFIXEDSZ;
15106#elif defined(HFIXEDSZ)
15107	/* Bind 4 interface w/ HFIXEDSZ */
15108	p += HFIXEDSZ;
15109#else
15110	/* Bind 4 interface w/o HFIXEDSZ */
15111	p += sizeof(HEADER);
15112#endif
15113	status = dn_expand( reply, reply+len, p, host, sizeof(host));
15114}
15115  ;
15116  return 0;
15117}
15118_ACEOF
15119if ac_fn_c_try_link "$LINENO"; then :
15120  ol_cv_resolver_none=yes
15121else
15122  ol_cv_resolver_none=no
15123fi
15124rm -f core conftest.err conftest.$ac_objext \
15125    conftest$ac_exeext conftest.$ac_ext
15126
15127	LIBS="$ol_LIBS"
15128
15129fi
15130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_none" >&5
15131$as_echo "$ol_cv_resolver_none" >&6; }
15132
15133	if test $ol_cv_resolver_none = yes ; then
15134		ol_cv_lib_resolver=yes
15135	fi
15136fi
15137
15138if test $ol_cv_lib_resolver = no ; then
15139	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lresolv)" >&5
15140$as_echo_n "checking for resolver link (-lresolv)... " >&6; }
15141if test "${ol_cv_resolver_resolv+set}" = set; then :
15142  $as_echo_n "(cached) " >&6
15143else
15144
15145	ol_RESOLVER_LIB=-lresolv
15146	ol_LIBS=$LIBS
15147	LIBS="$ol_RESOLVER_LIB $LIBS"
15148
15149	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15150/* end confdefs.h.  */
15151
15152#ifdef HAVE_SYS_TYPES_H
15153#	include <sys/types.h>
15154#endif
15155#include <netinet/in.h>
15156#ifdef HAVE_ARPA_NAMESER_H
15157#	include <arpa/nameser.h>
15158#endif
15159#ifdef HAVE_RESOLV_H
15160#	include <resolv.h>
15161#endif
15162
15163int
15164main ()
15165{
15166{
15167	int len, status;
15168	char *request = NULL;
15169	unsigned char reply[64*1024];
15170	unsigned char host[64*1024];
15171	unsigned char *p;
15172
15173#ifdef NS_HFIXEDSZ
15174	/* Bind 8/9 interface */
15175	len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15176#else
15177	/* Bind 4 interface */
15178# ifndef T_SRV
15179#  define T_SRV 33
15180# endif
15181	len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15182#endif
15183	p = reply;
15184#ifdef NS_HFIXEDSZ
15185	/* Bind 8/9 interface */
15186	p += NS_HFIXEDSZ;
15187#elif defined(HFIXEDSZ)
15188	/* Bind 4 interface w/ HFIXEDSZ */
15189	p += HFIXEDSZ;
15190#else
15191	/* Bind 4 interface w/o HFIXEDSZ */
15192	p += sizeof(HEADER);
15193#endif
15194	status = dn_expand( reply, reply+len, p, host, sizeof(host));
15195}
15196  ;
15197  return 0;
15198}
15199_ACEOF
15200if ac_fn_c_try_link "$LINENO"; then :
15201  ol_cv_resolver_resolv=yes
15202else
15203  ol_cv_resolver_resolv=no
15204fi
15205rm -f core conftest.err conftest.$ac_objext \
15206    conftest$ac_exeext conftest.$ac_ext
15207
15208	LIBS="$ol_LIBS"
15209
15210fi
15211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_resolv" >&5
15212$as_echo "$ol_cv_resolver_resolv" >&6; }
15213
15214	if test $ol_cv_resolver_resolv = yes ; then
15215		ol_cv_lib_resolver=-lresolv
15216	fi
15217fi
15218
15219if test $ol_cv_lib_resolver = no ; then
15220	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver link (-lbind)" >&5
15221$as_echo_n "checking for resolver link (-lbind)... " >&6; }
15222if test "${ol_cv_resolver_bind+set}" = set; then :
15223  $as_echo_n "(cached) " >&6
15224else
15225
15226	ol_RESOLVER_LIB=-lbind
15227	ol_LIBS=$LIBS
15228	LIBS="$ol_RESOLVER_LIB $LIBS"
15229
15230	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15231/* end confdefs.h.  */
15232
15233#ifdef HAVE_SYS_TYPES_H
15234#	include <sys/types.h>
15235#endif
15236#include <netinet/in.h>
15237#ifdef HAVE_ARPA_NAMESER_H
15238#	include <arpa/nameser.h>
15239#endif
15240#ifdef HAVE_RESOLV_H
15241#	include <resolv.h>
15242#endif
15243
15244int
15245main ()
15246{
15247{
15248	int len, status;
15249	char *request = NULL;
15250	unsigned char reply[64*1024];
15251	unsigned char host[64*1024];
15252	unsigned char *p;
15253
15254#ifdef NS_HFIXEDSZ
15255	/* Bind 8/9 interface */
15256	len = res_query(request, ns_c_in, ns_t_srv, reply, sizeof(reply));
15257#else
15258	/* Bind 4 interface */
15259# ifndef T_SRV
15260#  define T_SRV 33
15261# endif
15262	len = res_query(request, C_IN, T_SRV, reply, sizeof(reply));
15263#endif
15264	p = reply;
15265#ifdef NS_HFIXEDSZ
15266	/* Bind 8/9 interface */
15267	p += NS_HFIXEDSZ;
15268#elif defined(HFIXEDSZ)
15269	/* Bind 4 interface w/ HFIXEDSZ */
15270	p += HFIXEDSZ;
15271#else
15272	/* Bind 4 interface w/o HFIXEDSZ */
15273	p += sizeof(HEADER);
15274#endif
15275	status = dn_expand( reply, reply+len, p, host, sizeof(host));
15276}
15277  ;
15278  return 0;
15279}
15280_ACEOF
15281if ac_fn_c_try_link "$LINENO"; then :
15282  ol_cv_resolver_bind=yes
15283else
15284  ol_cv_resolver_bind=no
15285fi
15286rm -f core conftest.err conftest.$ac_objext \
15287    conftest$ac_exeext conftest.$ac_ext
15288
15289	LIBS="$ol_LIBS"
15290
15291fi
15292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_resolver_bind" >&5
15293$as_echo "$ol_cv_resolver_bind" >&6; }
15294
15295	if test $ol_cv_resolver_bind = yes ; then
15296		ol_cv_lib_resolver=-lbind
15297	fi
15298fi
15299
15300
15301
15302ol_link_dnssrv=no
15303if test "$ol_cv_lib_resolver" != no ; then
15304
15305$as_echo "#define HAVE_RES_QUERY 1" >>confdefs.h
15306
15307
15308	if test "$ol_enable_dnssrv" != no ; then
15309		ol_link_dnssrv=yes
15310	fi
15311
15312	if test "$ol_cv_lib_resolver" != yes ; then
15313		LIBS="$ol_cv_lib_resolver $LIBS"
15314	fi
15315fi
15316
15317if test "$ol_enable_dnssrv" = yes || test "$ol_enable_dnssrv" = mod ; then
15318	if test "$ol_link_dnssrv" = no ; then
15319		as_fn_error "DNSSRV requires res_query()" "$LINENO" 5
15320	fi
15321else
15322	ol_enable_dnssrv=no
15323fi
15324
15325for ac_func in hstrerror
15326do :
15327  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15328ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15329eval as_val=\$$as_ac_var
15330   if test "x$as_val" = x""yes; then :
15331  cat >>confdefs.h <<_ACEOF
15332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15333_ACEOF
15334
15335fi
15336done
15337
15338
15339for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop
15340do :
15341  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15342ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15343eval as_val=\$$as_ac_var
15344   if test "x$as_val" = x""yes; then :
15345  cat >>confdefs.h <<_ACEOF
15346#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15347_ACEOF
15348
15349fi
15350done
15351
15352
15353ol_link_ipv6=no
15354if test $ac_cv_func_getaddrinfo = no || test $ac_cv_func_inet_ntop = no ; then
15355	if test $ol_enable_ipv6 = yes ; then
15356		as_fn_error "IPv6 support requires getaddrinfo() and inet_ntop()" "$LINENO" 5
15357	fi
15358elif test $ol_enable_ipv6 != no ; then
15359	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking INET6_ADDRSTRLEN" >&5
15360$as_echo_n "checking INET6_ADDRSTRLEN... " >&6; }
15361if test "${ol_cv_inet6_addrstrlen+set}" = set; then :
15362  $as_echo_n "(cached) " >&6
15363else
15364
15365		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15366/* end confdefs.h.  */
15367
15368#			include <netinet/in.h>
15369#			ifdef INET6_ADDRSTRLEN
15370				__has_inet6_addrstrlen__;
15371#			endif
15372
15373_ACEOF
15374if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15375  $EGREP "__has_inet6_addrstrlen__" >/dev/null 2>&1; then :
15376  ol_cv_inet6_addrstrlen=yes
15377else
15378  ol_cv_inet6_addrstrlen=no
15379fi
15380rm -f conftest*
15381
15382fi
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_inet6_addrstrlen" >&5
15384$as_echo "$ol_cv_inet6_addrstrlen" >&6; }
15385
15386
15387	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr_storage" >&5
15388$as_echo_n "checking struct sockaddr_storage... " >&6; }
15389if test "${ol_cv_struct_sockaddr_storage+set}" = set; then :
15390  $as_echo_n "(cached) " >&6
15391else
15392
15393		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15394/* end confdefs.h.  */
15395
15396#include <sys/types.h>
15397#include <sys/socket.h>
15398
15399int
15400main ()
15401{
15402
15403			struct sockaddr_storage ss;
15404
15405  ;
15406  return 0;
15407}
15408_ACEOF
15409if ac_fn_c_try_compile "$LINENO"; then :
15410  ol_cv_struct_sockaddr_storage=yes
15411else
15412  ol_cv_struct_sockaddr_storage=no
15413fi
15414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15415fi
15416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_struct_sockaddr_storage" >&5
15417$as_echo "$ol_cv_struct_sockaddr_storage" >&6; }
15418
15419	if test $ol_cv_inet6_addrstrlen = yes &&
15420	   test $ol_cv_struct_sockaddr_storage = yes ; then
15421		ol_link_ipv6=yes
15422	elif test $ol_enable_ipv6 = yes &&
15423	     test $ol_cv_inet6_addrstrlen = no ; then
15424		as_fn_error "IPv6 support requires INET6_ADDRSTRLEN" "$LINENO" 5
15425	elif test $ol_enable_ipv6 = yes &&
15426	     test $ol_cv_struct_sockaddr_storage = no ; then
15427		as_fn_error "IPv6 support requires struct sockaddr_storage" "$LINENO" 5
15428	fi
15429fi
15430
15431if test $ol_enable_local != no ; then
15432	for ac_header in sys/un.h
15433do :
15434  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15435ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15436eval as_val=\$$as_ac_Header
15437   if test "x$as_val" = x""yes; then :
15438  cat >>confdefs.h <<_ACEOF
15439#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15440_ACEOF
15441
15442fi
15443
15444done
15445
15446
15447	if test $ol_enable_local = auto ; then
15448		ol_enable_local=$ac_cv_header_sys_un_h
15449	elif test $ac_cv_header_sys_un_h = no ; then
15450		as_fn_error "AF_LOCAL domain support requires sys/un.h" "$LINENO" 5
15451	fi
15452fi
15453
15454
15455if test $ol_with_tls = yes ; then
15456	ol_with_tls=auto
15457fi
15458
15459ol_link_tls=no
15460if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then
15461	for ac_header in openssl/ssl.h
15462do :
15463  ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
15464if test "x$ac_cv_header_openssl_ssl_h" = x""yes; then :
15465  cat >>confdefs.h <<_ACEOF
15466#define HAVE_OPENSSL_SSL_H 1
15467_ACEOF
15468
15469fi
15470
15471done
15472
15473
15474	if test $ac_cv_header_openssl_ssl_h = yes ; then
15475		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476/* end confdefs.h.  */
15477#include <openssl/opensslv.h>
15478			#if OPENSSL_VERSION_NUMBER < 0x1000200fL
15479			#error "OpenSSL is too old"
15480			#endif
15481_ACEOF
15482if ac_fn_c_try_cpp "$LINENO"; then :
15483
15484else
15485  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15487as_fn_error "OpenSSL 1.0.2a or newer required
15488See \`config.log' for more details." "$LINENO" 5; }
15489fi
15490rm -f conftest.err conftest.$ac_ext
15491
15492		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_msg_callback in -lssl" >&5
15493$as_echo_n "checking for SSL_CTX_set_msg_callback in -lssl... " >&6; }
15494if test "${ac_cv_lib_ssl_SSL_CTX_set_msg_callback+set}" = set; then :
15495  $as_echo_n "(cached) " >&6
15496else
15497  ac_check_lib_save_LIBS=$LIBS
15498LIBS="-lssl -lcrypto $LIBS"
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h.  */
15501
15502/* Override any GCC internal prototype to avoid an error.
15503   Use char because int might match the return type of a GCC
15504   builtin and then its argument prototype would still apply.  */
15505#ifdef __cplusplus
15506extern "C"
15507#endif
15508char SSL_CTX_set_msg_callback ();
15509int
15510main ()
15511{
15512return SSL_CTX_set_msg_callback ();
15513  ;
15514  return 0;
15515}
15516_ACEOF
15517if ac_fn_c_try_link "$LINENO"; then :
15518  ac_cv_lib_ssl_SSL_CTX_set_msg_callback=yes
15519else
15520  ac_cv_lib_ssl_SSL_CTX_set_msg_callback=no
15521fi
15522rm -f core conftest.err conftest.$ac_objext \
15523    conftest$ac_exeext conftest.$ac_ext
15524LIBS=$ac_check_lib_save_LIBS
15525fi
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&5
15527$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&6; }
15528if test "x$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" = x""yes; then :
15529  have_openssl=yes
15530			need_rsaref=no
15531else
15532  have_openssl=no
15533fi
15534
15535
15536		if test $have_openssl = no ; then
15537			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15538$as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15539if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15540  $as_echo_n "(cached) " >&6
15541else
15542  ac_check_lib_save_LIBS=$LIBS
15543LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15545/* end confdefs.h.  */
15546
15547/* Override any GCC internal prototype to avoid an error.
15548   Use char because int might match the return type of a GCC
15549   builtin and then its argument prototype would still apply.  */
15550#ifdef __cplusplus
15551extern "C"
15552#endif
15553char ssl3_accept ();
15554int
15555main ()
15556{
15557return ssl3_accept ();
15558  ;
15559  return 0;
15560}
15561_ACEOF
15562if ac_fn_c_try_link "$LINENO"; then :
15563  ac_cv_lib_ssl_ssl3_accept=yes
15564else
15565  ac_cv_lib_ssl_ssl3_accept=no
15566fi
15567rm -f core conftest.err conftest.$ac_objext \
15568    conftest$ac_exeext conftest.$ac_ext
15569LIBS=$ac_check_lib_save_LIBS
15570fi
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15572$as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15573if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15574  have_openssl=yes
15575				need_rsaref=yes
15576else
15577  have_openssl=no
15578fi
15579
15580		fi
15581
15582		if test $have_openssl = yes ; then
15583			ol_with_tls=openssl
15584			ol_link_tls=yes
15585
15586
15587$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15588
15589
15590			if test $need_rsaref = yes; then
15591
15592$as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15593
15594
15595				TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15596			else
15597				TLS_LIBS="-lssl -lcrypto"
15598			fi
15599
15600			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15601$as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15602if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15603  $as_echo_n "(cached) " >&6
15604else
15605
15606		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607/* end confdefs.h.  */
15608
15609#ifdef HAVE_OPENSSL_SSL_H
15610#include <openssl/ssl.h>
15611#endif
15612
15613/* Require 0.9.7d+ */
15614#if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15615	char *__ssl_compat = "0.9.7d";
15616#endif
15617
15618_ACEOF
15619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15620  $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15621  ol_cv_ssl_crl_compat=yes
15622else
15623  ol_cv_ssl_crl_compat=no
15624fi
15625rm -f conftest*
15626
15627fi
15628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15629$as_echo "$ol_cv_ssl_crl_compat" >&6; }
15630
15631			if test $ol_cv_ssl_crl_compat = yes ; then
15632
15633$as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15634
15635			fi
15636		fi
15637	fi
15638fi
15639
15640if test $ol_link_tls = no ; then
15641	if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15642		for ac_header in gnutls/gnutls.h
15643do :
15644  ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15645if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15646  cat >>confdefs.h <<_ACEOF
15647#define HAVE_GNUTLS_GNUTLS_H 1
15648_ACEOF
15649
15650fi
15651
15652done
15653
15654
15655		if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15656			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15657/* end confdefs.h.  */
15658#include <gnutls/gnutls.h>
15659#if GNUTLS_VERSION_NUMBER < 0x020c00
15660#error "GnuTLS 2.12.0 or newer required"
15661#endif
15662_ACEOF
15663if ac_fn_c_try_cpp "$LINENO"; then :
15664
15665else
15666  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15668as_fn_error "GnuTLS is too old
15669See \`config.log' for more details." "$LINENO" 5; }
15670fi
15671rm -f conftest.err conftest.$ac_ext
15672
15673			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15674$as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15675if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15676  $as_echo_n "(cached) " >&6
15677else
15678  ac_check_lib_save_LIBS=$LIBS
15679LIBS="-lgnutls  $LIBS"
15680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15681/* end confdefs.h.  */
15682
15683/* Override any GCC internal prototype to avoid an error.
15684   Use char because int might match the return type of a GCC
15685   builtin and then its argument prototype would still apply.  */
15686#ifdef __cplusplus
15687extern "C"
15688#endif
15689char gnutls_init ();
15690int
15691main ()
15692{
15693return gnutls_init ();
15694  ;
15695  return 0;
15696}
15697_ACEOF
15698if ac_fn_c_try_link "$LINENO"; then :
15699  ac_cv_lib_gnutls_gnutls_init=yes
15700else
15701  ac_cv_lib_gnutls_gnutls_init=no
15702fi
15703rm -f core conftest.err conftest.$ac_objext \
15704    conftest$ac_exeext conftest.$ac_ext
15705LIBS=$ac_check_lib_save_LIBS
15706fi
15707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15708$as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15709if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15710  have_gnutls=yes
15711else
15712  have_gnutls=no
15713fi
15714
15715
15716			if test $have_gnutls = yes ; then
15717				ol_with_tls=gnutls
15718				ol_link_tls=yes
15719
15720				TLS_LIBS="-lgnutls"
15721
15722
15723$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15724
15725			fi
15726		fi
15727	fi
15728fi
15729
15730if test $ol_link_tls = no ; then
15731	if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15732		have_moznss=no
15733		for ac_header in nssutil.h
15734do :
15735  ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15736if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15737  cat >>confdefs.h <<_ACEOF
15738#define HAVE_NSSUTIL_H 1
15739_ACEOF
15740
15741fi
15742
15743done
15744
15745		if test "$ac_cv_header_nssutil_h" = yes ; then
15746			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15747$as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15748if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15749  $as_echo_n "(cached) " >&6
15750else
15751  ac_check_lib_save_LIBS=$LIBS
15752LIBS="-lnss3  $LIBS"
15753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15754/* end confdefs.h.  */
15755
15756/* Override any GCC internal prototype to avoid an error.
15757   Use char because int might match the return type of a GCC
15758   builtin and then its argument prototype would still apply.  */
15759#ifdef __cplusplus
15760extern "C"
15761#endif
15762char NSS_Initialize ();
15763int
15764main ()
15765{
15766return NSS_Initialize ();
15767  ;
15768  return 0;
15769}
15770_ACEOF
15771if ac_fn_c_try_link "$LINENO"; then :
15772  ac_cv_lib_nss3_NSS_Initialize=yes
15773else
15774  ac_cv_lib_nss3_NSS_Initialize=no
15775fi
15776rm -f core conftest.err conftest.$ac_objext \
15777    conftest$ac_exeext conftest.$ac_ext
15778LIBS=$ac_check_lib_save_LIBS
15779fi
15780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15781$as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15782if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15783   have_moznss=yes
15784else
15785   have_moznss=no
15786fi
15787
15788		fi
15789
15790		if test "$have_moznss" = yes ; then
15791			ol_with_tls=moznss
15792			ol_link_tls=yes
15793
15794$as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15795
15796			TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15797		else
15798			if test $ol_with_tls = moznss ; then
15799			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
15800			fi
15801		fi
15802	fi
15803fi
15804
15805WITH_TLS=no
15806if test $ol_link_tls = yes ; then
15807
15808$as_echo "#define HAVE_TLS 1" >>confdefs.h
15809
15810	WITH_TLS=yes
15811elif test $ol_with_tls = auto ; then
15812	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15813$as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15814	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15815$as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15816elif test $ol_with_tls != no ; then
15817	as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15818else
15819	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15820$as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15821fi
15822
15823if test $ol_enable_lmpasswd != no; then
15824	if test $ol_link_tls != yes ; then
15825		as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15826	fi
15827
15828
15829$as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15830
15831fi
15832
15833ol_link_threads=no
15834
15835case $ol_with_threads in auto | yes | nt)
15836
15837
15838	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15839if test "x$ac_cv_func__beginthread" = x""yes; then :
15840
15841fi
15842
15843
15844	if test $ac_cv_func__beginthread = yes ; then
15845
15846$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15847
15848		ol_cv_nt_threads=yes
15849	fi
15850
15851
15852	if test "$ol_cv_nt_threads" = yes ; then
15853		ol_link_threads=nt
15854		ol_with_threads=found
15855		ol_with_yielding_select=yes
15856
15857
15858$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15859
15860
15861$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15862
15863	fi
15864
15865	if test $ol_with_threads = nt ; then
15866		as_fn_error "could not locate NT Threads" "$LINENO" 5
15867	fi
15868	;;
15869esac
15870
15871case $ol_with_threads in auto | yes | posix)
15872
15873	for ac_header in pthread.h
15874do :
15875  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15876if test "x$ac_cv_header_pthread_h" = x""yes; then :
15877  cat >>confdefs.h <<_ACEOF
15878#define HAVE_PTHREAD_H 1
15879_ACEOF
15880
15881fi
15882
15883done
15884
15885
15886	if test $ac_cv_header_pthread_h = yes ; then
15887		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15888$as_echo_n "checking POSIX thread version... " >&6; }
15889if test "${ol_cv_pthread_version+set}" = set; then :
15890  $as_echo_n "(cached) " >&6
15891else
15892
15893	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15894/* end confdefs.h.  */
15895
15896#		include <pthread.h>
15897
15898int
15899main ()
15900{
15901
15902		int i = PTHREAD_CREATE_JOINABLE;
15903
15904  ;
15905  return 0;
15906}
15907_ACEOF
15908if ac_fn_c_try_compile "$LINENO"; then :
15909
15910	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15911/* end confdefs.h.  */
15912#include <pthread.h>
15913
15914_ACEOF
15915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15916  $EGREP "pthread_detach" >/dev/null 2>&1; then :
15917  ol_cv_pthread_version=10
15918else
15919  ol_cv_pthread_version=8
15920fi
15921rm -f conftest*
15922
15923else
15924
15925	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15926/* end confdefs.h.  */
15927
15928#		include <pthread.h>
15929#		ifdef PTHREAD_CREATE_UNDETACHED
15930		draft7
15931#		endif
15932
15933_ACEOF
15934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15935  $EGREP "draft7" >/dev/null 2>&1; then :
15936  ol_cv_pthread_version=7
15937else
15938
15939	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15940/* end confdefs.h.  */
15941#include <pthread.h>
15942
15943_ACEOF
15944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15945  $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15946  ol_cv_pthread_version=6
15947else
15948
15949	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950/* end confdefs.h.  */
15951
15952#		include <pthread.h>
15953#ifdef		PTHREAD_MUTEX_INITIALIZER
15954		draft5
15955#endif
15956
15957_ACEOF
15958if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15959  $EGREP "draft5" >/dev/null 2>&1; then :
15960  ol_cv_pthread_version=5
15961else
15962  ol_cv_pthread_version=4
15963fi
15964rm -f conftest*
15965
15966fi
15967rm -f conftest*
15968
15969fi
15970rm -f conftest*
15971
15972fi
15973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15974
15975fi
15976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15977$as_echo "$ol_cv_pthread_version" >&6; }
15978
15979
15980		if test $ol_cv_pthread_version != 0 ; then
15981
15982cat >>confdefs.h <<_ACEOF
15983#define HAVE_PTHREADS $ol_cv_pthread_version
15984_ACEOF
15985
15986		else
15987			as_fn_error "unknown pthread version" "$LINENO" 5
15988		fi
15989
15990		# consider threads found
15991		ol_with_threads=found
15992
15993
15994	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
15995$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
15996if test "${ol_cv_header_linux_threads+set}" = set; then :
15997  $as_echo_n "(cached) " >&6
15998else
15999  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000/* end confdefs.h.  */
16001#include <pthread.h>
16002_ACEOF
16003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16004  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
16005  ol_cv_header_linux_threads=yes
16006else
16007  ol_cv_header_linux_threads=no
16008fi
16009rm -f conftest*
16010
16011
16012fi
16013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
16014$as_echo "$ol_cv_header_linux_threads" >&6; }
16015	if test $ol_cv_header_linux_threads = yes; then
16016
16017$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16018
16019	fi
16020
16021
16022	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16023$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16024if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16025  $as_echo_n "(cached) " >&6
16026else
16027  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16028/* end confdefs.h.  */
16029#include <pthread.h>
16030#ifdef _POSIX_THREAD_IS_GNU_PTH
16031	__gnu_pth__;
16032#endif
16033
16034_ACEOF
16035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16036  $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16037  ol_cv_header_gnu_pth_pthread_h=yes
16038else
16039  ol_cv_header_gnu_pth_pthread_h=no
16040fi
16041rm -f conftest*
16042
16043
16044fi
16045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16046$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16047
16048
16049		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16050			for ac_header in sched.h
16051do :
16052  ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16053if test "x$ac_cv_header_sched_h" = x""yes; then :
16054  cat >>confdefs.h <<_ACEOF
16055#define HAVE_SCHED_H 1
16056_ACEOF
16057
16058fi
16059
16060done
16061
16062		fi
16063
16064
16065				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16066$as_echo_n "checking for pthread_create in default libraries... " >&6; }
16067if test "${ol_cv_pthread_create+set}" = set; then :
16068  $as_echo_n "(cached) " >&6
16069else
16070
16071			if test "$cross_compiling" = yes; then :
16072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16073/* end confdefs.h.  */
16074
16075/* pthread test headers */
16076#include <pthread.h>
16077#if HAVE_PTHREADS < 7
16078#include <errno.h>
16079#endif
16080#ifndef NULL
16081#define NULL (void*)0
16082#endif
16083
16084static void *task(p)
16085	void *p;
16086{
16087	return (void *) (p == NULL);
16088}
16089
16090int
16091main ()
16092{
16093
16094	/* pthread test function */
16095#ifndef PTHREAD_CREATE_DETACHED
16096#define	PTHREAD_CREATE_DETACHED	1
16097#endif
16098	pthread_t t;
16099	int status;
16100	int detach = PTHREAD_CREATE_DETACHED;
16101
16102#if HAVE_PTHREADS > 4
16103	/* Final pthreads */
16104	pthread_attr_t attr;
16105
16106	status = pthread_attr_init(&attr);
16107	if( status ) return status;
16108
16109#if HAVE_PTHREADS < 7
16110	status = pthread_attr_setdetachstate(&attr, &detach);
16111	if( status < 0 ) status = errno;
16112#else
16113	status = pthread_attr_setdetachstate(&attr, detach);
16114#endif
16115	if( status ) return status;
16116	status = pthread_create( &t, &attr, task, NULL );
16117#if HAVE_PTHREADS < 7
16118	if( status < 0 ) status = errno;
16119#endif
16120	if( status ) return status;
16121#else
16122	/* Draft 4 pthreads */
16123	status = pthread_create( &t, pthread_attr_default, task, NULL );
16124	if( status ) return errno;
16125
16126	/* give thread a chance to complete */
16127	/* it should remain joinable and hence detachable */
16128	sleep( 1 );
16129
16130	status = pthread_detach( &t );
16131	if( status ) return errno;
16132#endif
16133
16134#ifdef HAVE_LINUX_THREADS
16135	pthread_kill_other_threads_np();
16136#endif
16137
16138	return 0;
16139
16140  ;
16141  return 0;
16142}
16143_ACEOF
16144if ac_fn_c_try_link "$LINENO"; then :
16145  ol_cv_pthread_create=yes
16146else
16147  ol_cv_pthread_create=no
16148fi
16149rm -f core conftest.err conftest.$ac_objext \
16150    conftest$ac_exeext conftest.$ac_ext
16151else
16152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16153/* end confdefs.h.  */
16154
16155/* pthread test headers */
16156#include <pthread.h>
16157#if HAVE_PTHREADS < 7
16158#include <errno.h>
16159#endif
16160#ifndef NULL
16161#define NULL (void*)0
16162#endif
16163
16164static void *task(p)
16165	void *p;
16166{
16167	return (void *) (p == NULL);
16168}
16169
16170
16171int main(argc, argv)
16172	int argc;
16173	char **argv;
16174{
16175
16176	/* pthread test function */
16177#ifndef PTHREAD_CREATE_DETACHED
16178#define	PTHREAD_CREATE_DETACHED	1
16179#endif
16180	pthread_t t;
16181	int status;
16182	int detach = PTHREAD_CREATE_DETACHED;
16183
16184#if HAVE_PTHREADS > 4
16185	/* Final pthreads */
16186	pthread_attr_t attr;
16187
16188	status = pthread_attr_init(&attr);
16189	if( status ) return status;
16190
16191#if HAVE_PTHREADS < 7
16192	status = pthread_attr_setdetachstate(&attr, &detach);
16193	if( status < 0 ) status = errno;
16194#else
16195	status = pthread_attr_setdetachstate(&attr, detach);
16196#endif
16197	if( status ) return status;
16198	status = pthread_create( &t, &attr, task, NULL );
16199#if HAVE_PTHREADS < 7
16200	if( status < 0 ) status = errno;
16201#endif
16202	if( status ) return status;
16203#else
16204	/* Draft 4 pthreads */
16205	status = pthread_create( &t, pthread_attr_default, task, NULL );
16206	if( status ) return errno;
16207
16208	/* give thread a chance to complete */
16209	/* it should remain joinable and hence detachable */
16210	sleep( 1 );
16211
16212	status = pthread_detach( &t );
16213	if( status ) return errno;
16214#endif
16215
16216#ifdef HAVE_LINUX_THREADS
16217	pthread_kill_other_threads_np();
16218#endif
16219
16220	return 0;
16221
16222}
16223
16224_ACEOF
16225if ac_fn_c_try_run "$LINENO"; then :
16226  ol_cv_pthread_create=yes
16227else
16228  ol_cv_pthread_create=no
16229fi
16230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16231  conftest.$ac_objext conftest.beam conftest.$ac_ext
16232fi
16233
16234fi
16235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16236$as_echo "$ol_cv_pthread_create" >&6; }
16237
16238		if test $ol_cv_pthread_create != no ; then
16239			ol_link_threads=posix
16240			ol_link_pthreads=""
16241		fi
16242
16243		# Pthread try link: -kthread (ol_cv_pthread_kthread)
16244if test "$ol_link_threads" = no ; then
16245	# try -kthread
16246	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16247$as_echo_n "checking for pthread link with -kthread... " >&6; }
16248if test "${ol_cv_pthread_kthread+set}" = set; then :
16249  $as_echo_n "(cached) " >&6
16250else
16251
16252		# save the flags
16253		ol_LIBS="$LIBS"
16254		LIBS="-kthread $LIBS"
16255
16256		if test "$cross_compiling" = yes; then :
16257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16258/* end confdefs.h.  */
16259
16260/* pthread test headers */
16261#include <pthread.h>
16262#if HAVE_PTHREADS < 7
16263#include <errno.h>
16264#endif
16265#ifndef NULL
16266#define NULL (void*)0
16267#endif
16268
16269static void *task(p)
16270	void *p;
16271{
16272	return (void *) (p == NULL);
16273}
16274
16275int
16276main ()
16277{
16278
16279	/* pthread test function */
16280#ifndef PTHREAD_CREATE_DETACHED
16281#define	PTHREAD_CREATE_DETACHED	1
16282#endif
16283	pthread_t t;
16284	int status;
16285	int detach = PTHREAD_CREATE_DETACHED;
16286
16287#if HAVE_PTHREADS > 4
16288	/* Final pthreads */
16289	pthread_attr_t attr;
16290
16291	status = pthread_attr_init(&attr);
16292	if( status ) return status;
16293
16294#if HAVE_PTHREADS < 7
16295	status = pthread_attr_setdetachstate(&attr, &detach);
16296	if( status < 0 ) status = errno;
16297#else
16298	status = pthread_attr_setdetachstate(&attr, detach);
16299#endif
16300	if( status ) return status;
16301	status = pthread_create( &t, &attr, task, NULL );
16302#if HAVE_PTHREADS < 7
16303	if( status < 0 ) status = errno;
16304#endif
16305	if( status ) return status;
16306#else
16307	/* Draft 4 pthreads */
16308	status = pthread_create( &t, pthread_attr_default, task, NULL );
16309	if( status ) return errno;
16310
16311	/* give thread a chance to complete */
16312	/* it should remain joinable and hence detachable */
16313	sleep( 1 );
16314
16315	status = pthread_detach( &t );
16316	if( status ) return errno;
16317#endif
16318
16319#ifdef HAVE_LINUX_THREADS
16320	pthread_kill_other_threads_np();
16321#endif
16322
16323	return 0;
16324
16325  ;
16326  return 0;
16327}
16328_ACEOF
16329if ac_fn_c_try_link "$LINENO"; then :
16330  ol_cv_pthread_kthread=yes
16331else
16332  ol_cv_pthread_kthread=no
16333fi
16334rm -f core conftest.err conftest.$ac_objext \
16335    conftest$ac_exeext conftest.$ac_ext
16336else
16337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16338/* end confdefs.h.  */
16339
16340/* pthread test headers */
16341#include <pthread.h>
16342#if HAVE_PTHREADS < 7
16343#include <errno.h>
16344#endif
16345#ifndef NULL
16346#define NULL (void*)0
16347#endif
16348
16349static void *task(p)
16350	void *p;
16351{
16352	return (void *) (p == NULL);
16353}
16354
16355
16356int main(argc, argv)
16357	int argc;
16358	char **argv;
16359{
16360
16361	/* pthread test function */
16362#ifndef PTHREAD_CREATE_DETACHED
16363#define	PTHREAD_CREATE_DETACHED	1
16364#endif
16365	pthread_t t;
16366	int status;
16367	int detach = PTHREAD_CREATE_DETACHED;
16368
16369#if HAVE_PTHREADS > 4
16370	/* Final pthreads */
16371	pthread_attr_t attr;
16372
16373	status = pthread_attr_init(&attr);
16374	if( status ) return status;
16375
16376#if HAVE_PTHREADS < 7
16377	status = pthread_attr_setdetachstate(&attr, &detach);
16378	if( status < 0 ) status = errno;
16379#else
16380	status = pthread_attr_setdetachstate(&attr, detach);
16381#endif
16382	if( status ) return status;
16383	status = pthread_create( &t, &attr, task, NULL );
16384#if HAVE_PTHREADS < 7
16385	if( status < 0 ) status = errno;
16386#endif
16387	if( status ) return status;
16388#else
16389	/* Draft 4 pthreads */
16390	status = pthread_create( &t, pthread_attr_default, task, NULL );
16391	if( status ) return errno;
16392
16393	/* give thread a chance to complete */
16394	/* it should remain joinable and hence detachable */
16395	sleep( 1 );
16396
16397	status = pthread_detach( &t );
16398	if( status ) return errno;
16399#endif
16400
16401#ifdef HAVE_LINUX_THREADS
16402	pthread_kill_other_threads_np();
16403#endif
16404
16405	return 0;
16406
16407}
16408
16409_ACEOF
16410if ac_fn_c_try_run "$LINENO"; then :
16411  ol_cv_pthread_kthread=yes
16412else
16413  ol_cv_pthread_kthread=no
16414fi
16415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16416  conftest.$ac_objext conftest.beam conftest.$ac_ext
16417fi
16418
16419
16420		# restore the LIBS
16421		LIBS="$ol_LIBS"
16422
16423fi
16424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16425$as_echo "$ol_cv_pthread_kthread" >&6; }
16426
16427	if test $ol_cv_pthread_kthread = yes ; then
16428		ol_link_pthreads="-kthread"
16429		ol_link_threads=posix
16430	fi
16431fi
16432
16433		# Pthread try link: -pthread (ol_cv_pthread_pthread)
16434if test "$ol_link_threads" = no ; then
16435	# try -pthread
16436	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16437$as_echo_n "checking for pthread link with -pthread... " >&6; }
16438if test "${ol_cv_pthread_pthread+set}" = set; then :
16439  $as_echo_n "(cached) " >&6
16440else
16441
16442		# save the flags
16443		ol_LIBS="$LIBS"
16444		LIBS="-pthread $LIBS"
16445
16446		if test "$cross_compiling" = yes; then :
16447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16448/* end confdefs.h.  */
16449
16450/* pthread test headers */
16451#include <pthread.h>
16452#if HAVE_PTHREADS < 7
16453#include <errno.h>
16454#endif
16455#ifndef NULL
16456#define NULL (void*)0
16457#endif
16458
16459static void *task(p)
16460	void *p;
16461{
16462	return (void *) (p == NULL);
16463}
16464
16465int
16466main ()
16467{
16468
16469	/* pthread test function */
16470#ifndef PTHREAD_CREATE_DETACHED
16471#define	PTHREAD_CREATE_DETACHED	1
16472#endif
16473	pthread_t t;
16474	int status;
16475	int detach = PTHREAD_CREATE_DETACHED;
16476
16477#if HAVE_PTHREADS > 4
16478	/* Final pthreads */
16479	pthread_attr_t attr;
16480
16481	status = pthread_attr_init(&attr);
16482	if( status ) return status;
16483
16484#if HAVE_PTHREADS < 7
16485	status = pthread_attr_setdetachstate(&attr, &detach);
16486	if( status < 0 ) status = errno;
16487#else
16488	status = pthread_attr_setdetachstate(&attr, detach);
16489#endif
16490	if( status ) return status;
16491	status = pthread_create( &t, &attr, task, NULL );
16492#if HAVE_PTHREADS < 7
16493	if( status < 0 ) status = errno;
16494#endif
16495	if( status ) return status;
16496#else
16497	/* Draft 4 pthreads */
16498	status = pthread_create( &t, pthread_attr_default, task, NULL );
16499	if( status ) return errno;
16500
16501	/* give thread a chance to complete */
16502	/* it should remain joinable and hence detachable */
16503	sleep( 1 );
16504
16505	status = pthread_detach( &t );
16506	if( status ) return errno;
16507#endif
16508
16509#ifdef HAVE_LINUX_THREADS
16510	pthread_kill_other_threads_np();
16511#endif
16512
16513	return 0;
16514
16515  ;
16516  return 0;
16517}
16518_ACEOF
16519if ac_fn_c_try_link "$LINENO"; then :
16520  ol_cv_pthread_pthread=yes
16521else
16522  ol_cv_pthread_pthread=no
16523fi
16524rm -f core conftest.err conftest.$ac_objext \
16525    conftest$ac_exeext conftest.$ac_ext
16526else
16527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16528/* end confdefs.h.  */
16529
16530/* pthread test headers */
16531#include <pthread.h>
16532#if HAVE_PTHREADS < 7
16533#include <errno.h>
16534#endif
16535#ifndef NULL
16536#define NULL (void*)0
16537#endif
16538
16539static void *task(p)
16540	void *p;
16541{
16542	return (void *) (p == NULL);
16543}
16544
16545
16546int main(argc, argv)
16547	int argc;
16548	char **argv;
16549{
16550
16551	/* pthread test function */
16552#ifndef PTHREAD_CREATE_DETACHED
16553#define	PTHREAD_CREATE_DETACHED	1
16554#endif
16555	pthread_t t;
16556	int status;
16557	int detach = PTHREAD_CREATE_DETACHED;
16558
16559#if HAVE_PTHREADS > 4
16560	/* Final pthreads */
16561	pthread_attr_t attr;
16562
16563	status = pthread_attr_init(&attr);
16564	if( status ) return status;
16565
16566#if HAVE_PTHREADS < 7
16567	status = pthread_attr_setdetachstate(&attr, &detach);
16568	if( status < 0 ) status = errno;
16569#else
16570	status = pthread_attr_setdetachstate(&attr, detach);
16571#endif
16572	if( status ) return status;
16573	status = pthread_create( &t, &attr, task, NULL );
16574#if HAVE_PTHREADS < 7
16575	if( status < 0 ) status = errno;
16576#endif
16577	if( status ) return status;
16578#else
16579	/* Draft 4 pthreads */
16580	status = pthread_create( &t, pthread_attr_default, task, NULL );
16581	if( status ) return errno;
16582
16583	/* give thread a chance to complete */
16584	/* it should remain joinable and hence detachable */
16585	sleep( 1 );
16586
16587	status = pthread_detach( &t );
16588	if( status ) return errno;
16589#endif
16590
16591#ifdef HAVE_LINUX_THREADS
16592	pthread_kill_other_threads_np();
16593#endif
16594
16595	return 0;
16596
16597}
16598
16599_ACEOF
16600if ac_fn_c_try_run "$LINENO"; then :
16601  ol_cv_pthread_pthread=yes
16602else
16603  ol_cv_pthread_pthread=no
16604fi
16605rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16606  conftest.$ac_objext conftest.beam conftest.$ac_ext
16607fi
16608
16609
16610		# restore the LIBS
16611		LIBS="$ol_LIBS"
16612
16613fi
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16615$as_echo "$ol_cv_pthread_pthread" >&6; }
16616
16617	if test $ol_cv_pthread_pthread = yes ; then
16618		ol_link_pthreads="-pthread"
16619		ol_link_threads=posix
16620	fi
16621fi
16622
16623		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16624if test "$ol_link_threads" = no ; then
16625	# try -pthreads
16626	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16627$as_echo_n "checking for pthread link with -pthreads... " >&6; }
16628if test "${ol_cv_pthread_pthreads+set}" = set; then :
16629  $as_echo_n "(cached) " >&6
16630else
16631
16632		# save the flags
16633		ol_LIBS="$LIBS"
16634		LIBS="-pthreads $LIBS"
16635
16636		if test "$cross_compiling" = yes; then :
16637  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638/* end confdefs.h.  */
16639
16640/* pthread test headers */
16641#include <pthread.h>
16642#if HAVE_PTHREADS < 7
16643#include <errno.h>
16644#endif
16645#ifndef NULL
16646#define NULL (void*)0
16647#endif
16648
16649static void *task(p)
16650	void *p;
16651{
16652	return (void *) (p == NULL);
16653}
16654
16655int
16656main ()
16657{
16658
16659	/* pthread test function */
16660#ifndef PTHREAD_CREATE_DETACHED
16661#define	PTHREAD_CREATE_DETACHED	1
16662#endif
16663	pthread_t t;
16664	int status;
16665	int detach = PTHREAD_CREATE_DETACHED;
16666
16667#if HAVE_PTHREADS > 4
16668	/* Final pthreads */
16669	pthread_attr_t attr;
16670
16671	status = pthread_attr_init(&attr);
16672	if( status ) return status;
16673
16674#if HAVE_PTHREADS < 7
16675	status = pthread_attr_setdetachstate(&attr, &detach);
16676	if( status < 0 ) status = errno;
16677#else
16678	status = pthread_attr_setdetachstate(&attr, detach);
16679#endif
16680	if( status ) return status;
16681	status = pthread_create( &t, &attr, task, NULL );
16682#if HAVE_PTHREADS < 7
16683	if( status < 0 ) status = errno;
16684#endif
16685	if( status ) return status;
16686#else
16687	/* Draft 4 pthreads */
16688	status = pthread_create( &t, pthread_attr_default, task, NULL );
16689	if( status ) return errno;
16690
16691	/* give thread a chance to complete */
16692	/* it should remain joinable and hence detachable */
16693	sleep( 1 );
16694
16695	status = pthread_detach( &t );
16696	if( status ) return errno;
16697#endif
16698
16699#ifdef HAVE_LINUX_THREADS
16700	pthread_kill_other_threads_np();
16701#endif
16702
16703	return 0;
16704
16705  ;
16706  return 0;
16707}
16708_ACEOF
16709if ac_fn_c_try_link "$LINENO"; then :
16710  ol_cv_pthread_pthreads=yes
16711else
16712  ol_cv_pthread_pthreads=no
16713fi
16714rm -f core conftest.err conftest.$ac_objext \
16715    conftest$ac_exeext conftest.$ac_ext
16716else
16717  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16718/* end confdefs.h.  */
16719
16720/* pthread test headers */
16721#include <pthread.h>
16722#if HAVE_PTHREADS < 7
16723#include <errno.h>
16724#endif
16725#ifndef NULL
16726#define NULL (void*)0
16727#endif
16728
16729static void *task(p)
16730	void *p;
16731{
16732	return (void *) (p == NULL);
16733}
16734
16735
16736int main(argc, argv)
16737	int argc;
16738	char **argv;
16739{
16740
16741	/* pthread test function */
16742#ifndef PTHREAD_CREATE_DETACHED
16743#define	PTHREAD_CREATE_DETACHED	1
16744#endif
16745	pthread_t t;
16746	int status;
16747	int detach = PTHREAD_CREATE_DETACHED;
16748
16749#if HAVE_PTHREADS > 4
16750	/* Final pthreads */
16751	pthread_attr_t attr;
16752
16753	status = pthread_attr_init(&attr);
16754	if( status ) return status;
16755
16756#if HAVE_PTHREADS < 7
16757	status = pthread_attr_setdetachstate(&attr, &detach);
16758	if( status < 0 ) status = errno;
16759#else
16760	status = pthread_attr_setdetachstate(&attr, detach);
16761#endif
16762	if( status ) return status;
16763	status = pthread_create( &t, &attr, task, NULL );
16764#if HAVE_PTHREADS < 7
16765	if( status < 0 ) status = errno;
16766#endif
16767	if( status ) return status;
16768#else
16769	/* Draft 4 pthreads */
16770	status = pthread_create( &t, pthread_attr_default, task, NULL );
16771	if( status ) return errno;
16772
16773	/* give thread a chance to complete */
16774	/* it should remain joinable and hence detachable */
16775	sleep( 1 );
16776
16777	status = pthread_detach( &t );
16778	if( status ) return errno;
16779#endif
16780
16781#ifdef HAVE_LINUX_THREADS
16782	pthread_kill_other_threads_np();
16783#endif
16784
16785	return 0;
16786
16787}
16788
16789_ACEOF
16790if ac_fn_c_try_run "$LINENO"; then :
16791  ol_cv_pthread_pthreads=yes
16792else
16793  ol_cv_pthread_pthreads=no
16794fi
16795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16796  conftest.$ac_objext conftest.beam conftest.$ac_ext
16797fi
16798
16799
16800		# restore the LIBS
16801		LIBS="$ol_LIBS"
16802
16803fi
16804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16805$as_echo "$ol_cv_pthread_pthreads" >&6; }
16806
16807	if test $ol_cv_pthread_pthreads = yes ; then
16808		ol_link_pthreads="-pthreads"
16809		ol_link_threads=posix
16810	fi
16811fi
16812
16813		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16814if test "$ol_link_threads" = no ; then
16815	# try -mthreads
16816	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16817$as_echo_n "checking for pthread link with -mthreads... " >&6; }
16818if test "${ol_cv_pthread_mthreads+set}" = set; then :
16819  $as_echo_n "(cached) " >&6
16820else
16821
16822		# save the flags
16823		ol_LIBS="$LIBS"
16824		LIBS="-mthreads $LIBS"
16825
16826		if test "$cross_compiling" = yes; then :
16827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828/* end confdefs.h.  */
16829
16830/* pthread test headers */
16831#include <pthread.h>
16832#if HAVE_PTHREADS < 7
16833#include <errno.h>
16834#endif
16835#ifndef NULL
16836#define NULL (void*)0
16837#endif
16838
16839static void *task(p)
16840	void *p;
16841{
16842	return (void *) (p == NULL);
16843}
16844
16845int
16846main ()
16847{
16848
16849	/* pthread test function */
16850#ifndef PTHREAD_CREATE_DETACHED
16851#define	PTHREAD_CREATE_DETACHED	1
16852#endif
16853	pthread_t t;
16854	int status;
16855	int detach = PTHREAD_CREATE_DETACHED;
16856
16857#if HAVE_PTHREADS > 4
16858	/* Final pthreads */
16859	pthread_attr_t attr;
16860
16861	status = pthread_attr_init(&attr);
16862	if( status ) return status;
16863
16864#if HAVE_PTHREADS < 7
16865	status = pthread_attr_setdetachstate(&attr, &detach);
16866	if( status < 0 ) status = errno;
16867#else
16868	status = pthread_attr_setdetachstate(&attr, detach);
16869#endif
16870	if( status ) return status;
16871	status = pthread_create( &t, &attr, task, NULL );
16872#if HAVE_PTHREADS < 7
16873	if( status < 0 ) status = errno;
16874#endif
16875	if( status ) return status;
16876#else
16877	/* Draft 4 pthreads */
16878	status = pthread_create( &t, pthread_attr_default, task, NULL );
16879	if( status ) return errno;
16880
16881	/* give thread a chance to complete */
16882	/* it should remain joinable and hence detachable */
16883	sleep( 1 );
16884
16885	status = pthread_detach( &t );
16886	if( status ) return errno;
16887#endif
16888
16889#ifdef HAVE_LINUX_THREADS
16890	pthread_kill_other_threads_np();
16891#endif
16892
16893	return 0;
16894
16895  ;
16896  return 0;
16897}
16898_ACEOF
16899if ac_fn_c_try_link "$LINENO"; then :
16900  ol_cv_pthread_mthreads=yes
16901else
16902  ol_cv_pthread_mthreads=no
16903fi
16904rm -f core conftest.err conftest.$ac_objext \
16905    conftest$ac_exeext conftest.$ac_ext
16906else
16907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908/* end confdefs.h.  */
16909
16910/* pthread test headers */
16911#include <pthread.h>
16912#if HAVE_PTHREADS < 7
16913#include <errno.h>
16914#endif
16915#ifndef NULL
16916#define NULL (void*)0
16917#endif
16918
16919static void *task(p)
16920	void *p;
16921{
16922	return (void *) (p == NULL);
16923}
16924
16925
16926int main(argc, argv)
16927	int argc;
16928	char **argv;
16929{
16930
16931	/* pthread test function */
16932#ifndef PTHREAD_CREATE_DETACHED
16933#define	PTHREAD_CREATE_DETACHED	1
16934#endif
16935	pthread_t t;
16936	int status;
16937	int detach = PTHREAD_CREATE_DETACHED;
16938
16939#if HAVE_PTHREADS > 4
16940	/* Final pthreads */
16941	pthread_attr_t attr;
16942
16943	status = pthread_attr_init(&attr);
16944	if( status ) return status;
16945
16946#if HAVE_PTHREADS < 7
16947	status = pthread_attr_setdetachstate(&attr, &detach);
16948	if( status < 0 ) status = errno;
16949#else
16950	status = pthread_attr_setdetachstate(&attr, detach);
16951#endif
16952	if( status ) return status;
16953	status = pthread_create( &t, &attr, task, NULL );
16954#if HAVE_PTHREADS < 7
16955	if( status < 0 ) status = errno;
16956#endif
16957	if( status ) return status;
16958#else
16959	/* Draft 4 pthreads */
16960	status = pthread_create( &t, pthread_attr_default, task, NULL );
16961	if( status ) return errno;
16962
16963	/* give thread a chance to complete */
16964	/* it should remain joinable and hence detachable */
16965	sleep( 1 );
16966
16967	status = pthread_detach( &t );
16968	if( status ) return errno;
16969#endif
16970
16971#ifdef HAVE_LINUX_THREADS
16972	pthread_kill_other_threads_np();
16973#endif
16974
16975	return 0;
16976
16977}
16978
16979_ACEOF
16980if ac_fn_c_try_run "$LINENO"; then :
16981  ol_cv_pthread_mthreads=yes
16982else
16983  ol_cv_pthread_mthreads=no
16984fi
16985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16986  conftest.$ac_objext conftest.beam conftest.$ac_ext
16987fi
16988
16989
16990		# restore the LIBS
16991		LIBS="$ol_LIBS"
16992
16993fi
16994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
16995$as_echo "$ol_cv_pthread_mthreads" >&6; }
16996
16997	if test $ol_cv_pthread_mthreads = yes ; then
16998		ol_link_pthreads="-mthreads"
16999		ol_link_threads=posix
17000	fi
17001fi
17002
17003		# Pthread try link: -thread (ol_cv_pthread_thread)
17004if test "$ol_link_threads" = no ; then
17005	# try -thread
17006	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
17007$as_echo_n "checking for pthread link with -thread... " >&6; }
17008if test "${ol_cv_pthread_thread+set}" = set; then :
17009  $as_echo_n "(cached) " >&6
17010else
17011
17012		# save the flags
17013		ol_LIBS="$LIBS"
17014		LIBS="-thread $LIBS"
17015
17016		if test "$cross_compiling" = yes; then :
17017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17018/* end confdefs.h.  */
17019
17020/* pthread test headers */
17021#include <pthread.h>
17022#if HAVE_PTHREADS < 7
17023#include <errno.h>
17024#endif
17025#ifndef NULL
17026#define NULL (void*)0
17027#endif
17028
17029static void *task(p)
17030	void *p;
17031{
17032	return (void *) (p == NULL);
17033}
17034
17035int
17036main ()
17037{
17038
17039	/* pthread test function */
17040#ifndef PTHREAD_CREATE_DETACHED
17041#define	PTHREAD_CREATE_DETACHED	1
17042#endif
17043	pthread_t t;
17044	int status;
17045	int detach = PTHREAD_CREATE_DETACHED;
17046
17047#if HAVE_PTHREADS > 4
17048	/* Final pthreads */
17049	pthread_attr_t attr;
17050
17051	status = pthread_attr_init(&attr);
17052	if( status ) return status;
17053
17054#if HAVE_PTHREADS < 7
17055	status = pthread_attr_setdetachstate(&attr, &detach);
17056	if( status < 0 ) status = errno;
17057#else
17058	status = pthread_attr_setdetachstate(&attr, detach);
17059#endif
17060	if( status ) return status;
17061	status = pthread_create( &t, &attr, task, NULL );
17062#if HAVE_PTHREADS < 7
17063	if( status < 0 ) status = errno;
17064#endif
17065	if( status ) return status;
17066#else
17067	/* Draft 4 pthreads */
17068	status = pthread_create( &t, pthread_attr_default, task, NULL );
17069	if( status ) return errno;
17070
17071	/* give thread a chance to complete */
17072	/* it should remain joinable and hence detachable */
17073	sleep( 1 );
17074
17075	status = pthread_detach( &t );
17076	if( status ) return errno;
17077#endif
17078
17079#ifdef HAVE_LINUX_THREADS
17080	pthread_kill_other_threads_np();
17081#endif
17082
17083	return 0;
17084
17085  ;
17086  return 0;
17087}
17088_ACEOF
17089if ac_fn_c_try_link "$LINENO"; then :
17090  ol_cv_pthread_thread=yes
17091else
17092  ol_cv_pthread_thread=no
17093fi
17094rm -f core conftest.err conftest.$ac_objext \
17095    conftest$ac_exeext conftest.$ac_ext
17096else
17097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17098/* end confdefs.h.  */
17099
17100/* pthread test headers */
17101#include <pthread.h>
17102#if HAVE_PTHREADS < 7
17103#include <errno.h>
17104#endif
17105#ifndef NULL
17106#define NULL (void*)0
17107#endif
17108
17109static void *task(p)
17110	void *p;
17111{
17112	return (void *) (p == NULL);
17113}
17114
17115
17116int main(argc, argv)
17117	int argc;
17118	char **argv;
17119{
17120
17121	/* pthread test function */
17122#ifndef PTHREAD_CREATE_DETACHED
17123#define	PTHREAD_CREATE_DETACHED	1
17124#endif
17125	pthread_t t;
17126	int status;
17127	int detach = PTHREAD_CREATE_DETACHED;
17128
17129#if HAVE_PTHREADS > 4
17130	/* Final pthreads */
17131	pthread_attr_t attr;
17132
17133	status = pthread_attr_init(&attr);
17134	if( status ) return status;
17135
17136#if HAVE_PTHREADS < 7
17137	status = pthread_attr_setdetachstate(&attr, &detach);
17138	if( status < 0 ) status = errno;
17139#else
17140	status = pthread_attr_setdetachstate(&attr, detach);
17141#endif
17142	if( status ) return status;
17143	status = pthread_create( &t, &attr, task, NULL );
17144#if HAVE_PTHREADS < 7
17145	if( status < 0 ) status = errno;
17146#endif
17147	if( status ) return status;
17148#else
17149	/* Draft 4 pthreads */
17150	status = pthread_create( &t, pthread_attr_default, task, NULL );
17151	if( status ) return errno;
17152
17153	/* give thread a chance to complete */
17154	/* it should remain joinable and hence detachable */
17155	sleep( 1 );
17156
17157	status = pthread_detach( &t );
17158	if( status ) return errno;
17159#endif
17160
17161#ifdef HAVE_LINUX_THREADS
17162	pthread_kill_other_threads_np();
17163#endif
17164
17165	return 0;
17166
17167}
17168
17169_ACEOF
17170if ac_fn_c_try_run "$LINENO"; then :
17171  ol_cv_pthread_thread=yes
17172else
17173  ol_cv_pthread_thread=no
17174fi
17175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17176  conftest.$ac_objext conftest.beam conftest.$ac_ext
17177fi
17178
17179
17180		# restore the LIBS
17181		LIBS="$ol_LIBS"
17182
17183fi
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17185$as_echo "$ol_cv_pthread_thread" >&6; }
17186
17187	if test $ol_cv_pthread_thread = yes ; then
17188		ol_link_pthreads="-thread"
17189		ol_link_threads=posix
17190	fi
17191fi
17192
17193
17194		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17195if test "$ol_link_threads" = no ; then
17196	# try -lpthread -lmach -lexc -lc_r
17197	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17198$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17199if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17200  $as_echo_n "(cached) " >&6
17201else
17202
17203		# save the flags
17204		ol_LIBS="$LIBS"
17205		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17206
17207		if test "$cross_compiling" = yes; then :
17208  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17209/* end confdefs.h.  */
17210
17211/* pthread test headers */
17212#include <pthread.h>
17213#if HAVE_PTHREADS < 7
17214#include <errno.h>
17215#endif
17216#ifndef NULL
17217#define NULL (void*)0
17218#endif
17219
17220static void *task(p)
17221	void *p;
17222{
17223	return (void *) (p == NULL);
17224}
17225
17226int
17227main ()
17228{
17229
17230	/* pthread test function */
17231#ifndef PTHREAD_CREATE_DETACHED
17232#define	PTHREAD_CREATE_DETACHED	1
17233#endif
17234	pthread_t t;
17235	int status;
17236	int detach = PTHREAD_CREATE_DETACHED;
17237
17238#if HAVE_PTHREADS > 4
17239	/* Final pthreads */
17240	pthread_attr_t attr;
17241
17242	status = pthread_attr_init(&attr);
17243	if( status ) return status;
17244
17245#if HAVE_PTHREADS < 7
17246	status = pthread_attr_setdetachstate(&attr, &detach);
17247	if( status < 0 ) status = errno;
17248#else
17249	status = pthread_attr_setdetachstate(&attr, detach);
17250#endif
17251	if( status ) return status;
17252	status = pthread_create( &t, &attr, task, NULL );
17253#if HAVE_PTHREADS < 7
17254	if( status < 0 ) status = errno;
17255#endif
17256	if( status ) return status;
17257#else
17258	/* Draft 4 pthreads */
17259	status = pthread_create( &t, pthread_attr_default, task, NULL );
17260	if( status ) return errno;
17261
17262	/* give thread a chance to complete */
17263	/* it should remain joinable and hence detachable */
17264	sleep( 1 );
17265
17266	status = pthread_detach( &t );
17267	if( status ) return errno;
17268#endif
17269
17270#ifdef HAVE_LINUX_THREADS
17271	pthread_kill_other_threads_np();
17272#endif
17273
17274	return 0;
17275
17276  ;
17277  return 0;
17278}
17279_ACEOF
17280if ac_fn_c_try_link "$LINENO"; then :
17281  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17282else
17283  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17284fi
17285rm -f core conftest.err conftest.$ac_objext \
17286    conftest$ac_exeext conftest.$ac_ext
17287else
17288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17289/* end confdefs.h.  */
17290
17291/* pthread test headers */
17292#include <pthread.h>
17293#if HAVE_PTHREADS < 7
17294#include <errno.h>
17295#endif
17296#ifndef NULL
17297#define NULL (void*)0
17298#endif
17299
17300static void *task(p)
17301	void *p;
17302{
17303	return (void *) (p == NULL);
17304}
17305
17306
17307int main(argc, argv)
17308	int argc;
17309	char **argv;
17310{
17311
17312	/* pthread test function */
17313#ifndef PTHREAD_CREATE_DETACHED
17314#define	PTHREAD_CREATE_DETACHED	1
17315#endif
17316	pthread_t t;
17317	int status;
17318	int detach = PTHREAD_CREATE_DETACHED;
17319
17320#if HAVE_PTHREADS > 4
17321	/* Final pthreads */
17322	pthread_attr_t attr;
17323
17324	status = pthread_attr_init(&attr);
17325	if( status ) return status;
17326
17327#if HAVE_PTHREADS < 7
17328	status = pthread_attr_setdetachstate(&attr, &detach);
17329	if( status < 0 ) status = errno;
17330#else
17331	status = pthread_attr_setdetachstate(&attr, detach);
17332#endif
17333	if( status ) return status;
17334	status = pthread_create( &t, &attr, task, NULL );
17335#if HAVE_PTHREADS < 7
17336	if( status < 0 ) status = errno;
17337#endif
17338	if( status ) return status;
17339#else
17340	/* Draft 4 pthreads */
17341	status = pthread_create( &t, pthread_attr_default, task, NULL );
17342	if( status ) return errno;
17343
17344	/* give thread a chance to complete */
17345	/* it should remain joinable and hence detachable */
17346	sleep( 1 );
17347
17348	status = pthread_detach( &t );
17349	if( status ) return errno;
17350#endif
17351
17352#ifdef HAVE_LINUX_THREADS
17353	pthread_kill_other_threads_np();
17354#endif
17355
17356	return 0;
17357
17358}
17359
17360_ACEOF
17361if ac_fn_c_try_run "$LINENO"; then :
17362  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17363else
17364  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17365fi
17366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17367  conftest.$ac_objext conftest.beam conftest.$ac_ext
17368fi
17369
17370
17371		# restore the LIBS
17372		LIBS="$ol_LIBS"
17373
17374fi
17375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17376$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17377
17378	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17379		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17380		ol_link_threads=posix
17381	fi
17382fi
17383
17384		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17385if test "$ol_link_threads" = no ; then
17386	# try -lpthread -lmach -lexc
17387	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17388$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17389if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17390  $as_echo_n "(cached) " >&6
17391else
17392
17393		# save the flags
17394		ol_LIBS="$LIBS"
17395		LIBS="-lpthread -lmach -lexc $LIBS"
17396
17397		if test "$cross_compiling" = yes; then :
17398  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17399/* end confdefs.h.  */
17400
17401/* pthread test headers */
17402#include <pthread.h>
17403#if HAVE_PTHREADS < 7
17404#include <errno.h>
17405#endif
17406#ifndef NULL
17407#define NULL (void*)0
17408#endif
17409
17410static void *task(p)
17411	void *p;
17412{
17413	return (void *) (p == NULL);
17414}
17415
17416int
17417main ()
17418{
17419
17420	/* pthread test function */
17421#ifndef PTHREAD_CREATE_DETACHED
17422#define	PTHREAD_CREATE_DETACHED	1
17423#endif
17424	pthread_t t;
17425	int status;
17426	int detach = PTHREAD_CREATE_DETACHED;
17427
17428#if HAVE_PTHREADS > 4
17429	/* Final pthreads */
17430	pthread_attr_t attr;
17431
17432	status = pthread_attr_init(&attr);
17433	if( status ) return status;
17434
17435#if HAVE_PTHREADS < 7
17436	status = pthread_attr_setdetachstate(&attr, &detach);
17437	if( status < 0 ) status = errno;
17438#else
17439	status = pthread_attr_setdetachstate(&attr, detach);
17440#endif
17441	if( status ) return status;
17442	status = pthread_create( &t, &attr, task, NULL );
17443#if HAVE_PTHREADS < 7
17444	if( status < 0 ) status = errno;
17445#endif
17446	if( status ) return status;
17447#else
17448	/* Draft 4 pthreads */
17449	status = pthread_create( &t, pthread_attr_default, task, NULL );
17450	if( status ) return errno;
17451
17452	/* give thread a chance to complete */
17453	/* it should remain joinable and hence detachable */
17454	sleep( 1 );
17455
17456	status = pthread_detach( &t );
17457	if( status ) return errno;
17458#endif
17459
17460#ifdef HAVE_LINUX_THREADS
17461	pthread_kill_other_threads_np();
17462#endif
17463
17464	return 0;
17465
17466  ;
17467  return 0;
17468}
17469_ACEOF
17470if ac_fn_c_try_link "$LINENO"; then :
17471  ol_cv_pthread_lpthread_lmach_lexc=yes
17472else
17473  ol_cv_pthread_lpthread_lmach_lexc=no
17474fi
17475rm -f core conftest.err conftest.$ac_objext \
17476    conftest$ac_exeext conftest.$ac_ext
17477else
17478  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17479/* end confdefs.h.  */
17480
17481/* pthread test headers */
17482#include <pthread.h>
17483#if HAVE_PTHREADS < 7
17484#include <errno.h>
17485#endif
17486#ifndef NULL
17487#define NULL (void*)0
17488#endif
17489
17490static void *task(p)
17491	void *p;
17492{
17493	return (void *) (p == NULL);
17494}
17495
17496
17497int main(argc, argv)
17498	int argc;
17499	char **argv;
17500{
17501
17502	/* pthread test function */
17503#ifndef PTHREAD_CREATE_DETACHED
17504#define	PTHREAD_CREATE_DETACHED	1
17505#endif
17506	pthread_t t;
17507	int status;
17508	int detach = PTHREAD_CREATE_DETACHED;
17509
17510#if HAVE_PTHREADS > 4
17511	/* Final pthreads */
17512	pthread_attr_t attr;
17513
17514	status = pthread_attr_init(&attr);
17515	if( status ) return status;
17516
17517#if HAVE_PTHREADS < 7
17518	status = pthread_attr_setdetachstate(&attr, &detach);
17519	if( status < 0 ) status = errno;
17520#else
17521	status = pthread_attr_setdetachstate(&attr, detach);
17522#endif
17523	if( status ) return status;
17524	status = pthread_create( &t, &attr, task, NULL );
17525#if HAVE_PTHREADS < 7
17526	if( status < 0 ) status = errno;
17527#endif
17528	if( status ) return status;
17529#else
17530	/* Draft 4 pthreads */
17531	status = pthread_create( &t, pthread_attr_default, task, NULL );
17532	if( status ) return errno;
17533
17534	/* give thread a chance to complete */
17535	/* it should remain joinable and hence detachable */
17536	sleep( 1 );
17537
17538	status = pthread_detach( &t );
17539	if( status ) return errno;
17540#endif
17541
17542#ifdef HAVE_LINUX_THREADS
17543	pthread_kill_other_threads_np();
17544#endif
17545
17546	return 0;
17547
17548}
17549
17550_ACEOF
17551if ac_fn_c_try_run "$LINENO"; then :
17552  ol_cv_pthread_lpthread_lmach_lexc=yes
17553else
17554  ol_cv_pthread_lpthread_lmach_lexc=no
17555fi
17556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17557  conftest.$ac_objext conftest.beam conftest.$ac_ext
17558fi
17559
17560
17561		# restore the LIBS
17562		LIBS="$ol_LIBS"
17563
17564fi
17565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17566$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17567
17568	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17569		ol_link_pthreads="-lpthread -lmach -lexc"
17570		ol_link_threads=posix
17571	fi
17572fi
17573
17574
17575		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17576if test "$ol_link_threads" = no ; then
17577	# try -lpthread -Wl,-woff,85
17578	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17579$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17580if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17581  $as_echo_n "(cached) " >&6
17582else
17583
17584		# save the flags
17585		ol_LIBS="$LIBS"
17586		LIBS="-lpthread -Wl,-woff,85 $LIBS"
17587
17588		if test "$cross_compiling" = yes; then :
17589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17590/* end confdefs.h.  */
17591
17592/* pthread test headers */
17593#include <pthread.h>
17594#if HAVE_PTHREADS < 7
17595#include <errno.h>
17596#endif
17597#ifndef NULL
17598#define NULL (void*)0
17599#endif
17600
17601static void *task(p)
17602	void *p;
17603{
17604	return (void *) (p == NULL);
17605}
17606
17607int
17608main ()
17609{
17610
17611	/* pthread test function */
17612#ifndef PTHREAD_CREATE_DETACHED
17613#define	PTHREAD_CREATE_DETACHED	1
17614#endif
17615	pthread_t t;
17616	int status;
17617	int detach = PTHREAD_CREATE_DETACHED;
17618
17619#if HAVE_PTHREADS > 4
17620	/* Final pthreads */
17621	pthread_attr_t attr;
17622
17623	status = pthread_attr_init(&attr);
17624	if( status ) return status;
17625
17626#if HAVE_PTHREADS < 7
17627	status = pthread_attr_setdetachstate(&attr, &detach);
17628	if( status < 0 ) status = errno;
17629#else
17630	status = pthread_attr_setdetachstate(&attr, detach);
17631#endif
17632	if( status ) return status;
17633	status = pthread_create( &t, &attr, task, NULL );
17634#if HAVE_PTHREADS < 7
17635	if( status < 0 ) status = errno;
17636#endif
17637	if( status ) return status;
17638#else
17639	/* Draft 4 pthreads */
17640	status = pthread_create( &t, pthread_attr_default, task, NULL );
17641	if( status ) return errno;
17642
17643	/* give thread a chance to complete */
17644	/* it should remain joinable and hence detachable */
17645	sleep( 1 );
17646
17647	status = pthread_detach( &t );
17648	if( status ) return errno;
17649#endif
17650
17651#ifdef HAVE_LINUX_THREADS
17652	pthread_kill_other_threads_np();
17653#endif
17654
17655	return 0;
17656
17657  ;
17658  return 0;
17659}
17660_ACEOF
17661if ac_fn_c_try_link "$LINENO"; then :
17662  ol_cv_pthread_lib_lpthread_woff=yes
17663else
17664  ol_cv_pthread_lib_lpthread_woff=no
17665fi
17666rm -f core conftest.err conftest.$ac_objext \
17667    conftest$ac_exeext conftest.$ac_ext
17668else
17669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17670/* end confdefs.h.  */
17671
17672/* pthread test headers */
17673#include <pthread.h>
17674#if HAVE_PTHREADS < 7
17675#include <errno.h>
17676#endif
17677#ifndef NULL
17678#define NULL (void*)0
17679#endif
17680
17681static void *task(p)
17682	void *p;
17683{
17684	return (void *) (p == NULL);
17685}
17686
17687
17688int main(argc, argv)
17689	int argc;
17690	char **argv;
17691{
17692
17693	/* pthread test function */
17694#ifndef PTHREAD_CREATE_DETACHED
17695#define	PTHREAD_CREATE_DETACHED	1
17696#endif
17697	pthread_t t;
17698	int status;
17699	int detach = PTHREAD_CREATE_DETACHED;
17700
17701#if HAVE_PTHREADS > 4
17702	/* Final pthreads */
17703	pthread_attr_t attr;
17704
17705	status = pthread_attr_init(&attr);
17706	if( status ) return status;
17707
17708#if HAVE_PTHREADS < 7
17709	status = pthread_attr_setdetachstate(&attr, &detach);
17710	if( status < 0 ) status = errno;
17711#else
17712	status = pthread_attr_setdetachstate(&attr, detach);
17713#endif
17714	if( status ) return status;
17715	status = pthread_create( &t, &attr, task, NULL );
17716#if HAVE_PTHREADS < 7
17717	if( status < 0 ) status = errno;
17718#endif
17719	if( status ) return status;
17720#else
17721	/* Draft 4 pthreads */
17722	status = pthread_create( &t, pthread_attr_default, task, NULL );
17723	if( status ) return errno;
17724
17725	/* give thread a chance to complete */
17726	/* it should remain joinable and hence detachable */
17727	sleep( 1 );
17728
17729	status = pthread_detach( &t );
17730	if( status ) return errno;
17731#endif
17732
17733#ifdef HAVE_LINUX_THREADS
17734	pthread_kill_other_threads_np();
17735#endif
17736
17737	return 0;
17738
17739}
17740
17741_ACEOF
17742if ac_fn_c_try_run "$LINENO"; then :
17743  ol_cv_pthread_lib_lpthread_woff=yes
17744else
17745  ol_cv_pthread_lib_lpthread_woff=no
17746fi
17747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17748  conftest.$ac_objext conftest.beam conftest.$ac_ext
17749fi
17750
17751
17752		# restore the LIBS
17753		LIBS="$ol_LIBS"
17754
17755fi
17756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17757$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17758
17759	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17760		ol_link_pthreads="-lpthread -Wl,-woff,85"
17761		ol_link_threads=posix
17762	fi
17763fi
17764
17765
17766		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17767if test "$ol_link_threads" = no ; then
17768	# try -lpthread
17769	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17770$as_echo_n "checking for pthread link with -lpthread... " >&6; }
17771if test "${ol_cv_pthread_lpthread+set}" = set; then :
17772  $as_echo_n "(cached) " >&6
17773else
17774
17775		# save the flags
17776		ol_LIBS="$LIBS"
17777		LIBS="-lpthread $LIBS"
17778
17779		if test "$cross_compiling" = yes; then :
17780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17781/* end confdefs.h.  */
17782
17783/* pthread test headers */
17784#include <pthread.h>
17785#if HAVE_PTHREADS < 7
17786#include <errno.h>
17787#endif
17788#ifndef NULL
17789#define NULL (void*)0
17790#endif
17791
17792static void *task(p)
17793	void *p;
17794{
17795	return (void *) (p == NULL);
17796}
17797
17798int
17799main ()
17800{
17801
17802	/* pthread test function */
17803#ifndef PTHREAD_CREATE_DETACHED
17804#define	PTHREAD_CREATE_DETACHED	1
17805#endif
17806	pthread_t t;
17807	int status;
17808	int detach = PTHREAD_CREATE_DETACHED;
17809
17810#if HAVE_PTHREADS > 4
17811	/* Final pthreads */
17812	pthread_attr_t attr;
17813
17814	status = pthread_attr_init(&attr);
17815	if( status ) return status;
17816
17817#if HAVE_PTHREADS < 7
17818	status = pthread_attr_setdetachstate(&attr, &detach);
17819	if( status < 0 ) status = errno;
17820#else
17821	status = pthread_attr_setdetachstate(&attr, detach);
17822#endif
17823	if( status ) return status;
17824	status = pthread_create( &t, &attr, task, NULL );
17825#if HAVE_PTHREADS < 7
17826	if( status < 0 ) status = errno;
17827#endif
17828	if( status ) return status;
17829#else
17830	/* Draft 4 pthreads */
17831	status = pthread_create( &t, pthread_attr_default, task, NULL );
17832	if( status ) return errno;
17833
17834	/* give thread a chance to complete */
17835	/* it should remain joinable and hence detachable */
17836	sleep( 1 );
17837
17838	status = pthread_detach( &t );
17839	if( status ) return errno;
17840#endif
17841
17842#ifdef HAVE_LINUX_THREADS
17843	pthread_kill_other_threads_np();
17844#endif
17845
17846	return 0;
17847
17848  ;
17849  return 0;
17850}
17851_ACEOF
17852if ac_fn_c_try_link "$LINENO"; then :
17853  ol_cv_pthread_lpthread=yes
17854else
17855  ol_cv_pthread_lpthread=no
17856fi
17857rm -f core conftest.err conftest.$ac_objext \
17858    conftest$ac_exeext conftest.$ac_ext
17859else
17860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17861/* end confdefs.h.  */
17862
17863/* pthread test headers */
17864#include <pthread.h>
17865#if HAVE_PTHREADS < 7
17866#include <errno.h>
17867#endif
17868#ifndef NULL
17869#define NULL (void*)0
17870#endif
17871
17872static void *task(p)
17873	void *p;
17874{
17875	return (void *) (p == NULL);
17876}
17877
17878
17879int main(argc, argv)
17880	int argc;
17881	char **argv;
17882{
17883
17884	/* pthread test function */
17885#ifndef PTHREAD_CREATE_DETACHED
17886#define	PTHREAD_CREATE_DETACHED	1
17887#endif
17888	pthread_t t;
17889	int status;
17890	int detach = PTHREAD_CREATE_DETACHED;
17891
17892#if HAVE_PTHREADS > 4
17893	/* Final pthreads */
17894	pthread_attr_t attr;
17895
17896	status = pthread_attr_init(&attr);
17897	if( status ) return status;
17898
17899#if HAVE_PTHREADS < 7
17900	status = pthread_attr_setdetachstate(&attr, &detach);
17901	if( status < 0 ) status = errno;
17902#else
17903	status = pthread_attr_setdetachstate(&attr, detach);
17904#endif
17905	if( status ) return status;
17906	status = pthread_create( &t, &attr, task, NULL );
17907#if HAVE_PTHREADS < 7
17908	if( status < 0 ) status = errno;
17909#endif
17910	if( status ) return status;
17911#else
17912	/* Draft 4 pthreads */
17913	status = pthread_create( &t, pthread_attr_default, task, NULL );
17914	if( status ) return errno;
17915
17916	/* give thread a chance to complete */
17917	/* it should remain joinable and hence detachable */
17918	sleep( 1 );
17919
17920	status = pthread_detach( &t );
17921	if( status ) return errno;
17922#endif
17923
17924#ifdef HAVE_LINUX_THREADS
17925	pthread_kill_other_threads_np();
17926#endif
17927
17928	return 0;
17929
17930}
17931
17932_ACEOF
17933if ac_fn_c_try_run "$LINENO"; then :
17934  ol_cv_pthread_lpthread=yes
17935else
17936  ol_cv_pthread_lpthread=no
17937fi
17938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17939  conftest.$ac_objext conftest.beam conftest.$ac_ext
17940fi
17941
17942
17943		# restore the LIBS
17944		LIBS="$ol_LIBS"
17945
17946fi
17947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17948$as_echo "$ol_cv_pthread_lpthread" >&6; }
17949
17950	if test $ol_cv_pthread_lpthread = yes ; then
17951		ol_link_pthreads="-lpthread"
17952		ol_link_threads=posix
17953	fi
17954fi
17955
17956		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17957if test "$ol_link_threads" = no ; then
17958	# try -lc_r
17959	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17960$as_echo_n "checking for pthread link with -lc_r... " >&6; }
17961if test "${ol_cv_pthread_lc_r+set}" = set; then :
17962  $as_echo_n "(cached) " >&6
17963else
17964
17965		# save the flags
17966		ol_LIBS="$LIBS"
17967		LIBS="-lc_r $LIBS"
17968
17969		if test "$cross_compiling" = yes; then :
17970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17971/* end confdefs.h.  */
17972
17973/* pthread test headers */
17974#include <pthread.h>
17975#if HAVE_PTHREADS < 7
17976#include <errno.h>
17977#endif
17978#ifndef NULL
17979#define NULL (void*)0
17980#endif
17981
17982static void *task(p)
17983	void *p;
17984{
17985	return (void *) (p == NULL);
17986}
17987
17988int
17989main ()
17990{
17991
17992	/* pthread test function */
17993#ifndef PTHREAD_CREATE_DETACHED
17994#define	PTHREAD_CREATE_DETACHED	1
17995#endif
17996	pthread_t t;
17997	int status;
17998	int detach = PTHREAD_CREATE_DETACHED;
17999
18000#if HAVE_PTHREADS > 4
18001	/* Final pthreads */
18002	pthread_attr_t attr;
18003
18004	status = pthread_attr_init(&attr);
18005	if( status ) return status;
18006
18007#if HAVE_PTHREADS < 7
18008	status = pthread_attr_setdetachstate(&attr, &detach);
18009	if( status < 0 ) status = errno;
18010#else
18011	status = pthread_attr_setdetachstate(&attr, detach);
18012#endif
18013	if( status ) return status;
18014	status = pthread_create( &t, &attr, task, NULL );
18015#if HAVE_PTHREADS < 7
18016	if( status < 0 ) status = errno;
18017#endif
18018	if( status ) return status;
18019#else
18020	/* Draft 4 pthreads */
18021	status = pthread_create( &t, pthread_attr_default, task, NULL );
18022	if( status ) return errno;
18023
18024	/* give thread a chance to complete */
18025	/* it should remain joinable and hence detachable */
18026	sleep( 1 );
18027
18028	status = pthread_detach( &t );
18029	if( status ) return errno;
18030#endif
18031
18032#ifdef HAVE_LINUX_THREADS
18033	pthread_kill_other_threads_np();
18034#endif
18035
18036	return 0;
18037
18038  ;
18039  return 0;
18040}
18041_ACEOF
18042if ac_fn_c_try_link "$LINENO"; then :
18043  ol_cv_pthread_lc_r=yes
18044else
18045  ol_cv_pthread_lc_r=no
18046fi
18047rm -f core conftest.err conftest.$ac_objext \
18048    conftest$ac_exeext conftest.$ac_ext
18049else
18050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18051/* end confdefs.h.  */
18052
18053/* pthread test headers */
18054#include <pthread.h>
18055#if HAVE_PTHREADS < 7
18056#include <errno.h>
18057#endif
18058#ifndef NULL
18059#define NULL (void*)0
18060#endif
18061
18062static void *task(p)
18063	void *p;
18064{
18065	return (void *) (p == NULL);
18066}
18067
18068
18069int main(argc, argv)
18070	int argc;
18071	char **argv;
18072{
18073
18074	/* pthread test function */
18075#ifndef PTHREAD_CREATE_DETACHED
18076#define	PTHREAD_CREATE_DETACHED	1
18077#endif
18078	pthread_t t;
18079	int status;
18080	int detach = PTHREAD_CREATE_DETACHED;
18081
18082#if HAVE_PTHREADS > 4
18083	/* Final pthreads */
18084	pthread_attr_t attr;
18085
18086	status = pthread_attr_init(&attr);
18087	if( status ) return status;
18088
18089#if HAVE_PTHREADS < 7
18090	status = pthread_attr_setdetachstate(&attr, &detach);
18091	if( status < 0 ) status = errno;
18092#else
18093	status = pthread_attr_setdetachstate(&attr, detach);
18094#endif
18095	if( status ) return status;
18096	status = pthread_create( &t, &attr, task, NULL );
18097#if HAVE_PTHREADS < 7
18098	if( status < 0 ) status = errno;
18099#endif
18100	if( status ) return status;
18101#else
18102	/* Draft 4 pthreads */
18103	status = pthread_create( &t, pthread_attr_default, task, NULL );
18104	if( status ) return errno;
18105
18106	/* give thread a chance to complete */
18107	/* it should remain joinable and hence detachable */
18108	sleep( 1 );
18109
18110	status = pthread_detach( &t );
18111	if( status ) return errno;
18112#endif
18113
18114#ifdef HAVE_LINUX_THREADS
18115	pthread_kill_other_threads_np();
18116#endif
18117
18118	return 0;
18119
18120}
18121
18122_ACEOF
18123if ac_fn_c_try_run "$LINENO"; then :
18124  ol_cv_pthread_lc_r=yes
18125else
18126  ol_cv_pthread_lc_r=no
18127fi
18128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18129  conftest.$ac_objext conftest.beam conftest.$ac_ext
18130fi
18131
18132
18133		# restore the LIBS
18134		LIBS="$ol_LIBS"
18135
18136fi
18137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18138$as_echo "$ol_cv_pthread_lc_r" >&6; }
18139
18140	if test $ol_cv_pthread_lc_r = yes ; then
18141		ol_link_pthreads="-lc_r"
18142		ol_link_threads=posix
18143	fi
18144fi
18145
18146
18147		# Pthread try link: -threads (ol_cv_pthread_threads)
18148if test "$ol_link_threads" = no ; then
18149	# try -threads
18150	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18151$as_echo_n "checking for pthread link with -threads... " >&6; }
18152if test "${ol_cv_pthread_threads+set}" = set; then :
18153  $as_echo_n "(cached) " >&6
18154else
18155
18156		# save the flags
18157		ol_LIBS="$LIBS"
18158		LIBS="-threads $LIBS"
18159
18160		if test "$cross_compiling" = yes; then :
18161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18162/* end confdefs.h.  */
18163
18164/* pthread test headers */
18165#include <pthread.h>
18166#if HAVE_PTHREADS < 7
18167#include <errno.h>
18168#endif
18169#ifndef NULL
18170#define NULL (void*)0
18171#endif
18172
18173static void *task(p)
18174	void *p;
18175{
18176	return (void *) (p == NULL);
18177}
18178
18179int
18180main ()
18181{
18182
18183	/* pthread test function */
18184#ifndef PTHREAD_CREATE_DETACHED
18185#define	PTHREAD_CREATE_DETACHED	1
18186#endif
18187	pthread_t t;
18188	int status;
18189	int detach = PTHREAD_CREATE_DETACHED;
18190
18191#if HAVE_PTHREADS > 4
18192	/* Final pthreads */
18193	pthread_attr_t attr;
18194
18195	status = pthread_attr_init(&attr);
18196	if( status ) return status;
18197
18198#if HAVE_PTHREADS < 7
18199	status = pthread_attr_setdetachstate(&attr, &detach);
18200	if( status < 0 ) status = errno;
18201#else
18202	status = pthread_attr_setdetachstate(&attr, detach);
18203#endif
18204	if( status ) return status;
18205	status = pthread_create( &t, &attr, task, NULL );
18206#if HAVE_PTHREADS < 7
18207	if( status < 0 ) status = errno;
18208#endif
18209	if( status ) return status;
18210#else
18211	/* Draft 4 pthreads */
18212	status = pthread_create( &t, pthread_attr_default, task, NULL );
18213	if( status ) return errno;
18214
18215	/* give thread a chance to complete */
18216	/* it should remain joinable and hence detachable */
18217	sleep( 1 );
18218
18219	status = pthread_detach( &t );
18220	if( status ) return errno;
18221#endif
18222
18223#ifdef HAVE_LINUX_THREADS
18224	pthread_kill_other_threads_np();
18225#endif
18226
18227	return 0;
18228
18229  ;
18230  return 0;
18231}
18232_ACEOF
18233if ac_fn_c_try_link "$LINENO"; then :
18234  ol_cv_pthread_threads=yes
18235else
18236  ol_cv_pthread_threads=no
18237fi
18238rm -f core conftest.err conftest.$ac_objext \
18239    conftest$ac_exeext conftest.$ac_ext
18240else
18241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18242/* end confdefs.h.  */
18243
18244/* pthread test headers */
18245#include <pthread.h>
18246#if HAVE_PTHREADS < 7
18247#include <errno.h>
18248#endif
18249#ifndef NULL
18250#define NULL (void*)0
18251#endif
18252
18253static void *task(p)
18254	void *p;
18255{
18256	return (void *) (p == NULL);
18257}
18258
18259
18260int main(argc, argv)
18261	int argc;
18262	char **argv;
18263{
18264
18265	/* pthread test function */
18266#ifndef PTHREAD_CREATE_DETACHED
18267#define	PTHREAD_CREATE_DETACHED	1
18268#endif
18269	pthread_t t;
18270	int status;
18271	int detach = PTHREAD_CREATE_DETACHED;
18272
18273#if HAVE_PTHREADS > 4
18274	/* Final pthreads */
18275	pthread_attr_t attr;
18276
18277	status = pthread_attr_init(&attr);
18278	if( status ) return status;
18279
18280#if HAVE_PTHREADS < 7
18281	status = pthread_attr_setdetachstate(&attr, &detach);
18282	if( status < 0 ) status = errno;
18283#else
18284	status = pthread_attr_setdetachstate(&attr, detach);
18285#endif
18286	if( status ) return status;
18287	status = pthread_create( &t, &attr, task, NULL );
18288#if HAVE_PTHREADS < 7
18289	if( status < 0 ) status = errno;
18290#endif
18291	if( status ) return status;
18292#else
18293	/* Draft 4 pthreads */
18294	status = pthread_create( &t, pthread_attr_default, task, NULL );
18295	if( status ) return errno;
18296
18297	/* give thread a chance to complete */
18298	/* it should remain joinable and hence detachable */
18299	sleep( 1 );
18300
18301	status = pthread_detach( &t );
18302	if( status ) return errno;
18303#endif
18304
18305#ifdef HAVE_LINUX_THREADS
18306	pthread_kill_other_threads_np();
18307#endif
18308
18309	return 0;
18310
18311}
18312
18313_ACEOF
18314if ac_fn_c_try_run "$LINENO"; then :
18315  ol_cv_pthread_threads=yes
18316else
18317  ol_cv_pthread_threads=no
18318fi
18319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18320  conftest.$ac_objext conftest.beam conftest.$ac_ext
18321fi
18322
18323
18324		# restore the LIBS
18325		LIBS="$ol_LIBS"
18326
18327fi
18328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18329$as_echo "$ol_cv_pthread_threads" >&6; }
18330
18331	if test $ol_cv_pthread_threads = yes ; then
18332		ol_link_pthreads="-threads"
18333		ol_link_threads=posix
18334	fi
18335fi
18336
18337
18338		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18339if test "$ol_link_threads" = no ; then
18340	# try -lpthreads -lmach -lexc -lc_r
18341	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18342$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18343if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18344  $as_echo_n "(cached) " >&6
18345else
18346
18347		# save the flags
18348		ol_LIBS="$LIBS"
18349		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18350
18351		if test "$cross_compiling" = yes; then :
18352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18353/* end confdefs.h.  */
18354
18355/* pthread test headers */
18356#include <pthread.h>
18357#if HAVE_PTHREADS < 7
18358#include <errno.h>
18359#endif
18360#ifndef NULL
18361#define NULL (void*)0
18362#endif
18363
18364static void *task(p)
18365	void *p;
18366{
18367	return (void *) (p == NULL);
18368}
18369
18370int
18371main ()
18372{
18373
18374	/* pthread test function */
18375#ifndef PTHREAD_CREATE_DETACHED
18376#define	PTHREAD_CREATE_DETACHED	1
18377#endif
18378	pthread_t t;
18379	int status;
18380	int detach = PTHREAD_CREATE_DETACHED;
18381
18382#if HAVE_PTHREADS > 4
18383	/* Final pthreads */
18384	pthread_attr_t attr;
18385
18386	status = pthread_attr_init(&attr);
18387	if( status ) return status;
18388
18389#if HAVE_PTHREADS < 7
18390	status = pthread_attr_setdetachstate(&attr, &detach);
18391	if( status < 0 ) status = errno;
18392#else
18393	status = pthread_attr_setdetachstate(&attr, detach);
18394#endif
18395	if( status ) return status;
18396	status = pthread_create( &t, &attr, task, NULL );
18397#if HAVE_PTHREADS < 7
18398	if( status < 0 ) status = errno;
18399#endif
18400	if( status ) return status;
18401#else
18402	/* Draft 4 pthreads */
18403	status = pthread_create( &t, pthread_attr_default, task, NULL );
18404	if( status ) return errno;
18405
18406	/* give thread a chance to complete */
18407	/* it should remain joinable and hence detachable */
18408	sleep( 1 );
18409
18410	status = pthread_detach( &t );
18411	if( status ) return errno;
18412#endif
18413
18414#ifdef HAVE_LINUX_THREADS
18415	pthread_kill_other_threads_np();
18416#endif
18417
18418	return 0;
18419
18420  ;
18421  return 0;
18422}
18423_ACEOF
18424if ac_fn_c_try_link "$LINENO"; then :
18425  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18426else
18427  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18428fi
18429rm -f core conftest.err conftest.$ac_objext \
18430    conftest$ac_exeext conftest.$ac_ext
18431else
18432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18433/* end confdefs.h.  */
18434
18435/* pthread test headers */
18436#include <pthread.h>
18437#if HAVE_PTHREADS < 7
18438#include <errno.h>
18439#endif
18440#ifndef NULL
18441#define NULL (void*)0
18442#endif
18443
18444static void *task(p)
18445	void *p;
18446{
18447	return (void *) (p == NULL);
18448}
18449
18450
18451int main(argc, argv)
18452	int argc;
18453	char **argv;
18454{
18455
18456	/* pthread test function */
18457#ifndef PTHREAD_CREATE_DETACHED
18458#define	PTHREAD_CREATE_DETACHED	1
18459#endif
18460	pthread_t t;
18461	int status;
18462	int detach = PTHREAD_CREATE_DETACHED;
18463
18464#if HAVE_PTHREADS > 4
18465	/* Final pthreads */
18466	pthread_attr_t attr;
18467
18468	status = pthread_attr_init(&attr);
18469	if( status ) return status;
18470
18471#if HAVE_PTHREADS < 7
18472	status = pthread_attr_setdetachstate(&attr, &detach);
18473	if( status < 0 ) status = errno;
18474#else
18475	status = pthread_attr_setdetachstate(&attr, detach);
18476#endif
18477	if( status ) return status;
18478	status = pthread_create( &t, &attr, task, NULL );
18479#if HAVE_PTHREADS < 7
18480	if( status < 0 ) status = errno;
18481#endif
18482	if( status ) return status;
18483#else
18484	/* Draft 4 pthreads */
18485	status = pthread_create( &t, pthread_attr_default, task, NULL );
18486	if( status ) return errno;
18487
18488	/* give thread a chance to complete */
18489	/* it should remain joinable and hence detachable */
18490	sleep( 1 );
18491
18492	status = pthread_detach( &t );
18493	if( status ) return errno;
18494#endif
18495
18496#ifdef HAVE_LINUX_THREADS
18497	pthread_kill_other_threads_np();
18498#endif
18499
18500	return 0;
18501
18502}
18503
18504_ACEOF
18505if ac_fn_c_try_run "$LINENO"; then :
18506  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18507else
18508  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18509fi
18510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18511  conftest.$ac_objext conftest.beam conftest.$ac_ext
18512fi
18513
18514
18515		# restore the LIBS
18516		LIBS="$ol_LIBS"
18517
18518fi
18519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18520$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18521
18522	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18523		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18524		ol_link_threads=posix
18525	fi
18526fi
18527
18528		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18529if test "$ol_link_threads" = no ; then
18530	# try -lpthreads -lmach -lexc
18531	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18532$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18533if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18534  $as_echo_n "(cached) " >&6
18535else
18536
18537		# save the flags
18538		ol_LIBS="$LIBS"
18539		LIBS="-lpthreads -lmach -lexc $LIBS"
18540
18541		if test "$cross_compiling" = yes; then :
18542  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18543/* end confdefs.h.  */
18544
18545/* pthread test headers */
18546#include <pthread.h>
18547#if HAVE_PTHREADS < 7
18548#include <errno.h>
18549#endif
18550#ifndef NULL
18551#define NULL (void*)0
18552#endif
18553
18554static void *task(p)
18555	void *p;
18556{
18557	return (void *) (p == NULL);
18558}
18559
18560int
18561main ()
18562{
18563
18564	/* pthread test function */
18565#ifndef PTHREAD_CREATE_DETACHED
18566#define	PTHREAD_CREATE_DETACHED	1
18567#endif
18568	pthread_t t;
18569	int status;
18570	int detach = PTHREAD_CREATE_DETACHED;
18571
18572#if HAVE_PTHREADS > 4
18573	/* Final pthreads */
18574	pthread_attr_t attr;
18575
18576	status = pthread_attr_init(&attr);
18577	if( status ) return status;
18578
18579#if HAVE_PTHREADS < 7
18580	status = pthread_attr_setdetachstate(&attr, &detach);
18581	if( status < 0 ) status = errno;
18582#else
18583	status = pthread_attr_setdetachstate(&attr, detach);
18584#endif
18585	if( status ) return status;
18586	status = pthread_create( &t, &attr, task, NULL );
18587#if HAVE_PTHREADS < 7
18588	if( status < 0 ) status = errno;
18589#endif
18590	if( status ) return status;
18591#else
18592	/* Draft 4 pthreads */
18593	status = pthread_create( &t, pthread_attr_default, task, NULL );
18594	if( status ) return errno;
18595
18596	/* give thread a chance to complete */
18597	/* it should remain joinable and hence detachable */
18598	sleep( 1 );
18599
18600	status = pthread_detach( &t );
18601	if( status ) return errno;
18602#endif
18603
18604#ifdef HAVE_LINUX_THREADS
18605	pthread_kill_other_threads_np();
18606#endif
18607
18608	return 0;
18609
18610  ;
18611  return 0;
18612}
18613_ACEOF
18614if ac_fn_c_try_link "$LINENO"; then :
18615  ol_cv_pthread_lpthreads_lmach_lexc=yes
18616else
18617  ol_cv_pthread_lpthreads_lmach_lexc=no
18618fi
18619rm -f core conftest.err conftest.$ac_objext \
18620    conftest$ac_exeext conftest.$ac_ext
18621else
18622  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18623/* end confdefs.h.  */
18624
18625/* pthread test headers */
18626#include <pthread.h>
18627#if HAVE_PTHREADS < 7
18628#include <errno.h>
18629#endif
18630#ifndef NULL
18631#define NULL (void*)0
18632#endif
18633
18634static void *task(p)
18635	void *p;
18636{
18637	return (void *) (p == NULL);
18638}
18639
18640
18641int main(argc, argv)
18642	int argc;
18643	char **argv;
18644{
18645
18646	/* pthread test function */
18647#ifndef PTHREAD_CREATE_DETACHED
18648#define	PTHREAD_CREATE_DETACHED	1
18649#endif
18650	pthread_t t;
18651	int status;
18652	int detach = PTHREAD_CREATE_DETACHED;
18653
18654#if HAVE_PTHREADS > 4
18655	/* Final pthreads */
18656	pthread_attr_t attr;
18657
18658	status = pthread_attr_init(&attr);
18659	if( status ) return status;
18660
18661#if HAVE_PTHREADS < 7
18662	status = pthread_attr_setdetachstate(&attr, &detach);
18663	if( status < 0 ) status = errno;
18664#else
18665	status = pthread_attr_setdetachstate(&attr, detach);
18666#endif
18667	if( status ) return status;
18668	status = pthread_create( &t, &attr, task, NULL );
18669#if HAVE_PTHREADS < 7
18670	if( status < 0 ) status = errno;
18671#endif
18672	if( status ) return status;
18673#else
18674	/* Draft 4 pthreads */
18675	status = pthread_create( &t, pthread_attr_default, task, NULL );
18676	if( status ) return errno;
18677
18678	/* give thread a chance to complete */
18679	/* it should remain joinable and hence detachable */
18680	sleep( 1 );
18681
18682	status = pthread_detach( &t );
18683	if( status ) return errno;
18684#endif
18685
18686#ifdef HAVE_LINUX_THREADS
18687	pthread_kill_other_threads_np();
18688#endif
18689
18690	return 0;
18691
18692}
18693
18694_ACEOF
18695if ac_fn_c_try_run "$LINENO"; then :
18696  ol_cv_pthread_lpthreads_lmach_lexc=yes
18697else
18698  ol_cv_pthread_lpthreads_lmach_lexc=no
18699fi
18700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18701  conftest.$ac_objext conftest.beam conftest.$ac_ext
18702fi
18703
18704
18705		# restore the LIBS
18706		LIBS="$ol_LIBS"
18707
18708fi
18709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18710$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18711
18712	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18713		ol_link_pthreads="-lpthreads -lmach -lexc"
18714		ol_link_threads=posix
18715	fi
18716fi
18717
18718		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18719if test "$ol_link_threads" = no ; then
18720	# try -lpthreads -lexc
18721	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18722$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18723if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18724  $as_echo_n "(cached) " >&6
18725else
18726
18727		# save the flags
18728		ol_LIBS="$LIBS"
18729		LIBS="-lpthreads -lexc $LIBS"
18730
18731		if test "$cross_compiling" = yes; then :
18732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18733/* end confdefs.h.  */
18734
18735/* pthread test headers */
18736#include <pthread.h>
18737#if HAVE_PTHREADS < 7
18738#include <errno.h>
18739#endif
18740#ifndef NULL
18741#define NULL (void*)0
18742#endif
18743
18744static void *task(p)
18745	void *p;
18746{
18747	return (void *) (p == NULL);
18748}
18749
18750int
18751main ()
18752{
18753
18754	/* pthread test function */
18755#ifndef PTHREAD_CREATE_DETACHED
18756#define	PTHREAD_CREATE_DETACHED	1
18757#endif
18758	pthread_t t;
18759	int status;
18760	int detach = PTHREAD_CREATE_DETACHED;
18761
18762#if HAVE_PTHREADS > 4
18763	/* Final pthreads */
18764	pthread_attr_t attr;
18765
18766	status = pthread_attr_init(&attr);
18767	if( status ) return status;
18768
18769#if HAVE_PTHREADS < 7
18770	status = pthread_attr_setdetachstate(&attr, &detach);
18771	if( status < 0 ) status = errno;
18772#else
18773	status = pthread_attr_setdetachstate(&attr, detach);
18774#endif
18775	if( status ) return status;
18776	status = pthread_create( &t, &attr, task, NULL );
18777#if HAVE_PTHREADS < 7
18778	if( status < 0 ) status = errno;
18779#endif
18780	if( status ) return status;
18781#else
18782	/* Draft 4 pthreads */
18783	status = pthread_create( &t, pthread_attr_default, task, NULL );
18784	if( status ) return errno;
18785
18786	/* give thread a chance to complete */
18787	/* it should remain joinable and hence detachable */
18788	sleep( 1 );
18789
18790	status = pthread_detach( &t );
18791	if( status ) return errno;
18792#endif
18793
18794#ifdef HAVE_LINUX_THREADS
18795	pthread_kill_other_threads_np();
18796#endif
18797
18798	return 0;
18799
18800  ;
18801  return 0;
18802}
18803_ACEOF
18804if ac_fn_c_try_link "$LINENO"; then :
18805  ol_cv_pthread_lpthreads_lexc=yes
18806else
18807  ol_cv_pthread_lpthreads_lexc=no
18808fi
18809rm -f core conftest.err conftest.$ac_objext \
18810    conftest$ac_exeext conftest.$ac_ext
18811else
18812  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18813/* end confdefs.h.  */
18814
18815/* pthread test headers */
18816#include <pthread.h>
18817#if HAVE_PTHREADS < 7
18818#include <errno.h>
18819#endif
18820#ifndef NULL
18821#define NULL (void*)0
18822#endif
18823
18824static void *task(p)
18825	void *p;
18826{
18827	return (void *) (p == NULL);
18828}
18829
18830
18831int main(argc, argv)
18832	int argc;
18833	char **argv;
18834{
18835
18836	/* pthread test function */
18837#ifndef PTHREAD_CREATE_DETACHED
18838#define	PTHREAD_CREATE_DETACHED	1
18839#endif
18840	pthread_t t;
18841	int status;
18842	int detach = PTHREAD_CREATE_DETACHED;
18843
18844#if HAVE_PTHREADS > 4
18845	/* Final pthreads */
18846	pthread_attr_t attr;
18847
18848	status = pthread_attr_init(&attr);
18849	if( status ) return status;
18850
18851#if HAVE_PTHREADS < 7
18852	status = pthread_attr_setdetachstate(&attr, &detach);
18853	if( status < 0 ) status = errno;
18854#else
18855	status = pthread_attr_setdetachstate(&attr, detach);
18856#endif
18857	if( status ) return status;
18858	status = pthread_create( &t, &attr, task, NULL );
18859#if HAVE_PTHREADS < 7
18860	if( status < 0 ) status = errno;
18861#endif
18862	if( status ) return status;
18863#else
18864	/* Draft 4 pthreads */
18865	status = pthread_create( &t, pthread_attr_default, task, NULL );
18866	if( status ) return errno;
18867
18868	/* give thread a chance to complete */
18869	/* it should remain joinable and hence detachable */
18870	sleep( 1 );
18871
18872	status = pthread_detach( &t );
18873	if( status ) return errno;
18874#endif
18875
18876#ifdef HAVE_LINUX_THREADS
18877	pthread_kill_other_threads_np();
18878#endif
18879
18880	return 0;
18881
18882}
18883
18884_ACEOF
18885if ac_fn_c_try_run "$LINENO"; then :
18886  ol_cv_pthread_lpthreads_lexc=yes
18887else
18888  ol_cv_pthread_lpthreads_lexc=no
18889fi
18890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18891  conftest.$ac_objext conftest.beam conftest.$ac_ext
18892fi
18893
18894
18895		# restore the LIBS
18896		LIBS="$ol_LIBS"
18897
18898fi
18899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18900$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18901
18902	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18903		ol_link_pthreads="-lpthreads -lexc"
18904		ol_link_threads=posix
18905	fi
18906fi
18907
18908
18909		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18910if test "$ol_link_threads" = no ; then
18911	# try -lpthreads
18912	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18913$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18914if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18915  $as_echo_n "(cached) " >&6
18916else
18917
18918		# save the flags
18919		ol_LIBS="$LIBS"
18920		LIBS="-lpthreads $LIBS"
18921
18922		if test "$cross_compiling" = yes; then :
18923  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18924/* end confdefs.h.  */
18925
18926/* pthread test headers */
18927#include <pthread.h>
18928#if HAVE_PTHREADS < 7
18929#include <errno.h>
18930#endif
18931#ifndef NULL
18932#define NULL (void*)0
18933#endif
18934
18935static void *task(p)
18936	void *p;
18937{
18938	return (void *) (p == NULL);
18939}
18940
18941int
18942main ()
18943{
18944
18945	/* pthread test function */
18946#ifndef PTHREAD_CREATE_DETACHED
18947#define	PTHREAD_CREATE_DETACHED	1
18948#endif
18949	pthread_t t;
18950	int status;
18951	int detach = PTHREAD_CREATE_DETACHED;
18952
18953#if HAVE_PTHREADS > 4
18954	/* Final pthreads */
18955	pthread_attr_t attr;
18956
18957	status = pthread_attr_init(&attr);
18958	if( status ) return status;
18959
18960#if HAVE_PTHREADS < 7
18961	status = pthread_attr_setdetachstate(&attr, &detach);
18962	if( status < 0 ) status = errno;
18963#else
18964	status = pthread_attr_setdetachstate(&attr, detach);
18965#endif
18966	if( status ) return status;
18967	status = pthread_create( &t, &attr, task, NULL );
18968#if HAVE_PTHREADS < 7
18969	if( status < 0 ) status = errno;
18970#endif
18971	if( status ) return status;
18972#else
18973	/* Draft 4 pthreads */
18974	status = pthread_create( &t, pthread_attr_default, task, NULL );
18975	if( status ) return errno;
18976
18977	/* give thread a chance to complete */
18978	/* it should remain joinable and hence detachable */
18979	sleep( 1 );
18980
18981	status = pthread_detach( &t );
18982	if( status ) return errno;
18983#endif
18984
18985#ifdef HAVE_LINUX_THREADS
18986	pthread_kill_other_threads_np();
18987#endif
18988
18989	return 0;
18990
18991  ;
18992  return 0;
18993}
18994_ACEOF
18995if ac_fn_c_try_link "$LINENO"; then :
18996  ol_cv_pthread_lib_lpthreads=yes
18997else
18998  ol_cv_pthread_lib_lpthreads=no
18999fi
19000rm -f core conftest.err conftest.$ac_objext \
19001    conftest$ac_exeext conftest.$ac_ext
19002else
19003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19004/* end confdefs.h.  */
19005
19006/* pthread test headers */
19007#include <pthread.h>
19008#if HAVE_PTHREADS < 7
19009#include <errno.h>
19010#endif
19011#ifndef NULL
19012#define NULL (void*)0
19013#endif
19014
19015static void *task(p)
19016	void *p;
19017{
19018	return (void *) (p == NULL);
19019}
19020
19021
19022int main(argc, argv)
19023	int argc;
19024	char **argv;
19025{
19026
19027	/* pthread test function */
19028#ifndef PTHREAD_CREATE_DETACHED
19029#define	PTHREAD_CREATE_DETACHED	1
19030#endif
19031	pthread_t t;
19032	int status;
19033	int detach = PTHREAD_CREATE_DETACHED;
19034
19035#if HAVE_PTHREADS > 4
19036	/* Final pthreads */
19037	pthread_attr_t attr;
19038
19039	status = pthread_attr_init(&attr);
19040	if( status ) return status;
19041
19042#if HAVE_PTHREADS < 7
19043	status = pthread_attr_setdetachstate(&attr, &detach);
19044	if( status < 0 ) status = errno;
19045#else
19046	status = pthread_attr_setdetachstate(&attr, detach);
19047#endif
19048	if( status ) return status;
19049	status = pthread_create( &t, &attr, task, NULL );
19050#if HAVE_PTHREADS < 7
19051	if( status < 0 ) status = errno;
19052#endif
19053	if( status ) return status;
19054#else
19055	/* Draft 4 pthreads */
19056	status = pthread_create( &t, pthread_attr_default, task, NULL );
19057	if( status ) return errno;
19058
19059	/* give thread a chance to complete */
19060	/* it should remain joinable and hence detachable */
19061	sleep( 1 );
19062
19063	status = pthread_detach( &t );
19064	if( status ) return errno;
19065#endif
19066
19067#ifdef HAVE_LINUX_THREADS
19068	pthread_kill_other_threads_np();
19069#endif
19070
19071	return 0;
19072
19073}
19074
19075_ACEOF
19076if ac_fn_c_try_run "$LINENO"; then :
19077  ol_cv_pthread_lib_lpthreads=yes
19078else
19079  ol_cv_pthread_lib_lpthreads=no
19080fi
19081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19082  conftest.$ac_objext conftest.beam conftest.$ac_ext
19083fi
19084
19085
19086		# restore the LIBS
19087		LIBS="$ol_LIBS"
19088
19089fi
19090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19091$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19092
19093	if test $ol_cv_pthread_lib_lpthreads = yes ; then
19094		ol_link_pthreads="-lpthreads"
19095		ol_link_threads=posix
19096	fi
19097fi
19098
19099
19100		if test $ol_link_threads != no ; then
19101			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19102
19103						save_CPPFLAGS="$CPPFLAGS"
19104			save_LIBS="$LIBS"
19105			LIBS="$LTHREAD_LIBS $LIBS"
19106
19107												for ac_func in sched_yield pthread_yield thr_yield
19108do :
19109  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19110ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19111eval as_val=\$$as_ac_var
19112   if test "x$as_val" = x""yes; then :
19113  cat >>confdefs.h <<_ACEOF
19114#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19115_ACEOF
19116
19117fi
19118done
19119
19120
19121			if test $ac_cv_func_sched_yield = no &&
19122			   test $ac_cv_func_pthread_yield = no &&
19123			   test $ac_cv_func_thr_yield = no ; then
19124								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19125$as_echo_n "checking for sched_yield in -lrt... " >&6; }
19126if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19127  $as_echo_n "(cached) " >&6
19128else
19129  ac_check_lib_save_LIBS=$LIBS
19130LIBS="-lrt  $LIBS"
19131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19132/* end confdefs.h.  */
19133
19134/* Override any GCC internal prototype to avoid an error.
19135   Use char because int might match the return type of a GCC
19136   builtin and then its argument prototype would still apply.  */
19137#ifdef __cplusplus
19138extern "C"
19139#endif
19140char sched_yield ();
19141int
19142main ()
19143{
19144return sched_yield ();
19145  ;
19146  return 0;
19147}
19148_ACEOF
19149if ac_fn_c_try_link "$LINENO"; then :
19150  ac_cv_lib_rt_sched_yield=yes
19151else
19152  ac_cv_lib_rt_sched_yield=no
19153fi
19154rm -f core conftest.err conftest.$ac_objext \
19155    conftest$ac_exeext conftest.$ac_ext
19156LIBS=$ac_check_lib_save_LIBS
19157fi
19158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19159$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19160if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19161  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19162
19163$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19164
19165					ac_cv_func_sched_yield=yes
19166else
19167  ac_cv_func_sched_yield=no
19168fi
19169
19170			fi
19171			if test $ac_cv_func_sched_yield = no &&
19172			   test $ac_cv_func_pthread_yield = no &&
19173			   test "$ac_cv_func_thr_yield" = no ; then
19174				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19175$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19176			fi
19177
19178						for ac_func in pthread_kill
19179do :
19180  ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19181if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19182  cat >>confdefs.h <<_ACEOF
19183#define HAVE_PTHREAD_KILL 1
19184_ACEOF
19185
19186fi
19187done
19188
19189
19190									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19191$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19192if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19193  $as_echo_n "(cached) " >&6
19194else
19195
19196								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19197/* end confdefs.h.  */
19198
19199#include <pthread.h>
19200pthread_rwlock_t rwlock;
19201
19202int
19203main ()
19204{
19205pthread_rwlock_destroy(&rwlock);
19206  ;
19207  return 0;
19208}
19209_ACEOF
19210if ac_fn_c_try_link "$LINENO"; then :
19211  ol_cv_func_pthread_rwlock_destroy=yes
19212else
19213  ol_cv_func_pthread_rwlock_destroy=no
19214fi
19215rm -f core conftest.err conftest.$ac_objext \
19216    conftest$ac_exeext conftest.$ac_ext
19217
19218fi
19219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19220$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19221			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19222
19223$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19224
19225			fi
19226
19227									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19228$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19229if test "${ol_cv_func_pthread_detach+set}" = set; then :
19230  $as_echo_n "(cached) " >&6
19231else
19232
19233								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19234/* end confdefs.h.  */
19235
19236#include <pthread.h>
19237#ifndef NULL
19238#define NULL (void*)0
19239#endif
19240
19241int
19242main ()
19243{
19244pthread_detach(NULL);
19245  ;
19246  return 0;
19247}
19248_ACEOF
19249if ac_fn_c_try_link "$LINENO"; then :
19250  ol_cv_func_pthread_detach=yes
19251else
19252  ol_cv_func_pthread_detach=no
19253fi
19254rm -f core conftest.err conftest.$ac_objext \
19255    conftest$ac_exeext conftest.$ac_ext
19256
19257fi
19258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19259$as_echo "$ol_cv_func_pthread_detach" >&6; }
19260
19261			if test $ol_cv_func_pthread_detach = no ; then
19262				as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19263			fi
19264
19265
19266$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19267
19268
19269						for ac_func in \
19270				pthread_setconcurrency \
19271				pthread_getconcurrency \
19272				thr_setconcurrency \
19273				thr_getconcurrency \
19274
19275do :
19276  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19277ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19278eval as_val=\$$as_ac_var
19279   if test "x$as_val" = x""yes; then :
19280  cat >>confdefs.h <<_ACEOF
19281#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19282_ACEOF
19283
19284fi
19285done
19286
19287
19288
19289	for ac_func in pthread_kill_other_threads_np
19290do :
19291  ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19292if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19293  cat >>confdefs.h <<_ACEOF
19294#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19295_ACEOF
19296
19297fi
19298done
19299
19300	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19301$as_echo_n "checking for LinuxThreads implementation... " >&6; }
19302if test "${ol_cv_sys_linux_threads+set}" = set; then :
19303  $as_echo_n "(cached) " >&6
19304else
19305  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19306fi
19307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19308$as_echo "$ol_cv_sys_linux_threads" >&6; }
19309
19310
19311
19312
19313	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19314$as_echo_n "checking for LinuxThreads consistency... " >&6; }
19315if test "${ol_cv_linux_threads+set}" = set; then :
19316  $as_echo_n "(cached) " >&6
19317else
19318
19319		if test $ol_cv_header_linux_threads = yes &&
19320		   test $ol_cv_sys_linux_threads = yes; then
19321			ol_cv_linux_threads=yes
19322		elif test $ol_cv_header_linux_threads = no &&
19323		     test $ol_cv_sys_linux_threads = no; then
19324			ol_cv_linux_threads=no
19325		else
19326			ol_cv_linux_threads=error
19327		fi
19328
19329fi
19330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19331$as_echo "$ol_cv_linux_threads" >&6; }
19332
19333
19334			if test $ol_cv_linux_threads = error; then
19335				as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19336			fi
19337
19338			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19339$as_echo_n "checking if pthread_create() works... " >&6; }
19340if test "${ol_cv_pthread_create_works+set}" = set; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343
19344			if test "$cross_compiling" = yes; then :
19345  				ol_cv_pthread_create_works=yes
19346else
19347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19348/* end confdefs.h.  */
19349
19350/* pthread test headers */
19351#include <pthread.h>
19352#if HAVE_PTHREADS < 7
19353#include <errno.h>
19354#endif
19355#ifndef NULL
19356#define NULL (void*)0
19357#endif
19358
19359static void *task(p)
19360	void *p;
19361{
19362	return (void *) (p == NULL);
19363}
19364
19365
19366int main(argc, argv)
19367	int argc;
19368	char **argv;
19369{
19370
19371	/* pthread test function */
19372#ifndef PTHREAD_CREATE_DETACHED
19373#define	PTHREAD_CREATE_DETACHED	1
19374#endif
19375	pthread_t t;
19376	int status;
19377	int detach = PTHREAD_CREATE_DETACHED;
19378
19379#if HAVE_PTHREADS > 4
19380	/* Final pthreads */
19381	pthread_attr_t attr;
19382
19383	status = pthread_attr_init(&attr);
19384	if( status ) return status;
19385
19386#if HAVE_PTHREADS < 7
19387	status = pthread_attr_setdetachstate(&attr, &detach);
19388	if( status < 0 ) status = errno;
19389#else
19390	status = pthread_attr_setdetachstate(&attr, detach);
19391#endif
19392	if( status ) return status;
19393	status = pthread_create( &t, &attr, task, NULL );
19394#if HAVE_PTHREADS < 7
19395	if( status < 0 ) status = errno;
19396#endif
19397	if( status ) return status;
19398#else
19399	/* Draft 4 pthreads */
19400	status = pthread_create( &t, pthread_attr_default, task, NULL );
19401	if( status ) return errno;
19402
19403	/* give thread a chance to complete */
19404	/* it should remain joinable and hence detachable */
19405	sleep( 1 );
19406
19407	status = pthread_detach( &t );
19408	if( status ) return errno;
19409#endif
19410
19411#ifdef HAVE_LINUX_THREADS
19412	pthread_kill_other_threads_np();
19413#endif
19414
19415	return 0;
19416
19417}
19418
19419_ACEOF
19420if ac_fn_c_try_run "$LINENO"; then :
19421  ol_cv_pthread_create_works=yes
19422else
19423  ol_cv_pthread_create_works=no
19424fi
19425rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19426  conftest.$ac_objext conftest.beam conftest.$ac_ext
19427fi
19428
19429fi
19430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19431$as_echo "$ol_cv_pthread_create_works" >&6; }
19432
19433			if test $ol_cv_pthread_create_works = no ; then
19434				as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19435			fi
19436
19437			ol_replace_broken_yield=no
19438
19439			if test $ol_replace_broken_yield = yes ; then
19440
19441$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19442
19443			fi
19444
19445						if test $ol_with_yielding_select = auto ; then
19446				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19447$as_echo_n "checking if select yields when using pthreads... " >&6; }
19448if test "${ol_cv_pthread_select_yields+set}" = set; then :
19449  $as_echo_n "(cached) " >&6
19450else
19451
19452				if test "$cross_compiling" = yes; then :
19453  ol_cv_pthread_select_yields=cross
19454else
19455  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19456/* end confdefs.h.  */
19457
19458#include <sys/types.h>
19459#include <sys/time.h>
19460#include <unistd.h>
19461#include <pthread.h>
19462#ifndef NULL
19463#define NULL (void*) 0
19464#endif
19465
19466static int fildes[2];
19467
19468static void *task(p)
19469	void *p;
19470{
19471	int i;
19472	struct timeval tv;
19473
19474	fd_set rfds;
19475
19476	tv.tv_sec=10;
19477	tv.tv_usec=0;
19478
19479	FD_ZERO(&rfds);
19480	FD_SET(fildes[0], &rfds);
19481
19482	/* we're not interested in any fds */
19483	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19484
19485	if(i < 0) {
19486		perror("select");
19487		exit(10);
19488	}
19489
19490	exit(0); /* if we exit here, the select blocked the whole process */
19491}
19492
19493int main(argc, argv)
19494	int argc;
19495	char **argv;
19496{
19497	pthread_t t;
19498
19499	/* create a pipe to select */
19500	if(pipe(&fildes[0])) {
19501		perror("select");
19502		exit(1);
19503	}
19504
19505#ifdef HAVE_PTHREAD_SETCONCURRENCY
19506	(void) pthread_setconcurrency(2);
19507#else
19508#ifdef HAVE_THR_SETCONCURRENCY
19509	/* Set Solaris LWP concurrency to 2 */
19510	thr_setconcurrency(2);
19511#endif
19512#endif
19513
19514#if HAVE_PTHREADS < 6
19515	pthread_create(&t, pthread_attr_default, task, NULL);
19516#else
19517	pthread_create(&t, NULL, task, NULL);
19518#endif
19519
19520	/* make sure task runs first */
19521#ifdef HAVE_THR_YIELD
19522	thr_yield();
19523#elif defined( HAVE_SCHED_YIELD )
19524	sched_yield();
19525#elif defined( HAVE_PTHREAD_YIELD )
19526	pthread_yield();
19527#endif
19528
19529	exit(2);
19530}
19531_ACEOF
19532if ac_fn_c_try_run "$LINENO"; then :
19533  ol_cv_pthread_select_yields=no
19534else
19535  ol_cv_pthread_select_yields=yes
19536fi
19537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19538  conftest.$ac_objext conftest.beam conftest.$ac_ext
19539fi
19540
19541fi
19542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19543$as_echo "$ol_cv_pthread_select_yields" >&6; }
19544
19545				if test $ol_cv_pthread_select_yields = cross ; then
19546					as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19547				fi
19548
19549				if test $ol_cv_pthread_select_yields = yes ; then
19550					ol_with_yielding_select=yes
19551				fi
19552			fi
19553
19554						CPPFLAGS="$save_CPPFLAGS"
19555			LIBS="$save_LIBS"
19556		else
19557			as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19558		fi
19559	fi
19560
19561	if test $ol_with_threads = posix ; then
19562		as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19563	fi
19564	;;
19565esac
19566
19567case $ol_with_threads in auto | yes | mach)
19568
19569		for ac_header in mach/cthreads.h cthreads.h
19570do :
19571  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19572ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19573eval as_val=\$$as_ac_Header
19574   if test "x$as_val" = x""yes; then :
19575  cat >>confdefs.h <<_ACEOF
19576#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19577_ACEOF
19578
19579fi
19580
19581done
19582
19583	if test $ac_cv_header_mach_cthreads_h = yes ; then
19584		ol_with_threads=found
19585
19586				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19587if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19588  ol_link_threads=yes
19589fi
19590
19591
19592		if test $ol_link_threads = no ; then
19593									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19594$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19595if test "${ol_cv_cthread_all_load+set}" = set; then :
19596  $as_echo_n "(cached) " >&6
19597else
19598
19599								save_LIBS="$LIBS"
19600				LIBS="-all_load $LIBS"
19601				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19602/* end confdefs.h.  */
19603#include <mach/cthreads.h>
19604int
19605main ()
19606{
19607
19608					cthread_fork((void *)0, (void *)0);
19609
19610  ;
19611  return 0;
19612}
19613_ACEOF
19614if ac_fn_c_try_link "$LINENO"; then :
19615  ol_cv_cthread_all_load=yes
19616else
19617  ol_cv_cthread_all_load=no
19618fi
19619rm -f core conftest.err conftest.$ac_objext \
19620    conftest$ac_exeext conftest.$ac_ext
19621								LIBS="$save_LIBS"
19622
19623fi
19624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19625$as_echo "$ol_cv_cthread_all_load" >&6; }
19626
19627			if test $ol_cv_cthread_all_load = yes ; then
19628				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19629				ol_link_threads=mach
19630				ol_with_threads=found
19631			fi
19632		fi
19633
19634	elif test $ac_cv_header_cthreads_h = yes ; then
19635
19636		ol_with_threads=found
19637
19638				save_LIBS="$LIBS"
19639		LIBS="$LIBS -lthreads"
19640		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19641if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19642  ol_link_threads=yes
19643fi
19644
19645		LIBS="$save_LIBS"
19646
19647		if test $ol_link_threads = yes ; then
19648			LTHREAD_LIBS="-lthreads"
19649			ol_link_threads=mach
19650			ol_with_threads=found
19651		else
19652			as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19653		fi
19654
19655	elif test $ol_with_threads = mach ; then
19656		as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19657	fi
19658
19659	if test $ol_link_threads = mach ; then
19660
19661$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19662
19663	elif test $ol_with_threads = found ; then
19664		as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19665	fi
19666	;;
19667esac
19668
19669case $ol_with_threads in auto | yes | pth)
19670
19671	for ac_header in pth.h
19672do :
19673  ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19674if test "x$ac_cv_header_pth_h" = x""yes; then :
19675  cat >>confdefs.h <<_ACEOF
19676#define HAVE_PTH_H 1
19677_ACEOF
19678
19679fi
19680
19681done
19682
19683
19684	if test $ac_cv_header_pth_h = yes ; then
19685		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19686$as_echo_n "checking for pth_version in -lpth... " >&6; }
19687if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19688  $as_echo_n "(cached) " >&6
19689else
19690  ac_check_lib_save_LIBS=$LIBS
19691LIBS="-lpth  $LIBS"
19692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19693/* end confdefs.h.  */
19694
19695/* Override any GCC internal prototype to avoid an error.
19696   Use char because int might match the return type of a GCC
19697   builtin and then its argument prototype would still apply.  */
19698#ifdef __cplusplus
19699extern "C"
19700#endif
19701char pth_version ();
19702int
19703main ()
19704{
19705return pth_version ();
19706  ;
19707  return 0;
19708}
19709_ACEOF
19710if ac_fn_c_try_link "$LINENO"; then :
19711  ac_cv_lib_pth_pth_version=yes
19712else
19713  ac_cv_lib_pth_pth_version=no
19714fi
19715rm -f core conftest.err conftest.$ac_objext \
19716    conftest$ac_exeext conftest.$ac_ext
19717LIBS=$ac_check_lib_save_LIBS
19718fi
19719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19720$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19721if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19722  have_pth=yes
19723else
19724  have_pth=no
19725fi
19726
19727
19728		if test $have_pth = yes ; then
19729
19730$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19731
19732			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19733			ol_link_threads=pth
19734			ol_with_threads=found
19735
19736			if test $ol_with_yielding_select = auto ; then
19737				ol_with_yielding_select=yes
19738			fi
19739		fi
19740	fi
19741	;;
19742esac
19743
19744case $ol_with_threads in auto | yes | lwp)
19745
19746		for ac_header in thread.h synch.h
19747do :
19748  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19749ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19750eval as_val=\$$as_ac_Header
19751   if test "x$as_val" = x""yes; then :
19752  cat >>confdefs.h <<_ACEOF
19753#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19754_ACEOF
19755
19756fi
19757
19758done
19759
19760	if test $ac_cv_header_thread_h = yes &&
19761	   test $ac_cv_header_synch_h = yes ; then
19762		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19763$as_echo_n "checking for thr_create in -lthread... " >&6; }
19764if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19765  $as_echo_n "(cached) " >&6
19766else
19767  ac_check_lib_save_LIBS=$LIBS
19768LIBS="-lthread  $LIBS"
19769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19770/* end confdefs.h.  */
19771
19772/* Override any GCC internal prototype to avoid an error.
19773   Use char because int might match the return type of a GCC
19774   builtin and then its argument prototype would still apply.  */
19775#ifdef __cplusplus
19776extern "C"
19777#endif
19778char thr_create ();
19779int
19780main ()
19781{
19782return thr_create ();
19783  ;
19784  return 0;
19785}
19786_ACEOF
19787if ac_fn_c_try_link "$LINENO"; then :
19788  ac_cv_lib_thread_thr_create=yes
19789else
19790  ac_cv_lib_thread_thr_create=no
19791fi
19792rm -f core conftest.err conftest.$ac_objext \
19793    conftest$ac_exeext conftest.$ac_ext
19794LIBS=$ac_check_lib_save_LIBS
19795fi
19796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19797$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19798if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19799  have_thr=yes
19800else
19801  have_thr=no
19802fi
19803
19804
19805		if test $have_thr = yes ; then
19806
19807$as_echo "#define HAVE_THR 1" >>confdefs.h
19808
19809			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19810			ol_link_threads=thr
19811
19812			if test $ol_with_yielding_select = auto ; then
19813				ol_with_yielding_select=yes
19814			fi
19815
19816						for ac_func in \
19817				thr_setconcurrency \
19818				thr_getconcurrency \
19819
19820do :
19821  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19822ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19823eval as_val=\$$as_ac_var
19824   if test "x$as_val" = x""yes; then :
19825  cat >>confdefs.h <<_ACEOF
19826#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19827_ACEOF
19828
19829fi
19830done
19831
19832		fi
19833	fi
19834	;;
19835esac
19836
19837if test $ol_with_yielding_select = yes ; then
19838
19839$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19840
19841fi
19842
19843if test $ol_with_threads = manual ; then
19844		ol_link_threads=yes
19845
19846	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19847$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19848
19849	for ac_header in pthread.h sched.h
19850do :
19851  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19852ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19853eval as_val=\$$as_ac_Header
19854   if test "x$as_val" = x""yes; then :
19855  cat >>confdefs.h <<_ACEOF
19856#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19857_ACEOF
19858
19859fi
19860
19861done
19862
19863	for ac_func in sched_yield pthread_yield
19864do :
19865  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19866ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19867eval as_val=\$$as_ac_var
19868   if test "x$as_val" = x""yes; then :
19869  cat >>confdefs.h <<_ACEOF
19870#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19871_ACEOF
19872
19873fi
19874done
19875
19876
19877	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19878$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19879if test "${ol_cv_header_linux_threads+set}" = set; then :
19880  $as_echo_n "(cached) " >&6
19881else
19882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19883/* end confdefs.h.  */
19884#include <pthread.h>
19885_ACEOF
19886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19887  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19888  ol_cv_header_linux_threads=yes
19889else
19890  ol_cv_header_linux_threads=no
19891fi
19892rm -f conftest*
19893
19894
19895fi
19896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19897$as_echo "$ol_cv_header_linux_threads" >&6; }
19898	if test $ol_cv_header_linux_threads = yes; then
19899
19900$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19901
19902	fi
19903
19904
19905	for ac_header in mach/cthreads.h
19906do :
19907  ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19908if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19909  cat >>confdefs.h <<_ACEOF
19910#define HAVE_MACH_CTHREADS_H 1
19911_ACEOF
19912
19913fi
19914
19915done
19916
19917	for ac_header in thread.h synch.h
19918do :
19919  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19920ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19921eval as_val=\$$as_ac_Header
19922   if test "x$as_val" = x""yes; then :
19923  cat >>confdefs.h <<_ACEOF
19924#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19925_ACEOF
19926
19927fi
19928
19929done
19930
19931fi
19932
19933if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19934			$as_echo "#define REENTRANT 1" >>confdefs.h
19935
19936	$as_echo "#define _REENTRANT 1" >>confdefs.h
19937
19938	$as_echo "#define THREAD_SAFE 1" >>confdefs.h
19939
19940	$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19941
19942	$as_echo "#define THREADSAFE 1" >>confdefs.h
19943
19944	$as_echo "#define _THREADSAFE 1" >>confdefs.h
19945
19946	$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19947
19948
19949			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19950$as_echo_n "checking for thread specific errno... " >&6; }
19951if test "${ol_cv_errno_thread_specific+set}" = set; then :
19952  $as_echo_n "(cached) " >&6
19953else
19954
19955		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19956/* end confdefs.h.  */
19957#include <errno.h>
19958int
19959main ()
19960{
19961errno = 0;
19962  ;
19963  return 0;
19964}
19965_ACEOF
19966if ac_fn_c_try_link "$LINENO"; then :
19967  ol_cv_errno_thread_specific=yes
19968else
19969  ol_cv_errno_thread_specific=no
19970fi
19971rm -f core conftest.err conftest.$ac_objext \
19972    conftest$ac_exeext conftest.$ac_ext
19973
19974fi
19975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19976$as_echo "$ol_cv_errno_thread_specific" >&6; }
19977
19978			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19979$as_echo_n "checking for thread specific h_errno... " >&6; }
19980if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
19981  $as_echo_n "(cached) " >&6
19982else
19983
19984		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19985/* end confdefs.h.  */
19986#include <netdb.h>
19987int
19988main ()
19989{
19990h_errno = 0;
19991  ;
19992  return 0;
19993}
19994_ACEOF
19995if ac_fn_c_try_link "$LINENO"; then :
19996  ol_cv_h_errno_thread_specific=yes
19997else
19998  ol_cv_h_errno_thread_specific=no
19999fi
20000rm -f core conftest.err conftest.$ac_objext \
20001    conftest$ac_exeext conftest.$ac_ext
20002
20003fi
20004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
20005$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
20006
20007	if test $ol_cv_errno_thread_specific != yes ||
20008	   test $ol_cv_h_errno_thread_specific != yes ; then
20009		LIBS="$LTHREAD_LIBS $LIBS"
20010		LTHREAD_LIBS=""
20011	fi
20012
20013fi
20014
20015if test $ol_link_threads = no ; then
20016	if test $ol_with_threads = yes ; then
20017		as_fn_error "no suitable thread support" "$LINENO" 5
20018	fi
20019
20020	if test $ol_with_threads = auto ; then
20021		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20022$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20023		ol_with_threads=no
20024	fi
20025
20026
20027$as_echo "#define NO_THREADS 1" >>confdefs.h
20028
20029	LTHREAD_LIBS=""
20030	BUILD_THREAD=no
20031else
20032	BUILD_THREAD=yes
20033fi
20034
20035if test $ol_link_threads != no ; then
20036
20037$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20038
20039fi
20040
20041for ac_func in \
20042	ctime_r			\
20043	gmtime_r localtime_r \
20044	gethostbyname_r	gethostbyaddr_r \
20045
20046do :
20047  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20048ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20049eval as_val=\$$as_ac_var
20050   if test "x$as_val" = x""yes; then :
20051  cat >>confdefs.h <<_ACEOF
20052#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20053_ACEOF
20054
20055fi
20056done
20057
20058
20059if test "$ac_cv_func_ctime_r" = no ; then
20060	ol_cv_func_ctime_r_nargs=0
20061else
20062	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20063$as_echo_n "checking number of arguments of ctime_r... " >&6; }
20064if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20065  $as_echo_n "(cached) " >&6
20066else
20067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20068/* end confdefs.h.  */
20069#include <time.h>
20070int
20071main ()
20072{
20073time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20074  ;
20075  return 0;
20076}
20077_ACEOF
20078if ac_fn_c_try_compile "$LINENO"; then :
20079  ol_cv_func_ctime_r_nargs3=yes
20080else
20081  ol_cv_func_ctime_r_nargs3=no
20082fi
20083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20084
20085	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20086/* end confdefs.h.  */
20087#include <time.h>
20088int
20089main ()
20090{
20091time_t ti; char *buffer; ctime_r(&ti,buffer);
20092  ;
20093  return 0;
20094}
20095_ACEOF
20096if ac_fn_c_try_compile "$LINENO"; then :
20097  ol_cv_func_ctime_r_nargs2=yes
20098else
20099  ol_cv_func_ctime_r_nargs2=no
20100fi
20101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20102
20103	if test $ol_cv_func_ctime_r_nargs3 = yes &&
20104	   test $ol_cv_func_ctime_r_nargs2 = no ; then
20105
20106		ol_cv_func_ctime_r_nargs=3
20107
20108	elif test $ol_cv_func_ctime_r_nargs3 = no &&
20109	     test $ol_cv_func_ctime_r_nargs2 = yes ; then
20110
20111		ol_cv_func_ctime_r_nargs=2
20112
20113	else
20114		ol_cv_func_ctime_r_nargs=0
20115	fi
20116
20117fi
20118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20119$as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20120
20121  if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20122
20123cat >>confdefs.h <<_ACEOF
20124#define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20125_ACEOF
20126
20127  fi
20128
20129fi
20130
20131if test "$ac_cv_func_gethostbyname_r" = yes ; then
20132 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20133$as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20134if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20135  $as_echo_n "(cached) " >&6
20136else
20137  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20138/* end confdefs.h.  */
20139#include <sys/types.h>
20140#include <sys/socket.h>
20141#include <netinet/in.h>
20142#include <netdb.h>
20143#define BUFSIZE (sizeof(struct hostent)+10)
20144int
20145main ()
20146{
20147struct hostent hent; char buffer[BUFSIZE];
20148		int bufsize=BUFSIZE;int h_errno;
20149		(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20150			buffer, bufsize, &h_errno);
20151  ;
20152  return 0;
20153}
20154_ACEOF
20155if ac_fn_c_try_compile "$LINENO"; then :
20156  ol_cv_func_gethostbyname_r_nargs5=yes
20157else
20158  ol_cv_func_gethostbyname_r_nargs5=no
20159fi
20160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20161
20162	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20163/* end confdefs.h.  */
20164#include <sys/types.h>
20165#include <sys/socket.h>
20166#include <netinet/in.h>
20167#include <netdb.h>
20168#define BUFSIZE (sizeof(struct hostent)+10)
20169int
20170main ()
20171{
20172struct hostent hent;struct hostent *rhent;
20173		char buffer[BUFSIZE];
20174		int bufsize=BUFSIZE;int h_errno;
20175		(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20176			&rhent, &h_errno);
20177  ;
20178  return 0;
20179}
20180_ACEOF
20181if ac_fn_c_try_compile "$LINENO"; then :
20182  ol_cv_func_gethostbyname_r_nargs6=yes
20183else
20184  ol_cv_func_gethostbyname_r_nargs6=no
20185fi
20186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20187
20188	if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20189	   test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20190
20191		ol_cv_func_gethostbyname_r_nargs=5
20192
20193	elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20194	     test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20195
20196		ol_cv_func_gethostbyname_r_nargs=6
20197
20198	else
20199		ol_cv_func_gethostbyname_r_nargs=0
20200	fi
20201
20202fi
20203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20204$as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20205  if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20206
20207cat >>confdefs.h <<_ACEOF
20208#define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20209_ACEOF
20210
20211  fi
20212
20213else
20214 	ol_cv_func_gethostbyname_r_nargs=0
20215fi
20216
20217if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20218 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20219$as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20220if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20221  $as_echo_n "(cached) " >&6
20222else
20223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20224/* end confdefs.h.  */
20225#include <sys/types.h>
20226#include <sys/socket.h>
20227#include <netinet/in.h>
20228#include <netdb.h>
20229#define BUFSIZE (sizeof(struct hostent)+10)
20230int
20231main ()
20232{
20233struct hostent hent; char buffer[BUFSIZE];
20234	    struct in_addr add;
20235	    size_t alen=sizeof(struct in_addr);
20236	    int bufsize=BUFSIZE;int h_errno;
20237		(void)gethostbyaddr_r( (void *)&(add.s_addr),
20238			alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20239  ;
20240  return 0;
20241}
20242_ACEOF
20243if ac_fn_c_try_compile "$LINENO"; then :
20244  ol_cv_func_gethostbyaddr_r_nargs7=yes
20245else
20246  ol_cv_func_gethostbyaddr_r_nargs7=no
20247fi
20248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20249
20250	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20251/* end confdefs.h.  */
20252#include <sys/types.h>
20253#include <sys/socket.h>
20254#include <netinet/in.h>
20255#include <netdb.h>
20256#define BUFSIZE (sizeof(struct hostent)+10)
20257int
20258main ()
20259{
20260struct hostent hent;
20261		struct hostent *rhent; char buffer[BUFSIZE];
20262		struct in_addr add;
20263		size_t alen=sizeof(struct in_addr);
20264		int bufsize=BUFSIZE;int h_errno;
20265		(void)gethostbyaddr_r( (void *)&(add.s_addr),
20266			alen, AF_INET, &hent, buffer, bufsize,
20267			&rhent, &h_errno);
20268  ;
20269  return 0;
20270}
20271_ACEOF
20272if ac_fn_c_try_compile "$LINENO"; then :
20273  ol_cv_func_gethostbyaddr_r_nargs8=yes
20274else
20275  ol_cv_func_gethostbyaddr_r_nargs8=no
20276fi
20277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20278
20279	if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20280	   test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20281
20282		ol_cv_func_gethostbyaddr_r_nargs=7
20283
20284	elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20285	     test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20286
20287		ol_cv_func_gethostbyaddr_r_nargs=8
20288
20289	else
20290		ol_cv_func_gethostbyaddr_r_nargs=0
20291	fi
20292
20293fi
20294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20295$as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20296  if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20297
20298cat >>confdefs.h <<_ACEOF
20299#define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20300_ACEOF
20301
20302  fi
20303
20304else
20305 	ol_cv_func_gethostbyaddr_r_nargs=0
20306fi
20307
20308ol_link_bdb=no
20309
20310if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20311	ol_cv_berkeley_db=no
20312for ac_header in db.h
20313do :
20314  ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20315if test "x$ac_cv_header_db_h" = x""yes; then :
20316  cat >>confdefs.h <<_ACEOF
20317#define HAVE_DB_H 1
20318_ACEOF
20319
20320fi
20321
20322done
20323
20324if test $ac_cv_header_db_h = yes; then
20325	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20326$as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20327if test "${ol_cv_bdb_major+set}" = set; then :
20328  $as_echo_n "(cached) " >&6
20329else
20330
20331	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20332/* end confdefs.h.  */
20333
20334#include <db.h>
20335#ifndef DB_VERSION_MAJOR
20336#	define DB_VERSION_MAJOR 1
20337#endif
20338__db_version DB_VERSION_MAJOR
20339
20340_ACEOF
20341	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20342	ol_cv_bdb_major=${3}
20343
20344fi
20345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20346$as_echo "$ol_cv_bdb_major" >&6; }
20347case $ol_cv_bdb_major in [1-9]*) : ;; *)
20348	as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20349esac
20350
20351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20352$as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20353if test "${ol_cv_bdb_minor+set}" = set; then :
20354  $as_echo_n "(cached) " >&6
20355else
20356
20357	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20358/* end confdefs.h.  */
20359
20360#include <db.h>
20361#ifndef DB_VERSION_MINOR
20362#	define DB_VERSION_MINOR 0
20363#endif
20364__db_version DB_VERSION_MINOR
20365
20366_ACEOF
20367	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20368	ol_cv_bdb_minor=${3}
20369
20370fi
20371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20372$as_echo "$ol_cv_bdb_minor" >&6; }
20373case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20374	as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20375esac
20376
20377	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20378$as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20379if test "${ol_cv_bdb_compat+set}" = set; then :
20380  $as_echo_n "(cached) " >&6
20381else
20382
20383	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20384/* end confdefs.h.  */
20385
20386#include <db.h>
20387
20388 /* this check could be improved */
20389#ifndef DB_VERSION_MAJOR
20390#	define DB_VERSION_MAJOR 1
20391#endif
20392#ifndef DB_VERSION_MINOR
20393#	define DB_VERSION_MINOR 0
20394#endif
20395#ifndef DB_VERSION_PATCH
20396#      define DB_VERSION_PATCH 0
20397#endif
20398
20399#define DB_VERSION_FULL        ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20400
20401/* require 4.4 or later, but less than 6.0.20 */
20402#if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20403	__db_version_compat
20404#endif
20405#if DB_VERSION_FULL >= 0x060014
20406#error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20407#endif
20408
20409_ACEOF
20410if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20411  $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20412  ol_cv_bdb_compat=yes
20413else
20414  ol_cv_bdb_compat=no
20415fi
20416rm -f conftest*
20417
20418fi
20419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20420$as_echo "$ol_cv_bdb_compat" >&6; }
20421
20422
20423	if test $ol_cv_bdb_compat != yes ; then
20424		as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20425	fi
20426
20427	ol_cv_lib_db=no
20428
20429if test $ol_cv_bdb_major = 5 ; then
20430	if test $ol_cv_lib_db = no ; then
20431	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20432$as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20433if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20434  $as_echo_n "(cached) " >&6
20435else
20436
20437	ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20438	ol_LIBS=$LIBS
20439	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20440
20441	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20442/* end confdefs.h.  */
20443
20444#ifdef HAVE_DB_185_H
20445# include <db_185.h>
20446#else
20447# include <db.h>
20448#endif
20449
20450#ifndef DB_VERSION_MAJOR
20451# define DB_VERSION_MAJOR 1
20452#endif
20453
20454#ifndef NULL
20455#define NULL ((void*)0)
20456#endif
20457
20458int
20459main ()
20460{
20461
20462#if DB_VERSION_MAJOR > 2
20463	db_env_create( NULL, 0 );
20464#elif DB_VERSION_MAJOR > 1
20465	db_appexit( NULL );
20466#else
20467	(void) dbopen( NULL, 0, 0, 0, NULL);
20468#endif
20469
20470  ;
20471  return 0;
20472}
20473_ACEOF
20474if ac_fn_c_try_link "$LINENO"; then :
20475  ol_cv_db_db_5_dot_m=yes
20476else
20477  ol_cv_db_db_5_dot_m=no
20478fi
20479rm -f core conftest.err conftest.$ac_objext \
20480    conftest$ac_exeext conftest.$ac_ext
20481
20482	LIBS="$ol_LIBS"
20483
20484fi
20485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20486$as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20487
20488	if test $ol_cv_db_db_5_dot_m = yes ; then
20489		ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20490	fi
20491fi
20492
20493	if test $ol_cv_lib_db = no ; then
20494	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20495$as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20496if test "${ol_cv_db_db5m+set}" = set; then :
20497  $as_echo_n "(cached) " >&6
20498else
20499
20500	ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20501	ol_LIBS=$LIBS
20502	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20503
20504	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20505/* end confdefs.h.  */
20506
20507#ifdef HAVE_DB_185_H
20508# include <db_185.h>
20509#else
20510# include <db.h>
20511#endif
20512
20513#ifndef DB_VERSION_MAJOR
20514# define DB_VERSION_MAJOR 1
20515#endif
20516
20517#ifndef NULL
20518#define NULL ((void*)0)
20519#endif
20520
20521int
20522main ()
20523{
20524
20525#if DB_VERSION_MAJOR > 2
20526	db_env_create( NULL, 0 );
20527#elif DB_VERSION_MAJOR > 1
20528	db_appexit( NULL );
20529#else
20530	(void) dbopen( NULL, 0, 0, 0, NULL);
20531#endif
20532
20533  ;
20534  return 0;
20535}
20536_ACEOF
20537if ac_fn_c_try_link "$LINENO"; then :
20538  ol_cv_db_db5m=yes
20539else
20540  ol_cv_db_db5m=no
20541fi
20542rm -f core conftest.err conftest.$ac_objext \
20543    conftest$ac_exeext conftest.$ac_ext
20544
20545	LIBS="$ol_LIBS"
20546
20547fi
20548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20549$as_echo "$ol_cv_db_db5m" >&6; }
20550
20551	if test $ol_cv_db_db5m = yes ; then
20552		ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20553	fi
20554fi
20555
20556	if test $ol_cv_lib_db = no ; then
20557	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20558$as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20559if test "${ol_cv_db_db_5m+set}" = set; then :
20560  $as_echo_n "(cached) " >&6
20561else
20562
20563	ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20564	ol_LIBS=$LIBS
20565	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20566
20567	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20568/* end confdefs.h.  */
20569
20570#ifdef HAVE_DB_185_H
20571# include <db_185.h>
20572#else
20573# include <db.h>
20574#endif
20575
20576#ifndef DB_VERSION_MAJOR
20577# define DB_VERSION_MAJOR 1
20578#endif
20579
20580#ifndef NULL
20581#define NULL ((void*)0)
20582#endif
20583
20584int
20585main ()
20586{
20587
20588#if DB_VERSION_MAJOR > 2
20589	db_env_create( NULL, 0 );
20590#elif DB_VERSION_MAJOR > 1
20591	db_appexit( NULL );
20592#else
20593	(void) dbopen( NULL, 0, 0, 0, NULL);
20594#endif
20595
20596  ;
20597  return 0;
20598}
20599_ACEOF
20600if ac_fn_c_try_link "$LINENO"; then :
20601  ol_cv_db_db_5m=yes
20602else
20603  ol_cv_db_db_5m=no
20604fi
20605rm -f core conftest.err conftest.$ac_objext \
20606    conftest$ac_exeext conftest.$ac_ext
20607
20608	LIBS="$ol_LIBS"
20609
20610fi
20611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20612$as_echo "$ol_cv_db_db_5m" >&6; }
20613
20614	if test $ol_cv_db_db_5m = yes ; then
20615		ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20616	fi
20617fi
20618
20619	if test $ol_cv_lib_db = no ; then
20620	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20621$as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20622if test "${ol_cv_db_db_5_m+set}" = set; then :
20623  $as_echo_n "(cached) " >&6
20624else
20625
20626	ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20627	ol_LIBS=$LIBS
20628	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20629
20630	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20631/* end confdefs.h.  */
20632
20633#ifdef HAVE_DB_185_H
20634# include <db_185.h>
20635#else
20636# include <db.h>
20637#endif
20638
20639#ifndef DB_VERSION_MAJOR
20640# define DB_VERSION_MAJOR 1
20641#endif
20642
20643#ifndef NULL
20644#define NULL ((void*)0)
20645#endif
20646
20647int
20648main ()
20649{
20650
20651#if DB_VERSION_MAJOR > 2
20652	db_env_create( NULL, 0 );
20653#elif DB_VERSION_MAJOR > 1
20654	db_appexit( NULL );
20655#else
20656	(void) dbopen( NULL, 0, 0, 0, NULL);
20657#endif
20658
20659  ;
20660  return 0;
20661}
20662_ACEOF
20663if ac_fn_c_try_link "$LINENO"; then :
20664  ol_cv_db_db_5_m=yes
20665else
20666  ol_cv_db_db_5_m=no
20667fi
20668rm -f core conftest.err conftest.$ac_objext \
20669    conftest$ac_exeext conftest.$ac_ext
20670
20671	LIBS="$ol_LIBS"
20672
20673fi
20674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20675$as_echo "$ol_cv_db_db_5_m" >&6; }
20676
20677	if test $ol_cv_db_db_5_m = yes ; then
20678		ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20679	fi
20680fi
20681
20682	if test $ol_cv_lib_db = no ; then
20683	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20684$as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20685if test "${ol_cv_db_db_5+set}" = set; then :
20686  $as_echo_n "(cached) " >&6
20687else
20688
20689	ol_DB_LIB=-ldb-5
20690	ol_LIBS=$LIBS
20691	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20692
20693	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20694/* end confdefs.h.  */
20695
20696#ifdef HAVE_DB_185_H
20697# include <db_185.h>
20698#else
20699# include <db.h>
20700#endif
20701
20702#ifndef DB_VERSION_MAJOR
20703# define DB_VERSION_MAJOR 1
20704#endif
20705
20706#ifndef NULL
20707#define NULL ((void*)0)
20708#endif
20709
20710int
20711main ()
20712{
20713
20714#if DB_VERSION_MAJOR > 2
20715	db_env_create( NULL, 0 );
20716#elif DB_VERSION_MAJOR > 1
20717	db_appexit( NULL );
20718#else
20719	(void) dbopen( NULL, 0, 0, 0, NULL);
20720#endif
20721
20722  ;
20723  return 0;
20724}
20725_ACEOF
20726if ac_fn_c_try_link "$LINENO"; then :
20727  ol_cv_db_db_5=yes
20728else
20729  ol_cv_db_db_5=no
20730fi
20731rm -f core conftest.err conftest.$ac_objext \
20732    conftest$ac_exeext conftest.$ac_ext
20733
20734	LIBS="$ol_LIBS"
20735
20736fi
20737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20738$as_echo "$ol_cv_db_db_5" >&6; }
20739
20740	if test $ol_cv_db_db_5 = yes ; then
20741		ol_cv_lib_db=-ldb-5
20742	fi
20743fi
20744
20745	if test $ol_cv_lib_db = no ; then
20746	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20747$as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20748if test "${ol_cv_db_db5+set}" = set; then :
20749  $as_echo_n "(cached) " >&6
20750else
20751
20752	ol_DB_LIB=-ldb5
20753	ol_LIBS=$LIBS
20754	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20755
20756	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20757/* end confdefs.h.  */
20758
20759#ifdef HAVE_DB_185_H
20760# include <db_185.h>
20761#else
20762# include <db.h>
20763#endif
20764
20765#ifndef DB_VERSION_MAJOR
20766# define DB_VERSION_MAJOR 1
20767#endif
20768
20769#ifndef NULL
20770#define NULL ((void*)0)
20771#endif
20772
20773int
20774main ()
20775{
20776
20777#if DB_VERSION_MAJOR > 2
20778	db_env_create( NULL, 0 );
20779#elif DB_VERSION_MAJOR > 1
20780	db_appexit( NULL );
20781#else
20782	(void) dbopen( NULL, 0, 0, 0, NULL);
20783#endif
20784
20785  ;
20786  return 0;
20787}
20788_ACEOF
20789if ac_fn_c_try_link "$LINENO"; then :
20790  ol_cv_db_db5=yes
20791else
20792  ol_cv_db_db5=no
20793fi
20794rm -f core conftest.err conftest.$ac_objext \
20795    conftest$ac_exeext conftest.$ac_ext
20796
20797	LIBS="$ol_LIBS"
20798
20799fi
20800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20801$as_echo "$ol_cv_db_db5" >&6; }
20802
20803	if test $ol_cv_db_db5 = yes ; then
20804		ol_cv_lib_db=-ldb5
20805	fi
20806fi
20807
20808elif test $ol_cv_bdb_major = 4 ; then
20809	if test $ol_cv_lib_db = no ; then
20810	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20811$as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20812if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20813  $as_echo_n "(cached) " >&6
20814else
20815
20816	ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20817	ol_LIBS=$LIBS
20818	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20819
20820	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20821/* end confdefs.h.  */
20822
20823#ifdef HAVE_DB_185_H
20824# include <db_185.h>
20825#else
20826# include <db.h>
20827#endif
20828
20829#ifndef DB_VERSION_MAJOR
20830# define DB_VERSION_MAJOR 1
20831#endif
20832
20833#ifndef NULL
20834#define NULL ((void*)0)
20835#endif
20836
20837int
20838main ()
20839{
20840
20841#if DB_VERSION_MAJOR > 2
20842	db_env_create( NULL, 0 );
20843#elif DB_VERSION_MAJOR > 1
20844	db_appexit( NULL );
20845#else
20846	(void) dbopen( NULL, 0, 0, 0, NULL);
20847#endif
20848
20849  ;
20850  return 0;
20851}
20852_ACEOF
20853if ac_fn_c_try_link "$LINENO"; then :
20854  ol_cv_db_db_4_dot_m=yes
20855else
20856  ol_cv_db_db_4_dot_m=no
20857fi
20858rm -f core conftest.err conftest.$ac_objext \
20859    conftest$ac_exeext conftest.$ac_ext
20860
20861	LIBS="$ol_LIBS"
20862
20863fi
20864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20865$as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20866
20867	if test $ol_cv_db_db_4_dot_m = yes ; then
20868		ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20869	fi
20870fi
20871
20872	if test $ol_cv_lib_db = no ; then
20873	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20874$as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20875if test "${ol_cv_db_db4m+set}" = set; then :
20876  $as_echo_n "(cached) " >&6
20877else
20878
20879	ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20880	ol_LIBS=$LIBS
20881	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20882
20883	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20884/* end confdefs.h.  */
20885
20886#ifdef HAVE_DB_185_H
20887# include <db_185.h>
20888#else
20889# include <db.h>
20890#endif
20891
20892#ifndef DB_VERSION_MAJOR
20893# define DB_VERSION_MAJOR 1
20894#endif
20895
20896#ifndef NULL
20897#define NULL ((void*)0)
20898#endif
20899
20900int
20901main ()
20902{
20903
20904#if DB_VERSION_MAJOR > 2
20905	db_env_create( NULL, 0 );
20906#elif DB_VERSION_MAJOR > 1
20907	db_appexit( NULL );
20908#else
20909	(void) dbopen( NULL, 0, 0, 0, NULL);
20910#endif
20911
20912  ;
20913  return 0;
20914}
20915_ACEOF
20916if ac_fn_c_try_link "$LINENO"; then :
20917  ol_cv_db_db4m=yes
20918else
20919  ol_cv_db_db4m=no
20920fi
20921rm -f core conftest.err conftest.$ac_objext \
20922    conftest$ac_exeext conftest.$ac_ext
20923
20924	LIBS="$ol_LIBS"
20925
20926fi
20927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20928$as_echo "$ol_cv_db_db4m" >&6; }
20929
20930	if test $ol_cv_db_db4m = yes ; then
20931		ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20932	fi
20933fi
20934
20935	if test $ol_cv_lib_db = no ; then
20936	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20937$as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20938if test "${ol_cv_db_db_4m+set}" = set; then :
20939  $as_echo_n "(cached) " >&6
20940else
20941
20942	ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20943	ol_LIBS=$LIBS
20944	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20945
20946	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20947/* end confdefs.h.  */
20948
20949#ifdef HAVE_DB_185_H
20950# include <db_185.h>
20951#else
20952# include <db.h>
20953#endif
20954
20955#ifndef DB_VERSION_MAJOR
20956# define DB_VERSION_MAJOR 1
20957#endif
20958
20959#ifndef NULL
20960#define NULL ((void*)0)
20961#endif
20962
20963int
20964main ()
20965{
20966
20967#if DB_VERSION_MAJOR > 2
20968	db_env_create( NULL, 0 );
20969#elif DB_VERSION_MAJOR > 1
20970	db_appexit( NULL );
20971#else
20972	(void) dbopen( NULL, 0, 0, 0, NULL);
20973#endif
20974
20975  ;
20976  return 0;
20977}
20978_ACEOF
20979if ac_fn_c_try_link "$LINENO"; then :
20980  ol_cv_db_db_4m=yes
20981else
20982  ol_cv_db_db_4m=no
20983fi
20984rm -f core conftest.err conftest.$ac_objext \
20985    conftest$ac_exeext conftest.$ac_ext
20986
20987	LIBS="$ol_LIBS"
20988
20989fi
20990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20991$as_echo "$ol_cv_db_db_4m" >&6; }
20992
20993	if test $ol_cv_db_db_4m = yes ; then
20994		ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20995	fi
20996fi
20997
20998	if test $ol_cv_lib_db = no ; then
20999	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
21000$as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
21001if test "${ol_cv_db_db_4_m+set}" = set; then :
21002  $as_echo_n "(cached) " >&6
21003else
21004
21005	ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
21006	ol_LIBS=$LIBS
21007	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21008
21009	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21010/* end confdefs.h.  */
21011
21012#ifdef HAVE_DB_185_H
21013# include <db_185.h>
21014#else
21015# include <db.h>
21016#endif
21017
21018#ifndef DB_VERSION_MAJOR
21019# define DB_VERSION_MAJOR 1
21020#endif
21021
21022#ifndef NULL
21023#define NULL ((void*)0)
21024#endif
21025
21026int
21027main ()
21028{
21029
21030#if DB_VERSION_MAJOR > 2
21031	db_env_create( NULL, 0 );
21032#elif DB_VERSION_MAJOR > 1
21033	db_appexit( NULL );
21034#else
21035	(void) dbopen( NULL, 0, 0, 0, NULL);
21036#endif
21037
21038  ;
21039  return 0;
21040}
21041_ACEOF
21042if ac_fn_c_try_link "$LINENO"; then :
21043  ol_cv_db_db_4_m=yes
21044else
21045  ol_cv_db_db_4_m=no
21046fi
21047rm -f core conftest.err conftest.$ac_objext \
21048    conftest$ac_exeext conftest.$ac_ext
21049
21050	LIBS="$ol_LIBS"
21051
21052fi
21053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21054$as_echo "$ol_cv_db_db_4_m" >&6; }
21055
21056	if test $ol_cv_db_db_4_m = yes ; then
21057		ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21058	fi
21059fi
21060
21061	if test $ol_cv_lib_db = no ; then
21062	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21063$as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21064if test "${ol_cv_db_db_4+set}" = set; then :
21065  $as_echo_n "(cached) " >&6
21066else
21067
21068	ol_DB_LIB=-ldb-4
21069	ol_LIBS=$LIBS
21070	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21071
21072	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21073/* end confdefs.h.  */
21074
21075#ifdef HAVE_DB_185_H
21076# include <db_185.h>
21077#else
21078# include <db.h>
21079#endif
21080
21081#ifndef DB_VERSION_MAJOR
21082# define DB_VERSION_MAJOR 1
21083#endif
21084
21085#ifndef NULL
21086#define NULL ((void*)0)
21087#endif
21088
21089int
21090main ()
21091{
21092
21093#if DB_VERSION_MAJOR > 2
21094	db_env_create( NULL, 0 );
21095#elif DB_VERSION_MAJOR > 1
21096	db_appexit( NULL );
21097#else
21098	(void) dbopen( NULL, 0, 0, 0, NULL);
21099#endif
21100
21101  ;
21102  return 0;
21103}
21104_ACEOF
21105if ac_fn_c_try_link "$LINENO"; then :
21106  ol_cv_db_db_4=yes
21107else
21108  ol_cv_db_db_4=no
21109fi
21110rm -f core conftest.err conftest.$ac_objext \
21111    conftest$ac_exeext conftest.$ac_ext
21112
21113	LIBS="$ol_LIBS"
21114
21115fi
21116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21117$as_echo "$ol_cv_db_db_4" >&6; }
21118
21119	if test $ol_cv_db_db_4 = yes ; then
21120		ol_cv_lib_db=-ldb-4
21121	fi
21122fi
21123
21124	if test $ol_cv_lib_db = no ; then
21125	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21126$as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21127if test "${ol_cv_db_db4+set}" = set; then :
21128  $as_echo_n "(cached) " >&6
21129else
21130
21131	ol_DB_LIB=-ldb4
21132	ol_LIBS=$LIBS
21133	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21134
21135	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21136/* end confdefs.h.  */
21137
21138#ifdef HAVE_DB_185_H
21139# include <db_185.h>
21140#else
21141# include <db.h>
21142#endif
21143
21144#ifndef DB_VERSION_MAJOR
21145# define DB_VERSION_MAJOR 1
21146#endif
21147
21148#ifndef NULL
21149#define NULL ((void*)0)
21150#endif
21151
21152int
21153main ()
21154{
21155
21156#if DB_VERSION_MAJOR > 2
21157	db_env_create( NULL, 0 );
21158#elif DB_VERSION_MAJOR > 1
21159	db_appexit( NULL );
21160#else
21161	(void) dbopen( NULL, 0, 0, 0, NULL);
21162#endif
21163
21164  ;
21165  return 0;
21166}
21167_ACEOF
21168if ac_fn_c_try_link "$LINENO"; then :
21169  ol_cv_db_db4=yes
21170else
21171  ol_cv_db_db4=no
21172fi
21173rm -f core conftest.err conftest.$ac_objext \
21174    conftest$ac_exeext conftest.$ac_ext
21175
21176	LIBS="$ol_LIBS"
21177
21178fi
21179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21180$as_echo "$ol_cv_db_db4" >&6; }
21181
21182	if test $ol_cv_db_db4 = yes ; then
21183		ol_cv_lib_db=-ldb4
21184	fi
21185fi
21186
21187fi
21188if test $ol_cv_lib_db = no ; then
21189	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21190$as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21191if test "${ol_cv_db_db+set}" = set; then :
21192  $as_echo_n "(cached) " >&6
21193else
21194
21195	ol_DB_LIB=-ldb
21196	ol_LIBS=$LIBS
21197	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21198
21199	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21200/* end confdefs.h.  */
21201
21202#ifdef HAVE_DB_185_H
21203# include <db_185.h>
21204#else
21205# include <db.h>
21206#endif
21207
21208#ifndef DB_VERSION_MAJOR
21209# define DB_VERSION_MAJOR 1
21210#endif
21211
21212#ifndef NULL
21213#define NULL ((void*)0)
21214#endif
21215
21216int
21217main ()
21218{
21219
21220#if DB_VERSION_MAJOR > 2
21221	db_env_create( NULL, 0 );
21222#elif DB_VERSION_MAJOR > 1
21223	db_appexit( NULL );
21224#else
21225	(void) dbopen( NULL, 0, 0, 0, NULL);
21226#endif
21227
21228  ;
21229  return 0;
21230}
21231_ACEOF
21232if ac_fn_c_try_link "$LINENO"; then :
21233  ol_cv_db_db=yes
21234else
21235  ol_cv_db_db=no
21236fi
21237rm -f core conftest.err conftest.$ac_objext \
21238    conftest$ac_exeext conftest.$ac_ext
21239
21240	LIBS="$ol_LIBS"
21241
21242fi
21243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21244$as_echo "$ol_cv_db_db" >&6; }
21245
21246	if test $ol_cv_db_db = yes ; then
21247		ol_cv_lib_db=-ldb
21248	fi
21249fi
21250
21251if test $ol_cv_lib_db = no ; then
21252	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21253$as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21254if test "${ol_cv_db_none+set}" = set; then :
21255  $as_echo_n "(cached) " >&6
21256else
21257
21258	ol_DB_LIB=
21259	ol_LIBS=$LIBS
21260	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21261
21262	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21263/* end confdefs.h.  */
21264
21265#ifdef HAVE_DB_185_H
21266# include <db_185.h>
21267#else
21268# include <db.h>
21269#endif
21270
21271#ifndef DB_VERSION_MAJOR
21272# define DB_VERSION_MAJOR 1
21273#endif
21274
21275#ifndef NULL
21276#define NULL ((void*)0)
21277#endif
21278
21279int
21280main ()
21281{
21282
21283#if DB_VERSION_MAJOR > 2
21284	db_env_create( NULL, 0 );
21285#elif DB_VERSION_MAJOR > 1
21286	db_appexit( NULL );
21287#else
21288	(void) dbopen( NULL, 0, 0, 0, NULL);
21289#endif
21290
21291  ;
21292  return 0;
21293}
21294_ACEOF
21295if ac_fn_c_try_link "$LINENO"; then :
21296  ol_cv_db_none=yes
21297else
21298  ol_cv_db_none=no
21299fi
21300rm -f core conftest.err conftest.$ac_objext \
21301    conftest$ac_exeext conftest.$ac_ext
21302
21303	LIBS="$ol_LIBS"
21304
21305fi
21306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21307$as_echo "$ol_cv_db_none" >&6; }
21308
21309	if test $ol_cv_db_none = yes ; then
21310		ol_cv_lib_db=yes
21311	fi
21312fi
21313
21314
21315	if test "$ol_cv_lib_db" != no ; then
21316		ol_cv_berkeley_db=yes
21317		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21318$as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21319if test "${ol_cv_berkeley_db_version+set}" = set; then :
21320  $as_echo_n "(cached) " >&6
21321else
21322
21323	ol_LIBS="$LIBS"
21324	LIBS="$LTHREAD_LIBS $LIBS"
21325	if test $ol_cv_lib_db != yes ; then
21326		LIBS="$ol_cv_lib_db $LIBS"
21327	fi
21328
21329	if test "$cross_compiling" = yes; then :
21330  ol_cv_berkeley_db_version=cross
21331else
21332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21333/* end confdefs.h.  */
21334
21335#ifdef HAVE_DB_185_H
21336	choke me;
21337#else
21338#include <db.h>
21339#endif
21340#ifndef DB_VERSION_MAJOR
21341# define DB_VERSION_MAJOR 1
21342#endif
21343#ifndef NULL
21344#define NULL ((void *)0)
21345#endif
21346main()
21347{
21348#if DB_VERSION_MAJOR > 1
21349	char *version;
21350	int major, minor, patch;
21351
21352	version = db_version( &major, &minor, &patch );
21353
21354	if( major != DB_VERSION_MAJOR ||
21355		minor != DB_VERSION_MINOR ||
21356		patch != DB_VERSION_PATCH )
21357	{
21358		printf("Berkeley DB version mismatch\n"
21359			"\theader: %s\n\tlibrary: %s\n",
21360			DB_VERSION_STRING, version);
21361		return 1;
21362	}
21363#endif
21364
21365	return 0;
21366}
21367_ACEOF
21368if ac_fn_c_try_run "$LINENO"; then :
21369  ol_cv_berkeley_db_version=yes
21370else
21371  ol_cv_berkeley_db_version=no
21372fi
21373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21374  conftest.$ac_objext conftest.beam conftest.$ac_ext
21375fi
21376
21377
21378	LIBS="$ol_LIBS"
21379
21380fi
21381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21382$as_echo "$ol_cv_berkeley_db_version" >&6; }
21383
21384	if test $ol_cv_berkeley_db_version = no ; then
21385		as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21386	fi
21387
21388		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21389$as_echo_n "checking for Berkeley DB thread support... " >&6; }
21390if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21391  $as_echo_n "(cached) " >&6
21392else
21393
21394	ol_LIBS="$LIBS"
21395	LIBS="$LTHREAD_LIBS $LIBS"
21396	if test $ol_cv_lib_db != yes ; then
21397		LIBS="$ol_cv_lib_db $LIBS"
21398	fi
21399
21400	if test "$cross_compiling" = yes; then :
21401  ol_cv_berkeley_db_thread=cross
21402else
21403  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21404/* end confdefs.h.  */
21405
21406#ifdef HAVE_DB_185_H
21407	choke me;
21408#else
21409#include <db.h>
21410#endif
21411#ifndef NULL
21412#define NULL ((void *)0)
21413#endif
21414main()
21415{
21416	int rc;
21417	u_int32_t flags = DB_CREATE |
21418#ifdef DB_PRIVATE
21419		DB_PRIVATE |
21420#endif
21421		DB_THREAD;
21422
21423#if DB_VERSION_MAJOR > 2
21424	DB_ENV *env = NULL;
21425
21426	rc = db_env_create( &env, 0 );
21427
21428	flags |= DB_INIT_MPOOL;
21429#ifdef DB_MPOOL_PRIVATE
21430	flags |= DB_MPOOL_PRIVATE;
21431#endif
21432
21433	if( rc ) {
21434		printf("BerkeleyDB: %s\n", db_strerror(rc) );
21435		return rc;
21436	}
21437
21438#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21439	rc = (env->open)( env, NULL, flags, 0 );
21440#else
21441	rc = (env->open)( env, NULL, NULL, flags, 0 );
21442#endif
21443
21444	if ( rc == 0 ) {
21445		rc = env->close( env, 0 );
21446	}
21447
21448	if( rc ) {
21449		printf("BerkeleyDB: %s\n", db_strerror(rc) );
21450		return rc;
21451	}
21452
21453#else
21454	DB_ENV env;
21455	memset( &env, '\0', sizeof(env) );
21456
21457	rc = db_appinit( NULL, NULL, &env, flags );
21458
21459	if( rc == 0 ) {
21460		db_appexit( &env );
21461	}
21462
21463	unlink("__db_mpool.share");
21464	unlink("__db_lock.share");
21465#endif
21466
21467	return rc;
21468}
21469_ACEOF
21470if ac_fn_c_try_run "$LINENO"; then :
21471  ol_cv_berkeley_db_thread=yes
21472else
21473  ol_cv_berkeley_db_thread=no
21474fi
21475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21476  conftest.$ac_objext conftest.beam conftest.$ac_ext
21477fi
21478
21479
21480	LIBS="$ol_LIBS"
21481
21482fi
21483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21484$as_echo "$ol_cv_berkeley_db_thread" >&6; }
21485
21486	if test $ol_cv_berkeley_db_thread != no ; then
21487
21488$as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21489
21490	fi
21491
21492	fi
21493fi
21494
21495
21496	if test $ol_cv_berkeley_db = no ; then
21497		as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21498	fi
21499
21500
21501$as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21502
21503
21504			if test $ol_cv_lib_db != yes ; then
21505		BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21506	fi
21507
21508			if test $ol_enable_bdb/$ol_enable_hdb != mod/mod ; then
21509		if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
21510			SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21511		fi
21512	fi
21513
21514	ol_link_bdb=yes
21515fi
21516
21517
21518if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21519	BUILD_LIBS_DYNAMIC=shared
21520
21521$as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21522
21523	LTSTATIC=""
21524else
21525	BUILD_LIBS_DYNAMIC=static
21526	LTSTATIC="-static"
21527fi
21528
21529if test $ol_enable_wrappers != no ; then
21530	for ac_header in tcpd.h
21531do :
21532  ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21533if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21534  cat >>confdefs.h <<_ACEOF
21535#define HAVE_TCPD_H 1
21536_ACEOF
21537
21538		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21539$as_echo_n "checking for TCP wrappers library... " >&6; }
21540		save_LIBS="$LIBS"
21541		LIBS="$LIBS -lwrap"
21542		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21543/* end confdefs.h.  */
21544
21545#include <tcpd.h>
21546int allow_severity = 0;
21547int deny_severity  = 0;
21548
21549struct request_info *req;
21550
21551int
21552main ()
21553{
21554
21555hosts_access(req)
21556
21557  ;
21558  return 0;
21559}
21560_ACEOF
21561if ac_fn_c_try_link "$LINENO"; then :
21562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21563$as_echo "-lwrap" >&6; }
21564		have_wrappers=yes
21565		LIBS="$save_LIBS"
21566else
21567
21568				LIBS="$LIBS -lnsl"
21569		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21570/* end confdefs.h.  */
21571
21572#include <tcpd.h>
21573int allow_severity = 0;
21574int deny_severity  = 0;
21575
21576struct request_info *req;
21577
21578int
21579main ()
21580{
21581
21582hosts_access(req)
21583
21584  ;
21585  return 0;
21586}
21587_ACEOF
21588if ac_fn_c_try_link "$LINENO"; then :
21589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21590$as_echo "-lwrap -lnsl" >&6; }
21591		have_wrappers=yes
21592		LIBS="$save_LIBS -lnsl"
21593else
21594
21595		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21596$as_echo "no" >&6; }
21597		have_wrappers=no
21598		LIBS=$save_LIBS
21599fi
21600rm -f core conftest.err conftest.$ac_objext \
21601    conftest$ac_exeext conftest.$ac_ext
21602fi
21603rm -f core conftest.err conftest.$ac_objext \
21604    conftest$ac_exeext conftest.$ac_ext
21605else
21606  have_wrappers=no
21607fi
21608
21609done
21610
21611
21612	if test $have_wrappers = yes ; then
21613
21614$as_echo "#define HAVE_TCPD 1" >>confdefs.h
21615
21616		WRAP_LIBS="-lwrap"
21617	elif test $ol_enable_wrappers = yes ; then
21618		as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21619	else
21620		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21621$as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21622		WRAP_LIBS=""
21623	fi
21624fi
21625
21626if test $ol_enable_syslog != no ; then
21627	ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21628if test "x$ac_cv_func_openlog" = x""yes; then :
21629
21630fi
21631
21632	if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21633		{ as_fn_set_status select appropriate options or disable
21634as_fn_error "could not find syslog" "$LINENO" 5; }
21635	fi
21636	ol_enable_syslog=$ac_cv_func_openlog
21637fi
21638
21639ol_link_sql=no
21640if test $ol_enable_sql != no ; then
21641	for ac_header in sql.h sqlext.h
21642do :
21643  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21644ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21645eval as_val=\$$as_ac_Header
21646   if test "x$as_val" = x""yes; then :
21647  cat >>confdefs.h <<_ACEOF
21648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21649_ACEOF
21650
21651else
21652
21653		as_fn_error "could not locate SQL headers" "$LINENO" 5
21654
21655fi
21656
21657done
21658
21659
21660	sql_LIBS="$LIBS"
21661	LIBS="$LTHREAD_LIBS $LIBS"
21662
21663	if test $ol_with_odbc = auto ; then
21664		ol_with_odbc="iodbc unixodbc odbc32"
21665	fi
21666
21667	for odbc in $ol_with_odbc ; do
21668		if test $ol_link_sql = no ; then
21669			case $odbc in
21670			iodbc)
21671				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21672$as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21673if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21674  $as_echo_n "(cached) " >&6
21675else
21676  ac_check_lib_save_LIBS=$LIBS
21677LIBS="-liodbc  $LIBS $LTHREAD_LIBS"
21678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21679/* end confdefs.h.  */
21680
21681/* Override any GCC internal prototype to avoid an error.
21682   Use char because int might match the return type of a GCC
21683   builtin and then its argument prototype would still apply.  */
21684#ifdef __cplusplus
21685extern "C"
21686#endif
21687char SQLDriverConnect ();
21688int
21689main ()
21690{
21691return SQLDriverConnect ();
21692  ;
21693  return 0;
21694}
21695_ACEOF
21696if ac_fn_c_try_link "$LINENO"; then :
21697  ac_cv_lib_iodbc_SQLDriverConnect=yes
21698else
21699  ac_cv_lib_iodbc_SQLDriverConnect=no
21700fi
21701rm -f core conftest.err conftest.$ac_objext \
21702    conftest$ac_exeext conftest.$ac_ext
21703LIBS=$ac_check_lib_save_LIBS
21704fi
21705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21706$as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21707if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21708  have_iodbc=yes
21709else
21710  have_iodbc=no
21711fi
21712
21713				if test $have_iodbc = yes ; then
21714					ol_link_sql="-liodbc"
21715				fi
21716				;;
21717
21718			unixodbc)
21719				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21720$as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21721if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21722  $as_echo_n "(cached) " >&6
21723else
21724  ac_check_lib_save_LIBS=$LIBS
21725LIBS="-lodbc  $LIBS $LTHREAD_LIBS"
21726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21727/* end confdefs.h.  */
21728
21729/* Override any GCC internal prototype to avoid an error.
21730   Use char because int might match the return type of a GCC
21731   builtin and then its argument prototype would still apply.  */
21732#ifdef __cplusplus
21733extern "C"
21734#endif
21735char SQLDriverConnect ();
21736int
21737main ()
21738{
21739return SQLDriverConnect ();
21740  ;
21741  return 0;
21742}
21743_ACEOF
21744if ac_fn_c_try_link "$LINENO"; then :
21745  ac_cv_lib_odbc_SQLDriverConnect=yes
21746else
21747  ac_cv_lib_odbc_SQLDriverConnect=no
21748fi
21749rm -f core conftest.err conftest.$ac_objext \
21750    conftest$ac_exeext conftest.$ac_ext
21751LIBS=$ac_check_lib_save_LIBS
21752fi
21753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21754$as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21755if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21756  have_odbc=yes
21757else
21758  have_odbc=no
21759fi
21760
21761				if test $have_odbc = yes ; then
21762					ol_link_sql="-lodbc"
21763				fi
21764				;;
21765
21766			odbc32)
21767				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21768$as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21769if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21770  $as_echo_n "(cached) " >&6
21771else
21772  ac_check_lib_save_LIBS=$LIBS
21773LIBS="-lodbc32  $LIBS"
21774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21775/* end confdefs.h.  */
21776
21777/* Override any GCC internal prototype to avoid an error.
21778   Use char because int might match the return type of a GCC
21779   builtin and then its argument prototype would still apply.  */
21780#ifdef __cplusplus
21781extern "C"
21782#endif
21783char SQLDriverConnect ();
21784int
21785main ()
21786{
21787return SQLDriverConnect ();
21788  ;
21789  return 0;
21790}
21791_ACEOF
21792if ac_fn_c_try_link "$LINENO"; then :
21793  ac_cv_lib_odbc32_SQLDriverConnect=yes
21794else
21795  ac_cv_lib_odbc32_SQLDriverConnect=no
21796fi
21797rm -f core conftest.err conftest.$ac_objext \
21798    conftest$ac_exeext conftest.$ac_ext
21799LIBS=$ac_check_lib_save_LIBS
21800fi
21801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21802$as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21803if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21804  have_odbc32=yes
21805else
21806  have_odbc32=no
21807fi
21808
21809
21810								if test $have_odbc32 = no ; then
21811					{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21812$as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21813					save_LIBS="$LIBS"
21814					LIBS="$LIBS -lodbc32"
21815					cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21816/* end confdefs.h.  */
21817#include <windows.h>
21818					#include <sqlext.h>
21819
21820int
21821main ()
21822{
21823
21824						SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21825
21826  ;
21827  return 0;
21828}
21829_ACEOF
21830if ac_fn_c_try_link "$LINENO"; then :
21831  have_odbc32=yes
21832else
21833  have_odbc32=no
21834fi
21835rm -f core conftest.err conftest.$ac_objext \
21836    conftest$ac_exeext conftest.$ac_ext
21837					LIBS="$save_LIBS"
21838					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21839$as_echo "$have_odbc32" >&6; }
21840				fi
21841
21842				if test $have_odbc32 = yes ; then
21843					ol_link_sql="-lodbc32"
21844				fi
21845				;;
21846
21847			*)
21848				as_fn_error "unknown ODBC library" "$LINENO" 5
21849				;;
21850			esac
21851		fi
21852	done
21853
21854	LIBS="$sql_LIBS"
21855
21856	if test $ol_link_sql != no ; then
21857		SLAPD_SQL_LIBS="$ol_link_sql"
21858
21859	elif test $ol_enable_sql != auto ; then
21860		as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21861	fi
21862fi
21863
21864ol_link_ndb=no
21865if test $ol_enable_ndb != no ; then
21866	# Extract the first word of "mysql_config", so it can be a program name with args.
21867set dummy mysql_config; ac_word=$2
21868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21869$as_echo_n "checking for $ac_word... " >&6; }
21870if test "${ac_cv_prog_MYSQL+set}" = set; then :
21871  $as_echo_n "(cached) " >&6
21872else
21873  if test -n "$MYSQL"; then
21874  ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21875else
21876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21877for as_dir in $PATH
21878do
21879  IFS=$as_save_IFS
21880  test -z "$as_dir" && as_dir=.
21881    for ac_exec_ext in '' $ac_executable_extensions; do
21882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21883    ac_cv_prog_MYSQL="yes"
21884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21885    break 2
21886  fi
21887done
21888  done
21889IFS=$as_save_IFS
21890
21891fi
21892fi
21893MYSQL=$ac_cv_prog_MYSQL
21894if test -n "$MYSQL"; then
21895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21896$as_echo "$MYSQL" >&6; }
21897else
21898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21899$as_echo "no" >&6; }
21900fi
21901
21902
21903	if test "$MYSQL" != yes ; then
21904		as_fn_error "could not locate mysql_config" "$LINENO" 5
21905	fi
21906
21907	SQL_INC=`mysql_config --include`
21908	SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21909
21910	save_CPPFLAGS="$CPPFLAGS"
21911	CPPFLAGS="$SLAPD_NDB_INCS"
21912	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21913$as_echo_n "checking for NdbApi.hpp... " >&6; }
21914	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21915/* end confdefs.h.  */
21916#include <NdbApi.hpp>
21917_ACEOF
21918if ac_fn_c_try_cpp "$LINENO"; then :
21919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21920$as_echo "yes" >&6; }
21921else
21922  as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21923
21924fi
21925rm -f conftest.err conftest.$ac_ext
21926	CPPFLAGS="$save_CPPFLAGS"
21927
21928	SQL_LIB=`mysql_config --libs_r`
21929	SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21930
21931	save_LDFLAGS="$LDFLAGS"
21932	save_LIBS="$LIBS"
21933	LDFLAGS="$SQL_LIB"
21934	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21935$as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21936if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21937  $as_echo_n "(cached) " >&6
21938else
21939  ac_check_lib_save_LIBS=$LIBS
21940LIBS="-lndbclient -lstdc++ $LIBS"
21941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21942/* end confdefs.h.  */
21943
21944/* Override any GCC internal prototype to avoid an error.
21945   Use char because int might match the return type of a GCC
21946   builtin and then its argument prototype would still apply.  */
21947#ifdef __cplusplus
21948extern "C"
21949#endif
21950char ndb_init ();
21951int
21952main ()
21953{
21954return ndb_init ();
21955  ;
21956  return 0;
21957}
21958_ACEOF
21959if ac_fn_c_try_link "$LINENO"; then :
21960  ac_cv_lib_ndbclient_ndb_init=yes
21961else
21962  ac_cv_lib_ndbclient_ndb_init=no
21963fi
21964rm -f core conftest.err conftest.$ac_objext \
21965    conftest$ac_exeext conftest.$ac_ext
21966LIBS=$ac_check_lib_save_LIBS
21967fi
21968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21969$as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21970if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
21971  : ok
21972else
21973
21974		as_fn_error "could not locate ndbclient library" "$LINENO" 5
21975
21976fi
21977
21978	LIBS="$save_LIBS"
21979	LDFLAGS="$save_LDFLAGS"
21980
21981	if test "$ol_enable_ndb" = yes ; then
21982		SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21983	fi
21984fi
21985
21986WITH_SASL=no
21987ol_link_sasl=no
21988ol_link_spasswd=no
21989if test $ol_with_cyrus_sasl != no ; then
21990	for ac_header in sasl/sasl.h sasl.h
21991do :
21992  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21993ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21994eval as_val=\$$as_ac_Header
21995   if test "x$as_val" = x""yes; then :
21996  cat >>confdefs.h <<_ACEOF
21997#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21998_ACEOF
21999
22000fi
22001
22002done
22003
22004
22005	if test $ac_cv_header_sasl_sasl_h = yes ||
22006	   test $ac_cv_header_sasl_h = yes; then
22007		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
22008$as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
22009if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
22010  $as_echo_n "(cached) " >&6
22011else
22012  ac_check_lib_save_LIBS=$LIBS
22013LIBS="-lsasl2  $LIBS"
22014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22015/* end confdefs.h.  */
22016
22017/* Override any GCC internal prototype to avoid an error.
22018   Use char because int might match the return type of a GCC
22019   builtin and then its argument prototype would still apply.  */
22020#ifdef __cplusplus
22021extern "C"
22022#endif
22023char sasl_client_init ();
22024int
22025main ()
22026{
22027return sasl_client_init ();
22028  ;
22029  return 0;
22030}
22031_ACEOF
22032if ac_fn_c_try_link "$LINENO"; then :
22033  ac_cv_lib_sasl2_sasl_client_init=yes
22034else
22035  ac_cv_lib_sasl2_sasl_client_init=no
22036fi
22037rm -f core conftest.err conftest.$ac_objext \
22038    conftest$ac_exeext conftest.$ac_ext
22039LIBS=$ac_check_lib_save_LIBS
22040fi
22041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22042$as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22043if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22044  ol_link_sasl="-lsasl2"
22045else
22046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22047$as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22048if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22049  $as_echo_n "(cached) " >&6
22050else
22051  ac_check_lib_save_LIBS=$LIBS
22052LIBS="-lsasl  $LIBS"
22053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22054/* end confdefs.h.  */
22055
22056/* Override any GCC internal prototype to avoid an error.
22057   Use char because int might match the return type of a GCC
22058   builtin and then its argument prototype would still apply.  */
22059#ifdef __cplusplus
22060extern "C"
22061#endif
22062char sasl_client_init ();
22063int
22064main ()
22065{
22066return sasl_client_init ();
22067  ;
22068  return 0;
22069}
22070_ACEOF
22071if ac_fn_c_try_link "$LINENO"; then :
22072  ac_cv_lib_sasl_sasl_client_init=yes
22073else
22074  ac_cv_lib_sasl_sasl_client_init=no
22075fi
22076rm -f core conftest.err conftest.$ac_objext \
22077    conftest$ac_exeext conftest.$ac_ext
22078LIBS=$ac_check_lib_save_LIBS
22079fi
22080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22081$as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22082if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22083  ol_link_sasl="-lsasl"
22084fi
22085
22086fi
22087
22088	fi
22089
22090	if test $ol_link_sasl = no ; then
22091		if test $ol_with_cyrus_sasl != auto ; then
22092			as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22093		else
22094			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22095$as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22096			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22097$as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22098			if test $ol_link_tls = no ; then
22099				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22100$as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22101			fi
22102		fi
22103	else
22104		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22105$as_echo_n "checking Cyrus SASL library version... " >&6; }
22106if test "${ol_cv_sasl_compat+set}" = set; then :
22107  $as_echo_n "(cached) " >&6
22108else
22109
22110	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22111/* end confdefs.h.  */
22112
22113#ifdef HAVE_SASL_SASL_H
22114#include <sasl/sasl.h>
22115#else
22116#include <sasl.h>
22117#endif
22118
22119/* Require 2.1.15+ */
22120#if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22121	char *__sasl_compat = "2.2+ or better okay (we guess)";
22122#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22123	&& SASL_VERSION_STEP >=15
22124	char *__sasl_compat = "2.1.15+ or better okay";
22125#endif
22126
22127_ACEOF
22128if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22129  $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22130  ol_cv_sasl_compat=yes
22131else
22132  ol_cv_sasl_compat=no
22133fi
22134rm -f conftest*
22135
22136fi
22137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22138$as_echo "$ol_cv_sasl_compat" >&6; }
22139
22140		if test $ol_cv_sasl_compat = no ; then
22141			ol_link_sasl=no
22142			as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22143		fi
22144
22145
22146$as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22147
22148		SASL_LIBS="$ol_link_sasl"
22149		if test $ol_enable_spasswd != no ; then
22150			ol_link_spasswd=yes
22151		fi
22152
22153		ac_save_LIBS="$LIBS"
22154		LIBS="$LIBS $ol_link_sasl"
22155		ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22156if test "x$ac_cv_func_sasl_version" = x""yes; then :
22157
22158$as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22159
22160fi
22161
22162		LIBS="$ac_save_LIBS"
22163
22164		WITH_SASL=yes
22165	fi
22166
22167else
22168	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22169$as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22170	if test $ol_link_tls = no ; then
22171		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22172$as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22173	fi
22174fi
22175
22176if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22177	dev=no
22178	if test -r /dev/urandom ; then
22179		dev="/dev/urandom";
22180	elif test -r /idev/urandom ; then
22181		dev="/idev/urandom";
22182	elif test -r /dev/srandom ; then
22183		dev="/dev/srandom";
22184	elif test -r /dev/random ; then
22185		dev="/dev/random";
22186	elif test -r /idev/random ; then
22187		dev="/idev/random";
22188	fi
22189
22190	if test $dev != no ; then
22191
22192cat >>confdefs.h <<_ACEOF
22193#define URANDOM_DEVICE "$dev"
22194_ACEOF
22195
22196	fi
22197fi
22198
22199ol_link_fetch=no
22200if test $ol_with_fetch != no ; then
22201	ol_LIBS=$LIBS
22202LIBS="-lfetch -lcom_err $LIBS"
22203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22204$as_echo_n "checking fetch(3) library... " >&6; }
22205if test "${ol_cv_lib_fetch+set}" = set; then :
22206  $as_echo_n "(cached) " >&6
22207else
22208
22209	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22210/* end confdefs.h.  */
22211
22212#ifdef HAVE_SYS_PARAM_H
22213#include <sys/param.h>
22214#endif
22215#include <stdio.h>
22216#include <fetch.h>
22217int
22218main ()
22219{
22220struct url *u = fetchParseURL("file:///");
22221  ;
22222  return 0;
22223}
22224_ACEOF
22225if ac_fn_c_try_link "$LINENO"; then :
22226  ol_cv_lib_fetch=yes
22227else
22228  ol_cv_lib_fetch=no
22229fi
22230rm -f core conftest.err conftest.$ac_objext \
22231    conftest$ac_exeext conftest.$ac_ext
22232fi
22233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22234$as_echo "$ol_cv_lib_fetch" >&6; }
22235LIBS=$ol_LIBS
22236if test $ol_cv_lib_fetch != no ; then
22237	ol_link_fetch="-lfetch -lcom_err"
22238
22239$as_echo "#define HAVE_FETCH 1" >>confdefs.h
22240
22241fi
22242
22243
22244	if test $ol_cv_lib_fetch != no ; then
22245		LIBS="$LIBS $ol_link_fetch"
22246		ol_link_fetch=freebsd
22247
22248	elif test $ol_with_fetch != auto ; then
22249		as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22250	fi
22251fi
22252
22253if test $ol_enable_crypt != no ; then
22254	save_LIBS="$LIBS"
22255	LIBS="$TLS_LIBS $LIBS"
22256
22257	ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22258if test "x$ac_cv_func_crypt" = x""yes; then :
22259  have_crypt=yes
22260else
22261
22262		LIBS="$save_LIBS"
22263		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22264$as_echo_n "checking for crypt in -lcrypt... " >&6; }
22265if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22266  $as_echo_n "(cached) " >&6
22267else
22268  ac_check_lib_save_LIBS=$LIBS
22269LIBS="-lcrypt  $LIBS"
22270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22271/* end confdefs.h.  */
22272
22273/* Override any GCC internal prototype to avoid an error.
22274   Use char because int might match the return type of a GCC
22275   builtin and then its argument prototype would still apply.  */
22276#ifdef __cplusplus
22277extern "C"
22278#endif
22279char crypt ();
22280int
22281main ()
22282{
22283return crypt ();
22284  ;
22285  return 0;
22286}
22287_ACEOF
22288if ac_fn_c_try_link "$LINENO"; then :
22289  ac_cv_lib_crypt_crypt=yes
22290else
22291  ac_cv_lib_crypt_crypt=no
22292fi
22293rm -f core conftest.err conftest.$ac_objext \
22294    conftest$ac_exeext conftest.$ac_ext
22295LIBS=$ac_check_lib_save_LIBS
22296fi
22297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22298$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22299if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22300  LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22301			have_crypt=yes
22302else
22303  have_crypt=no
22304fi
22305
22306fi
22307
22308
22309	LIBS="$save_LIBS"
22310
22311	if test $have_crypt = yes ; then
22312
22313$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22314
22315	else
22316		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22317$as_echo "$as_me: WARNING: could not find crypt" >&2;}
22318		if test $ol_enable_crypt = yes ; then
22319			as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22320		fi
22321
22322		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22323$as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22324		ol_enable_crypt=no
22325	fi
22326fi
22327
22328if test $ol_enable_proctitle != no ; then
22329	ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22330if test "x$ac_cv_func_setproctitle" = x""yes; then :
22331  have_setproctitle=yes
22332else
22333
22334		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22335$as_echo_n "checking for setproctitle in -lutil... " >&6; }
22336if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22337  $as_echo_n "(cached) " >&6
22338else
22339  ac_check_lib_save_LIBS=$LIBS
22340LIBS="-lutil  $LIBS"
22341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22342/* end confdefs.h.  */
22343
22344/* Override any GCC internal prototype to avoid an error.
22345   Use char because int might match the return type of a GCC
22346   builtin and then its argument prototype would still apply.  */
22347#ifdef __cplusplus
22348extern "C"
22349#endif
22350char setproctitle ();
22351int
22352main ()
22353{
22354return setproctitle ();
22355  ;
22356  return 0;
22357}
22358_ACEOF
22359if ac_fn_c_try_link "$LINENO"; then :
22360  ac_cv_lib_util_setproctitle=yes
22361else
22362  ac_cv_lib_util_setproctitle=no
22363fi
22364rm -f core conftest.err conftest.$ac_objext \
22365    conftest$ac_exeext conftest.$ac_ext
22366LIBS=$ac_check_lib_save_LIBS
22367fi
22368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22369$as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22370if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22371  have_setproctitle=yes
22372			LUTIL_LIBS="$LUTIL_LIBS -lutil"
22373else
22374  have_setproctitle=no
22375			case " $LIBOBJS " in
22376  *" setproctitle.$ac_objext "* ) ;;
22377  *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22378 ;;
22379esac
22380
22381			LIBSRCS="$LIBSRCS setproctitle.c"
22382fi
22383
22384fi
22385
22386
22387	if test $have_setproctitle = yes ; then
22388
22389$as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22390
22391	fi
22392fi
22393
22394if test $ol_enable_slp != no ; then
22395	for ac_header in slp.h
22396do :
22397  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22398ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22399eval as_val=\$$as_ac_Header
22400   if test "x$as_val" = x""yes; then :
22401  cat >>confdefs.h <<_ACEOF
22402#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22403_ACEOF
22404
22405fi
22406
22407done
22408
22409
22410	if test $ac_cv_header_slp_h = yes ; then
22411		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22412$as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22413if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22414  $as_echo_n "(cached) " >&6
22415else
22416  ac_check_lib_save_LIBS=$LIBS
22417LIBS="-lslp  $LIBS"
22418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22419/* end confdefs.h.  */
22420
22421/* Override any GCC internal prototype to avoid an error.
22422   Use char because int might match the return type of a GCC
22423   builtin and then its argument prototype would still apply.  */
22424#ifdef __cplusplus
22425extern "C"
22426#endif
22427char SLPOpen ();
22428int
22429main ()
22430{
22431return SLPOpen ();
22432  ;
22433  return 0;
22434}
22435_ACEOF
22436if ac_fn_c_try_link "$LINENO"; then :
22437  ac_cv_lib_slp_SLPOpen=yes
22438else
22439  ac_cv_lib_slp_SLPOpen=no
22440fi
22441rm -f core conftest.err conftest.$ac_objext \
22442    conftest$ac_exeext conftest.$ac_ext
22443LIBS=$ac_check_lib_save_LIBS
22444fi
22445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22446$as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22447if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22448  have_slp=yes
22449else
22450  have_slp=no
22451fi
22452
22453		if test $have_slp = yes ; then
22454
22455$as_echo "#define HAVE_SLP 1" >>confdefs.h
22456
22457			SLAPD_SLP_LIBS=-lslp
22458		fi
22459
22460	elif test $ol_enable_slp = yes ; then
22461		as_fn_error "SLP not found" "$LINENO" 5
22462	fi
22463fi
22464
22465
22466ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22467if test "x$ac_cv_type_mode_t" = x""yes; then :
22468
22469else
22470
22471cat >>confdefs.h <<_ACEOF
22472#define mode_t int
22473_ACEOF
22474
22475fi
22476
22477ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22478if test "x$ac_cv_type_off_t" = x""yes; then :
22479
22480else
22481
22482cat >>confdefs.h <<_ACEOF
22483#define off_t long
22484_ACEOF
22485
22486fi
22487
22488ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22489if test "x$ac_cv_type_pid_t" = x""yes; then :
22490
22491else
22492
22493cat >>confdefs.h <<_ACEOF
22494#define pid_t int
22495_ACEOF
22496
22497fi
22498
22499ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22500if test "x$ac_cv_type_ssize_t" = x""yes; then :
22501
22502else
22503
22504cat >>confdefs.h <<_ACEOF
22505#define ssize_t signed int
22506_ACEOF
22507
22508fi
22509
22510ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22511if test "x$ac_cv_type_caddr_t" = x""yes; then :
22512
22513else
22514
22515cat >>confdefs.h <<_ACEOF
22516#define caddr_t char *
22517_ACEOF
22518
22519fi
22520
22521ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22522if test "x$ac_cv_type_size_t" = x""yes; then :
22523
22524else
22525
22526cat >>confdefs.h <<_ACEOF
22527#define size_t unsigned
22528_ACEOF
22529
22530fi
22531
22532
22533ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22534if test "x$ac_cv_type_long_long" = x""yes; then :
22535
22536cat >>confdefs.h <<_ACEOF
22537#define HAVE_LONG_LONG 1
22538_ACEOF
22539
22540
22541fi
22542
22543ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22544if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22545
22546cat >>confdefs.h <<_ACEOF
22547#define HAVE_PTRDIFF_T 1
22548_ACEOF
22549
22550
22551fi
22552
22553
22554
22555ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22556#ifdef HAVE_SYS_SOCKET_H
22557#include <sys/socket.h>
22558#endif
22559#ifdef HAVE_WINSOCK2
22560#include <ws2tcpip.h>
22561#endif
22562"
22563if test "x$ac_cv_type_socklen_t" = x""yes; then :
22564
22565fi
22566
22567
22568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22569$as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22570if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22571  $as_echo_n "(cached) " >&6
22572else
22573
22574	set socklen_t int unsigned "unsigned long" long size_t
22575	test "$ac_cv_type_socklen_t" = yes || shift
22576	ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22577	for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22578		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22579/* end confdefs.h.  */
22580$ac_includes_default
22581#ifdef HAVE_SYS_SOCKET_H
22582#include <sys/socket.h>
22583#endif
22584extern int accept(int s, $addrtype *ap, $lentype *lp);
22585
22586int
22587main ()
22588{
22589
22590accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22591
22592  ;
22593  return 0;
22594}
22595_ACEOF
22596if ac_fn_c_try_compile "$LINENO"; then :
22597  ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22598fi
22599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22600	done ; done
22601fi
22602
22603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22604$as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22605
22606cat >>confdefs.h <<_ACEOF
22607#define ber_socklen_t $ol_cv_type_ber_socklen_t
22608_ACEOF
22609
22610
22611if test "$ac_cv_type_socklen_t" != yes; then
22612
22613cat >>confdefs.h <<_ACEOF
22614#define socklen_t $ol_cv_type_ber_socklen_t
22615_ACEOF
22616
22617fi
22618
22619
22620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22621$as_echo_n "checking return type of signal handlers... " >&6; }
22622if test "${ac_cv_type_signal+set}" = set; then :
22623  $as_echo_n "(cached) " >&6
22624else
22625  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22626/* end confdefs.h.  */
22627#include <sys/types.h>
22628#include <signal.h>
22629
22630int
22631main ()
22632{
22633return *(signal (0, 0)) (0) == 1;
22634  ;
22635  return 0;
22636}
22637_ACEOF
22638if ac_fn_c_try_compile "$LINENO"; then :
22639  ac_cv_type_signal=int
22640else
22641  ac_cv_type_signal=void
22642fi
22643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22644fi
22645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22646$as_echo "$ac_cv_type_signal" >&6; }
22647
22648cat >>confdefs.h <<_ACEOF
22649#define RETSIGTYPE $ac_cv_type_signal
22650_ACEOF
22651
22652
22653
22654ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22655#include <signal.h>
22656
22657"
22658if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22659
22660else
22661
22662cat >>confdefs.h <<_ACEOF
22663#define sig_atomic_t int
22664_ACEOF
22665
22666fi
22667
22668
22669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22670$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22671if test "${ac_cv_type_uid_t+set}" = set; then :
22672  $as_echo_n "(cached) " >&6
22673else
22674  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22675/* end confdefs.h.  */
22676#include <sys/types.h>
22677
22678_ACEOF
22679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22680  $EGREP "uid_t" >/dev/null 2>&1; then :
22681  ac_cv_type_uid_t=yes
22682else
22683  ac_cv_type_uid_t=no
22684fi
22685rm -f conftest*
22686
22687fi
22688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22689$as_echo "$ac_cv_type_uid_t" >&6; }
22690if test $ac_cv_type_uid_t = no; then
22691
22692$as_echo "#define uid_t int" >>confdefs.h
22693
22694
22695$as_echo "#define gid_t int" >>confdefs.h
22696
22697fi
22698
22699
22700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22701$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22702if test "${ac_cv_header_time+set}" = set; then :
22703  $as_echo_n "(cached) " >&6
22704else
22705  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22706/* end confdefs.h.  */
22707#include <sys/types.h>
22708#include <sys/time.h>
22709#include <time.h>
22710
22711int
22712main ()
22713{
22714if ((struct tm *) 0)
22715return 0;
22716  ;
22717  return 0;
22718}
22719_ACEOF
22720if ac_fn_c_try_compile "$LINENO"; then :
22721  ac_cv_header_time=yes
22722else
22723  ac_cv_header_time=no
22724fi
22725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22726fi
22727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22728$as_echo "$ac_cv_header_time" >&6; }
22729if test $ac_cv_header_time = yes; then
22730
22731$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22732
22733fi
22734
22735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22736$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22737if test "${ac_cv_struct_tm+set}" = set; then :
22738  $as_echo_n "(cached) " >&6
22739else
22740  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22741/* end confdefs.h.  */
22742#include <sys/types.h>
22743#include <time.h>
22744
22745int
22746main ()
22747{
22748struct tm tm;
22749				     int *p = &tm.tm_sec;
22750				     return !p;
22751  ;
22752  return 0;
22753}
22754_ACEOF
22755if ac_fn_c_try_compile "$LINENO"; then :
22756  ac_cv_struct_tm=time.h
22757else
22758  ac_cv_struct_tm=sys/time.h
22759fi
22760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22761fi
22762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22763$as_echo "$ac_cv_struct_tm" >&6; }
22764if test $ac_cv_struct_tm = sys/time.h; then
22765
22766$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22767
22768fi
22769
22770ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22771if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22772
22773cat >>confdefs.h <<_ACEOF
22774#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22775_ACEOF
22776
22777
22778fi
22779
22780ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22781#include <pwd.h>
22782"
22783if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
22784
22785cat >>confdefs.h <<_ACEOF
22786#define HAVE_STRUCT_PASSWD_PW_GECOS 1
22787_ACEOF
22788
22789
22790fi
22791
22792ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22793#include <pwd.h>
22794"
22795if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
22796
22797cat >>confdefs.h <<_ACEOF
22798#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22799_ACEOF
22800
22801
22802fi
22803
22804
22805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22806$as_echo_n "checking if toupper() requires islower()... " >&6; }
22807if test "${ol_cv_c_upper_lower+set}" = set; then :
22808  $as_echo_n "(cached) " >&6
22809else
22810
22811	if test "$cross_compiling" = yes; then :
22812  ol_cv_c_upper_lower=safe
22813else
22814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22815/* end confdefs.h.  */
22816
22817#include <ctype.h>
22818main()
22819{
22820	if ('C' == toupper('C'))
22821		exit(0);
22822	else
22823		exit(1);
22824}
22825_ACEOF
22826if ac_fn_c_try_run "$LINENO"; then :
22827  ol_cv_c_upper_lower=no
22828else
22829  ol_cv_c_upper_lower=yes
22830fi
22831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22832  conftest.$ac_objext conftest.beam conftest.$ac_ext
22833fi
22834
22835fi
22836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22837$as_echo "$ol_cv_c_upper_lower" >&6; }
22838if test $ol_cv_c_upper_lower != no ; then
22839
22840$as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22841
22842fi
22843
22844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22845$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22846if test "${ac_cv_c_const+set}" = set; then :
22847  $as_echo_n "(cached) " >&6
22848else
22849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22850/* end confdefs.h.  */
22851
22852int
22853main ()
22854{
22855/* FIXME: Include the comments suggested by Paul. */
22856#ifndef __cplusplus
22857  /* Ultrix mips cc rejects this.  */
22858  typedef int charset[2];
22859  const charset cs;
22860  /* SunOS 4.1.1 cc rejects this.  */
22861  char const *const *pcpcc;
22862  char **ppc;
22863  /* NEC SVR4.0.2 mips cc rejects this.  */
22864  struct point {int x, y;};
22865  static struct point const zero = {0,0};
22866  /* AIX XL C 1.02.0.0 rejects this.
22867     It does not let you subtract one const X* pointer from another in
22868     an arm of an if-expression whose if-part is not a constant
22869     expression */
22870  const char *g = "string";
22871  pcpcc = &g + (g ? g-g : 0);
22872  /* HPUX 7.0 cc rejects these. */
22873  ++pcpcc;
22874  ppc = (char**) pcpcc;
22875  pcpcc = (char const *const *) ppc;
22876  { /* SCO 3.2v4 cc rejects this.  */
22877    char *t;
22878    char const *s = 0 ? (char *) 0 : (char const *) 0;
22879
22880    *t++ = 0;
22881    if (s) return 0;
22882  }
22883  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22884    int x[] = {25, 17};
22885    const int *foo = &x[0];
22886    ++foo;
22887  }
22888  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22889    typedef const int *iptr;
22890    iptr p = 0;
22891    ++p;
22892  }
22893  { /* AIX XL C 1.02.0.0 rejects this saying
22894       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22895    struct s { int j; const int *ap[3]; };
22896    struct s *b; b->j = 5;
22897  }
22898  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22899    const int foo = 10;
22900    if (!foo) return 0;
22901  }
22902  return !cs[0] && !zero.x;
22903#endif
22904
22905  ;
22906  return 0;
22907}
22908_ACEOF
22909if ac_fn_c_try_compile "$LINENO"; then :
22910  ac_cv_c_const=yes
22911else
22912  ac_cv_c_const=no
22913fi
22914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22915fi
22916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22917$as_echo "$ac_cv_c_const" >&6; }
22918if test $ac_cv_c_const = no; then
22919
22920$as_echo "#define const /**/" >>confdefs.h
22921
22922fi
22923
22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22925$as_echo_n "checking if compiler understands volatile... " >&6; }
22926if test "${ol_cv_c_volatile+set}" = set; then :
22927  $as_echo_n "(cached) " >&6
22928else
22929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22930/* end confdefs.h.  */
22931int x, y, z;
22932int
22933main ()
22934{
22935volatile int a; int * volatile b = x ? &y : &z;
22936      /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22937      *b = 0;
22938  ;
22939  return 0;
22940}
22941_ACEOF
22942if ac_fn_c_try_compile "$LINENO"; then :
22943  ol_cv_c_volatile=yes
22944else
22945  ol_cv_c_volatile=no
22946fi
22947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22948fi
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22950$as_echo "$ol_cv_c_volatile" >&6; }
22951  if test $ol_cv_c_volatile = yes; then
22952    :
22953  else
22954
22955$as_echo "#define volatile /**/" >>confdefs.h
22956
22957  fi
22958
22959
22960if test $cross_compiling = yes ; then
22961	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
22962$as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
22963
22964$as_echo "#define CROSS_COMPILING 1" >>confdefs.h
22965
22966else
22967	 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
22968$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
22969if test "${ac_cv_c_bigendian+set}" = set; then :
22970  $as_echo_n "(cached) " >&6
22971else
22972  ac_cv_c_bigendian=unknown
22973    # See if we're dealing with a universal compiler.
22974    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22975/* end confdefs.h.  */
22976#ifndef __APPLE_CC__
22977	       not a universal capable compiler
22978	     #endif
22979	     typedef int dummy;
22980
22981_ACEOF
22982if ac_fn_c_try_compile "$LINENO"; then :
22983
22984	# Check for potential -arch flags.  It is not universal unless
22985	# there are at least two -arch flags with different values.
22986	ac_arch=
22987	ac_prev=
22988	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22989	 if test -n "$ac_prev"; then
22990	   case $ac_word in
22991	     i?86 | x86_64 | ppc | ppc64)
22992	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22993		 ac_arch=$ac_word
22994	       else
22995		 ac_cv_c_bigendian=universal
22996		 break
22997	       fi
22998	       ;;
22999	   esac
23000	   ac_prev=
23001	 elif test "x$ac_word" = "x-arch"; then
23002	   ac_prev=arch
23003	 fi
23004       done
23005fi
23006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23007    if test $ac_cv_c_bigendian = unknown; then
23008      # See if sys/param.h defines the BYTE_ORDER macro.
23009      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23010/* end confdefs.h.  */
23011#include <sys/types.h>
23012	     #include <sys/param.h>
23013
23014int
23015main ()
23016{
23017#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23018		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23019		     && LITTLE_ENDIAN)
23020	      bogus endian macros
23021	     #endif
23022
23023  ;
23024  return 0;
23025}
23026_ACEOF
23027if ac_fn_c_try_compile "$LINENO"; then :
23028  # It does; now see whether it defined to BIG_ENDIAN or not.
23029	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23030/* end confdefs.h.  */
23031#include <sys/types.h>
23032		#include <sys/param.h>
23033
23034int
23035main ()
23036{
23037#if BYTE_ORDER != BIG_ENDIAN
23038		 not big endian
23039		#endif
23040
23041  ;
23042  return 0;
23043}
23044_ACEOF
23045if ac_fn_c_try_compile "$LINENO"; then :
23046  ac_cv_c_bigendian=yes
23047else
23048  ac_cv_c_bigendian=no
23049fi
23050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23051fi
23052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23053    fi
23054    if test $ac_cv_c_bigendian = unknown; then
23055      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23056      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23057/* end confdefs.h.  */
23058#include <limits.h>
23059
23060int
23061main ()
23062{
23063#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23064	      bogus endian macros
23065	     #endif
23066
23067  ;
23068  return 0;
23069}
23070_ACEOF
23071if ac_fn_c_try_compile "$LINENO"; then :
23072  # It does; now see whether it defined to _BIG_ENDIAN or not.
23073	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23074/* end confdefs.h.  */
23075#include <limits.h>
23076
23077int
23078main ()
23079{
23080#ifndef _BIG_ENDIAN
23081		 not big endian
23082		#endif
23083
23084  ;
23085  return 0;
23086}
23087_ACEOF
23088if ac_fn_c_try_compile "$LINENO"; then :
23089  ac_cv_c_bigendian=yes
23090else
23091  ac_cv_c_bigendian=no
23092fi
23093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23094fi
23095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23096    fi
23097    if test $ac_cv_c_bigendian = unknown; then
23098      # Compile a test program.
23099      if test "$cross_compiling" = yes; then :
23100  # Try to guess by grepping values from an object file.
23101	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23102/* end confdefs.h.  */
23103short int ascii_mm[] =
23104		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23105		short int ascii_ii[] =
23106		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23107		int use_ascii (int i) {
23108		  return ascii_mm[i] + ascii_ii[i];
23109		}
23110		short int ebcdic_ii[] =
23111		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23112		short int ebcdic_mm[] =
23113		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23114		int use_ebcdic (int i) {
23115		  return ebcdic_mm[i] + ebcdic_ii[i];
23116		}
23117		extern int foo;
23118
23119int
23120main ()
23121{
23122return use_ascii (foo) == use_ebcdic (foo);
23123  ;
23124  return 0;
23125}
23126_ACEOF
23127if ac_fn_c_try_compile "$LINENO"; then :
23128  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23129	      ac_cv_c_bigendian=yes
23130	    fi
23131	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23132	      if test "$ac_cv_c_bigendian" = unknown; then
23133		ac_cv_c_bigendian=no
23134	      else
23135		# finding both strings is unlikely to happen, but who knows?
23136		ac_cv_c_bigendian=unknown
23137	      fi
23138	    fi
23139fi
23140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23141else
23142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23143/* end confdefs.h.  */
23144$ac_includes_default
23145int
23146main ()
23147{
23148
23149	     /* Are we little or big endian?  From Harbison&Steele.  */
23150	     union
23151	     {
23152	       long int l;
23153	       char c[sizeof (long int)];
23154	     } u;
23155	     u.l = 1;
23156	     return u.c[sizeof (long int) - 1] == 1;
23157
23158  ;
23159  return 0;
23160}
23161_ACEOF
23162if ac_fn_c_try_run "$LINENO"; then :
23163  ac_cv_c_bigendian=no
23164else
23165  ac_cv_c_bigendian=yes
23166fi
23167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23168  conftest.$ac_objext conftest.beam conftest.$ac_ext
23169fi
23170
23171    fi
23172fi
23173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23174$as_echo "$ac_cv_c_bigendian" >&6; }
23175 case $ac_cv_c_bigendian in #(
23176   yes)
23177     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23178;; #(
23179   no)
23180      ;; #(
23181   universal)
23182
23183$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23184
23185     ;; #(
23186   *)
23187     as_fn_error "unknown endianness
23188 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23189 esac
23190
23191fi
23192
23193# The cast to long int works around a bug in the HP C Compiler
23194# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23195# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23196# This bug is HP SR number 8606223364.
23197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23198$as_echo_n "checking size of short... " >&6; }
23199if test "${ac_cv_sizeof_short+set}" = set; then :
23200  $as_echo_n "(cached) " >&6
23201else
23202  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23203
23204else
23205  if test "$ac_cv_type_short" = yes; then
23206     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23207$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23208{ as_fn_set_status 77
23209as_fn_error "cannot compute sizeof (short)
23210See \`config.log' for more details." "$LINENO" 5; }; }
23211   else
23212     ac_cv_sizeof_short=0
23213   fi
23214fi
23215
23216fi
23217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23218$as_echo "$ac_cv_sizeof_short" >&6; }
23219
23220
23221
23222cat >>confdefs.h <<_ACEOF
23223#define SIZEOF_SHORT $ac_cv_sizeof_short
23224_ACEOF
23225
23226
23227# The cast to long int works around a bug in the HP C Compiler
23228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23230# This bug is HP SR number 8606223364.
23231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23232$as_echo_n "checking size of int... " >&6; }
23233if test "${ac_cv_sizeof_int+set}" = set; then :
23234  $as_echo_n "(cached) " >&6
23235else
23236  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23237
23238else
23239  if test "$ac_cv_type_int" = yes; then
23240     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23241$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23242{ as_fn_set_status 77
23243as_fn_error "cannot compute sizeof (int)
23244See \`config.log' for more details." "$LINENO" 5; }; }
23245   else
23246     ac_cv_sizeof_int=0
23247   fi
23248fi
23249
23250fi
23251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23252$as_echo "$ac_cv_sizeof_int" >&6; }
23253
23254
23255
23256cat >>confdefs.h <<_ACEOF
23257#define SIZEOF_INT $ac_cv_sizeof_int
23258_ACEOF
23259
23260
23261# The cast to long int works around a bug in the HP C Compiler
23262# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23263# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23264# This bug is HP SR number 8606223364.
23265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23266$as_echo_n "checking size of long... " >&6; }
23267if test "${ac_cv_sizeof_long+set}" = set; then :
23268  $as_echo_n "(cached) " >&6
23269else
23270  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23271
23272else
23273  if test "$ac_cv_type_long" = yes; then
23274     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23275$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23276{ as_fn_set_status 77
23277as_fn_error "cannot compute sizeof (long)
23278See \`config.log' for more details." "$LINENO" 5; }; }
23279   else
23280     ac_cv_sizeof_long=0
23281   fi
23282fi
23283
23284fi
23285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23286$as_echo "$ac_cv_sizeof_long" >&6; }
23287
23288
23289
23290cat >>confdefs.h <<_ACEOF
23291#define SIZEOF_LONG $ac_cv_sizeof_long
23292_ACEOF
23293
23294
23295# The cast to long int works around a bug in the HP C Compiler
23296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23298# This bug is HP SR number 8606223364.
23299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23300$as_echo_n "checking size of long long... " >&6; }
23301if test "${ac_cv_sizeof_long_long+set}" = set; then :
23302  $as_echo_n "(cached) " >&6
23303else
23304  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23305
23306else
23307  if test "$ac_cv_type_long_long" = yes; then
23308     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23309$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23310{ as_fn_set_status 77
23311as_fn_error "cannot compute sizeof (long long)
23312See \`config.log' for more details." "$LINENO" 5; }; }
23313   else
23314     ac_cv_sizeof_long_long=0
23315   fi
23316fi
23317
23318fi
23319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23320$as_echo "$ac_cv_sizeof_long_long" >&6; }
23321
23322
23323
23324cat >>confdefs.h <<_ACEOF
23325#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23326_ACEOF
23327
23328
23329# The cast to long int works around a bug in the HP C Compiler
23330# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23331# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23332# This bug is HP SR number 8606223364.
23333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23334$as_echo_n "checking size of wchar_t... " >&6; }
23335if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23336  $as_echo_n "(cached) " >&6
23337else
23338  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23339
23340else
23341  if test "$ac_cv_type_wchar_t" = yes; then
23342     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23343$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23344{ as_fn_set_status 77
23345as_fn_error "cannot compute sizeof (wchar_t)
23346See \`config.log' for more details." "$LINENO" 5; }; }
23347   else
23348     ac_cv_sizeof_wchar_t=0
23349   fi
23350fi
23351
23352fi
23353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23354$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23355
23356
23357
23358cat >>confdefs.h <<_ACEOF
23359#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23360_ACEOF
23361
23362
23363
23364if test "$ac_cv_sizeof_int" -lt 4 ; then
23365	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23366$as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23367
23368
23369$as_echo "#define LBER_INT_T long" >>confdefs.h
23370
23371else
23372
23373$as_echo "#define LBER_INT_T int" >>confdefs.h
23374
23375fi
23376
23377
23378$as_echo "#define LBER_LEN_T long" >>confdefs.h
23379
23380
23381$as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23382
23383
23384$as_echo "#define LBER_TAG_T long" >>confdefs.h
23385
23386
23387if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23388	if test $ac_cv_sizeof_long_long -gt 4 ; then
23389		ol_with_mp=longlong
23390
23391$as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23392
23393	elif test $ol_with_mp = longlong ; then
23394		as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23395	fi
23396fi
23397if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23398	if test $ac_cv_sizeof_long -gt 4 ; then
23399		ol_with_mp=long
23400
23401$as_echo "#define USE_MP_LONG 1" >>confdefs.h
23402
23403	elif test $ol_with_mp = long ; then
23404		as_fn_error "long unusable for multiple precision" "$LINENO" 5
23405	fi
23406fi
23407if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23408	for ac_header in openssl/bn.h
23409do :
23410  ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23411if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23412  cat >>confdefs.h <<_ACEOF
23413#define HAVE_OPENSSL_BN_H 1
23414_ACEOF
23415
23416fi
23417
23418done
23419
23420	for ac_header in openssl/crypto.h
23421do :
23422  ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23423if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23424  cat >>confdefs.h <<_ACEOF
23425#define HAVE_OPENSSL_CRYPTO_H 1
23426_ACEOF
23427
23428fi
23429
23430done
23431
23432	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23433		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23434		test "$ol_with_tls" = "found" ; then
23435		ol_with_mp=bignum
23436
23437$as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23438
23439	elif test $ol_with_mp = bignum ; then
23440		as_fn_error "bignum not available" "$LINENO" 5
23441	fi
23442fi
23443if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23444	for ac_header in gmp.h
23445do :
23446  ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23447if test "x$ac_cv_header_gmp_h" = x""yes; then :
23448  cat >>confdefs.h <<_ACEOF
23449#define HAVE_GMP_H 1
23450_ACEOF
23451
23452fi
23453
23454done
23455
23456	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23457$as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23458if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23459  $as_echo_n "(cached) " >&6
23460else
23461  ac_check_lib_save_LIBS=$LIBS
23462LIBS="-lgmp  $LIBS"
23463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23464/* end confdefs.h.  */
23465
23466/* Override any GCC internal prototype to avoid an error.
23467   Use char because int might match the return type of a GCC
23468   builtin and then its argument prototype would still apply.  */
23469#ifdef __cplusplus
23470extern "C"
23471#endif
23472char __gmpz_add_ui ();
23473int
23474main ()
23475{
23476return __gmpz_add_ui ();
23477  ;
23478  return 0;
23479}
23480_ACEOF
23481if ac_fn_c_try_link "$LINENO"; then :
23482  ac_cv_lib_gmp___gmpz_add_ui=yes
23483else
23484  ac_cv_lib_gmp___gmpz_add_ui=no
23485fi
23486rm -f core conftest.err conftest.$ac_objext \
23487    conftest$ac_exeext conftest.$ac_ext
23488LIBS=$ac_check_lib_save_LIBS
23489fi
23490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23491$as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23492if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23493  cat >>confdefs.h <<_ACEOF
23494#define HAVE_LIBGMP 1
23495_ACEOF
23496
23497  LIBS="-lgmp $LIBS"
23498
23499fi
23500
23501	if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23502
23503$as_echo "#define USE_MP_GMP 1" >>confdefs.h
23504
23505		ol_with_mp=gmp
23506	elif test $ol_with_mp = gmp ; then
23507		as_fn_error "gmp not available" "$LINENO" 5
23508	fi
23509fi
23510if test $ol_with_mp = auto ; then
23511	ol_with_mp=no
23512fi
23513
23514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23515$as_echo_n "checking for working memcmp... " >&6; }
23516if test "${ac_cv_func_memcmp_working+set}" = set; then :
23517  $as_echo_n "(cached) " >&6
23518else
23519  if test "$cross_compiling" = yes; then :
23520  ac_cv_func_memcmp_working=no
23521else
23522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23523/* end confdefs.h.  */
23524$ac_includes_default
23525int
23526main ()
23527{
23528
23529  /* Some versions of memcmp are not 8-bit clean.  */
23530  char c0 = '\100', c1 = '\200', c2 = '\201';
23531  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23532    return 1;
23533
23534  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23535     or more and with at least one buffer not starting on a 4-byte boundary.
23536     William Lewis provided this test program.   */
23537  {
23538    char foo[21];
23539    char bar[21];
23540    int i;
23541    for (i = 0; i < 4; i++)
23542      {
23543	char *a = foo + i;
23544	char *b = bar + i;
23545	strcpy (a, "--------01111111");
23546	strcpy (b, "--------10000000");
23547	if (memcmp (a, b, 16) >= 0)
23548	  return 1;
23549      }
23550    return 0;
23551  }
23552
23553  ;
23554  return 0;
23555}
23556_ACEOF
23557if ac_fn_c_try_run "$LINENO"; then :
23558  ac_cv_func_memcmp_working=yes
23559else
23560  ac_cv_func_memcmp_working=no
23561fi
23562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23563  conftest.$ac_objext conftest.beam conftest.$ac_ext
23564fi
23565
23566fi
23567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23568$as_echo "$ac_cv_func_memcmp_working" >&6; }
23569test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23570  *" memcmp.$ac_objext "* ) ;;
23571  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23572 ;;
23573esac
23574
23575
23576
23577if test $ac_cv_func_memcmp_working = no ; then
23578
23579$as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23580
23581fi
23582
23583for ac_func in strftime
23584do :
23585  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23586if test "x$ac_cv_func_strftime" = x""yes; then :
23587  cat >>confdefs.h <<_ACEOF
23588#define HAVE_STRFTIME 1
23589_ACEOF
23590
23591else
23592  # strftime is in -lintl on SCO UNIX.
23593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23594$as_echo_n "checking for strftime in -lintl... " >&6; }
23595if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23596  $as_echo_n "(cached) " >&6
23597else
23598  ac_check_lib_save_LIBS=$LIBS
23599LIBS="-lintl  $LIBS"
23600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23601/* end confdefs.h.  */
23602
23603/* Override any GCC internal prototype to avoid an error.
23604   Use char because int might match the return type of a GCC
23605   builtin and then its argument prototype would still apply.  */
23606#ifdef __cplusplus
23607extern "C"
23608#endif
23609char strftime ();
23610int
23611main ()
23612{
23613return strftime ();
23614  ;
23615  return 0;
23616}
23617_ACEOF
23618if ac_fn_c_try_link "$LINENO"; then :
23619  ac_cv_lib_intl_strftime=yes
23620else
23621  ac_cv_lib_intl_strftime=no
23622fi
23623rm -f core conftest.err conftest.$ac_objext \
23624    conftest$ac_exeext conftest.$ac_ext
23625LIBS=$ac_check_lib_save_LIBS
23626fi
23627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23628$as_echo "$ac_cv_lib_intl_strftime" >&6; }
23629if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23630  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23631
23632LIBS="-lintl $LIBS"
23633fi
23634
23635fi
23636done
23637
23638
23639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23640$as_echo_n "checking for inet_aton()... " >&6; }
23641if test "${ol_cv_func_inet_aton+set}" = set; then :
23642  $as_echo_n "(cached) " >&6
23643else
23644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23645/* end confdefs.h.  */
23646
23647#ifdef HAVE_SYS_TYPES_H
23648#	include <sys/types.h>
23649#endif
23650#ifdef HAVE_SYS_SOCKET_H
23651#	include <sys/socket.h>
23652#	ifdef HAVE_SYS_SELECT_H
23653#		include <sys/select.h>
23654#	endif
23655#	include <netinet/in.h>
23656#	ifdef HAVE_ARPA_INET_H
23657#		include <arpa/inet.h>
23658#	endif
23659#endif
23660
23661int
23662main ()
23663{
23664struct in_addr in;
23665int rc = inet_aton( "255.255.255.255", &in );
23666  ;
23667  return 0;
23668}
23669_ACEOF
23670if ac_fn_c_try_link "$LINENO"; then :
23671  ol_cv_func_inet_aton=yes
23672else
23673  ol_cv_func_inet_aton=no
23674fi
23675rm -f core conftest.err conftest.$ac_objext \
23676    conftest$ac_exeext conftest.$ac_ext
23677fi
23678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23679$as_echo "$ol_cv_func_inet_aton" >&6; }
23680  if test $ol_cv_func_inet_aton != no; then
23681
23682$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23683
23684  fi
23685
23686
23687ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23688if test "x$ac_cv_func__spawnlp" = x""yes; then :
23689
23690$as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23691
23692fi
23693
23694
23695ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23696if test "x$ac_cv_func__snprintf" = x""yes; then :
23697  ac_cv_func_snprintf=yes
23698
23699$as_echo "#define snprintf _snprintf" >>confdefs.h
23700
23701
23702fi
23703
23704
23705for ac_func in vsnprintf _vsnprintf
23706do :
23707  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23708ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23709eval as_val=\$$as_ac_var
23710   if test "x$as_val" = x""yes; then :
23711  cat >>confdefs.h <<_ACEOF
23712#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23713_ACEOF
23714
23715fi
23716done
23717
23718
23719if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23720	ac_cv_func_vsnprintf=yes
23721
23722$as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23723
23724fi
23725
23726for ac_func in vprintf
23727do :
23728  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23729if test "x$ac_cv_func_vprintf" = x""yes; then :
23730  cat >>confdefs.h <<_ACEOF
23731#define HAVE_VPRINTF 1
23732_ACEOF
23733
23734ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23735if test "x$ac_cv_func__doprnt" = x""yes; then :
23736
23737$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23738
23739fi
23740
23741fi
23742done
23743
23744
23745
23746if test $ac_cv_func_vprintf = yes ; then
23747		for ac_func in snprintf vsnprintf
23748do :
23749  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23750ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23751eval as_val=\$$as_ac_var
23752   if test "x$as_val" = x""yes; then :
23753  cat >>confdefs.h <<_ACEOF
23754#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23755_ACEOF
23756
23757fi
23758done
23759
23760fi
23761
23762for ac_func in \
23763	bcopy			\
23764	closesocket		\
23765	chroot			\
23766	endgrent		\
23767	endpwent		\
23768	fcntl			\
23769	flock			\
23770	fstat			\
23771	getdtablesize		\
23772	geteuid			\
23773	getgrgid		\
23774	gethostname		\
23775	getpassphrase		\
23776	getpwuid		\
23777	getpwnam		\
23778	getspnam		\
23779	gettimeofday		\
23780	initgroups		\
23781	inet_ntoa_b		\
23782	ioctl			\
23783	lockf			\
23784	memcpy			\
23785	memmove			\
23786	memrchr			\
23787	mkstemp			\
23788	mktemp			\
23789	pipe			\
23790	read			\
23791	recv			\
23792	recvfrom		\
23793	setpwfile		\
23794	setgid			\
23795	setegid			\
23796	setsid			\
23797	setuid			\
23798	seteuid			\
23799	signal			\
23800	strdup			\
23801	strpbrk			\
23802	strrchr			\
23803	strsep			\
23804	strstr			\
23805	strtol			\
23806	strtoul			\
23807	strtoq			\
23808	strtouq			\
23809	strtoll			\
23810	strtoull		\
23811	strspn			\
23812	sysconf			\
23813	waitpid			\
23814	wait4			\
23815	write			\
23816	send			\
23817	sendmsg			\
23818	sendto			\
23819
23820do :
23821  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23822ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23823eval as_val=\$$as_ac_var
23824   if test "x$as_val" = x""yes; then :
23825  cat >>confdefs.h <<_ACEOF
23826#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23827_ACEOF
23828
23829fi
23830done
23831
23832
23833for ac_func in getopt getpeereid
23834do :
23835  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23836ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23837eval as_val=\$$as_ac_var
23838   if test "x$as_val" = x""yes; then :
23839  cat >>confdefs.h <<_ACEOF
23840#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23841_ACEOF
23842
23843else
23844  case " $LIBOBJS " in
23845  *" $ac_func.$ac_objext "* ) ;;
23846  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
23847 ;;
23848esac
23849
23850fi
23851done
23852
23853
23854
23855if test "$ac_cv_func_getopt" != yes; then
23856	LIBSRCS="$LIBSRCS getopt.c"
23857fi
23858
23859if test "$ac_cv_func_getpeereid" != yes; then
23860	for ac_func in getpeerucred
23861do :
23862  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23863ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23864eval as_val=\$$as_ac_var
23865   if test "x$as_val" = x""yes; then :
23866  cat >>confdefs.h <<_ACEOF
23867#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23868_ACEOF
23869
23870fi
23871done
23872
23873	if test "$ac_cv_func_getpeerucred" != yes ; then
23874		ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23875#ifdef HAVE_SYS_SOCKET_H
23876#include <sys/socket.h>
23877#endif
23878"
23879if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
23880
23881cat >>confdefs.h <<_ACEOF
23882#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23883_ACEOF
23884
23885
23886fi
23887
23888		if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23889			ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23890#ifdef HAVE_SYS_SOCKET_H
23891#include <sys/socket.h>
23892#endif
23893"
23894if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
23895
23896cat >>confdefs.h <<_ACEOF
23897#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23898_ACEOF
23899
23900
23901fi
23902
23903		fi
23904		ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23905if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
23906
23907cat >>confdefs.h <<_ACEOF
23908#define HAVE_STRUCT_STAT_ST_FSTYPE 1
23909_ACEOF
23910
23911
23912fi
23913ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23914if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
23915
23916cat >>confdefs.h <<_ACEOF
23917#define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23918_ACEOF
23919
23920
23921fi
23922
23923		if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23924			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23925/* end confdefs.h.  */
23926struct stat st; char *ptr=st.st_fstype;
23927_ACEOF
23928if ac_fn_c_try_compile "$LINENO"; then :
23929
23930$as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23931
23932else
23933
23934$as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23935
23936fi
23937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23938		fi
23939	fi
23940	LIBSRCS="$LIBSRCS getpeereid.c"
23941fi
23942
23943if test "$ac_cv_func_snprintf" != yes ||
23944   test "$ac_cv_func_vsnprintf" != yes; then
23945	if test "$ac_cv_func_snprintf" != yes; then
23946
23947$as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23948
23949	fi
23950	if test "$ac_cv_func_vsnprintf" != yes; then
23951
23952$as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23953
23954	fi
23955fi
23956
23957
23958if test "$ol_enable_slapi" != no ; then
23959			for ac_header in ltdl.h
23960do :
23961  ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
23962if test "x$ac_cv_header_ltdl_h" = x""yes; then :
23963  cat >>confdefs.h <<_ACEOF
23964#define HAVE_LTDL_H 1
23965_ACEOF
23966
23967fi
23968
23969done
23970
23971
23972	if test $ac_cv_header_ltdl_h != yes ; then
23973		as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
23974	fi
23975	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
23976$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
23977if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
23978  $as_echo_n "(cached) " >&6
23979else
23980  ac_check_lib_save_LIBS=$LIBS
23981LIBS="-lltdl  $LIBS"
23982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23983/* end confdefs.h.  */
23984
23985/* Override any GCC internal prototype to avoid an error.
23986   Use char because int might match the return type of a GCC
23987   builtin and then its argument prototype would still apply.  */
23988#ifdef __cplusplus
23989extern "C"
23990#endif
23991char lt_dlinit ();
23992int
23993main ()
23994{
23995return lt_dlinit ();
23996  ;
23997  return 0;
23998}
23999_ACEOF
24000if ac_fn_c_try_link "$LINENO"; then :
24001  ac_cv_lib_ltdl_lt_dlinit=yes
24002else
24003  ac_cv_lib_ltdl_lt_dlinit=no
24004fi
24005rm -f core conftest.err conftest.$ac_objext \
24006    conftest$ac_exeext conftest.$ac_ext
24007LIBS=$ac_check_lib_save_LIBS
24008fi
24009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
24010$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
24011if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
24012
24013		SLAPI_LIBS=-lltdl
24014		LIBSLAPI=slapi/libslapi.la
24015
24016$as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24017
24018
24019else
24020  as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24021fi
24022
24023
24024
24025$as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24026
24027fi
24028
24029if test "$ol_enable_debug" != no ; then
24030	if test "$ol_enable_debug" = traditional; then
24031
24032$as_echo "#define OLD_DEBUG 1" >>confdefs.h
24033
24034	fi
24035
24036$as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24037
24038fi
24039if test "$ol_enable_syslog" = yes ; then
24040
24041$as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24042
24043fi
24044if test "$ol_enable_proctitle" != no ; then
24045
24046$as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24047
24048fi
24049if test "$ol_enable_referrals" != no ; then
24050
24051$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24052
24053fi
24054if test "$ol_enable_local" != no; then
24055
24056$as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24057
24058fi
24059if test "$ol_link_ipv6" != no; then
24060
24061$as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24062
24063fi
24064if test "$ol_enable_cleartext" != no ; then
24065
24066$as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24067
24068fi
24069if test "$ol_enable_crypt" != no ; then
24070
24071$as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24072
24073fi
24074if test "$ol_link_spasswd" != no ; then
24075
24076$as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24077
24078fi
24079if test "$ol_enable_rlookups" != no ; then
24080
24081$as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24082
24083fi
24084if test "$ol_enable_aci" != no ; then
24085	if test $ol_enable_dynacl = no ; then
24086		ol_enable_dynacl=yes
24087		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24088$as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24089	fi
24090	if test "$ol_enable_aci" = mod ; then
24091		MFLAG=SLAPD_MOD_DYNAMIC
24092				as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24093	else
24094		MFLAG=SLAPD_MOD_STATIC
24095	fi
24096	WITH_ACI_ENABLED=$ol_enable_aci
24097
24098cat >>confdefs.h <<_ACEOF
24099#define SLAPD_ACI_ENABLED $MFLAG
24100_ACEOF
24101
24102else
24103	WITH_ACI_ENABLED=no
24104fi
24105if test "$ol_enable_dynacl" != no ; then
24106
24107$as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24108
24109fi
24110
24111if test "$ol_link_modules" != no ; then
24112
24113$as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24114
24115	BUILD_SLAPD=yes
24116	SLAPD_MODULES_LDFLAGS="-dlopen self"
24117fi
24118
24119
24120$as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24121
24122
24123$as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24124
24125
24126if test "$ol_enable_monitor" != no ; then
24127	BUILD_SLAPD=yes
24128	BUILD_MONITOR=$ol_enable_monitor
24129	if test "$ol_enable_monitor" = mod ; then
24130		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24131		MFLAG=SLAPD_MOD_DYNAMIC
24132	else
24133		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24134		MFLAG=SLAPD_MOD_STATIC
24135	fi
24136
24137cat >>confdefs.h <<_ACEOF
24138#define SLAPD_MONITOR $MFLAG
24139_ACEOF
24140
24141fi
24142
24143if test "$ol_enable_bdb" != no ; then
24144	BUILD_SLAPD=yes
24145	BUILD_BDB=$ol_enable_bdb
24146	if test "$ol_enable_bdb" = mod ; then
24147		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24148		MFLAG=SLAPD_MOD_DYNAMIC
24149	else
24150		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24151		MFLAG=SLAPD_MOD_STATIC
24152	fi
24153
24154cat >>confdefs.h <<_ACEOF
24155#define SLAPD_BDB $MFLAG
24156_ACEOF
24157
24158fi
24159
24160if test "$ol_enable_dnssrv" != no ; then
24161	BUILD_SLAPD=yes
24162	BUILD_DNSSRV=$ol_enable_dnssrv
24163	if test "$ol_enable_dnssrv" = mod ; then
24164		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24165		MFLAG=SLAPD_MOD_DYNAMIC
24166	else
24167		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24168		MFLAG=SLAPD_MOD_STATIC
24169	fi
24170
24171cat >>confdefs.h <<_ACEOF
24172#define SLAPD_DNSSRV $MFLAG
24173_ACEOF
24174
24175fi
24176
24177if test "$ol_enable_hdb" != no ; then
24178	BUILD_SLAPD=yes
24179	BUILD_HDB=$ol_enable_hdb
24180	if test "$ol_enable_hdb" = mod ; then
24181		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24182		MFLAG=SLAPD_MOD_DYNAMIC
24183	else
24184		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24185		MFLAG=SLAPD_MOD_STATIC
24186	fi
24187
24188cat >>confdefs.h <<_ACEOF
24189#define SLAPD_HDB $MFLAG
24190_ACEOF
24191
24192fi
24193
24194if test "$ol_enable_ldap" != no ; then
24195	BUILD_SLAPD=yes
24196	BUILD_LDAP=$ol_enable_ldap
24197	if test "$ol_enable_ldap" = mod ; then
24198		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24199		MFLAG=SLAPD_MOD_DYNAMIC
24200	else
24201		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24202		MFLAG=SLAPD_MOD_STATIC
24203	fi
24204
24205cat >>confdefs.h <<_ACEOF
24206#define SLAPD_LDAP $MFLAG
24207_ACEOF
24208
24209fi
24210
24211if test "$ol_enable_mdb" != no ; then
24212	BUILD_SLAPD=yes
24213	BUILD_MDB=$ol_enable_mdb
24214	if test "$ol_enable_mdb" = mod ; then
24215		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24216		MFLAG=SLAPD_MOD_DYNAMIC
24217	else
24218		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24219		MFLAG=SLAPD_MOD_STATIC
24220	fi
24221
24222cat >>confdefs.h <<_ACEOF
24223#define SLAPD_MDB $MFLAG
24224_ACEOF
24225
24226fi
24227
24228if test "$ol_enable_meta" != no ; then
24229	BUILD_SLAPD=yes
24230	BUILD_META=$ol_enable_meta
24231	BUILD_REWRITE=yes
24232	if test "$ol_enable_meta" = mod ; then
24233		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24234		MFLAG=SLAPD_MOD_DYNAMIC
24235	else
24236		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24237		MFLAG=SLAPD_MOD_STATIC
24238	fi
24239
24240cat >>confdefs.h <<_ACEOF
24241#define SLAPD_META $MFLAG
24242_ACEOF
24243
24244fi
24245
24246if test "$ol_enable_ndb" != no ; then
24247	BUILD_SLAPD=yes
24248	BUILD_NDB=$ol_enable_ndb
24249	if test "$ol_enable_ndb" = mod ; then
24250		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24251		MFLAG=SLAPD_MOD_DYNAMIC
24252	else
24253		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24254		MFLAG=SLAPD_MOD_STATIC
24255	fi
24256
24257cat >>confdefs.h <<_ACEOF
24258#define SLAPD_NDB $MFLAG
24259_ACEOF
24260
24261fi
24262
24263if test "$ol_enable_null" != no ; then
24264	BUILD_SLAPD=yes
24265	BUILD_NULL=$ol_enable_null
24266	if test "$ol_enable_null" = mod ; then
24267		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24268		MFLAG=SLAPD_MOD_DYNAMIC
24269	else
24270		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24271		MFLAG=SLAPD_MOD_STATIC
24272	fi
24273
24274cat >>confdefs.h <<_ACEOF
24275#define SLAPD_NULL $MFLAG
24276_ACEOF
24277
24278fi
24279
24280if test "$ol_enable_passwd" != no ; then
24281	BUILD_SLAPD=yes
24282	BUILD_PASSWD=$ol_enable_passwd
24283	if test "$ol_enable_passwd" = mod ; then
24284		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24285		MFLAG=SLAPD_MOD_DYNAMIC
24286	else
24287		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24288		MFLAG=SLAPD_MOD_STATIC
24289	fi
24290
24291cat >>confdefs.h <<_ACEOF
24292#define SLAPD_PASSWD $MFLAG
24293_ACEOF
24294
24295fi
24296
24297if test "$ol_link_perl" != no ; then
24298	BUILD_SLAPD=yes
24299	BUILD_PERL=$ol_enable_perl
24300	if test "$ol_enable_perl" = mod ; then
24301		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24302		MFLAG=SLAPD_MOD_DYNAMIC
24303	else
24304		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24305		MFLAG=SLAPD_MOD_STATIC
24306	fi
24307
24308cat >>confdefs.h <<_ACEOF
24309#define SLAPD_PERL $MFLAG
24310_ACEOF
24311
24312fi
24313
24314if test "$ol_enable_relay" != no ; then
24315	BUILD_SLAPD=yes
24316	BUILD_RELAY=$ol_enable_relay
24317	if test "$ol_enable_relay" = mod ; then
24318		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24319		MFLAG=SLAPD_MOD_DYNAMIC
24320	else
24321		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24322		MFLAG=SLAPD_MOD_STATIC
24323	fi
24324
24325cat >>confdefs.h <<_ACEOF
24326#define SLAPD_RELAY $MFLAG
24327_ACEOF
24328
24329fi
24330
24331if test "$ol_enable_shell" != no ; then
24332	if test "$ol_link_threads" != no ; then
24333		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24334$as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24335	fi
24336	BUILD_SLAPD=yes
24337	BUILD_SHELL=$ol_enable_shell
24338	if test "$ol_enable_shell" = mod ; then
24339		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24340		MFLAG=SLAPD_MOD_DYNAMIC
24341	else
24342		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24343		MFLAG=SLAPD_MOD_STATIC
24344	fi
24345
24346cat >>confdefs.h <<_ACEOF
24347#define SLAPD_SHELL $MFLAG
24348_ACEOF
24349
24350fi
24351
24352if test "$ol_enable_sock" != no ; then
24353	BUILD_SLAPD=yes
24354	BUILD_SOCK=$ol_enable_sock
24355	if test "$ol_enable_sock" = mod ; then
24356		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24357		MFLAG=SLAPD_MOD_DYNAMIC
24358	else
24359		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24360		MFLAG=SLAPD_MOD_STATIC
24361	fi
24362
24363cat >>confdefs.h <<_ACEOF
24364#define SLAPD_SOCK $MFLAG
24365_ACEOF
24366
24367fi
24368
24369if test "$ol_link_sql" != no ; then
24370	BUILD_SLAPD=yes
24371	BUILD_SQL=$ol_enable_sql
24372	if test "$ol_enable_sql" = mod; then
24373		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24374		MFLAG=SLAPD_MOD_DYNAMIC
24375	else
24376		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24377		MFLAG=SLAPD_MOD_STATIC
24378	fi
24379
24380cat >>confdefs.h <<_ACEOF
24381#define SLAPD_SQL $MFLAG
24382_ACEOF
24383
24384fi
24385
24386if test "$ol_enable_accesslog" != no ; then
24387	BUILD_ACCESSLOG=$ol_enable_accesslog
24388	if test "$ol_enable_accesslog" = mod ; then
24389		MFLAG=SLAPD_MOD_DYNAMIC
24390		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24391	else
24392		MFLAG=SLAPD_MOD_STATIC
24393		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24394	fi
24395
24396cat >>confdefs.h <<_ACEOF
24397#define SLAPD_OVER_ACCESSLOG $MFLAG
24398_ACEOF
24399
24400fi
24401
24402if test "$ol_enable_auditlog" != no ; then
24403	BUILD_AUDITLOG=$ol_enable_auditlog
24404	if test "$ol_enable_auditlog" = mod ; then
24405		MFLAG=SLAPD_MOD_DYNAMIC
24406		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24407	else
24408		MFLAG=SLAPD_MOD_STATIC
24409		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24410	fi
24411
24412cat >>confdefs.h <<_ACEOF
24413#define SLAPD_OVER_AUDITLOG $MFLAG
24414_ACEOF
24415
24416fi
24417
24418if test "$ol_enable_collect" != no ; then
24419        BUILD_COLLECT=$ol_enable_collect
24420        if test "$ol_enable_collect" = mod ; then
24421                MFLAG=SLAPD_MOD_DYNAMIC
24422                SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24423        else
24424                MFLAG=SLAPD_MOD_STATIC
24425                SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24426        fi
24427
24428cat >>confdefs.h <<_ACEOF
24429#define SLAPD_OVER_COLLECT $MFLAG
24430_ACEOF
24431
24432fi
24433
24434if test "$ol_enable_constraint" != no ; then
24435	BUILD_CONSTRAINT=$ol_enable_constraint
24436	if test "$ol_enable_constraint" = mod ; then
24437		MFLAG=SLAPD_MOD_DYNAMIC
24438		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24439	else
24440		MFLAG=SLAPD_MOD_STATIC
24441		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24442	fi
24443
24444cat >>confdefs.h <<_ACEOF
24445#define SLAPD_OVER_CONSTRAINT $MFLAG
24446_ACEOF
24447
24448fi
24449
24450if test "$ol_enable_dds" != no ; then
24451	BUILD_DDS=$ol_enable_dds
24452	if test "$ol_enable_dds" = mod ; then
24453		MFLAG=SLAPD_MOD_DYNAMIC
24454		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24455	else
24456		MFLAG=SLAPD_MOD_STATIC
24457		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24458	fi
24459
24460cat >>confdefs.h <<_ACEOF
24461#define SLAPD_OVER_DDS $MFLAG
24462_ACEOF
24463
24464fi
24465
24466if test "$ol_enable_deref" != no ; then
24467	BUILD_DEREF=$ol_enable_deref
24468	if test "$ol_enable_deref" = mod ; then
24469		MFLAG=SLAPD_MOD_DYNAMIC
24470		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24471	else
24472		MFLAG=SLAPD_MOD_STATIC
24473		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24474	fi
24475
24476cat >>confdefs.h <<_ACEOF
24477#define SLAPD_OVER_DEREF $MFLAG
24478_ACEOF
24479
24480fi
24481
24482if test "$ol_enable_dyngroup" != no ; then
24483	BUILD_DYNGROUP=$ol_enable_dyngroup
24484	if test "$ol_enable_dyngroup" = mod ; then
24485		MFLAG=SLAPD_MOD_DYNAMIC
24486		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24487	else
24488		MFLAG=SLAPD_MOD_STATIC
24489		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24490	fi
24491
24492cat >>confdefs.h <<_ACEOF
24493#define SLAPD_OVER_DYNGROUP $MFLAG
24494_ACEOF
24495
24496fi
24497
24498if test "$ol_enable_dynlist" != no ; then
24499	BUILD_DYNLIST=$ol_enable_dynlist
24500	if test "$ol_enable_dynlist" = mod ; then
24501		MFLAG=SLAPD_MOD_DYNAMIC
24502		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24503	else
24504		MFLAG=SLAPD_MOD_STATIC
24505		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24506	fi
24507
24508cat >>confdefs.h <<_ACEOF
24509#define SLAPD_OVER_DYNLIST $MFLAG
24510_ACEOF
24511
24512fi
24513
24514if test "$ol_enable_memberof" != no ; then
24515	BUILD_MEMBEROF=$ol_enable_memberof
24516	if test "$ol_enable_memberof" = mod ; then
24517		MFLAG=SLAPD_MOD_DYNAMIC
24518		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24519	else
24520		MFLAG=SLAPD_MOD_STATIC
24521		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24522	fi
24523
24524cat >>confdefs.h <<_ACEOF
24525#define SLAPD_OVER_MEMBEROF $MFLAG
24526_ACEOF
24527
24528fi
24529
24530if test "$ol_enable_ppolicy" != no ; then
24531	BUILD_PPOLICY=$ol_enable_ppolicy
24532	if test "$ol_enable_ppolicy" = mod ; then
24533		MFLAG=SLAPD_MOD_DYNAMIC
24534		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24535	else
24536		MFLAG=SLAPD_MOD_STATIC
24537		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24538	fi
24539
24540cat >>confdefs.h <<_ACEOF
24541#define SLAPD_OVER_PPOLICY $MFLAG
24542_ACEOF
24543
24544fi
24545
24546if test "$ol_enable_proxycache" != no ; then
24547	BUILD_PROXYCACHE=$ol_enable_proxycache
24548	if test "$ol_enable_proxycache" = mod ; then
24549		MFLAG=SLAPD_MOD_DYNAMIC
24550		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24551	else
24552		MFLAG=SLAPD_MOD_STATIC
24553		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24554	fi
24555
24556cat >>confdefs.h <<_ACEOF
24557#define SLAPD_OVER_PROXYCACHE $MFLAG
24558_ACEOF
24559
24560fi
24561
24562if test "$ol_enable_refint" != no ; then
24563	BUILD_REFINT=$ol_enable_refint
24564	if test "$ol_enable_refint" = mod ; then
24565		MFLAG=SLAPD_MOD_DYNAMIC
24566		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24567	else
24568		MFLAG=SLAPD_MOD_STATIC
24569		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24570	fi
24571
24572cat >>confdefs.h <<_ACEOF
24573#define SLAPD_OVER_REFINT $MFLAG
24574_ACEOF
24575
24576fi
24577
24578if test "$ol_enable_retcode" != no ; then
24579	BUILD_RETCODE=$ol_enable_retcode
24580	if test "$ol_enable_retcode" = mod ; then
24581		MFLAG=SLAPD_MOD_DYNAMIC
24582		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24583	else
24584		MFLAG=SLAPD_MOD_STATIC
24585		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24586	fi
24587
24588cat >>confdefs.h <<_ACEOF
24589#define SLAPD_OVER_RETCODE $MFLAG
24590_ACEOF
24591
24592fi
24593
24594if test "$ol_enable_rwm" != no ; then
24595	BUILD_REWRITE=yes
24596	BUILD_RWM=$ol_enable_rwm
24597	if test "$ol_enable_rwm" = mod ; then
24598		MFLAG=SLAPD_MOD_DYNAMIC
24599		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24600	else
24601		MFLAG=SLAPD_MOD_STATIC
24602		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24603	fi
24604
24605cat >>confdefs.h <<_ACEOF
24606#define SLAPD_OVER_RWM $MFLAG
24607_ACEOF
24608
24609fi
24610
24611if test "$ol_enable_seqmod" != no ; then
24612	BUILD_SEQMOD=$ol_enable_seqmod
24613	if test "$ol_enable_seqmod" = mod ; then
24614		MFLAG=SLAPD_MOD_DYNAMIC
24615		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24616	else
24617		MFLAG=SLAPD_MOD_STATIC
24618		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24619	fi
24620
24621cat >>confdefs.h <<_ACEOF
24622#define SLAPD_OVER_SEQMOD $MFLAG
24623_ACEOF
24624
24625fi
24626
24627if test "$ol_enable_sssvlv" != no ; then
24628	BUILD_SSSVLV=$ol_enable_sssvlv
24629	if test "$ol_enable_sssvlv" = mod ; then
24630		MFLAG=SLAPD_MOD_DYNAMIC
24631		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24632	else
24633		MFLAG=SLAPD_MOD_STATIC
24634		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24635	fi
24636
24637cat >>confdefs.h <<_ACEOF
24638#define SLAPD_OVER_SSSVLV $MFLAG
24639_ACEOF
24640
24641fi
24642
24643if test "$ol_enable_syncprov" != no ; then
24644	BUILD_SYNCPROV=$ol_enable_syncprov
24645	if test "$ol_enable_syncprov" = mod ; then
24646		MFLAG=SLAPD_MOD_DYNAMIC
24647		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24648	else
24649		MFLAG=SLAPD_MOD_STATIC
24650		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24651	fi
24652
24653cat >>confdefs.h <<_ACEOF
24654#define SLAPD_OVER_SYNCPROV $MFLAG
24655_ACEOF
24656
24657fi
24658
24659if test "$ol_enable_translucent" != no ; then
24660	BUILD_TRANSLUCENT=$ol_enable_translucent
24661	if test "$ol_enable_translucent" = mod ; then
24662		MFLAG=SLAPD_MOD_DYNAMIC
24663		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24664	else
24665		MFLAG=SLAPD_MOD_STATIC
24666		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24667	fi
24668
24669cat >>confdefs.h <<_ACEOF
24670#define SLAPD_OVER_TRANSLUCENT $MFLAG
24671_ACEOF
24672
24673fi
24674
24675if test "$ol_enable_unique" != no ; then
24676	BUILD_UNIQUE=$ol_enable_unique
24677	if test "$ol_enable_unique" = mod ; then
24678		MFLAG=SLAPD_MOD_DYNAMIC
24679		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24680	else
24681		MFLAG=SLAPD_MOD_STATIC
24682		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24683	fi
24684
24685cat >>confdefs.h <<_ACEOF
24686#define SLAPD_OVER_UNIQUE $MFLAG
24687_ACEOF
24688
24689fi
24690
24691if test "$ol_enable_valsort" != no ; then
24692	BUILD_VALSORT=$ol_enable_valsort
24693	if test "$ol_enable_valsort" = mod ; then
24694		MFLAG=SLAPD_MOD_DYNAMIC
24695		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24696	else
24697		MFLAG=SLAPD_MOD_STATIC
24698		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24699	fi
24700
24701cat >>confdefs.h <<_ACEOF
24702#define SLAPD_OVER_VALSORT $MFLAG
24703_ACEOF
24704
24705fi
24706
24707if test "$ol_enable_rewrite" != no ; then
24708
24709$as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24710
24711	BUILD_REWRITE=yes
24712fi
24713
24714if test "$ol_enable_slapi" != no ; then
24715
24716$as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24717
24718	BUILD_SLAPI=yes
24719	SLAPD_SLAPI_DEPEND=libslapi.a
24720fi
24721
24722
24723
24724if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24725	PLAT=NT
24726	SLAPD_MODULES_LDFLAGS=
24727else
24728	PLAT=UNIX
24729fi
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820# Check whether --with-xxinstall was given.
24821if test "${with_xxinstall+set}" = set; then :
24822  withval=$with_xxinstall;
24823fi
24824
24825
24826
24827ac_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"
24828
24829
24830ac_config_commands="$ac_config_commands default"
24831
24832
24833
24834test "x$prefix" = xNONE && prefix=$ac_default_prefix
24835# Let make expand exec_prefix.
24836test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24837
24838DEFS=-DHAVE_CONFIG_H
24839
24840ac_libobjs=
24841ac_ltlibobjs=
24842for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24843  # 1. Remove the extension, and $U if already installed.
24844  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24845  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24846  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24847  #    will be set to the directory where LIBOBJS objects are built.
24848  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24849  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24850done
24851LIBOBJS=$ac_libobjs
24852
24853LTLIBOBJS=$ac_ltlibobjs
24854
24855
24856if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24857  as_fn_error "conditional \"AMDEP\" was never defined.
24858Usually this means the macro was only invoked conditionally." "$LINENO" 5
24859fi
24860if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24861  as_fn_error "conditional \"am__fastdepCC\" was never defined.
24862Usually this means the macro was only invoked conditionally." "$LINENO" 5
24863fi
24864if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24865  as_fn_error "conditional \"am__fastdepCC\" was never defined.
24866Usually this means the macro was only invoked conditionally." "$LINENO" 5
24867fi
24868
24869
24870: ${CONFIG_STATUS=./config.status}
24871ac_write_fail=0
24872ac_clean_files_save=$ac_clean_files
24873ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24874{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24875$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24876as_write_fail=0
24877cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24878#! $SHELL
24879# Generated by $as_me.
24880# Run this file to recreate the current configuration.
24881# Compiler output produced by configure, useful for debugging
24882# configure, is in config.log if it exists.
24883
24884debug=false
24885ac_cs_recheck=false
24886ac_cs_silent=false
24887
24888SHELL=\${CONFIG_SHELL-$SHELL}
24889export SHELL
24890_ASEOF
24891cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24892## -------------------- ##
24893## M4sh Initialization. ##
24894## -------------------- ##
24895
24896# Be more Bourne compatible
24897DUALCASE=1; export DUALCASE # for MKS sh
24898if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24899  emulate sh
24900  NULLCMD=:
24901  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24902  # is contrary to our usage.  Disable this feature.
24903  alias -g '${1+"$@"}'='"$@"'
24904  setopt NO_GLOB_SUBST
24905else
24906  case `(set -o) 2>/dev/null` in #(
24907  *posix*) :
24908    set -o posix ;; #(
24909  *) :
24910     ;;
24911esac
24912fi
24913
24914
24915as_nl='
24916'
24917export as_nl
24918# Printing a long string crashes Solaris 7 /usr/bin/printf.
24919as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24920as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24921as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24922# Prefer a ksh shell builtin over an external printf program on Solaris,
24923# but without wasting forks for bash or zsh.
24924if test -z "$BASH_VERSION$ZSH_VERSION" \
24925    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24926  as_echo='print -r --'
24927  as_echo_n='print -rn --'
24928elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24929  as_echo='printf %s\n'
24930  as_echo_n='printf %s'
24931else
24932  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24933    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24934    as_echo_n='/usr/ucb/echo -n'
24935  else
24936    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24937    as_echo_n_body='eval
24938      arg=$1;
24939      case $arg in #(
24940      *"$as_nl"*)
24941	expr "X$arg" : "X\\(.*\\)$as_nl";
24942	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24943      esac;
24944      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24945    '
24946    export as_echo_n_body
24947    as_echo_n='sh -c $as_echo_n_body as_echo'
24948  fi
24949  export as_echo_body
24950  as_echo='sh -c $as_echo_body as_echo'
24951fi
24952
24953# The user is always right.
24954if test "${PATH_SEPARATOR+set}" != set; then
24955  PATH_SEPARATOR=:
24956  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24957    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24958      PATH_SEPARATOR=';'
24959  }
24960fi
24961
24962
24963# IFS
24964# We need space, tab and new line, in precisely that order.  Quoting is
24965# there to prevent editors from complaining about space-tab.
24966# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24967# splitting by setting IFS to empty value.)
24968IFS=" ""	$as_nl"
24969
24970# Find who we are.  Look in the path if we contain no directory separator.
24971case $0 in #((
24972  *[\\/]* ) as_myself=$0 ;;
24973  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24974for as_dir in $PATH
24975do
24976  IFS=$as_save_IFS
24977  test -z "$as_dir" && as_dir=.
24978    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24979  done
24980IFS=$as_save_IFS
24981
24982     ;;
24983esac
24984# We did not find ourselves, most probably we were run as `sh COMMAND'
24985# in which case we are not to be found in the path.
24986if test "x$as_myself" = x; then
24987  as_myself=$0
24988fi
24989if test ! -f "$as_myself"; then
24990  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24991  exit 1
24992fi
24993
24994# Unset variables that we do not need and which cause bugs (e.g. in
24995# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24996# suppresses any "Segmentation fault" message there.  '((' could
24997# trigger a bug in pdksh 5.2.14.
24998for as_var in BASH_ENV ENV MAIL MAILPATH
24999do eval test x\${$as_var+set} = xset \
25000  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
25001done
25002PS1='$ '
25003PS2='> '
25004PS4='+ '
25005
25006# NLS nuisances.
25007LC_ALL=C
25008export LC_ALL
25009LANGUAGE=C
25010export LANGUAGE
25011
25012# CDPATH.
25013(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
25014
25015
25016# as_fn_error ERROR [LINENO LOG_FD]
25017# ---------------------------------
25018# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25019# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25020# script with status $?, using 1 if that was 0.
25021as_fn_error ()
25022{
25023  as_status=$?; test $as_status -eq 0 && as_status=1
25024  if test "$3"; then
25025    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25026    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25027  fi
25028  $as_echo "$as_me: error: $1" >&2
25029  as_fn_exit $as_status
25030} # as_fn_error
25031
25032
25033# as_fn_set_status STATUS
25034# -----------------------
25035# Set $? to STATUS, without forking.
25036as_fn_set_status ()
25037{
25038  return $1
25039} # as_fn_set_status
25040
25041# as_fn_exit STATUS
25042# -----------------
25043# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25044as_fn_exit ()
25045{
25046  set +e
25047  as_fn_set_status $1
25048  exit $1
25049} # as_fn_exit
25050
25051# as_fn_unset VAR
25052# ---------------
25053# Portably unset VAR.
25054as_fn_unset ()
25055{
25056  { eval $1=; unset $1;}
25057}
25058as_unset=as_fn_unset
25059# as_fn_append VAR VALUE
25060# ----------------------
25061# Append the text in VALUE to the end of the definition contained in VAR. Take
25062# advantage of any shell optimizations that allow amortized linear growth over
25063# repeated appends, instead of the typical quadratic growth present in naive
25064# implementations.
25065if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25066  eval 'as_fn_append ()
25067  {
25068    eval $1+=\$2
25069  }'
25070else
25071  as_fn_append ()
25072  {
25073    eval $1=\$$1\$2
25074  }
25075fi # as_fn_append
25076
25077# as_fn_arith ARG...
25078# ------------------
25079# Perform arithmetic evaluation on the ARGs, and store the result in the
25080# global $as_val. Take advantage of shells that can avoid forks. The arguments
25081# must be portable across $(()) and expr.
25082if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25083  eval 'as_fn_arith ()
25084  {
25085    as_val=$(( $* ))
25086  }'
25087else
25088  as_fn_arith ()
25089  {
25090    as_val=`expr "$@" || test $? -eq 1`
25091  }
25092fi # as_fn_arith
25093
25094
25095if expr a : '\(a\)' >/dev/null 2>&1 &&
25096   test "X`expr 00001 : '.*\(...\)'`" = X001; then
25097  as_expr=expr
25098else
25099  as_expr=false
25100fi
25101
25102if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25103  as_basename=basename
25104else
25105  as_basename=false
25106fi
25107
25108if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25109  as_dirname=dirname
25110else
25111  as_dirname=false
25112fi
25113
25114as_me=`$as_basename -- "$0" ||
25115$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25116	 X"$0" : 'X\(//\)$' \| \
25117	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25118$as_echo X/"$0" |
25119    sed '/^.*\/\([^/][^/]*\)\/*$/{
25120	    s//\1/
25121	    q
25122	  }
25123	  /^X\/\(\/\/\)$/{
25124	    s//\1/
25125	    q
25126	  }
25127	  /^X\/\(\/\).*/{
25128	    s//\1/
25129	    q
25130	  }
25131	  s/.*/./; q'`
25132
25133# Avoid depending upon Character Ranges.
25134as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25135as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25136as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25137as_cr_digits='0123456789'
25138as_cr_alnum=$as_cr_Letters$as_cr_digits
25139
25140ECHO_C= ECHO_N= ECHO_T=
25141case `echo -n x` in #(((((
25142-n*)
25143  case `echo 'xy\c'` in
25144  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
25145  xy)  ECHO_C='\c';;
25146  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25147       ECHO_T='	';;
25148  esac;;
25149*)
25150  ECHO_N='-n';;
25151esac
25152
25153rm -f conf$$ conf$$.exe conf$$.file
25154if test -d conf$$.dir; then
25155  rm -f conf$$.dir/conf$$.file
25156else
25157  rm -f conf$$.dir
25158  mkdir conf$$.dir 2>/dev/null
25159fi
25160if (echo >conf$$.file) 2>/dev/null; then
25161  if ln -s conf$$.file conf$$ 2>/dev/null; then
25162    as_ln_s='ln -s'
25163    # ... but there are two gotchas:
25164    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25165    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25166    # In both cases, we have to default to `cp -p'.
25167    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25168      as_ln_s='cp -p'
25169  elif ln conf$$.file conf$$ 2>/dev/null; then
25170    as_ln_s=ln
25171  else
25172    as_ln_s='cp -p'
25173  fi
25174else
25175  as_ln_s='cp -p'
25176fi
25177rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25178rmdir conf$$.dir 2>/dev/null
25179
25180
25181# as_fn_mkdir_p
25182# -------------
25183# Create "$as_dir" as a directory, including parents if necessary.
25184as_fn_mkdir_p ()
25185{
25186
25187  case $as_dir in #(
25188  -*) as_dir=./$as_dir;;
25189  esac
25190  test -d "$as_dir" || eval $as_mkdir_p || {
25191    as_dirs=
25192    while :; do
25193      case $as_dir in #(
25194      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25195      *) as_qdir=$as_dir;;
25196      esac
25197      as_dirs="'$as_qdir' $as_dirs"
25198      as_dir=`$as_dirname -- "$as_dir" ||
25199$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25200	 X"$as_dir" : 'X\(//\)[^/]' \| \
25201	 X"$as_dir" : 'X\(//\)$' \| \
25202	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25203$as_echo X"$as_dir" |
25204    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25205	    s//\1/
25206	    q
25207	  }
25208	  /^X\(\/\/\)[^/].*/{
25209	    s//\1/
25210	    q
25211	  }
25212	  /^X\(\/\/\)$/{
25213	    s//\1/
25214	    q
25215	  }
25216	  /^X\(\/\).*/{
25217	    s//\1/
25218	    q
25219	  }
25220	  s/.*/./; q'`
25221      test -d "$as_dir" && break
25222    done
25223    test -z "$as_dirs" || eval "mkdir $as_dirs"
25224  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25225
25226
25227} # as_fn_mkdir_p
25228if mkdir -p . 2>/dev/null; then
25229  as_mkdir_p='mkdir -p "$as_dir"'
25230else
25231  test -d ./-p && rmdir ./-p
25232  as_mkdir_p=false
25233fi
25234
25235if test -x / >/dev/null 2>&1; then
25236  as_test_x='test -x'
25237else
25238  if ls -dL / >/dev/null 2>&1; then
25239    as_ls_L_option=L
25240  else
25241    as_ls_L_option=
25242  fi
25243  as_test_x='
25244    eval sh -c '\''
25245      if test -d "$1"; then
25246	test -d "$1/.";
25247      else
25248	case $1 in #(
25249	-*)set "./$1";;
25250	esac;
25251	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25252	???[sx]*):;;*)false;;esac;fi
25253    '\'' sh
25254  '
25255fi
25256as_executable_p=$as_test_x
25257
25258# Sed expression to map a string onto a valid CPP name.
25259as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25260
25261# Sed expression to map a string onto a valid variable name.
25262as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25263
25264
25265exec 6>&1
25266## ----------------------------------- ##
25267## Main body of $CONFIG_STATUS script. ##
25268## ----------------------------------- ##
25269_ASEOF
25270test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25271
25272cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25273# Save the log message, to keep $0 and so on meaningful, and to
25274# report actual input values of CONFIG_FILES etc. instead of their
25275# values after options handling.
25276ac_log="
25277This file was extended by $as_me, which was
25278generated by GNU Autoconf 2.65.  Invocation command line was
25279
25280  CONFIG_FILES    = $CONFIG_FILES
25281  CONFIG_HEADERS  = $CONFIG_HEADERS
25282  CONFIG_LINKS    = $CONFIG_LINKS
25283  CONFIG_COMMANDS = $CONFIG_COMMANDS
25284  $ $0 $@
25285
25286on `(hostname || uname -n) 2>/dev/null | sed 1q`
25287"
25288
25289_ACEOF
25290
25291case $ac_config_files in *"
25292"*) set x $ac_config_files; shift; ac_config_files=$*;;
25293esac
25294
25295case $ac_config_headers in *"
25296"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25297esac
25298
25299
25300cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25301# Files that config.status was made for.
25302config_files="$ac_config_files"
25303config_headers="$ac_config_headers"
25304config_commands="$ac_config_commands"
25305
25306_ACEOF
25307
25308cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25309ac_cs_usage="\
25310\`$as_me' instantiates files and other configuration actions
25311from templates according to the current configuration.  Unless the files
25312and actions are specified as TAGs, all are instantiated by default.
25313
25314Usage: $0 [OPTION]... [TAG]...
25315
25316  -h, --help       print this help, then exit
25317  -V, --version    print version number and configuration settings, then exit
25318      --config     print configuration, then exit
25319  -q, --quiet, --silent
25320                   do not print progress messages
25321  -d, --debug      don't remove temporary files
25322      --recheck    update $as_me by reconfiguring in the same conditions
25323      --file=FILE[:TEMPLATE]
25324                   instantiate the configuration file FILE
25325      --header=FILE[:TEMPLATE]
25326                   instantiate the configuration header FILE
25327
25328Configuration files:
25329$config_files
25330
25331Configuration headers:
25332$config_headers
25333
25334Configuration commands:
25335$config_commands
25336
25337Report bugs to <<http://www.openldap.org/its/>>."
25338
25339_ACEOF
25340cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25341ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25342ac_cs_version="\\
25343config.status
25344configured by $0, generated by GNU Autoconf 2.65,
25345  with options \\"\$ac_cs_config\\"
25346
25347Copyright (C) 2009 Free Software Foundation, Inc.
25348This config.status script is free software; the Free Software Foundation
25349gives unlimited permission to copy, distribute and modify it."
25350
25351ac_pwd='$ac_pwd'
25352srcdir='$srcdir'
25353INSTALL='$INSTALL'
25354AWK='$AWK'
25355test -n "\$AWK" || AWK=awk
25356_ACEOF
25357
25358cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25359# The default lists apply if the user does not specify any file.
25360ac_need_defaults=:
25361while test $# != 0
25362do
25363  case $1 in
25364  --*=*)
25365    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25366    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25367    ac_shift=:
25368    ;;
25369  *)
25370    ac_option=$1
25371    ac_optarg=$2
25372    ac_shift=shift
25373    ;;
25374  esac
25375
25376  case $ac_option in
25377  # Handling of the options.
25378  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25379    ac_cs_recheck=: ;;
25380  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25381    $as_echo "$ac_cs_version"; exit ;;
25382  --config | --confi | --conf | --con | --co | --c )
25383    $as_echo "$ac_cs_config"; exit ;;
25384  --debug | --debu | --deb | --de | --d | -d )
25385    debug=: ;;
25386  --file | --fil | --fi | --f )
25387    $ac_shift
25388    case $ac_optarg in
25389    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25390    esac
25391    as_fn_append CONFIG_FILES " '$ac_optarg'"
25392    ac_need_defaults=false;;
25393  --header | --heade | --head | --hea )
25394    $ac_shift
25395    case $ac_optarg in
25396    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25397    esac
25398    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25399    ac_need_defaults=false;;
25400  --he | --h)
25401    # Conflict between --help and --header
25402    as_fn_error "ambiguous option: \`$1'
25403Try \`$0 --help' for more information.";;
25404  --help | --hel | -h )
25405    $as_echo "$ac_cs_usage"; exit ;;
25406  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25407  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25408    ac_cs_silent=: ;;
25409
25410  # This is an error.
25411  -*) as_fn_error "unrecognized option: \`$1'
25412Try \`$0 --help' for more information." ;;
25413
25414  *) as_fn_append ac_config_targets " $1"
25415     ac_need_defaults=false ;;
25416
25417  esac
25418  shift
25419done
25420
25421ac_configure_extra_args=
25422
25423if $ac_cs_silent; then
25424  exec 6>/dev/null
25425  ac_configure_extra_args="$ac_configure_extra_args --silent"
25426fi
25427
25428_ACEOF
25429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25430if \$ac_cs_recheck; then
25431  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25432  shift
25433  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25434  CONFIG_SHELL='$SHELL'
25435  export CONFIG_SHELL
25436  exec "\$@"
25437fi
25438
25439_ACEOF
25440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25441exec 5>>config.log
25442{
25443  echo
25444  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25445## Running $as_me. ##
25446_ASBOX
25447  $as_echo "$ac_log"
25448} >&5
25449
25450_ACEOF
25451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25452#
25453# INIT-COMMANDS
25454#
25455AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25456
25457STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25458STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25459
25460
25461_ACEOF
25462
25463cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25464
25465# Handling of arguments.
25466for ac_config_target in $ac_config_targets
25467do
25468  case $ac_config_target in
25469    "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25470    "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25471    "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25472    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25473    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25474    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25475    "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25476    "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25477    "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25478    "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25479    "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25480    "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25481    "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25482    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25483    "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25484    "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25485    "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25486    "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" ;;
25487    "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25488    "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25489    "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25490    "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25491    "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25492    "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" ;;
25493    "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" ;;
25494    "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" ;;
25495    "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" ;;
25496    "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" ;;
25497    "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" ;;
25498    "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" ;;
25499    "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" ;;
25500    "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" ;;
25501    "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" ;;
25502    "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" ;;
25503    "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" ;;
25504    "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" ;;
25505    "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" ;;
25506    "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" ;;
25507    "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" ;;
25508    "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" ;;
25509    "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" ;;
25510    "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25511    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25512    "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25513    "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25514    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25515
25516  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25517  esac
25518done
25519
25520
25521# If the user did not use the arguments to specify the items to instantiate,
25522# then the envvar interface is used.  Set only those that are not.
25523# We use the long form for the default assignment because of an extremely
25524# bizarre bug on SunOS 4.1.3.
25525if $ac_need_defaults; then
25526  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25527  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25528  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25529fi
25530
25531# Have a temporary directory for convenience.  Make it in the build tree
25532# simply because there is no reason against having it here, and in addition,
25533# creating and moving files from /tmp can sometimes cause problems.
25534# Hook for its removal unless debugging.
25535# Note that there is a small window in which the directory will not be cleaned:
25536# after its creation but before its name has been assigned to `$tmp'.
25537$debug ||
25538{
25539  tmp=
25540  trap 'exit_status=$?
25541  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25542' 0
25543  trap 'as_fn_exit 1' 1 2 13 15
25544}
25545# Create a (secure) tmp directory for tmp files.
25546
25547{
25548  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25549  test -n "$tmp" && test -d "$tmp"
25550}  ||
25551{
25552  tmp=./conf$$-$RANDOM
25553  (umask 077 && mkdir "$tmp")
25554} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25555
25556# Set up the scripts for CONFIG_FILES section.
25557# No need to generate them if there are no CONFIG_FILES.
25558# This happens for instance with `./config.status config.h'.
25559if test -n "$CONFIG_FILES"; then
25560
25561
25562ac_cr=`echo X | tr X '\015'`
25563# On cygwin, bash can eat \r inside `` if the user requested igncr.
25564# But we know of no other shell where ac_cr would be empty at this
25565# point, so we can use a bashism as a fallback.
25566if test "x$ac_cr" = x; then
25567  eval ac_cr=\$\'\\r\'
25568fi
25569ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25570if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25571  ac_cs_awk_cr='\r'
25572else
25573  ac_cs_awk_cr=$ac_cr
25574fi
25575
25576echo 'BEGIN {' >"$tmp/subs1.awk" &&
25577_ACEOF
25578
25579
25580{
25581  echo "cat >conf$$subs.awk <<_ACEOF" &&
25582  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25583  echo "_ACEOF"
25584} >conf$$subs.sh ||
25585  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25586ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25587ac_delim='%!_!# '
25588for ac_last_try in false false false false false :; do
25589  . ./conf$$subs.sh ||
25590    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25591
25592  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25593  if test $ac_delim_n = $ac_delim_num; then
25594    break
25595  elif $ac_last_try; then
25596    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25597  else
25598    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25599  fi
25600done
25601rm -f conf$$subs.sh
25602
25603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25604cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25605_ACEOF
25606sed -n '
25607h
25608s/^/S["/; s/!.*/"]=/
25609p
25610g
25611s/^[^!]*!//
25612:repl
25613t repl
25614s/'"$ac_delim"'$//
25615t delim
25616:nl
25617h
25618s/\(.\{148\}\)..*/\1/
25619t more1
25620s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25621p
25622n
25623b repl
25624:more1
25625s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25626p
25627g
25628s/.\{148\}//
25629t nl
25630:delim
25631h
25632s/\(.\{148\}\)..*/\1/
25633t more2
25634s/["\\]/\\&/g; s/^/"/; s/$/"/
25635p
25636b
25637:more2
25638s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25639p
25640g
25641s/.\{148\}//
25642t delim
25643' <conf$$subs.awk | sed '
25644/^[^""]/{
25645  N
25646  s/\n//
25647}
25648' >>$CONFIG_STATUS || ac_write_fail=1
25649rm -f conf$$subs.awk
25650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25651_ACAWK
25652cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25653  for (key in S) S_is_set[key] = 1
25654  FS = ""
25655
25656}
25657{
25658  line = $ 0
25659  nfields = split(line, field, "@")
25660  substed = 0
25661  len = length(field[1])
25662  for (i = 2; i < nfields; i++) {
25663    key = field[i]
25664    keylen = length(key)
25665    if (S_is_set[key]) {
25666      value = S[key]
25667      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25668      len += length(value) + length(field[++i])
25669      substed = 1
25670    } else
25671      len += 1 + keylen
25672  }
25673
25674  print line
25675}
25676
25677_ACAWK
25678_ACEOF
25679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25680if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25681  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25682else
25683  cat
25684fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25685  || as_fn_error "could not setup config files machinery" "$LINENO" 5
25686_ACEOF
25687
25688# VPATH may cause trouble with some makes, so we remove $(srcdir),
25689# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25690# trailing colons and then remove the whole line if VPATH becomes empty
25691# (actually we leave an empty line to preserve line numbers).
25692if test "x$srcdir" = x.; then
25693  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
25694s/:*\$(srcdir):*/:/
25695s/:*\${srcdir}:*/:/
25696s/:*@srcdir@:*/:/
25697s/^\([^=]*=[	 ]*\):*/\1/
25698s/:*$//
25699s/^[^=]*=[	 ]*$//
25700}'
25701fi
25702
25703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25704fi # test -n "$CONFIG_FILES"
25705
25706# Set up the scripts for CONFIG_HEADERS section.
25707# No need to generate them if there are no CONFIG_HEADERS.
25708# This happens for instance with `./config.status Makefile'.
25709if test -n "$CONFIG_HEADERS"; then
25710cat >"$tmp/defines.awk" <<\_ACAWK ||
25711BEGIN {
25712_ACEOF
25713
25714# Transform confdefs.h into an awk script `defines.awk', embedded as
25715# here-document in config.status, that substitutes the proper values into
25716# config.h.in to produce config.h.
25717
25718# Create a delimiter string that does not exist in confdefs.h, to ease
25719# handling of long lines.
25720ac_delim='%!_!# '
25721for ac_last_try in false false :; do
25722  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25723  if test -z "$ac_t"; then
25724    break
25725  elif $ac_last_try; then
25726    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25727  else
25728    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25729  fi
25730done
25731
25732# For the awk script, D is an array of macro values keyed by name,
25733# likewise P contains macro parameters if any.  Preserve backslash
25734# newline sequences.
25735
25736ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25737sed -n '
25738s/.\{148\}/&'"$ac_delim"'/g
25739t rset
25740:rset
25741s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25742t def
25743d
25744:def
25745s/\\$//
25746t bsnl
25747s/["\\]/\\&/g
25748s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25749D["\1"]=" \3"/p
25750s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25751d
25752:bsnl
25753s/["\\]/\\&/g
25754s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25755D["\1"]=" \3\\\\\\n"\\/p
25756t cont
25757s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25758t cont
25759d
25760:cont
25761n
25762s/.\{148\}/&'"$ac_delim"'/g
25763t clear
25764:clear
25765s/\\$//
25766t bsnlc
25767s/["\\]/\\&/g; s/^/"/; s/$/"/p
25768d
25769:bsnlc
25770s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25771b cont
25772' <confdefs.h | sed '
25773s/'"$ac_delim"'/"\\\
25774"/g' >>$CONFIG_STATUS || ac_write_fail=1
25775
25776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25777  for (key in D) D_is_set[key] = 1
25778  FS = ""
25779}
25780/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25781  line = \$ 0
25782  split(line, arg, " ")
25783  if (arg[1] == "#") {
25784    defundef = arg[2]
25785    mac1 = arg[3]
25786  } else {
25787    defundef = substr(arg[1], 2)
25788    mac1 = arg[2]
25789  }
25790  split(mac1, mac2, "(") #)
25791  macro = mac2[1]
25792  prefix = substr(line, 1, index(line, defundef) - 1)
25793  if (D_is_set[macro]) {
25794    # Preserve the white space surrounding the "#".
25795    print prefix "define", macro P[macro] D[macro]
25796    next
25797  } else {
25798    # Replace #undef with comments.  This is necessary, for example,
25799    # in the case of _POSIX_SOURCE, which is predefined and required
25800    # on some systems where configure will not decide to define it.
25801    if (defundef == "undef") {
25802      print "/*", prefix defundef, macro, "*/"
25803      next
25804    }
25805  }
25806}
25807{ print }
25808_ACAWK
25809_ACEOF
25810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25811  as_fn_error "could not setup config headers machinery" "$LINENO" 5
25812fi # test -n "$CONFIG_HEADERS"
25813
25814
25815eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25816shift
25817for ac_tag
25818do
25819  case $ac_tag in
25820  :[FHLC]) ac_mode=$ac_tag; continue;;
25821  esac
25822  case $ac_mode$ac_tag in
25823  :[FHL]*:*);;
25824  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25825  :[FH]-) ac_tag=-:-;;
25826  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25827  esac
25828  ac_save_IFS=$IFS
25829  IFS=:
25830  set x $ac_tag
25831  IFS=$ac_save_IFS
25832  shift
25833  ac_file=$1
25834  shift
25835
25836  case $ac_mode in
25837  :L) ac_source=$1;;
25838  :[FH])
25839    ac_file_inputs=
25840    for ac_f
25841    do
25842      case $ac_f in
25843      -) ac_f="$tmp/stdin";;
25844      *) # Look for the file first in the build tree, then in the source tree
25845	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25846	 # because $ac_f cannot contain `:'.
25847	 test -f "$ac_f" ||
25848	   case $ac_f in
25849	   [\\/$]*) false;;
25850	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25851	   esac ||
25852	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25853      esac
25854      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25855      as_fn_append ac_file_inputs " '$ac_f'"
25856    done
25857
25858    # Let's still pretend it is `configure' which instantiates (i.e., don't
25859    # use $as_me), people would be surprised to read:
25860    #    /* config.h.  Generated by config.status.  */
25861    configure_input='Generated from '`
25862	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25863	`' by configure.'
25864    if test x"$ac_file" != x-; then
25865      configure_input="$ac_file.  $configure_input"
25866      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25867$as_echo "$as_me: creating $ac_file" >&6;}
25868    fi
25869    # Neutralize special characters interpreted by sed in replacement strings.
25870    case $configure_input in #(
25871    *\&* | *\|* | *\\* )
25872       ac_sed_conf_input=`$as_echo "$configure_input" |
25873       sed 's/[\\\\&|]/\\\\&/g'`;; #(
25874    *) ac_sed_conf_input=$configure_input;;
25875    esac
25876
25877    case $ac_tag in
25878    *:-:* | *:-) cat >"$tmp/stdin" \
25879      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25880    esac
25881    ;;
25882  esac
25883
25884  ac_dir=`$as_dirname -- "$ac_file" ||
25885$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25886	 X"$ac_file" : 'X\(//\)[^/]' \| \
25887	 X"$ac_file" : 'X\(//\)$' \| \
25888	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25889$as_echo X"$ac_file" |
25890    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25891	    s//\1/
25892	    q
25893	  }
25894	  /^X\(\/\/\)[^/].*/{
25895	    s//\1/
25896	    q
25897	  }
25898	  /^X\(\/\/\)$/{
25899	    s//\1/
25900	    q
25901	  }
25902	  /^X\(\/\).*/{
25903	    s//\1/
25904	    q
25905	  }
25906	  s/.*/./; q'`
25907  as_dir="$ac_dir"; as_fn_mkdir_p
25908  ac_builddir=.
25909
25910case "$ac_dir" in
25911.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25912*)
25913  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25914  # A ".." for each directory in $ac_dir_suffix.
25915  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25916  case $ac_top_builddir_sub in
25917  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25918  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25919  esac ;;
25920esac
25921ac_abs_top_builddir=$ac_pwd
25922ac_abs_builddir=$ac_pwd$ac_dir_suffix
25923# for backward compatibility:
25924ac_top_builddir=$ac_top_build_prefix
25925
25926case $srcdir in
25927  .)  # We are building in place.
25928    ac_srcdir=.
25929    ac_top_srcdir=$ac_top_builddir_sub
25930    ac_abs_top_srcdir=$ac_pwd ;;
25931  [\\/]* | ?:[\\/]* )  # Absolute name.
25932    ac_srcdir=$srcdir$ac_dir_suffix;
25933    ac_top_srcdir=$srcdir
25934    ac_abs_top_srcdir=$srcdir ;;
25935  *) # Relative name.
25936    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25937    ac_top_srcdir=$ac_top_build_prefix$srcdir
25938    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25939esac
25940ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25941
25942
25943  case $ac_mode in
25944  :F)
25945  #
25946  # CONFIG_FILE
25947  #
25948
25949  case $INSTALL in
25950  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25951  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25952  esac
25953_ACEOF
25954
25955cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25956# If the template does not know about datarootdir, expand it.
25957# FIXME: This hack should be removed a few years after 2.60.
25958ac_datarootdir_hack=; ac_datarootdir_seen=
25959ac_sed_dataroot='
25960/datarootdir/ {
25961  p
25962  q
25963}
25964/@datadir@/p
25965/@docdir@/p
25966/@infodir@/p
25967/@localedir@/p
25968/@mandir@/p'
25969case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25970*datarootdir*) ac_datarootdir_seen=yes;;
25971*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25972  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25973$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25974_ACEOF
25975cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25976  ac_datarootdir_hack='
25977  s&@datadir@&$datadir&g
25978  s&@docdir@&$docdir&g
25979  s&@infodir@&$infodir&g
25980  s&@localedir@&$localedir&g
25981  s&@mandir@&$mandir&g
25982  s&\\\${datarootdir}&$datarootdir&g' ;;
25983esac
25984_ACEOF
25985
25986# Neutralize VPATH when `$srcdir' = `.'.
25987# Shell code in configure.ac might set extrasub.
25988# FIXME: do we really want to maintain this feature?
25989cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25990ac_sed_extra="$ac_vpsub
25991$extrasub
25992_ACEOF
25993cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25994:t
25995/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25996s|@configure_input@|$ac_sed_conf_input|;t t
25997s&@top_builddir@&$ac_top_builddir_sub&;t t
25998s&@top_build_prefix@&$ac_top_build_prefix&;t t
25999s&@srcdir@&$ac_srcdir&;t t
26000s&@abs_srcdir@&$ac_abs_srcdir&;t t
26001s&@top_srcdir@&$ac_top_srcdir&;t t
26002s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26003s&@builddir@&$ac_builddir&;t t
26004s&@abs_builddir@&$ac_abs_builddir&;t t
26005s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26006s&@INSTALL@&$ac_INSTALL&;t t
26007$ac_datarootdir_hack
26008"
26009eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26010  || as_fn_error "could not create $ac_file" "$LINENO" 5
26011
26012test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26013  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26014  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
26015  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26016which seems to be undefined.  Please make sure it is defined." >&5
26017$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26018which seems to be undefined.  Please make sure it is defined." >&2;}
26019
26020  rm -f "$tmp/stdin"
26021  case $ac_file in
26022  -) cat "$tmp/out" && rm -f "$tmp/out";;
26023  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26024  esac \
26025  || as_fn_error "could not create $ac_file" "$LINENO" 5
26026 ;;
26027  :H)
26028  #
26029  # CONFIG_HEADER
26030  #
26031  if test x"$ac_file" != x-; then
26032    {
26033      $as_echo "/* $configure_input  */" \
26034      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26035    } >"$tmp/config.h" \
26036      || as_fn_error "could not create $ac_file" "$LINENO" 5
26037    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26038      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26039$as_echo "$as_me: $ac_file is unchanged" >&6;}
26040    else
26041      rm -f "$ac_file"
26042      mv "$tmp/config.h" "$ac_file" \
26043	|| as_fn_error "could not create $ac_file" "$LINENO" 5
26044    fi
26045  else
26046    $as_echo "/* $configure_input  */" \
26047      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26048      || as_fn_error "could not create -" "$LINENO" 5
26049  fi
26050# Compute "$ac_file"'s index in $config_headers.
26051_am_stamp_count=1
26052for _am_header in $config_headers :; do
26053  case $_am_header in
26054    "$ac_file" | "$ac_file":* )
26055      break ;;
26056    * )
26057      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26058  esac
26059done
26060echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26061$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26062	 X"$ac_file" : 'X\(//\)[^/]' \| \
26063	 X"$ac_file" : 'X\(//\)$' \| \
26064	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26065$as_echo X"$ac_file" |
26066    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26067	    s//\1/
26068	    q
26069	  }
26070	  /^X\(\/\/\)[^/].*/{
26071	    s//\1/
26072	    q
26073	  }
26074	  /^X\(\/\/\)$/{
26075	    s//\1/
26076	    q
26077	  }
26078	  /^X\(\/\).*/{
26079	    s//\1/
26080	    q
26081	  }
26082	  s/.*/./; q'`/stamp-h$_am_stamp_count
26083 ;;
26084
26085  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26086$as_echo "$as_me: executing $ac_file commands" >&6;}
26087 ;;
26088  esac
26089
26090
26091  case $ac_file$ac_mode in
26092    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26093  # Strip MF so we end up with the name of the file.
26094  mf=`echo "$mf" | sed -e 's/:.*$//'`
26095  # Check whether this is an Automake generated Makefile or not.
26096  # We used to match only the files named `Makefile.in', but
26097  # some people rename them; so instead we look at the file content.
26098  # Grep'ing the first line is not enough: some people post-process
26099  # each Makefile.in and add a new line on top of each file to say so.
26100  # So let's grep whole file.
26101  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26102    dirpart=`$as_dirname -- "$mf" ||
26103$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26104	 X"$mf" : 'X\(//\)[^/]' \| \
26105	 X"$mf" : 'X\(//\)$' \| \
26106	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26107$as_echo X"$mf" |
26108    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26109	    s//\1/
26110	    q
26111	  }
26112	  /^X\(\/\/\)[^/].*/{
26113	    s//\1/
26114	    q
26115	  }
26116	  /^X\(\/\/\)$/{
26117	    s//\1/
26118	    q
26119	  }
26120	  /^X\(\/\).*/{
26121	    s//\1/
26122	    q
26123	  }
26124	  s/.*/./; q'`
26125  else
26126    continue
26127  fi
26128  # Extract the definition of DEPDIR, am__include, and am__quote
26129  # from the Makefile without running `make'.
26130  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26131  test -z "$DEPDIR" && continue
26132  am__include=`sed -n 's/^am__include = //p' < "$mf"`
26133  test -z "am__include" && continue
26134  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26135  # When using ansi2knr, U may be empty or an underscore; expand it
26136  U=`sed -n 's/^U = //p' < "$mf"`
26137  # Find all dependency output files, they are included files with
26138  # $(DEPDIR) in their names.  We invoke sed twice because it is the
26139  # simplest approach to changing $(DEPDIR) to its actual value in the
26140  # expansion.
26141  for file in `sed -n "
26142    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26143       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26144    # Make sure the directory exists.
26145    test -f "$dirpart/$file" && continue
26146    fdir=`$as_dirname -- "$file" ||
26147$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26148	 X"$file" : 'X\(//\)[^/]' \| \
26149	 X"$file" : 'X\(//\)$' \| \
26150	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26151$as_echo X"$file" |
26152    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26153	    s//\1/
26154	    q
26155	  }
26156	  /^X\(\/\/\)[^/].*/{
26157	    s//\1/
26158	    q
26159	  }
26160	  /^X\(\/\/\)$/{
26161	    s//\1/
26162	    q
26163	  }
26164	  /^X\(\/\).*/{
26165	    s//\1/
26166	    q
26167	  }
26168	  s/.*/./; q'`
26169    as_dir=$dirpart/$fdir; as_fn_mkdir_p
26170    # echo "creating $dirpart/$file"
26171    echo '# dummy' > "$dirpart/$file"
26172  done
26173done
26174 ;;
26175    "default":C)
26176chmod +x tests/run
26177date > stamp-h
26178BACKENDSC="servers/slapd/backends.c"
26179echo "Making $BACKENDSC"
26180rm -f $BACKENDSC
26181cat > $BACKENDSC << ENDX
26182/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26183 *
26184 * Copyright 1998-2021 The OpenLDAP Foundation.
26185 * All rights reserved.
26186 *
26187 * Redistribution and use in source and binary forms, with or without
26188 * modification, are permitted only as authorized by the OpenLDAP
26189 * Public License.
26190 *
26191 * A copy of this license is available in the file LICENSE in the
26192 * top-level directory of the distribution or, alternatively, at
26193 * <http://www.OpenLDAP.org/license.html>.
26194 */
26195/* This file is automatically generated by configure; please do not edit. */
26196
26197#include "portable.h"
26198#include "slap.h"
26199
26200ENDX
26201if test "${STATIC_BACKENDS}"; then
26202	for b in config ${STATIC_BACKENDS}; do
26203		bb=`echo "${b}" | sed -e 's/back-//'`
26204		cat >> $BACKENDSC << ENDX
26205extern BI_init ${bb}_back_initialize;
26206ENDX
26207	done
26208
26209	cat >> $BACKENDSC << ENDX
26210
26211BackendInfo slap_binfo[] = {
26212ENDX
26213
26214	for b in config ${STATIC_BACKENDS}; do
26215		bb=`echo "${b}" | sed -e 's/back-//'`
26216		echo "    Add ${bb} ..."
26217		cat >> $BACKENDSC << ENDX
26218	{ "${bb}", ${bb}_back_initialize },
26219ENDX
26220	done
26221
26222	cat >> $BACKENDSC << ENDX
26223	{ NULL, NULL },
26224};
26225
26226/* end of generated file */
26227ENDX
26228fi
26229OVERLAYSC="servers/slapd/overlays/statover.c"
26230echo "Making $OVERLAYSC"
26231rm -f $OVERLAYSC
26232cat > $OVERLAYSC << ENDX
26233/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26234 *
26235 * Copyright 1998-2021 The OpenLDAP Foundation.
26236 * All rights reserved.
26237 *
26238 * Redistribution and use in source and binary forms, with or without
26239 * modification, are permitted only as authorized by the OpenLDAP
26240 * Public License.
26241 *
26242 * A copy of this license is available in the file LICENSE in the
26243 * top-level directory of the distribution or, alternatively, at
26244 * <http://www.OpenLDAP.org/license.html>.
26245 */
26246/* This file is automatically generated by configure; please do not edit. */
26247
26248#include "portable.h"
26249#include "slap.h"
26250
26251ENDX
26252if test "${STATIC_OVERLAYS}"; then
26253	for o in ${STATIC_OVERLAYS}; do
26254		oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26255		cat >> $OVERLAYSC << ENDX
26256extern OV_init ${oo}_initialize;
26257ENDX
26258	done
26259fi
26260
26261cat >> $OVERLAYSC << ENDX
26262
26263OverlayInit slap_oinfo[] = {
26264ENDX
26265
26266if test "${STATIC_OVERLAYS}"; then
26267	for o in ${STATIC_OVERLAYS}; do
26268		oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26269		echo "    Add ${oo} ..."
26270		cat >> $OVERLAYSC << ENDX
26271	{ "${oo}", ${oo}_initialize },
26272ENDX
26273	done
26274fi
26275
26276	cat >> $OVERLAYSC << ENDX
26277	{ NULL, NULL },
26278};
26279
26280/* end of generated file */
26281ENDX
26282
26283if test "${ol_cv_mkdep}" = no; then
26284	echo '(Do not "make depend"; we do not know how to build dependencies)'
26285else
26286	echo 'Please run "make depend" to build dependencies'
26287fi
26288 ;;
26289
26290  esac
26291done # for ac_tag
26292
26293
26294as_fn_exit 0
26295_ACEOF
26296ac_clean_files=$ac_clean_files_save
26297
26298test $ac_write_fail = 0 ||
26299  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26300
26301
26302# configure is writing to config.log, and then calls config.status.
26303# config.status does its own redirection, appending to config.log.
26304# Unfortunately, on DOS this fails, as config.log is still kept open
26305# by configure, so config.status won't be able to write to it; its
26306# output is simply discarded.  So we exec the FD to /dev/null,
26307# effectively closing config.log, so it can be properly (re)opened and
26308# appended to by config.status.  When coming back to configure, we
26309# need to make the FD available again.
26310if test "$no_create" != yes; then
26311  ac_cs_success=:
26312  ac_config_status_args=
26313  test "$silent" = yes &&
26314    ac_config_status_args="$ac_config_status_args --quiet"
26315  exec 5>/dev/null
26316  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26317  exec 5>>config.log
26318  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26319  # would make configure fail if this is the last instruction.
26320  $ac_cs_success || as_fn_exit $?
26321fi
26322if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26323  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26324$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26325fi
26326
26327