xref: /netbsd-src/external/bsd/openldap/dist/configure (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1#! /bin/sh
2# From configure.in Id: 37293e618797a957ebe6b5f7b9479e9165e1362b .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.65.
5#
6# Copyright 1998-2020 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-2020 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 uuid/uuid.h
14877do :
14878  ac_fn_c_check_header_mongrel "$LINENO" "uuid/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		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_set_msg_callback in -lssl" >&5
15476$as_echo_n "checking for SSL_CTX_set_msg_callback in -lssl... " >&6; }
15477if test "${ac_cv_lib_ssl_SSL_CTX_set_msg_callback+set}" = set; then :
15478  $as_echo_n "(cached) " >&6
15479else
15480  ac_check_lib_save_LIBS=$LIBS
15481LIBS="-lssl -lcrypto $LIBS"
15482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15483/* end confdefs.h.  */
15484
15485/* Override any GCC internal prototype to avoid an error.
15486   Use char because int might match the return type of a GCC
15487   builtin and then its argument prototype would still apply.  */
15488#ifdef __cplusplus
15489extern "C"
15490#endif
15491char SSL_CTX_set_msg_callback ();
15492int
15493main ()
15494{
15495return SSL_CTX_set_msg_callback ();
15496  ;
15497  return 0;
15498}
15499_ACEOF
15500if ac_fn_c_try_link "$LINENO"; then :
15501  ac_cv_lib_ssl_SSL_CTX_set_msg_callback=yes
15502else
15503  ac_cv_lib_ssl_SSL_CTX_set_msg_callback=no
15504fi
15505rm -f core conftest.err conftest.$ac_objext \
15506    conftest$ac_exeext conftest.$ac_ext
15507LIBS=$ac_check_lib_save_LIBS
15508fi
15509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&5
15510$as_echo "$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" >&6; }
15511if test "x$ac_cv_lib_ssl_SSL_CTX_set_msg_callback" = x""yes; then :
15512  have_openssl=yes
15513			need_rsaref=no
15514else
15515  have_openssl=no
15516fi
15517
15518
15519		if test $have_openssl = no ; then
15520			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssl3_accept in -lssl" >&5
15521$as_echo_n "checking for ssl3_accept in -lssl... " >&6; }
15522if test "${ac_cv_lib_ssl_ssl3_accept+set}" = set; then :
15523  $as_echo_n "(cached) " >&6
15524else
15525  ac_check_lib_save_LIBS=$LIBS
15526LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
15527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15528/* end confdefs.h.  */
15529
15530/* Override any GCC internal prototype to avoid an error.
15531   Use char because int might match the return type of a GCC
15532   builtin and then its argument prototype would still apply.  */
15533#ifdef __cplusplus
15534extern "C"
15535#endif
15536char ssl3_accept ();
15537int
15538main ()
15539{
15540return ssl3_accept ();
15541  ;
15542  return 0;
15543}
15544_ACEOF
15545if ac_fn_c_try_link "$LINENO"; then :
15546  ac_cv_lib_ssl_ssl3_accept=yes
15547else
15548  ac_cv_lib_ssl_ssl3_accept=no
15549fi
15550rm -f core conftest.err conftest.$ac_objext \
15551    conftest$ac_exeext conftest.$ac_ext
15552LIBS=$ac_check_lib_save_LIBS
15553fi
15554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_ssl3_accept" >&5
15555$as_echo "$ac_cv_lib_ssl_ssl3_accept" >&6; }
15556if test "x$ac_cv_lib_ssl_ssl3_accept" = x""yes; then :
15557  have_openssl=yes
15558				need_rsaref=yes
15559else
15560  have_openssl=no
15561fi
15562
15563		fi
15564
15565		if test $have_openssl = yes ; then
15566			ol_with_tls=openssl
15567			ol_link_tls=yes
15568
15569
15570$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
15571
15572
15573			if test $need_rsaref = yes; then
15574
15575$as_echo "#define HAVE_RSAREF 1" >>confdefs.h
15576
15577
15578				TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
15579			else
15580				TLS_LIBS="-lssl -lcrypto"
15581			fi
15582
15583			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version (CRL checking capability)" >&5
15584$as_echo_n "checking OpenSSL library version (CRL checking capability)... " >&6; }
15585if test "${ol_cv_ssl_crl_compat+set}" = set; then :
15586  $as_echo_n "(cached) " >&6
15587else
15588
15589		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15590/* end confdefs.h.  */
15591
15592#ifdef HAVE_OPENSSL_SSL_H
15593#include <openssl/ssl.h>
15594#endif
15595
15596/* Require 0.9.7d+ */
15597#if OPENSSL_VERSION_NUMBER >= 0x0090704fL
15598	char *__ssl_compat = "0.9.7d";
15599#endif
15600
15601_ACEOF
15602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15603  $EGREP "__ssl_compat" >/dev/null 2>&1; then :
15604  ol_cv_ssl_crl_compat=yes
15605else
15606  ol_cv_ssl_crl_compat=no
15607fi
15608rm -f conftest*
15609
15610fi
15611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_ssl_crl_compat" >&5
15612$as_echo "$ol_cv_ssl_crl_compat" >&6; }
15613
15614			if test $ol_cv_ssl_crl_compat = yes ; then
15615
15616$as_echo "#define HAVE_OPENSSL_CRL 1" >>confdefs.h
15617
15618			fi
15619		fi
15620	fi
15621fi
15622
15623if test $ol_link_tls = no ; then
15624	if test $ol_with_tls = gnutls || test $ol_with_tls = auto ; then
15625		for ac_header in gnutls/gnutls.h
15626do :
15627  ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default"
15628if test "x$ac_cv_header_gnutls_gnutls_h" = x""yes; then :
15629  cat >>confdefs.h <<_ACEOF
15630#define HAVE_GNUTLS_GNUTLS_H 1
15631_ACEOF
15632
15633fi
15634
15635done
15636
15637
15638		if test $ac_cv_header_gnutls_gnutls_h = yes ; then
15639			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15640/* end confdefs.h.  */
15641#include <gnutls/gnutls.h>
15642#if GNUTLS_VERSION_NUMBER < 0x020c00
15643#error "GnuTLS 2.12.0 or newer required"
15644#endif
15645_ACEOF
15646if ac_fn_c_try_cpp "$LINENO"; then :
15647
15648else
15649  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15650$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15651as_fn_error "GnuTLS is too old
15652See \`config.log' for more details." "$LINENO" 5; }
15653fi
15654rm -f conftest.err conftest.$ac_ext
15655
15656			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gnutls_init in -lgnutls" >&5
15657$as_echo_n "checking for gnutls_init in -lgnutls... " >&6; }
15658if test "${ac_cv_lib_gnutls_gnutls_init+set}" = set; then :
15659  $as_echo_n "(cached) " >&6
15660else
15661  ac_check_lib_save_LIBS=$LIBS
15662LIBS="-lgnutls  $LIBS"
15663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15664/* end confdefs.h.  */
15665
15666/* Override any GCC internal prototype to avoid an error.
15667   Use char because int might match the return type of a GCC
15668   builtin and then its argument prototype would still apply.  */
15669#ifdef __cplusplus
15670extern "C"
15671#endif
15672char gnutls_init ();
15673int
15674main ()
15675{
15676return gnutls_init ();
15677  ;
15678  return 0;
15679}
15680_ACEOF
15681if ac_fn_c_try_link "$LINENO"; then :
15682  ac_cv_lib_gnutls_gnutls_init=yes
15683else
15684  ac_cv_lib_gnutls_gnutls_init=no
15685fi
15686rm -f core conftest.err conftest.$ac_objext \
15687    conftest$ac_exeext conftest.$ac_ext
15688LIBS=$ac_check_lib_save_LIBS
15689fi
15690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnutls_gnutls_init" >&5
15691$as_echo "$ac_cv_lib_gnutls_gnutls_init" >&6; }
15692if test "x$ac_cv_lib_gnutls_gnutls_init" = x""yes; then :
15693  have_gnutls=yes
15694else
15695  have_gnutls=no
15696fi
15697
15698
15699			if test $have_gnutls = yes ; then
15700				ol_with_tls=gnutls
15701				ol_link_tls=yes
15702
15703				TLS_LIBS="-lgnutls"
15704
15705
15706$as_echo "#define HAVE_GNUTLS 1" >>confdefs.h
15707
15708			fi
15709		fi
15710	fi
15711fi
15712
15713if test $ol_link_tls = no ; then
15714	if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
15715		have_moznss=no
15716		for ac_header in nssutil.h
15717do :
15718  ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
15719if test "x$ac_cv_header_nssutil_h" = x""yes; then :
15720  cat >>confdefs.h <<_ACEOF
15721#define HAVE_NSSUTIL_H 1
15722_ACEOF
15723
15724fi
15725
15726done
15727
15728		if test "$ac_cv_header_nssutil_h" = yes ; then
15729			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
15730$as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
15731if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
15732  $as_echo_n "(cached) " >&6
15733else
15734  ac_check_lib_save_LIBS=$LIBS
15735LIBS="-lnss3  $LIBS"
15736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15737/* end confdefs.h.  */
15738
15739/* Override any GCC internal prototype to avoid an error.
15740   Use char because int might match the return type of a GCC
15741   builtin and then its argument prototype would still apply.  */
15742#ifdef __cplusplus
15743extern "C"
15744#endif
15745char NSS_Initialize ();
15746int
15747main ()
15748{
15749return NSS_Initialize ();
15750  ;
15751  return 0;
15752}
15753_ACEOF
15754if ac_fn_c_try_link "$LINENO"; then :
15755  ac_cv_lib_nss3_NSS_Initialize=yes
15756else
15757  ac_cv_lib_nss3_NSS_Initialize=no
15758fi
15759rm -f core conftest.err conftest.$ac_objext \
15760    conftest$ac_exeext conftest.$ac_ext
15761LIBS=$ac_check_lib_save_LIBS
15762fi
15763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
15764$as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
15765if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
15766   have_moznss=yes
15767else
15768   have_moznss=no
15769fi
15770
15771		fi
15772
15773		if test "$have_moznss" = yes ; then
15774			ol_with_tls=moznss
15775			ol_link_tls=yes
15776
15777$as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
15778
15779			TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
15780		else
15781			if test $ol_with_tls = moznss ; then
15782			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
15783			fi
15784		fi
15785	fi
15786fi
15787
15788WITH_TLS=no
15789if test $ol_link_tls = yes ; then
15790
15791$as_echo "#define HAVE_TLS 1" >>confdefs.h
15792
15793	WITH_TLS=yes
15794elif test $ol_with_tls = auto ; then
15795	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate TLS/SSL package" >&5
15796$as_echo "$as_me: WARNING: Could not locate TLS/SSL package" >&2;}
15797	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15798$as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15799elif test $ol_with_tls != no ; then
15800	as_fn_error "Could not locate TLS/SSL package" "$LINENO" 5
15801else
15802	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: TLS data protection not supported!" >&5
15803$as_echo "$as_me: WARNING: TLS data protection not supported!" >&2;}
15804fi
15805
15806if test $ol_enable_lmpasswd != no; then
15807	if test $ol_link_tls != yes ; then
15808		as_fn_error "LAN Manager passwords require OpenSSL" "$LINENO" 5
15809	fi
15810
15811
15812$as_echo "#define SLAPD_LMHASH 1" >>confdefs.h
15813
15814fi
15815
15816ol_link_threads=no
15817
15818case $ol_with_threads in auto | yes | nt)
15819
15820
15821	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
15822if test "x$ac_cv_func__beginthread" = x""yes; then :
15823
15824fi
15825
15826
15827	if test $ac_cv_func__beginthread = yes ; then
15828
15829$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
15830
15831		ol_cv_nt_threads=yes
15832	fi
15833
15834
15835	if test "$ol_cv_nt_threads" = yes ; then
15836		ol_link_threads=nt
15837		ol_with_threads=found
15838		ol_with_yielding_select=yes
15839
15840
15841$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
15842
15843
15844$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
15845
15846	fi
15847
15848	if test $ol_with_threads = nt ; then
15849		as_fn_error "could not locate NT Threads" "$LINENO" 5
15850	fi
15851	;;
15852esac
15853
15854case $ol_with_threads in auto | yes | posix)
15855
15856	for ac_header in pthread.h
15857do :
15858  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
15859if test "x$ac_cv_header_pthread_h" = x""yes; then :
15860  cat >>confdefs.h <<_ACEOF
15861#define HAVE_PTHREAD_H 1
15862_ACEOF
15863
15864fi
15865
15866done
15867
15868
15869	if test $ac_cv_header_pthread_h = yes ; then
15870		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
15871$as_echo_n "checking POSIX thread version... " >&6; }
15872if test "${ol_cv_pthread_version+set}" = set; then :
15873  $as_echo_n "(cached) " >&6
15874else
15875
15876	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15877/* end confdefs.h.  */
15878
15879#		include <pthread.h>
15880
15881int
15882main ()
15883{
15884
15885		int i = PTHREAD_CREATE_JOINABLE;
15886
15887  ;
15888  return 0;
15889}
15890_ACEOF
15891if ac_fn_c_try_compile "$LINENO"; then :
15892
15893	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15894/* end confdefs.h.  */
15895#include <pthread.h>
15896
15897_ACEOF
15898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15899  $EGREP "pthread_detach" >/dev/null 2>&1; then :
15900  ol_cv_pthread_version=10
15901else
15902  ol_cv_pthread_version=8
15903fi
15904rm -f conftest*
15905
15906else
15907
15908	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15909/* end confdefs.h.  */
15910
15911#		include <pthread.h>
15912#		ifdef PTHREAD_CREATE_UNDETACHED
15913		draft7
15914#		endif
15915
15916_ACEOF
15917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15918  $EGREP "draft7" >/dev/null 2>&1; then :
15919  ol_cv_pthread_version=7
15920else
15921
15922	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15923/* end confdefs.h.  */
15924#include <pthread.h>
15925
15926_ACEOF
15927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15928  $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
15929  ol_cv_pthread_version=6
15930else
15931
15932	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15933/* end confdefs.h.  */
15934
15935#		include <pthread.h>
15936#ifdef		PTHREAD_MUTEX_INITIALIZER
15937		draft5
15938#endif
15939
15940_ACEOF
15941if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15942  $EGREP "draft5" >/dev/null 2>&1; then :
15943  ol_cv_pthread_version=5
15944else
15945  ol_cv_pthread_version=4
15946fi
15947rm -f conftest*
15948
15949fi
15950rm -f conftest*
15951
15952fi
15953rm -f conftest*
15954
15955fi
15956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15957
15958fi
15959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
15960$as_echo "$ol_cv_pthread_version" >&6; }
15961
15962
15963		if test $ol_cv_pthread_version != 0 ; then
15964
15965cat >>confdefs.h <<_ACEOF
15966#define HAVE_PTHREADS $ol_cv_pthread_version
15967_ACEOF
15968
15969		else
15970			as_fn_error "unknown pthread version" "$LINENO" 5
15971		fi
15972
15973		# consider threads found
15974		ol_with_threads=found
15975
15976
15977	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
15978$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
15979if test "${ol_cv_header_linux_threads+set}" = set; then :
15980  $as_echo_n "(cached) " >&6
15981else
15982  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15983/* end confdefs.h.  */
15984#include <pthread.h>
15985_ACEOF
15986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15987  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
15988  ol_cv_header_linux_threads=yes
15989else
15990  ol_cv_header_linux_threads=no
15991fi
15992rm -f conftest*
15993
15994
15995fi
15996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
15997$as_echo "$ol_cv_header_linux_threads" >&6; }
15998	if test $ol_cv_header_linux_threads = yes; then
15999
16000$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
16001
16002	fi
16003
16004
16005	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
16006$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
16007if test "${ol_cv_header_gnu_pth_pthread_h+set}" = set; then :
16008  $as_echo_n "(cached) " >&6
16009else
16010  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16011/* end confdefs.h.  */
16012#include <pthread.h>
16013#ifdef _POSIX_THREAD_IS_GNU_PTH
16014	__gnu_pth__;
16015#endif
16016
16017_ACEOF
16018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16019  $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
16020  ol_cv_header_gnu_pth_pthread_h=yes
16021else
16022  ol_cv_header_gnu_pth_pthread_h=no
16023fi
16024rm -f conftest*
16025
16026
16027fi
16028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
16029$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
16030
16031
16032		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
16033			for ac_header in sched.h
16034do :
16035  ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
16036if test "x$ac_cv_header_sched_h" = x""yes; then :
16037  cat >>confdefs.h <<_ACEOF
16038#define HAVE_SCHED_H 1
16039_ACEOF
16040
16041fi
16042
16043done
16044
16045		fi
16046
16047
16048				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
16049$as_echo_n "checking for pthread_create in default libraries... " >&6; }
16050if test "${ol_cv_pthread_create+set}" = set; then :
16051  $as_echo_n "(cached) " >&6
16052else
16053
16054			if test "$cross_compiling" = yes; then :
16055  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16056/* end confdefs.h.  */
16057
16058/* pthread test headers */
16059#include <pthread.h>
16060#if HAVE_PTHREADS < 7
16061#include <errno.h>
16062#endif
16063#ifndef NULL
16064#define NULL (void*)0
16065#endif
16066
16067static void *task(p)
16068	void *p;
16069{
16070	return (void *) (p == NULL);
16071}
16072
16073int
16074main ()
16075{
16076
16077	/* pthread test function */
16078#ifndef PTHREAD_CREATE_DETACHED
16079#define	PTHREAD_CREATE_DETACHED	1
16080#endif
16081	pthread_t t;
16082	int status;
16083	int detach = PTHREAD_CREATE_DETACHED;
16084
16085#if HAVE_PTHREADS > 4
16086	/* Final pthreads */
16087	pthread_attr_t attr;
16088
16089	status = pthread_attr_init(&attr);
16090	if( status ) return status;
16091
16092#if HAVE_PTHREADS < 7
16093	status = pthread_attr_setdetachstate(&attr, &detach);
16094	if( status < 0 ) status = errno;
16095#else
16096	status = pthread_attr_setdetachstate(&attr, detach);
16097#endif
16098	if( status ) return status;
16099	status = pthread_create( &t, &attr, task, NULL );
16100#if HAVE_PTHREADS < 7
16101	if( status < 0 ) status = errno;
16102#endif
16103	if( status ) return status;
16104#else
16105	/* Draft 4 pthreads */
16106	status = pthread_create( &t, pthread_attr_default, task, NULL );
16107	if( status ) return errno;
16108
16109	/* give thread a chance to complete */
16110	/* it should remain joinable and hence detachable */
16111	sleep( 1 );
16112
16113	status = pthread_detach( &t );
16114	if( status ) return errno;
16115#endif
16116
16117#ifdef HAVE_LINUX_THREADS
16118	pthread_kill_other_threads_np();
16119#endif
16120
16121	return 0;
16122
16123  ;
16124  return 0;
16125}
16126_ACEOF
16127if ac_fn_c_try_link "$LINENO"; then :
16128  ol_cv_pthread_create=yes
16129else
16130  ol_cv_pthread_create=no
16131fi
16132rm -f core conftest.err conftest.$ac_objext \
16133    conftest$ac_exeext conftest.$ac_ext
16134else
16135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136/* end confdefs.h.  */
16137
16138/* pthread test headers */
16139#include <pthread.h>
16140#if HAVE_PTHREADS < 7
16141#include <errno.h>
16142#endif
16143#ifndef NULL
16144#define NULL (void*)0
16145#endif
16146
16147static void *task(p)
16148	void *p;
16149{
16150	return (void *) (p == NULL);
16151}
16152
16153
16154int main(argc, argv)
16155	int argc;
16156	char **argv;
16157{
16158
16159	/* pthread test function */
16160#ifndef PTHREAD_CREATE_DETACHED
16161#define	PTHREAD_CREATE_DETACHED	1
16162#endif
16163	pthread_t t;
16164	int status;
16165	int detach = PTHREAD_CREATE_DETACHED;
16166
16167#if HAVE_PTHREADS > 4
16168	/* Final pthreads */
16169	pthread_attr_t attr;
16170
16171	status = pthread_attr_init(&attr);
16172	if( status ) return status;
16173
16174#if HAVE_PTHREADS < 7
16175	status = pthread_attr_setdetachstate(&attr, &detach);
16176	if( status < 0 ) status = errno;
16177#else
16178	status = pthread_attr_setdetachstate(&attr, detach);
16179#endif
16180	if( status ) return status;
16181	status = pthread_create( &t, &attr, task, NULL );
16182#if HAVE_PTHREADS < 7
16183	if( status < 0 ) status = errno;
16184#endif
16185	if( status ) return status;
16186#else
16187	/* Draft 4 pthreads */
16188	status = pthread_create( &t, pthread_attr_default, task, NULL );
16189	if( status ) return errno;
16190
16191	/* give thread a chance to complete */
16192	/* it should remain joinable and hence detachable */
16193	sleep( 1 );
16194
16195	status = pthread_detach( &t );
16196	if( status ) return errno;
16197#endif
16198
16199#ifdef HAVE_LINUX_THREADS
16200	pthread_kill_other_threads_np();
16201#endif
16202
16203	return 0;
16204
16205}
16206
16207_ACEOF
16208if ac_fn_c_try_run "$LINENO"; then :
16209  ol_cv_pthread_create=yes
16210else
16211  ol_cv_pthread_create=no
16212fi
16213rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16214  conftest.$ac_objext conftest.beam conftest.$ac_ext
16215fi
16216
16217fi
16218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
16219$as_echo "$ol_cv_pthread_create" >&6; }
16220
16221		if test $ol_cv_pthread_create != no ; then
16222			ol_link_threads=posix
16223			ol_link_pthreads=""
16224		fi
16225
16226		# Pthread try link: -kthread (ol_cv_pthread_kthread)
16227if test "$ol_link_threads" = no ; then
16228	# try -kthread
16229	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
16230$as_echo_n "checking for pthread link with -kthread... " >&6; }
16231if test "${ol_cv_pthread_kthread+set}" = set; then :
16232  $as_echo_n "(cached) " >&6
16233else
16234
16235		# save the flags
16236		ol_LIBS="$LIBS"
16237		LIBS="-kthread $LIBS"
16238
16239		if test "$cross_compiling" = yes; then :
16240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16241/* end confdefs.h.  */
16242
16243/* pthread test headers */
16244#include <pthread.h>
16245#if HAVE_PTHREADS < 7
16246#include <errno.h>
16247#endif
16248#ifndef NULL
16249#define NULL (void*)0
16250#endif
16251
16252static void *task(p)
16253	void *p;
16254{
16255	return (void *) (p == NULL);
16256}
16257
16258int
16259main ()
16260{
16261
16262	/* pthread test function */
16263#ifndef PTHREAD_CREATE_DETACHED
16264#define	PTHREAD_CREATE_DETACHED	1
16265#endif
16266	pthread_t t;
16267	int status;
16268	int detach = PTHREAD_CREATE_DETACHED;
16269
16270#if HAVE_PTHREADS > 4
16271	/* Final pthreads */
16272	pthread_attr_t attr;
16273
16274	status = pthread_attr_init(&attr);
16275	if( status ) return status;
16276
16277#if HAVE_PTHREADS < 7
16278	status = pthread_attr_setdetachstate(&attr, &detach);
16279	if( status < 0 ) status = errno;
16280#else
16281	status = pthread_attr_setdetachstate(&attr, detach);
16282#endif
16283	if( status ) return status;
16284	status = pthread_create( &t, &attr, task, NULL );
16285#if HAVE_PTHREADS < 7
16286	if( status < 0 ) status = errno;
16287#endif
16288	if( status ) return status;
16289#else
16290	/* Draft 4 pthreads */
16291	status = pthread_create( &t, pthread_attr_default, task, NULL );
16292	if( status ) return errno;
16293
16294	/* give thread a chance to complete */
16295	/* it should remain joinable and hence detachable */
16296	sleep( 1 );
16297
16298	status = pthread_detach( &t );
16299	if( status ) return errno;
16300#endif
16301
16302#ifdef HAVE_LINUX_THREADS
16303	pthread_kill_other_threads_np();
16304#endif
16305
16306	return 0;
16307
16308  ;
16309  return 0;
16310}
16311_ACEOF
16312if ac_fn_c_try_link "$LINENO"; then :
16313  ol_cv_pthread_kthread=yes
16314else
16315  ol_cv_pthread_kthread=no
16316fi
16317rm -f core conftest.err conftest.$ac_objext \
16318    conftest$ac_exeext conftest.$ac_ext
16319else
16320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16321/* end confdefs.h.  */
16322
16323/* pthread test headers */
16324#include <pthread.h>
16325#if HAVE_PTHREADS < 7
16326#include <errno.h>
16327#endif
16328#ifndef NULL
16329#define NULL (void*)0
16330#endif
16331
16332static void *task(p)
16333	void *p;
16334{
16335	return (void *) (p == NULL);
16336}
16337
16338
16339int main(argc, argv)
16340	int argc;
16341	char **argv;
16342{
16343
16344	/* pthread test function */
16345#ifndef PTHREAD_CREATE_DETACHED
16346#define	PTHREAD_CREATE_DETACHED	1
16347#endif
16348	pthread_t t;
16349	int status;
16350	int detach = PTHREAD_CREATE_DETACHED;
16351
16352#if HAVE_PTHREADS > 4
16353	/* Final pthreads */
16354	pthread_attr_t attr;
16355
16356	status = pthread_attr_init(&attr);
16357	if( status ) return status;
16358
16359#if HAVE_PTHREADS < 7
16360	status = pthread_attr_setdetachstate(&attr, &detach);
16361	if( status < 0 ) status = errno;
16362#else
16363	status = pthread_attr_setdetachstate(&attr, detach);
16364#endif
16365	if( status ) return status;
16366	status = pthread_create( &t, &attr, task, NULL );
16367#if HAVE_PTHREADS < 7
16368	if( status < 0 ) status = errno;
16369#endif
16370	if( status ) return status;
16371#else
16372	/* Draft 4 pthreads */
16373	status = pthread_create( &t, pthread_attr_default, task, NULL );
16374	if( status ) return errno;
16375
16376	/* give thread a chance to complete */
16377	/* it should remain joinable and hence detachable */
16378	sleep( 1 );
16379
16380	status = pthread_detach( &t );
16381	if( status ) return errno;
16382#endif
16383
16384#ifdef HAVE_LINUX_THREADS
16385	pthread_kill_other_threads_np();
16386#endif
16387
16388	return 0;
16389
16390}
16391
16392_ACEOF
16393if ac_fn_c_try_run "$LINENO"; then :
16394  ol_cv_pthread_kthread=yes
16395else
16396  ol_cv_pthread_kthread=no
16397fi
16398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16399  conftest.$ac_objext conftest.beam conftest.$ac_ext
16400fi
16401
16402
16403		# restore the LIBS
16404		LIBS="$ol_LIBS"
16405
16406fi
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
16408$as_echo "$ol_cv_pthread_kthread" >&6; }
16409
16410	if test $ol_cv_pthread_kthread = yes ; then
16411		ol_link_pthreads="-kthread"
16412		ol_link_threads=posix
16413	fi
16414fi
16415
16416		# Pthread try link: -pthread (ol_cv_pthread_pthread)
16417if test "$ol_link_threads" = no ; then
16418	# try -pthread
16419	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
16420$as_echo_n "checking for pthread link with -pthread... " >&6; }
16421if test "${ol_cv_pthread_pthread+set}" = set; then :
16422  $as_echo_n "(cached) " >&6
16423else
16424
16425		# save the flags
16426		ol_LIBS="$LIBS"
16427		LIBS="-pthread $LIBS"
16428
16429		if test "$cross_compiling" = yes; then :
16430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16431/* end confdefs.h.  */
16432
16433/* pthread test headers */
16434#include <pthread.h>
16435#if HAVE_PTHREADS < 7
16436#include <errno.h>
16437#endif
16438#ifndef NULL
16439#define NULL (void*)0
16440#endif
16441
16442static void *task(p)
16443	void *p;
16444{
16445	return (void *) (p == NULL);
16446}
16447
16448int
16449main ()
16450{
16451
16452	/* pthread test function */
16453#ifndef PTHREAD_CREATE_DETACHED
16454#define	PTHREAD_CREATE_DETACHED	1
16455#endif
16456	pthread_t t;
16457	int status;
16458	int detach = PTHREAD_CREATE_DETACHED;
16459
16460#if HAVE_PTHREADS > 4
16461	/* Final pthreads */
16462	pthread_attr_t attr;
16463
16464	status = pthread_attr_init(&attr);
16465	if( status ) return status;
16466
16467#if HAVE_PTHREADS < 7
16468	status = pthread_attr_setdetachstate(&attr, &detach);
16469	if( status < 0 ) status = errno;
16470#else
16471	status = pthread_attr_setdetachstate(&attr, detach);
16472#endif
16473	if( status ) return status;
16474	status = pthread_create( &t, &attr, task, NULL );
16475#if HAVE_PTHREADS < 7
16476	if( status < 0 ) status = errno;
16477#endif
16478	if( status ) return status;
16479#else
16480	/* Draft 4 pthreads */
16481	status = pthread_create( &t, pthread_attr_default, task, NULL );
16482	if( status ) return errno;
16483
16484	/* give thread a chance to complete */
16485	/* it should remain joinable and hence detachable */
16486	sleep( 1 );
16487
16488	status = pthread_detach( &t );
16489	if( status ) return errno;
16490#endif
16491
16492#ifdef HAVE_LINUX_THREADS
16493	pthread_kill_other_threads_np();
16494#endif
16495
16496	return 0;
16497
16498  ;
16499  return 0;
16500}
16501_ACEOF
16502if ac_fn_c_try_link "$LINENO"; then :
16503  ol_cv_pthread_pthread=yes
16504else
16505  ol_cv_pthread_pthread=no
16506fi
16507rm -f core conftest.err conftest.$ac_objext \
16508    conftest$ac_exeext conftest.$ac_ext
16509else
16510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16511/* end confdefs.h.  */
16512
16513/* pthread test headers */
16514#include <pthread.h>
16515#if HAVE_PTHREADS < 7
16516#include <errno.h>
16517#endif
16518#ifndef NULL
16519#define NULL (void*)0
16520#endif
16521
16522static void *task(p)
16523	void *p;
16524{
16525	return (void *) (p == NULL);
16526}
16527
16528
16529int main(argc, argv)
16530	int argc;
16531	char **argv;
16532{
16533
16534	/* pthread test function */
16535#ifndef PTHREAD_CREATE_DETACHED
16536#define	PTHREAD_CREATE_DETACHED	1
16537#endif
16538	pthread_t t;
16539	int status;
16540	int detach = PTHREAD_CREATE_DETACHED;
16541
16542#if HAVE_PTHREADS > 4
16543	/* Final pthreads */
16544	pthread_attr_t attr;
16545
16546	status = pthread_attr_init(&attr);
16547	if( status ) return status;
16548
16549#if HAVE_PTHREADS < 7
16550	status = pthread_attr_setdetachstate(&attr, &detach);
16551	if( status < 0 ) status = errno;
16552#else
16553	status = pthread_attr_setdetachstate(&attr, detach);
16554#endif
16555	if( status ) return status;
16556	status = pthread_create( &t, &attr, task, NULL );
16557#if HAVE_PTHREADS < 7
16558	if( status < 0 ) status = errno;
16559#endif
16560	if( status ) return status;
16561#else
16562	/* Draft 4 pthreads */
16563	status = pthread_create( &t, pthread_attr_default, task, NULL );
16564	if( status ) return errno;
16565
16566	/* give thread a chance to complete */
16567	/* it should remain joinable and hence detachable */
16568	sleep( 1 );
16569
16570	status = pthread_detach( &t );
16571	if( status ) return errno;
16572#endif
16573
16574#ifdef HAVE_LINUX_THREADS
16575	pthread_kill_other_threads_np();
16576#endif
16577
16578	return 0;
16579
16580}
16581
16582_ACEOF
16583if ac_fn_c_try_run "$LINENO"; then :
16584  ol_cv_pthread_pthread=yes
16585else
16586  ol_cv_pthread_pthread=no
16587fi
16588rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16589  conftest.$ac_objext conftest.beam conftest.$ac_ext
16590fi
16591
16592
16593		# restore the LIBS
16594		LIBS="$ol_LIBS"
16595
16596fi
16597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
16598$as_echo "$ol_cv_pthread_pthread" >&6; }
16599
16600	if test $ol_cv_pthread_pthread = yes ; then
16601		ol_link_pthreads="-pthread"
16602		ol_link_threads=posix
16603	fi
16604fi
16605
16606		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
16607if test "$ol_link_threads" = no ; then
16608	# try -pthreads
16609	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
16610$as_echo_n "checking for pthread link with -pthreads... " >&6; }
16611if test "${ol_cv_pthread_pthreads+set}" = set; then :
16612  $as_echo_n "(cached) " >&6
16613else
16614
16615		# save the flags
16616		ol_LIBS="$LIBS"
16617		LIBS="-pthreads $LIBS"
16618
16619		if test "$cross_compiling" = yes; then :
16620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16621/* end confdefs.h.  */
16622
16623/* pthread test headers */
16624#include <pthread.h>
16625#if HAVE_PTHREADS < 7
16626#include <errno.h>
16627#endif
16628#ifndef NULL
16629#define NULL (void*)0
16630#endif
16631
16632static void *task(p)
16633	void *p;
16634{
16635	return (void *) (p == NULL);
16636}
16637
16638int
16639main ()
16640{
16641
16642	/* pthread test function */
16643#ifndef PTHREAD_CREATE_DETACHED
16644#define	PTHREAD_CREATE_DETACHED	1
16645#endif
16646	pthread_t t;
16647	int status;
16648	int detach = PTHREAD_CREATE_DETACHED;
16649
16650#if HAVE_PTHREADS > 4
16651	/* Final pthreads */
16652	pthread_attr_t attr;
16653
16654	status = pthread_attr_init(&attr);
16655	if( status ) return status;
16656
16657#if HAVE_PTHREADS < 7
16658	status = pthread_attr_setdetachstate(&attr, &detach);
16659	if( status < 0 ) status = errno;
16660#else
16661	status = pthread_attr_setdetachstate(&attr, detach);
16662#endif
16663	if( status ) return status;
16664	status = pthread_create( &t, &attr, task, NULL );
16665#if HAVE_PTHREADS < 7
16666	if( status < 0 ) status = errno;
16667#endif
16668	if( status ) return status;
16669#else
16670	/* Draft 4 pthreads */
16671	status = pthread_create( &t, pthread_attr_default, task, NULL );
16672	if( status ) return errno;
16673
16674	/* give thread a chance to complete */
16675	/* it should remain joinable and hence detachable */
16676	sleep( 1 );
16677
16678	status = pthread_detach( &t );
16679	if( status ) return errno;
16680#endif
16681
16682#ifdef HAVE_LINUX_THREADS
16683	pthread_kill_other_threads_np();
16684#endif
16685
16686	return 0;
16687
16688  ;
16689  return 0;
16690}
16691_ACEOF
16692if ac_fn_c_try_link "$LINENO"; then :
16693  ol_cv_pthread_pthreads=yes
16694else
16695  ol_cv_pthread_pthreads=no
16696fi
16697rm -f core conftest.err conftest.$ac_objext \
16698    conftest$ac_exeext conftest.$ac_ext
16699else
16700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16701/* end confdefs.h.  */
16702
16703/* pthread test headers */
16704#include <pthread.h>
16705#if HAVE_PTHREADS < 7
16706#include <errno.h>
16707#endif
16708#ifndef NULL
16709#define NULL (void*)0
16710#endif
16711
16712static void *task(p)
16713	void *p;
16714{
16715	return (void *) (p == NULL);
16716}
16717
16718
16719int main(argc, argv)
16720	int argc;
16721	char **argv;
16722{
16723
16724	/* pthread test function */
16725#ifndef PTHREAD_CREATE_DETACHED
16726#define	PTHREAD_CREATE_DETACHED	1
16727#endif
16728	pthread_t t;
16729	int status;
16730	int detach = PTHREAD_CREATE_DETACHED;
16731
16732#if HAVE_PTHREADS > 4
16733	/* Final pthreads */
16734	pthread_attr_t attr;
16735
16736	status = pthread_attr_init(&attr);
16737	if( status ) return status;
16738
16739#if HAVE_PTHREADS < 7
16740	status = pthread_attr_setdetachstate(&attr, &detach);
16741	if( status < 0 ) status = errno;
16742#else
16743	status = pthread_attr_setdetachstate(&attr, detach);
16744#endif
16745	if( status ) return status;
16746	status = pthread_create( &t, &attr, task, NULL );
16747#if HAVE_PTHREADS < 7
16748	if( status < 0 ) status = errno;
16749#endif
16750	if( status ) return status;
16751#else
16752	/* Draft 4 pthreads */
16753	status = pthread_create( &t, pthread_attr_default, task, NULL );
16754	if( status ) return errno;
16755
16756	/* give thread a chance to complete */
16757	/* it should remain joinable and hence detachable */
16758	sleep( 1 );
16759
16760	status = pthread_detach( &t );
16761	if( status ) return errno;
16762#endif
16763
16764#ifdef HAVE_LINUX_THREADS
16765	pthread_kill_other_threads_np();
16766#endif
16767
16768	return 0;
16769
16770}
16771
16772_ACEOF
16773if ac_fn_c_try_run "$LINENO"; then :
16774  ol_cv_pthread_pthreads=yes
16775else
16776  ol_cv_pthread_pthreads=no
16777fi
16778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16779  conftest.$ac_objext conftest.beam conftest.$ac_ext
16780fi
16781
16782
16783		# restore the LIBS
16784		LIBS="$ol_LIBS"
16785
16786fi
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
16788$as_echo "$ol_cv_pthread_pthreads" >&6; }
16789
16790	if test $ol_cv_pthread_pthreads = yes ; then
16791		ol_link_pthreads="-pthreads"
16792		ol_link_threads=posix
16793	fi
16794fi
16795
16796		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
16797if test "$ol_link_threads" = no ; then
16798	# try -mthreads
16799	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
16800$as_echo_n "checking for pthread link with -mthreads... " >&6; }
16801if test "${ol_cv_pthread_mthreads+set}" = set; then :
16802  $as_echo_n "(cached) " >&6
16803else
16804
16805		# save the flags
16806		ol_LIBS="$LIBS"
16807		LIBS="-mthreads $LIBS"
16808
16809		if test "$cross_compiling" = yes; then :
16810  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16811/* end confdefs.h.  */
16812
16813/* pthread test headers */
16814#include <pthread.h>
16815#if HAVE_PTHREADS < 7
16816#include <errno.h>
16817#endif
16818#ifndef NULL
16819#define NULL (void*)0
16820#endif
16821
16822static void *task(p)
16823	void *p;
16824{
16825	return (void *) (p == NULL);
16826}
16827
16828int
16829main ()
16830{
16831
16832	/* pthread test function */
16833#ifndef PTHREAD_CREATE_DETACHED
16834#define	PTHREAD_CREATE_DETACHED	1
16835#endif
16836	pthread_t t;
16837	int status;
16838	int detach = PTHREAD_CREATE_DETACHED;
16839
16840#if HAVE_PTHREADS > 4
16841	/* Final pthreads */
16842	pthread_attr_t attr;
16843
16844	status = pthread_attr_init(&attr);
16845	if( status ) return status;
16846
16847#if HAVE_PTHREADS < 7
16848	status = pthread_attr_setdetachstate(&attr, &detach);
16849	if( status < 0 ) status = errno;
16850#else
16851	status = pthread_attr_setdetachstate(&attr, detach);
16852#endif
16853	if( status ) return status;
16854	status = pthread_create( &t, &attr, task, NULL );
16855#if HAVE_PTHREADS < 7
16856	if( status < 0 ) status = errno;
16857#endif
16858	if( status ) return status;
16859#else
16860	/* Draft 4 pthreads */
16861	status = pthread_create( &t, pthread_attr_default, task, NULL );
16862	if( status ) return errno;
16863
16864	/* give thread a chance to complete */
16865	/* it should remain joinable and hence detachable */
16866	sleep( 1 );
16867
16868	status = pthread_detach( &t );
16869	if( status ) return errno;
16870#endif
16871
16872#ifdef HAVE_LINUX_THREADS
16873	pthread_kill_other_threads_np();
16874#endif
16875
16876	return 0;
16877
16878  ;
16879  return 0;
16880}
16881_ACEOF
16882if ac_fn_c_try_link "$LINENO"; then :
16883  ol_cv_pthread_mthreads=yes
16884else
16885  ol_cv_pthread_mthreads=no
16886fi
16887rm -f core conftest.err conftest.$ac_objext \
16888    conftest$ac_exeext conftest.$ac_ext
16889else
16890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16891/* end confdefs.h.  */
16892
16893/* pthread test headers */
16894#include <pthread.h>
16895#if HAVE_PTHREADS < 7
16896#include <errno.h>
16897#endif
16898#ifndef NULL
16899#define NULL (void*)0
16900#endif
16901
16902static void *task(p)
16903	void *p;
16904{
16905	return (void *) (p == NULL);
16906}
16907
16908
16909int main(argc, argv)
16910	int argc;
16911	char **argv;
16912{
16913
16914	/* pthread test function */
16915#ifndef PTHREAD_CREATE_DETACHED
16916#define	PTHREAD_CREATE_DETACHED	1
16917#endif
16918	pthread_t t;
16919	int status;
16920	int detach = PTHREAD_CREATE_DETACHED;
16921
16922#if HAVE_PTHREADS > 4
16923	/* Final pthreads */
16924	pthread_attr_t attr;
16925
16926	status = pthread_attr_init(&attr);
16927	if( status ) return status;
16928
16929#if HAVE_PTHREADS < 7
16930	status = pthread_attr_setdetachstate(&attr, &detach);
16931	if( status < 0 ) status = errno;
16932#else
16933	status = pthread_attr_setdetachstate(&attr, detach);
16934#endif
16935	if( status ) return status;
16936	status = pthread_create( &t, &attr, task, NULL );
16937#if HAVE_PTHREADS < 7
16938	if( status < 0 ) status = errno;
16939#endif
16940	if( status ) return status;
16941#else
16942	/* Draft 4 pthreads */
16943	status = pthread_create( &t, pthread_attr_default, task, NULL );
16944	if( status ) return errno;
16945
16946	/* give thread a chance to complete */
16947	/* it should remain joinable and hence detachable */
16948	sleep( 1 );
16949
16950	status = pthread_detach( &t );
16951	if( status ) return errno;
16952#endif
16953
16954#ifdef HAVE_LINUX_THREADS
16955	pthread_kill_other_threads_np();
16956#endif
16957
16958	return 0;
16959
16960}
16961
16962_ACEOF
16963if ac_fn_c_try_run "$LINENO"; then :
16964  ol_cv_pthread_mthreads=yes
16965else
16966  ol_cv_pthread_mthreads=no
16967fi
16968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16969  conftest.$ac_objext conftest.beam conftest.$ac_ext
16970fi
16971
16972
16973		# restore the LIBS
16974		LIBS="$ol_LIBS"
16975
16976fi
16977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
16978$as_echo "$ol_cv_pthread_mthreads" >&6; }
16979
16980	if test $ol_cv_pthread_mthreads = yes ; then
16981		ol_link_pthreads="-mthreads"
16982		ol_link_threads=posix
16983	fi
16984fi
16985
16986		# Pthread try link: -thread (ol_cv_pthread_thread)
16987if test "$ol_link_threads" = no ; then
16988	# try -thread
16989	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
16990$as_echo_n "checking for pthread link with -thread... " >&6; }
16991if test "${ol_cv_pthread_thread+set}" = set; then :
16992  $as_echo_n "(cached) " >&6
16993else
16994
16995		# save the flags
16996		ol_LIBS="$LIBS"
16997		LIBS="-thread $LIBS"
16998
16999		if test "$cross_compiling" = yes; then :
17000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17001/* end confdefs.h.  */
17002
17003/* pthread test headers */
17004#include <pthread.h>
17005#if HAVE_PTHREADS < 7
17006#include <errno.h>
17007#endif
17008#ifndef NULL
17009#define NULL (void*)0
17010#endif
17011
17012static void *task(p)
17013	void *p;
17014{
17015	return (void *) (p == NULL);
17016}
17017
17018int
17019main ()
17020{
17021
17022	/* pthread test function */
17023#ifndef PTHREAD_CREATE_DETACHED
17024#define	PTHREAD_CREATE_DETACHED	1
17025#endif
17026	pthread_t t;
17027	int status;
17028	int detach = PTHREAD_CREATE_DETACHED;
17029
17030#if HAVE_PTHREADS > 4
17031	/* Final pthreads */
17032	pthread_attr_t attr;
17033
17034	status = pthread_attr_init(&attr);
17035	if( status ) return status;
17036
17037#if HAVE_PTHREADS < 7
17038	status = pthread_attr_setdetachstate(&attr, &detach);
17039	if( status < 0 ) status = errno;
17040#else
17041	status = pthread_attr_setdetachstate(&attr, detach);
17042#endif
17043	if( status ) return status;
17044	status = pthread_create( &t, &attr, task, NULL );
17045#if HAVE_PTHREADS < 7
17046	if( status < 0 ) status = errno;
17047#endif
17048	if( status ) return status;
17049#else
17050	/* Draft 4 pthreads */
17051	status = pthread_create( &t, pthread_attr_default, task, NULL );
17052	if( status ) return errno;
17053
17054	/* give thread a chance to complete */
17055	/* it should remain joinable and hence detachable */
17056	sleep( 1 );
17057
17058	status = pthread_detach( &t );
17059	if( status ) return errno;
17060#endif
17061
17062#ifdef HAVE_LINUX_THREADS
17063	pthread_kill_other_threads_np();
17064#endif
17065
17066	return 0;
17067
17068  ;
17069  return 0;
17070}
17071_ACEOF
17072if ac_fn_c_try_link "$LINENO"; then :
17073  ol_cv_pthread_thread=yes
17074else
17075  ol_cv_pthread_thread=no
17076fi
17077rm -f core conftest.err conftest.$ac_objext \
17078    conftest$ac_exeext conftest.$ac_ext
17079else
17080  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17081/* end confdefs.h.  */
17082
17083/* pthread test headers */
17084#include <pthread.h>
17085#if HAVE_PTHREADS < 7
17086#include <errno.h>
17087#endif
17088#ifndef NULL
17089#define NULL (void*)0
17090#endif
17091
17092static void *task(p)
17093	void *p;
17094{
17095	return (void *) (p == NULL);
17096}
17097
17098
17099int main(argc, argv)
17100	int argc;
17101	char **argv;
17102{
17103
17104	/* pthread test function */
17105#ifndef PTHREAD_CREATE_DETACHED
17106#define	PTHREAD_CREATE_DETACHED	1
17107#endif
17108	pthread_t t;
17109	int status;
17110	int detach = PTHREAD_CREATE_DETACHED;
17111
17112#if HAVE_PTHREADS > 4
17113	/* Final pthreads */
17114	pthread_attr_t attr;
17115
17116	status = pthread_attr_init(&attr);
17117	if( status ) return status;
17118
17119#if HAVE_PTHREADS < 7
17120	status = pthread_attr_setdetachstate(&attr, &detach);
17121	if( status < 0 ) status = errno;
17122#else
17123	status = pthread_attr_setdetachstate(&attr, detach);
17124#endif
17125	if( status ) return status;
17126	status = pthread_create( &t, &attr, task, NULL );
17127#if HAVE_PTHREADS < 7
17128	if( status < 0 ) status = errno;
17129#endif
17130	if( status ) return status;
17131#else
17132	/* Draft 4 pthreads */
17133	status = pthread_create( &t, pthread_attr_default, task, NULL );
17134	if( status ) return errno;
17135
17136	/* give thread a chance to complete */
17137	/* it should remain joinable and hence detachable */
17138	sleep( 1 );
17139
17140	status = pthread_detach( &t );
17141	if( status ) return errno;
17142#endif
17143
17144#ifdef HAVE_LINUX_THREADS
17145	pthread_kill_other_threads_np();
17146#endif
17147
17148	return 0;
17149
17150}
17151
17152_ACEOF
17153if ac_fn_c_try_run "$LINENO"; then :
17154  ol_cv_pthread_thread=yes
17155else
17156  ol_cv_pthread_thread=no
17157fi
17158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17159  conftest.$ac_objext conftest.beam conftest.$ac_ext
17160fi
17161
17162
17163		# restore the LIBS
17164		LIBS="$ol_LIBS"
17165
17166fi
17167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
17168$as_echo "$ol_cv_pthread_thread" >&6; }
17169
17170	if test $ol_cv_pthread_thread = yes ; then
17171		ol_link_pthreads="-thread"
17172		ol_link_threads=posix
17173	fi
17174fi
17175
17176
17177		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
17178if test "$ol_link_threads" = no ; then
17179	# try -lpthread -lmach -lexc -lc_r
17180	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
17181$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
17182if test "${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}" = set; then :
17183  $as_echo_n "(cached) " >&6
17184else
17185
17186		# save the flags
17187		ol_LIBS="$LIBS"
17188		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
17189
17190		if test "$cross_compiling" = yes; then :
17191  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17192/* end confdefs.h.  */
17193
17194/* pthread test headers */
17195#include <pthread.h>
17196#if HAVE_PTHREADS < 7
17197#include <errno.h>
17198#endif
17199#ifndef NULL
17200#define NULL (void*)0
17201#endif
17202
17203static void *task(p)
17204	void *p;
17205{
17206	return (void *) (p == NULL);
17207}
17208
17209int
17210main ()
17211{
17212
17213	/* pthread test function */
17214#ifndef PTHREAD_CREATE_DETACHED
17215#define	PTHREAD_CREATE_DETACHED	1
17216#endif
17217	pthread_t t;
17218	int status;
17219	int detach = PTHREAD_CREATE_DETACHED;
17220
17221#if HAVE_PTHREADS > 4
17222	/* Final pthreads */
17223	pthread_attr_t attr;
17224
17225	status = pthread_attr_init(&attr);
17226	if( status ) return status;
17227
17228#if HAVE_PTHREADS < 7
17229	status = pthread_attr_setdetachstate(&attr, &detach);
17230	if( status < 0 ) status = errno;
17231#else
17232	status = pthread_attr_setdetachstate(&attr, detach);
17233#endif
17234	if( status ) return status;
17235	status = pthread_create( &t, &attr, task, NULL );
17236#if HAVE_PTHREADS < 7
17237	if( status < 0 ) status = errno;
17238#endif
17239	if( status ) return status;
17240#else
17241	/* Draft 4 pthreads */
17242	status = pthread_create( &t, pthread_attr_default, task, NULL );
17243	if( status ) return errno;
17244
17245	/* give thread a chance to complete */
17246	/* it should remain joinable and hence detachable */
17247	sleep( 1 );
17248
17249	status = pthread_detach( &t );
17250	if( status ) return errno;
17251#endif
17252
17253#ifdef HAVE_LINUX_THREADS
17254	pthread_kill_other_threads_np();
17255#endif
17256
17257	return 0;
17258
17259  ;
17260  return 0;
17261}
17262_ACEOF
17263if ac_fn_c_try_link "$LINENO"; then :
17264  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17265else
17266  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17267fi
17268rm -f core conftest.err conftest.$ac_objext \
17269    conftest$ac_exeext conftest.$ac_ext
17270else
17271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17272/* end confdefs.h.  */
17273
17274/* pthread test headers */
17275#include <pthread.h>
17276#if HAVE_PTHREADS < 7
17277#include <errno.h>
17278#endif
17279#ifndef NULL
17280#define NULL (void*)0
17281#endif
17282
17283static void *task(p)
17284	void *p;
17285{
17286	return (void *) (p == NULL);
17287}
17288
17289
17290int main(argc, argv)
17291	int argc;
17292	char **argv;
17293{
17294
17295	/* pthread test function */
17296#ifndef PTHREAD_CREATE_DETACHED
17297#define	PTHREAD_CREATE_DETACHED	1
17298#endif
17299	pthread_t t;
17300	int status;
17301	int detach = PTHREAD_CREATE_DETACHED;
17302
17303#if HAVE_PTHREADS > 4
17304	/* Final pthreads */
17305	pthread_attr_t attr;
17306
17307	status = pthread_attr_init(&attr);
17308	if( status ) return status;
17309
17310#if HAVE_PTHREADS < 7
17311	status = pthread_attr_setdetachstate(&attr, &detach);
17312	if( status < 0 ) status = errno;
17313#else
17314	status = pthread_attr_setdetachstate(&attr, detach);
17315#endif
17316	if( status ) return status;
17317	status = pthread_create( &t, &attr, task, NULL );
17318#if HAVE_PTHREADS < 7
17319	if( status < 0 ) status = errno;
17320#endif
17321	if( status ) return status;
17322#else
17323	/* Draft 4 pthreads */
17324	status = pthread_create( &t, pthread_attr_default, task, NULL );
17325	if( status ) return errno;
17326
17327	/* give thread a chance to complete */
17328	/* it should remain joinable and hence detachable */
17329	sleep( 1 );
17330
17331	status = pthread_detach( &t );
17332	if( status ) return errno;
17333#endif
17334
17335#ifdef HAVE_LINUX_THREADS
17336	pthread_kill_other_threads_np();
17337#endif
17338
17339	return 0;
17340
17341}
17342
17343_ACEOF
17344if ac_fn_c_try_run "$LINENO"; then :
17345  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
17346else
17347  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
17348fi
17349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17350  conftest.$ac_objext conftest.beam conftest.$ac_ext
17351fi
17352
17353
17354		# restore the LIBS
17355		LIBS="$ol_LIBS"
17356
17357fi
17358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
17359$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
17360
17361	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
17362		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
17363		ol_link_threads=posix
17364	fi
17365fi
17366
17367		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
17368if test "$ol_link_threads" = no ; then
17369	# try -lpthread -lmach -lexc
17370	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
17371$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
17372if test "${ol_cv_pthread_lpthread_lmach_lexc+set}" = set; then :
17373  $as_echo_n "(cached) " >&6
17374else
17375
17376		# save the flags
17377		ol_LIBS="$LIBS"
17378		LIBS="-lpthread -lmach -lexc $LIBS"
17379
17380		if test "$cross_compiling" = yes; then :
17381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17382/* end confdefs.h.  */
17383
17384/* pthread test headers */
17385#include <pthread.h>
17386#if HAVE_PTHREADS < 7
17387#include <errno.h>
17388#endif
17389#ifndef NULL
17390#define NULL (void*)0
17391#endif
17392
17393static void *task(p)
17394	void *p;
17395{
17396	return (void *) (p == NULL);
17397}
17398
17399int
17400main ()
17401{
17402
17403	/* pthread test function */
17404#ifndef PTHREAD_CREATE_DETACHED
17405#define	PTHREAD_CREATE_DETACHED	1
17406#endif
17407	pthread_t t;
17408	int status;
17409	int detach = PTHREAD_CREATE_DETACHED;
17410
17411#if HAVE_PTHREADS > 4
17412	/* Final pthreads */
17413	pthread_attr_t attr;
17414
17415	status = pthread_attr_init(&attr);
17416	if( status ) return status;
17417
17418#if HAVE_PTHREADS < 7
17419	status = pthread_attr_setdetachstate(&attr, &detach);
17420	if( status < 0 ) status = errno;
17421#else
17422	status = pthread_attr_setdetachstate(&attr, detach);
17423#endif
17424	if( status ) return status;
17425	status = pthread_create( &t, &attr, task, NULL );
17426#if HAVE_PTHREADS < 7
17427	if( status < 0 ) status = errno;
17428#endif
17429	if( status ) return status;
17430#else
17431	/* Draft 4 pthreads */
17432	status = pthread_create( &t, pthread_attr_default, task, NULL );
17433	if( status ) return errno;
17434
17435	/* give thread a chance to complete */
17436	/* it should remain joinable and hence detachable */
17437	sleep( 1 );
17438
17439	status = pthread_detach( &t );
17440	if( status ) return errno;
17441#endif
17442
17443#ifdef HAVE_LINUX_THREADS
17444	pthread_kill_other_threads_np();
17445#endif
17446
17447	return 0;
17448
17449  ;
17450  return 0;
17451}
17452_ACEOF
17453if ac_fn_c_try_link "$LINENO"; then :
17454  ol_cv_pthread_lpthread_lmach_lexc=yes
17455else
17456  ol_cv_pthread_lpthread_lmach_lexc=no
17457fi
17458rm -f core conftest.err conftest.$ac_objext \
17459    conftest$ac_exeext conftest.$ac_ext
17460else
17461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17462/* end confdefs.h.  */
17463
17464/* pthread test headers */
17465#include <pthread.h>
17466#if HAVE_PTHREADS < 7
17467#include <errno.h>
17468#endif
17469#ifndef NULL
17470#define NULL (void*)0
17471#endif
17472
17473static void *task(p)
17474	void *p;
17475{
17476	return (void *) (p == NULL);
17477}
17478
17479
17480int main(argc, argv)
17481	int argc;
17482	char **argv;
17483{
17484
17485	/* pthread test function */
17486#ifndef PTHREAD_CREATE_DETACHED
17487#define	PTHREAD_CREATE_DETACHED	1
17488#endif
17489	pthread_t t;
17490	int status;
17491	int detach = PTHREAD_CREATE_DETACHED;
17492
17493#if HAVE_PTHREADS > 4
17494	/* Final pthreads */
17495	pthread_attr_t attr;
17496
17497	status = pthread_attr_init(&attr);
17498	if( status ) return status;
17499
17500#if HAVE_PTHREADS < 7
17501	status = pthread_attr_setdetachstate(&attr, &detach);
17502	if( status < 0 ) status = errno;
17503#else
17504	status = pthread_attr_setdetachstate(&attr, detach);
17505#endif
17506	if( status ) return status;
17507	status = pthread_create( &t, &attr, task, NULL );
17508#if HAVE_PTHREADS < 7
17509	if( status < 0 ) status = errno;
17510#endif
17511	if( status ) return status;
17512#else
17513	/* Draft 4 pthreads */
17514	status = pthread_create( &t, pthread_attr_default, task, NULL );
17515	if( status ) return errno;
17516
17517	/* give thread a chance to complete */
17518	/* it should remain joinable and hence detachable */
17519	sleep( 1 );
17520
17521	status = pthread_detach( &t );
17522	if( status ) return errno;
17523#endif
17524
17525#ifdef HAVE_LINUX_THREADS
17526	pthread_kill_other_threads_np();
17527#endif
17528
17529	return 0;
17530
17531}
17532
17533_ACEOF
17534if ac_fn_c_try_run "$LINENO"; then :
17535  ol_cv_pthread_lpthread_lmach_lexc=yes
17536else
17537  ol_cv_pthread_lpthread_lmach_lexc=no
17538fi
17539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17540  conftest.$ac_objext conftest.beam conftest.$ac_ext
17541fi
17542
17543
17544		# restore the LIBS
17545		LIBS="$ol_LIBS"
17546
17547fi
17548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
17549$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
17550
17551	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
17552		ol_link_pthreads="-lpthread -lmach -lexc"
17553		ol_link_threads=posix
17554	fi
17555fi
17556
17557
17558		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
17559if test "$ol_link_threads" = no ; then
17560	# try -lpthread -Wl,-woff,85
17561	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
17562$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
17563if test "${ol_cv_pthread_lib_lpthread_woff+set}" = set; then :
17564  $as_echo_n "(cached) " >&6
17565else
17566
17567		# save the flags
17568		ol_LIBS="$LIBS"
17569		LIBS="-lpthread -Wl,-woff,85 $LIBS"
17570
17571		if test "$cross_compiling" = yes; then :
17572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17573/* end confdefs.h.  */
17574
17575/* pthread test headers */
17576#include <pthread.h>
17577#if HAVE_PTHREADS < 7
17578#include <errno.h>
17579#endif
17580#ifndef NULL
17581#define NULL (void*)0
17582#endif
17583
17584static void *task(p)
17585	void *p;
17586{
17587	return (void *) (p == NULL);
17588}
17589
17590int
17591main ()
17592{
17593
17594	/* pthread test function */
17595#ifndef PTHREAD_CREATE_DETACHED
17596#define	PTHREAD_CREATE_DETACHED	1
17597#endif
17598	pthread_t t;
17599	int status;
17600	int detach = PTHREAD_CREATE_DETACHED;
17601
17602#if HAVE_PTHREADS > 4
17603	/* Final pthreads */
17604	pthread_attr_t attr;
17605
17606	status = pthread_attr_init(&attr);
17607	if( status ) return status;
17608
17609#if HAVE_PTHREADS < 7
17610	status = pthread_attr_setdetachstate(&attr, &detach);
17611	if( status < 0 ) status = errno;
17612#else
17613	status = pthread_attr_setdetachstate(&attr, detach);
17614#endif
17615	if( status ) return status;
17616	status = pthread_create( &t, &attr, task, NULL );
17617#if HAVE_PTHREADS < 7
17618	if( status < 0 ) status = errno;
17619#endif
17620	if( status ) return status;
17621#else
17622	/* Draft 4 pthreads */
17623	status = pthread_create( &t, pthread_attr_default, task, NULL );
17624	if( status ) return errno;
17625
17626	/* give thread a chance to complete */
17627	/* it should remain joinable and hence detachable */
17628	sleep( 1 );
17629
17630	status = pthread_detach( &t );
17631	if( status ) return errno;
17632#endif
17633
17634#ifdef HAVE_LINUX_THREADS
17635	pthread_kill_other_threads_np();
17636#endif
17637
17638	return 0;
17639
17640  ;
17641  return 0;
17642}
17643_ACEOF
17644if ac_fn_c_try_link "$LINENO"; then :
17645  ol_cv_pthread_lib_lpthread_woff=yes
17646else
17647  ol_cv_pthread_lib_lpthread_woff=no
17648fi
17649rm -f core conftest.err conftest.$ac_objext \
17650    conftest$ac_exeext conftest.$ac_ext
17651else
17652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17653/* end confdefs.h.  */
17654
17655/* pthread test headers */
17656#include <pthread.h>
17657#if HAVE_PTHREADS < 7
17658#include <errno.h>
17659#endif
17660#ifndef NULL
17661#define NULL (void*)0
17662#endif
17663
17664static void *task(p)
17665	void *p;
17666{
17667	return (void *) (p == NULL);
17668}
17669
17670
17671int main(argc, argv)
17672	int argc;
17673	char **argv;
17674{
17675
17676	/* pthread test function */
17677#ifndef PTHREAD_CREATE_DETACHED
17678#define	PTHREAD_CREATE_DETACHED	1
17679#endif
17680	pthread_t t;
17681	int status;
17682	int detach = PTHREAD_CREATE_DETACHED;
17683
17684#if HAVE_PTHREADS > 4
17685	/* Final pthreads */
17686	pthread_attr_t attr;
17687
17688	status = pthread_attr_init(&attr);
17689	if( status ) return status;
17690
17691#if HAVE_PTHREADS < 7
17692	status = pthread_attr_setdetachstate(&attr, &detach);
17693	if( status < 0 ) status = errno;
17694#else
17695	status = pthread_attr_setdetachstate(&attr, detach);
17696#endif
17697	if( status ) return status;
17698	status = pthread_create( &t, &attr, task, NULL );
17699#if HAVE_PTHREADS < 7
17700	if( status < 0 ) status = errno;
17701#endif
17702	if( status ) return status;
17703#else
17704	/* Draft 4 pthreads */
17705	status = pthread_create( &t, pthread_attr_default, task, NULL );
17706	if( status ) return errno;
17707
17708	/* give thread a chance to complete */
17709	/* it should remain joinable and hence detachable */
17710	sleep( 1 );
17711
17712	status = pthread_detach( &t );
17713	if( status ) return errno;
17714#endif
17715
17716#ifdef HAVE_LINUX_THREADS
17717	pthread_kill_other_threads_np();
17718#endif
17719
17720	return 0;
17721
17722}
17723
17724_ACEOF
17725if ac_fn_c_try_run "$LINENO"; then :
17726  ol_cv_pthread_lib_lpthread_woff=yes
17727else
17728  ol_cv_pthread_lib_lpthread_woff=no
17729fi
17730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17731  conftest.$ac_objext conftest.beam conftest.$ac_ext
17732fi
17733
17734
17735		# restore the LIBS
17736		LIBS="$ol_LIBS"
17737
17738fi
17739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
17740$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
17741
17742	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
17743		ol_link_pthreads="-lpthread -Wl,-woff,85"
17744		ol_link_threads=posix
17745	fi
17746fi
17747
17748
17749		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
17750if test "$ol_link_threads" = no ; then
17751	# try -lpthread
17752	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
17753$as_echo_n "checking for pthread link with -lpthread... " >&6; }
17754if test "${ol_cv_pthread_lpthread+set}" = set; then :
17755  $as_echo_n "(cached) " >&6
17756else
17757
17758		# save the flags
17759		ol_LIBS="$LIBS"
17760		LIBS="-lpthread $LIBS"
17761
17762		if test "$cross_compiling" = yes; then :
17763  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17764/* end confdefs.h.  */
17765
17766/* pthread test headers */
17767#include <pthread.h>
17768#if HAVE_PTHREADS < 7
17769#include <errno.h>
17770#endif
17771#ifndef NULL
17772#define NULL (void*)0
17773#endif
17774
17775static void *task(p)
17776	void *p;
17777{
17778	return (void *) (p == NULL);
17779}
17780
17781int
17782main ()
17783{
17784
17785	/* pthread test function */
17786#ifndef PTHREAD_CREATE_DETACHED
17787#define	PTHREAD_CREATE_DETACHED	1
17788#endif
17789	pthread_t t;
17790	int status;
17791	int detach = PTHREAD_CREATE_DETACHED;
17792
17793#if HAVE_PTHREADS > 4
17794	/* Final pthreads */
17795	pthread_attr_t attr;
17796
17797	status = pthread_attr_init(&attr);
17798	if( status ) return status;
17799
17800#if HAVE_PTHREADS < 7
17801	status = pthread_attr_setdetachstate(&attr, &detach);
17802	if( status < 0 ) status = errno;
17803#else
17804	status = pthread_attr_setdetachstate(&attr, detach);
17805#endif
17806	if( status ) return status;
17807	status = pthread_create( &t, &attr, task, NULL );
17808#if HAVE_PTHREADS < 7
17809	if( status < 0 ) status = errno;
17810#endif
17811	if( status ) return status;
17812#else
17813	/* Draft 4 pthreads */
17814	status = pthread_create( &t, pthread_attr_default, task, NULL );
17815	if( status ) return errno;
17816
17817	/* give thread a chance to complete */
17818	/* it should remain joinable and hence detachable */
17819	sleep( 1 );
17820
17821	status = pthread_detach( &t );
17822	if( status ) return errno;
17823#endif
17824
17825#ifdef HAVE_LINUX_THREADS
17826	pthread_kill_other_threads_np();
17827#endif
17828
17829	return 0;
17830
17831  ;
17832  return 0;
17833}
17834_ACEOF
17835if ac_fn_c_try_link "$LINENO"; then :
17836  ol_cv_pthread_lpthread=yes
17837else
17838  ol_cv_pthread_lpthread=no
17839fi
17840rm -f core conftest.err conftest.$ac_objext \
17841    conftest$ac_exeext conftest.$ac_ext
17842else
17843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17844/* end confdefs.h.  */
17845
17846/* pthread test headers */
17847#include <pthread.h>
17848#if HAVE_PTHREADS < 7
17849#include <errno.h>
17850#endif
17851#ifndef NULL
17852#define NULL (void*)0
17853#endif
17854
17855static void *task(p)
17856	void *p;
17857{
17858	return (void *) (p == NULL);
17859}
17860
17861
17862int main(argc, argv)
17863	int argc;
17864	char **argv;
17865{
17866
17867	/* pthread test function */
17868#ifndef PTHREAD_CREATE_DETACHED
17869#define	PTHREAD_CREATE_DETACHED	1
17870#endif
17871	pthread_t t;
17872	int status;
17873	int detach = PTHREAD_CREATE_DETACHED;
17874
17875#if HAVE_PTHREADS > 4
17876	/* Final pthreads */
17877	pthread_attr_t attr;
17878
17879	status = pthread_attr_init(&attr);
17880	if( status ) return status;
17881
17882#if HAVE_PTHREADS < 7
17883	status = pthread_attr_setdetachstate(&attr, &detach);
17884	if( status < 0 ) status = errno;
17885#else
17886	status = pthread_attr_setdetachstate(&attr, detach);
17887#endif
17888	if( status ) return status;
17889	status = pthread_create( &t, &attr, task, NULL );
17890#if HAVE_PTHREADS < 7
17891	if( status < 0 ) status = errno;
17892#endif
17893	if( status ) return status;
17894#else
17895	/* Draft 4 pthreads */
17896	status = pthread_create( &t, pthread_attr_default, task, NULL );
17897	if( status ) return errno;
17898
17899	/* give thread a chance to complete */
17900	/* it should remain joinable and hence detachable */
17901	sleep( 1 );
17902
17903	status = pthread_detach( &t );
17904	if( status ) return errno;
17905#endif
17906
17907#ifdef HAVE_LINUX_THREADS
17908	pthread_kill_other_threads_np();
17909#endif
17910
17911	return 0;
17912
17913}
17914
17915_ACEOF
17916if ac_fn_c_try_run "$LINENO"; then :
17917  ol_cv_pthread_lpthread=yes
17918else
17919  ol_cv_pthread_lpthread=no
17920fi
17921rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17922  conftest.$ac_objext conftest.beam conftest.$ac_ext
17923fi
17924
17925
17926		# restore the LIBS
17927		LIBS="$ol_LIBS"
17928
17929fi
17930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
17931$as_echo "$ol_cv_pthread_lpthread" >&6; }
17932
17933	if test $ol_cv_pthread_lpthread = yes ; then
17934		ol_link_pthreads="-lpthread"
17935		ol_link_threads=posix
17936	fi
17937fi
17938
17939		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
17940if test "$ol_link_threads" = no ; then
17941	# try -lc_r
17942	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
17943$as_echo_n "checking for pthread link with -lc_r... " >&6; }
17944if test "${ol_cv_pthread_lc_r+set}" = set; then :
17945  $as_echo_n "(cached) " >&6
17946else
17947
17948		# save the flags
17949		ol_LIBS="$LIBS"
17950		LIBS="-lc_r $LIBS"
17951
17952		if test "$cross_compiling" = yes; then :
17953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17954/* end confdefs.h.  */
17955
17956/* pthread test headers */
17957#include <pthread.h>
17958#if HAVE_PTHREADS < 7
17959#include <errno.h>
17960#endif
17961#ifndef NULL
17962#define NULL (void*)0
17963#endif
17964
17965static void *task(p)
17966	void *p;
17967{
17968	return (void *) (p == NULL);
17969}
17970
17971int
17972main ()
17973{
17974
17975	/* pthread test function */
17976#ifndef PTHREAD_CREATE_DETACHED
17977#define	PTHREAD_CREATE_DETACHED	1
17978#endif
17979	pthread_t t;
17980	int status;
17981	int detach = PTHREAD_CREATE_DETACHED;
17982
17983#if HAVE_PTHREADS > 4
17984	/* Final pthreads */
17985	pthread_attr_t attr;
17986
17987	status = pthread_attr_init(&attr);
17988	if( status ) return status;
17989
17990#if HAVE_PTHREADS < 7
17991	status = pthread_attr_setdetachstate(&attr, &detach);
17992	if( status < 0 ) status = errno;
17993#else
17994	status = pthread_attr_setdetachstate(&attr, detach);
17995#endif
17996	if( status ) return status;
17997	status = pthread_create( &t, &attr, task, NULL );
17998#if HAVE_PTHREADS < 7
17999	if( status < 0 ) status = errno;
18000#endif
18001	if( status ) return status;
18002#else
18003	/* Draft 4 pthreads */
18004	status = pthread_create( &t, pthread_attr_default, task, NULL );
18005	if( status ) return errno;
18006
18007	/* give thread a chance to complete */
18008	/* it should remain joinable and hence detachable */
18009	sleep( 1 );
18010
18011	status = pthread_detach( &t );
18012	if( status ) return errno;
18013#endif
18014
18015#ifdef HAVE_LINUX_THREADS
18016	pthread_kill_other_threads_np();
18017#endif
18018
18019	return 0;
18020
18021  ;
18022  return 0;
18023}
18024_ACEOF
18025if ac_fn_c_try_link "$LINENO"; then :
18026  ol_cv_pthread_lc_r=yes
18027else
18028  ol_cv_pthread_lc_r=no
18029fi
18030rm -f core conftest.err conftest.$ac_objext \
18031    conftest$ac_exeext conftest.$ac_ext
18032else
18033  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18034/* end confdefs.h.  */
18035
18036/* pthread test headers */
18037#include <pthread.h>
18038#if HAVE_PTHREADS < 7
18039#include <errno.h>
18040#endif
18041#ifndef NULL
18042#define NULL (void*)0
18043#endif
18044
18045static void *task(p)
18046	void *p;
18047{
18048	return (void *) (p == NULL);
18049}
18050
18051
18052int main(argc, argv)
18053	int argc;
18054	char **argv;
18055{
18056
18057	/* pthread test function */
18058#ifndef PTHREAD_CREATE_DETACHED
18059#define	PTHREAD_CREATE_DETACHED	1
18060#endif
18061	pthread_t t;
18062	int status;
18063	int detach = PTHREAD_CREATE_DETACHED;
18064
18065#if HAVE_PTHREADS > 4
18066	/* Final pthreads */
18067	pthread_attr_t attr;
18068
18069	status = pthread_attr_init(&attr);
18070	if( status ) return status;
18071
18072#if HAVE_PTHREADS < 7
18073	status = pthread_attr_setdetachstate(&attr, &detach);
18074	if( status < 0 ) status = errno;
18075#else
18076	status = pthread_attr_setdetachstate(&attr, detach);
18077#endif
18078	if( status ) return status;
18079	status = pthread_create( &t, &attr, task, NULL );
18080#if HAVE_PTHREADS < 7
18081	if( status < 0 ) status = errno;
18082#endif
18083	if( status ) return status;
18084#else
18085	/* Draft 4 pthreads */
18086	status = pthread_create( &t, pthread_attr_default, task, NULL );
18087	if( status ) return errno;
18088
18089	/* give thread a chance to complete */
18090	/* it should remain joinable and hence detachable */
18091	sleep( 1 );
18092
18093	status = pthread_detach( &t );
18094	if( status ) return errno;
18095#endif
18096
18097#ifdef HAVE_LINUX_THREADS
18098	pthread_kill_other_threads_np();
18099#endif
18100
18101	return 0;
18102
18103}
18104
18105_ACEOF
18106if ac_fn_c_try_run "$LINENO"; then :
18107  ol_cv_pthread_lc_r=yes
18108else
18109  ol_cv_pthread_lc_r=no
18110fi
18111rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18112  conftest.$ac_objext conftest.beam conftest.$ac_ext
18113fi
18114
18115
18116		# restore the LIBS
18117		LIBS="$ol_LIBS"
18118
18119fi
18120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
18121$as_echo "$ol_cv_pthread_lc_r" >&6; }
18122
18123	if test $ol_cv_pthread_lc_r = yes ; then
18124		ol_link_pthreads="-lc_r"
18125		ol_link_threads=posix
18126	fi
18127fi
18128
18129
18130		# Pthread try link: -threads (ol_cv_pthread_threads)
18131if test "$ol_link_threads" = no ; then
18132	# try -threads
18133	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
18134$as_echo_n "checking for pthread link with -threads... " >&6; }
18135if test "${ol_cv_pthread_threads+set}" = set; then :
18136  $as_echo_n "(cached) " >&6
18137else
18138
18139		# save the flags
18140		ol_LIBS="$LIBS"
18141		LIBS="-threads $LIBS"
18142
18143		if test "$cross_compiling" = yes; then :
18144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18145/* end confdefs.h.  */
18146
18147/* pthread test headers */
18148#include <pthread.h>
18149#if HAVE_PTHREADS < 7
18150#include <errno.h>
18151#endif
18152#ifndef NULL
18153#define NULL (void*)0
18154#endif
18155
18156static void *task(p)
18157	void *p;
18158{
18159	return (void *) (p == NULL);
18160}
18161
18162int
18163main ()
18164{
18165
18166	/* pthread test function */
18167#ifndef PTHREAD_CREATE_DETACHED
18168#define	PTHREAD_CREATE_DETACHED	1
18169#endif
18170	pthread_t t;
18171	int status;
18172	int detach = PTHREAD_CREATE_DETACHED;
18173
18174#if HAVE_PTHREADS > 4
18175	/* Final pthreads */
18176	pthread_attr_t attr;
18177
18178	status = pthread_attr_init(&attr);
18179	if( status ) return status;
18180
18181#if HAVE_PTHREADS < 7
18182	status = pthread_attr_setdetachstate(&attr, &detach);
18183	if( status < 0 ) status = errno;
18184#else
18185	status = pthread_attr_setdetachstate(&attr, detach);
18186#endif
18187	if( status ) return status;
18188	status = pthread_create( &t, &attr, task, NULL );
18189#if HAVE_PTHREADS < 7
18190	if( status < 0 ) status = errno;
18191#endif
18192	if( status ) return status;
18193#else
18194	/* Draft 4 pthreads */
18195	status = pthread_create( &t, pthread_attr_default, task, NULL );
18196	if( status ) return errno;
18197
18198	/* give thread a chance to complete */
18199	/* it should remain joinable and hence detachable */
18200	sleep( 1 );
18201
18202	status = pthread_detach( &t );
18203	if( status ) return errno;
18204#endif
18205
18206#ifdef HAVE_LINUX_THREADS
18207	pthread_kill_other_threads_np();
18208#endif
18209
18210	return 0;
18211
18212  ;
18213  return 0;
18214}
18215_ACEOF
18216if ac_fn_c_try_link "$LINENO"; then :
18217  ol_cv_pthread_threads=yes
18218else
18219  ol_cv_pthread_threads=no
18220fi
18221rm -f core conftest.err conftest.$ac_objext \
18222    conftest$ac_exeext conftest.$ac_ext
18223else
18224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225/* end confdefs.h.  */
18226
18227/* pthread test headers */
18228#include <pthread.h>
18229#if HAVE_PTHREADS < 7
18230#include <errno.h>
18231#endif
18232#ifndef NULL
18233#define NULL (void*)0
18234#endif
18235
18236static void *task(p)
18237	void *p;
18238{
18239	return (void *) (p == NULL);
18240}
18241
18242
18243int main(argc, argv)
18244	int argc;
18245	char **argv;
18246{
18247
18248	/* pthread test function */
18249#ifndef PTHREAD_CREATE_DETACHED
18250#define	PTHREAD_CREATE_DETACHED	1
18251#endif
18252	pthread_t t;
18253	int status;
18254	int detach = PTHREAD_CREATE_DETACHED;
18255
18256#if HAVE_PTHREADS > 4
18257	/* Final pthreads */
18258	pthread_attr_t attr;
18259
18260	status = pthread_attr_init(&attr);
18261	if( status ) return status;
18262
18263#if HAVE_PTHREADS < 7
18264	status = pthread_attr_setdetachstate(&attr, &detach);
18265	if( status < 0 ) status = errno;
18266#else
18267	status = pthread_attr_setdetachstate(&attr, detach);
18268#endif
18269	if( status ) return status;
18270	status = pthread_create( &t, &attr, task, NULL );
18271#if HAVE_PTHREADS < 7
18272	if( status < 0 ) status = errno;
18273#endif
18274	if( status ) return status;
18275#else
18276	/* Draft 4 pthreads */
18277	status = pthread_create( &t, pthread_attr_default, task, NULL );
18278	if( status ) return errno;
18279
18280	/* give thread a chance to complete */
18281	/* it should remain joinable and hence detachable */
18282	sleep( 1 );
18283
18284	status = pthread_detach( &t );
18285	if( status ) return errno;
18286#endif
18287
18288#ifdef HAVE_LINUX_THREADS
18289	pthread_kill_other_threads_np();
18290#endif
18291
18292	return 0;
18293
18294}
18295
18296_ACEOF
18297if ac_fn_c_try_run "$LINENO"; then :
18298  ol_cv_pthread_threads=yes
18299else
18300  ol_cv_pthread_threads=no
18301fi
18302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18303  conftest.$ac_objext conftest.beam conftest.$ac_ext
18304fi
18305
18306
18307		# restore the LIBS
18308		LIBS="$ol_LIBS"
18309
18310fi
18311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
18312$as_echo "$ol_cv_pthread_threads" >&6; }
18313
18314	if test $ol_cv_pthread_threads = yes ; then
18315		ol_link_pthreads="-threads"
18316		ol_link_threads=posix
18317	fi
18318fi
18319
18320
18321		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
18322if test "$ol_link_threads" = no ; then
18323	# try -lpthreads -lmach -lexc -lc_r
18324	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
18325$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
18326if test "${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}" = set; then :
18327  $as_echo_n "(cached) " >&6
18328else
18329
18330		# save the flags
18331		ol_LIBS="$LIBS"
18332		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
18333
18334		if test "$cross_compiling" = yes; then :
18335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18336/* end confdefs.h.  */
18337
18338/* pthread test headers */
18339#include <pthread.h>
18340#if HAVE_PTHREADS < 7
18341#include <errno.h>
18342#endif
18343#ifndef NULL
18344#define NULL (void*)0
18345#endif
18346
18347static void *task(p)
18348	void *p;
18349{
18350	return (void *) (p == NULL);
18351}
18352
18353int
18354main ()
18355{
18356
18357	/* pthread test function */
18358#ifndef PTHREAD_CREATE_DETACHED
18359#define	PTHREAD_CREATE_DETACHED	1
18360#endif
18361	pthread_t t;
18362	int status;
18363	int detach = PTHREAD_CREATE_DETACHED;
18364
18365#if HAVE_PTHREADS > 4
18366	/* Final pthreads */
18367	pthread_attr_t attr;
18368
18369	status = pthread_attr_init(&attr);
18370	if( status ) return status;
18371
18372#if HAVE_PTHREADS < 7
18373	status = pthread_attr_setdetachstate(&attr, &detach);
18374	if( status < 0 ) status = errno;
18375#else
18376	status = pthread_attr_setdetachstate(&attr, detach);
18377#endif
18378	if( status ) return status;
18379	status = pthread_create( &t, &attr, task, NULL );
18380#if HAVE_PTHREADS < 7
18381	if( status < 0 ) status = errno;
18382#endif
18383	if( status ) return status;
18384#else
18385	/* Draft 4 pthreads */
18386	status = pthread_create( &t, pthread_attr_default, task, NULL );
18387	if( status ) return errno;
18388
18389	/* give thread a chance to complete */
18390	/* it should remain joinable and hence detachable */
18391	sleep( 1 );
18392
18393	status = pthread_detach( &t );
18394	if( status ) return errno;
18395#endif
18396
18397#ifdef HAVE_LINUX_THREADS
18398	pthread_kill_other_threads_np();
18399#endif
18400
18401	return 0;
18402
18403  ;
18404  return 0;
18405}
18406_ACEOF
18407if ac_fn_c_try_link "$LINENO"; then :
18408  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18409else
18410  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18411fi
18412rm -f core conftest.err conftest.$ac_objext \
18413    conftest$ac_exeext conftest.$ac_ext
18414else
18415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18416/* end confdefs.h.  */
18417
18418/* pthread test headers */
18419#include <pthread.h>
18420#if HAVE_PTHREADS < 7
18421#include <errno.h>
18422#endif
18423#ifndef NULL
18424#define NULL (void*)0
18425#endif
18426
18427static void *task(p)
18428	void *p;
18429{
18430	return (void *) (p == NULL);
18431}
18432
18433
18434int main(argc, argv)
18435	int argc;
18436	char **argv;
18437{
18438
18439	/* pthread test function */
18440#ifndef PTHREAD_CREATE_DETACHED
18441#define	PTHREAD_CREATE_DETACHED	1
18442#endif
18443	pthread_t t;
18444	int status;
18445	int detach = PTHREAD_CREATE_DETACHED;
18446
18447#if HAVE_PTHREADS > 4
18448	/* Final pthreads */
18449	pthread_attr_t attr;
18450
18451	status = pthread_attr_init(&attr);
18452	if( status ) return status;
18453
18454#if HAVE_PTHREADS < 7
18455	status = pthread_attr_setdetachstate(&attr, &detach);
18456	if( status < 0 ) status = errno;
18457#else
18458	status = pthread_attr_setdetachstate(&attr, detach);
18459#endif
18460	if( status ) return status;
18461	status = pthread_create( &t, &attr, task, NULL );
18462#if HAVE_PTHREADS < 7
18463	if( status < 0 ) status = errno;
18464#endif
18465	if( status ) return status;
18466#else
18467	/* Draft 4 pthreads */
18468	status = pthread_create( &t, pthread_attr_default, task, NULL );
18469	if( status ) return errno;
18470
18471	/* give thread a chance to complete */
18472	/* it should remain joinable and hence detachable */
18473	sleep( 1 );
18474
18475	status = pthread_detach( &t );
18476	if( status ) return errno;
18477#endif
18478
18479#ifdef HAVE_LINUX_THREADS
18480	pthread_kill_other_threads_np();
18481#endif
18482
18483	return 0;
18484
18485}
18486
18487_ACEOF
18488if ac_fn_c_try_run "$LINENO"; then :
18489  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
18490else
18491  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
18492fi
18493rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18494  conftest.$ac_objext conftest.beam conftest.$ac_ext
18495fi
18496
18497
18498		# restore the LIBS
18499		LIBS="$ol_LIBS"
18500
18501fi
18502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
18503$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
18504
18505	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
18506		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
18507		ol_link_threads=posix
18508	fi
18509fi
18510
18511		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
18512if test "$ol_link_threads" = no ; then
18513	# try -lpthreads -lmach -lexc
18514	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
18515$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
18516if test "${ol_cv_pthread_lpthreads_lmach_lexc+set}" = set; then :
18517  $as_echo_n "(cached) " >&6
18518else
18519
18520		# save the flags
18521		ol_LIBS="$LIBS"
18522		LIBS="-lpthreads -lmach -lexc $LIBS"
18523
18524		if test "$cross_compiling" = yes; then :
18525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18526/* end confdefs.h.  */
18527
18528/* pthread test headers */
18529#include <pthread.h>
18530#if HAVE_PTHREADS < 7
18531#include <errno.h>
18532#endif
18533#ifndef NULL
18534#define NULL (void*)0
18535#endif
18536
18537static void *task(p)
18538	void *p;
18539{
18540	return (void *) (p == NULL);
18541}
18542
18543int
18544main ()
18545{
18546
18547	/* pthread test function */
18548#ifndef PTHREAD_CREATE_DETACHED
18549#define	PTHREAD_CREATE_DETACHED	1
18550#endif
18551	pthread_t t;
18552	int status;
18553	int detach = PTHREAD_CREATE_DETACHED;
18554
18555#if HAVE_PTHREADS > 4
18556	/* Final pthreads */
18557	pthread_attr_t attr;
18558
18559	status = pthread_attr_init(&attr);
18560	if( status ) return status;
18561
18562#if HAVE_PTHREADS < 7
18563	status = pthread_attr_setdetachstate(&attr, &detach);
18564	if( status < 0 ) status = errno;
18565#else
18566	status = pthread_attr_setdetachstate(&attr, detach);
18567#endif
18568	if( status ) return status;
18569	status = pthread_create( &t, &attr, task, NULL );
18570#if HAVE_PTHREADS < 7
18571	if( status < 0 ) status = errno;
18572#endif
18573	if( status ) return status;
18574#else
18575	/* Draft 4 pthreads */
18576	status = pthread_create( &t, pthread_attr_default, task, NULL );
18577	if( status ) return errno;
18578
18579	/* give thread a chance to complete */
18580	/* it should remain joinable and hence detachable */
18581	sleep( 1 );
18582
18583	status = pthread_detach( &t );
18584	if( status ) return errno;
18585#endif
18586
18587#ifdef HAVE_LINUX_THREADS
18588	pthread_kill_other_threads_np();
18589#endif
18590
18591	return 0;
18592
18593  ;
18594  return 0;
18595}
18596_ACEOF
18597if ac_fn_c_try_link "$LINENO"; then :
18598  ol_cv_pthread_lpthreads_lmach_lexc=yes
18599else
18600  ol_cv_pthread_lpthreads_lmach_lexc=no
18601fi
18602rm -f core conftest.err conftest.$ac_objext \
18603    conftest$ac_exeext conftest.$ac_ext
18604else
18605  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18606/* end confdefs.h.  */
18607
18608/* pthread test headers */
18609#include <pthread.h>
18610#if HAVE_PTHREADS < 7
18611#include <errno.h>
18612#endif
18613#ifndef NULL
18614#define NULL (void*)0
18615#endif
18616
18617static void *task(p)
18618	void *p;
18619{
18620	return (void *) (p == NULL);
18621}
18622
18623
18624int main(argc, argv)
18625	int argc;
18626	char **argv;
18627{
18628
18629	/* pthread test function */
18630#ifndef PTHREAD_CREATE_DETACHED
18631#define	PTHREAD_CREATE_DETACHED	1
18632#endif
18633	pthread_t t;
18634	int status;
18635	int detach = PTHREAD_CREATE_DETACHED;
18636
18637#if HAVE_PTHREADS > 4
18638	/* Final pthreads */
18639	pthread_attr_t attr;
18640
18641	status = pthread_attr_init(&attr);
18642	if( status ) return status;
18643
18644#if HAVE_PTHREADS < 7
18645	status = pthread_attr_setdetachstate(&attr, &detach);
18646	if( status < 0 ) status = errno;
18647#else
18648	status = pthread_attr_setdetachstate(&attr, detach);
18649#endif
18650	if( status ) return status;
18651	status = pthread_create( &t, &attr, task, NULL );
18652#if HAVE_PTHREADS < 7
18653	if( status < 0 ) status = errno;
18654#endif
18655	if( status ) return status;
18656#else
18657	/* Draft 4 pthreads */
18658	status = pthread_create( &t, pthread_attr_default, task, NULL );
18659	if( status ) return errno;
18660
18661	/* give thread a chance to complete */
18662	/* it should remain joinable and hence detachable */
18663	sleep( 1 );
18664
18665	status = pthread_detach( &t );
18666	if( status ) return errno;
18667#endif
18668
18669#ifdef HAVE_LINUX_THREADS
18670	pthread_kill_other_threads_np();
18671#endif
18672
18673	return 0;
18674
18675}
18676
18677_ACEOF
18678if ac_fn_c_try_run "$LINENO"; then :
18679  ol_cv_pthread_lpthreads_lmach_lexc=yes
18680else
18681  ol_cv_pthread_lpthreads_lmach_lexc=no
18682fi
18683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18684  conftest.$ac_objext conftest.beam conftest.$ac_ext
18685fi
18686
18687
18688		# restore the LIBS
18689		LIBS="$ol_LIBS"
18690
18691fi
18692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
18693$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
18694
18695	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
18696		ol_link_pthreads="-lpthreads -lmach -lexc"
18697		ol_link_threads=posix
18698	fi
18699fi
18700
18701		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
18702if test "$ol_link_threads" = no ; then
18703	# try -lpthreads -lexc
18704	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
18705$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
18706if test "${ol_cv_pthread_lpthreads_lexc+set}" = set; then :
18707  $as_echo_n "(cached) " >&6
18708else
18709
18710		# save the flags
18711		ol_LIBS="$LIBS"
18712		LIBS="-lpthreads -lexc $LIBS"
18713
18714		if test "$cross_compiling" = yes; then :
18715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18716/* end confdefs.h.  */
18717
18718/* pthread test headers */
18719#include <pthread.h>
18720#if HAVE_PTHREADS < 7
18721#include <errno.h>
18722#endif
18723#ifndef NULL
18724#define NULL (void*)0
18725#endif
18726
18727static void *task(p)
18728	void *p;
18729{
18730	return (void *) (p == NULL);
18731}
18732
18733int
18734main ()
18735{
18736
18737	/* pthread test function */
18738#ifndef PTHREAD_CREATE_DETACHED
18739#define	PTHREAD_CREATE_DETACHED	1
18740#endif
18741	pthread_t t;
18742	int status;
18743	int detach = PTHREAD_CREATE_DETACHED;
18744
18745#if HAVE_PTHREADS > 4
18746	/* Final pthreads */
18747	pthread_attr_t attr;
18748
18749	status = pthread_attr_init(&attr);
18750	if( status ) return status;
18751
18752#if HAVE_PTHREADS < 7
18753	status = pthread_attr_setdetachstate(&attr, &detach);
18754	if( status < 0 ) status = errno;
18755#else
18756	status = pthread_attr_setdetachstate(&attr, detach);
18757#endif
18758	if( status ) return status;
18759	status = pthread_create( &t, &attr, task, NULL );
18760#if HAVE_PTHREADS < 7
18761	if( status < 0 ) status = errno;
18762#endif
18763	if( status ) return status;
18764#else
18765	/* Draft 4 pthreads */
18766	status = pthread_create( &t, pthread_attr_default, task, NULL );
18767	if( status ) return errno;
18768
18769	/* give thread a chance to complete */
18770	/* it should remain joinable and hence detachable */
18771	sleep( 1 );
18772
18773	status = pthread_detach( &t );
18774	if( status ) return errno;
18775#endif
18776
18777#ifdef HAVE_LINUX_THREADS
18778	pthread_kill_other_threads_np();
18779#endif
18780
18781	return 0;
18782
18783  ;
18784  return 0;
18785}
18786_ACEOF
18787if ac_fn_c_try_link "$LINENO"; then :
18788  ol_cv_pthread_lpthreads_lexc=yes
18789else
18790  ol_cv_pthread_lpthreads_lexc=no
18791fi
18792rm -f core conftest.err conftest.$ac_objext \
18793    conftest$ac_exeext conftest.$ac_ext
18794else
18795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18796/* end confdefs.h.  */
18797
18798/* pthread test headers */
18799#include <pthread.h>
18800#if HAVE_PTHREADS < 7
18801#include <errno.h>
18802#endif
18803#ifndef NULL
18804#define NULL (void*)0
18805#endif
18806
18807static void *task(p)
18808	void *p;
18809{
18810	return (void *) (p == NULL);
18811}
18812
18813
18814int main(argc, argv)
18815	int argc;
18816	char **argv;
18817{
18818
18819	/* pthread test function */
18820#ifndef PTHREAD_CREATE_DETACHED
18821#define	PTHREAD_CREATE_DETACHED	1
18822#endif
18823	pthread_t t;
18824	int status;
18825	int detach = PTHREAD_CREATE_DETACHED;
18826
18827#if HAVE_PTHREADS > 4
18828	/* Final pthreads */
18829	pthread_attr_t attr;
18830
18831	status = pthread_attr_init(&attr);
18832	if( status ) return status;
18833
18834#if HAVE_PTHREADS < 7
18835	status = pthread_attr_setdetachstate(&attr, &detach);
18836	if( status < 0 ) status = errno;
18837#else
18838	status = pthread_attr_setdetachstate(&attr, detach);
18839#endif
18840	if( status ) return status;
18841	status = pthread_create( &t, &attr, task, NULL );
18842#if HAVE_PTHREADS < 7
18843	if( status < 0 ) status = errno;
18844#endif
18845	if( status ) return status;
18846#else
18847	/* Draft 4 pthreads */
18848	status = pthread_create( &t, pthread_attr_default, task, NULL );
18849	if( status ) return errno;
18850
18851	/* give thread a chance to complete */
18852	/* it should remain joinable and hence detachable */
18853	sleep( 1 );
18854
18855	status = pthread_detach( &t );
18856	if( status ) return errno;
18857#endif
18858
18859#ifdef HAVE_LINUX_THREADS
18860	pthread_kill_other_threads_np();
18861#endif
18862
18863	return 0;
18864
18865}
18866
18867_ACEOF
18868if ac_fn_c_try_run "$LINENO"; then :
18869  ol_cv_pthread_lpthreads_lexc=yes
18870else
18871  ol_cv_pthread_lpthreads_lexc=no
18872fi
18873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18874  conftest.$ac_objext conftest.beam conftest.$ac_ext
18875fi
18876
18877
18878		# restore the LIBS
18879		LIBS="$ol_LIBS"
18880
18881fi
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
18883$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
18884
18885	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
18886		ol_link_pthreads="-lpthreads -lexc"
18887		ol_link_threads=posix
18888	fi
18889fi
18890
18891
18892		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
18893if test "$ol_link_threads" = no ; then
18894	# try -lpthreads
18895	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
18896$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
18897if test "${ol_cv_pthread_lib_lpthreads+set}" = set; then :
18898  $as_echo_n "(cached) " >&6
18899else
18900
18901		# save the flags
18902		ol_LIBS="$LIBS"
18903		LIBS="-lpthreads $LIBS"
18904
18905		if test "$cross_compiling" = yes; then :
18906  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18907/* end confdefs.h.  */
18908
18909/* pthread test headers */
18910#include <pthread.h>
18911#if HAVE_PTHREADS < 7
18912#include <errno.h>
18913#endif
18914#ifndef NULL
18915#define NULL (void*)0
18916#endif
18917
18918static void *task(p)
18919	void *p;
18920{
18921	return (void *) (p == NULL);
18922}
18923
18924int
18925main ()
18926{
18927
18928	/* pthread test function */
18929#ifndef PTHREAD_CREATE_DETACHED
18930#define	PTHREAD_CREATE_DETACHED	1
18931#endif
18932	pthread_t t;
18933	int status;
18934	int detach = PTHREAD_CREATE_DETACHED;
18935
18936#if HAVE_PTHREADS > 4
18937	/* Final pthreads */
18938	pthread_attr_t attr;
18939
18940	status = pthread_attr_init(&attr);
18941	if( status ) return status;
18942
18943#if HAVE_PTHREADS < 7
18944	status = pthread_attr_setdetachstate(&attr, &detach);
18945	if( status < 0 ) status = errno;
18946#else
18947	status = pthread_attr_setdetachstate(&attr, detach);
18948#endif
18949	if( status ) return status;
18950	status = pthread_create( &t, &attr, task, NULL );
18951#if HAVE_PTHREADS < 7
18952	if( status < 0 ) status = errno;
18953#endif
18954	if( status ) return status;
18955#else
18956	/* Draft 4 pthreads */
18957	status = pthread_create( &t, pthread_attr_default, task, NULL );
18958	if( status ) return errno;
18959
18960	/* give thread a chance to complete */
18961	/* it should remain joinable and hence detachable */
18962	sleep( 1 );
18963
18964	status = pthread_detach( &t );
18965	if( status ) return errno;
18966#endif
18967
18968#ifdef HAVE_LINUX_THREADS
18969	pthread_kill_other_threads_np();
18970#endif
18971
18972	return 0;
18973
18974  ;
18975  return 0;
18976}
18977_ACEOF
18978if ac_fn_c_try_link "$LINENO"; then :
18979  ol_cv_pthread_lib_lpthreads=yes
18980else
18981  ol_cv_pthread_lib_lpthreads=no
18982fi
18983rm -f core conftest.err conftest.$ac_objext \
18984    conftest$ac_exeext conftest.$ac_ext
18985else
18986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18987/* end confdefs.h.  */
18988
18989/* pthread test headers */
18990#include <pthread.h>
18991#if HAVE_PTHREADS < 7
18992#include <errno.h>
18993#endif
18994#ifndef NULL
18995#define NULL (void*)0
18996#endif
18997
18998static void *task(p)
18999	void *p;
19000{
19001	return (void *) (p == NULL);
19002}
19003
19004
19005int main(argc, argv)
19006	int argc;
19007	char **argv;
19008{
19009
19010	/* pthread test function */
19011#ifndef PTHREAD_CREATE_DETACHED
19012#define	PTHREAD_CREATE_DETACHED	1
19013#endif
19014	pthread_t t;
19015	int status;
19016	int detach = PTHREAD_CREATE_DETACHED;
19017
19018#if HAVE_PTHREADS > 4
19019	/* Final pthreads */
19020	pthread_attr_t attr;
19021
19022	status = pthread_attr_init(&attr);
19023	if( status ) return status;
19024
19025#if HAVE_PTHREADS < 7
19026	status = pthread_attr_setdetachstate(&attr, &detach);
19027	if( status < 0 ) status = errno;
19028#else
19029	status = pthread_attr_setdetachstate(&attr, detach);
19030#endif
19031	if( status ) return status;
19032	status = pthread_create( &t, &attr, task, NULL );
19033#if HAVE_PTHREADS < 7
19034	if( status < 0 ) status = errno;
19035#endif
19036	if( status ) return status;
19037#else
19038	/* Draft 4 pthreads */
19039	status = pthread_create( &t, pthread_attr_default, task, NULL );
19040	if( status ) return errno;
19041
19042	/* give thread a chance to complete */
19043	/* it should remain joinable and hence detachable */
19044	sleep( 1 );
19045
19046	status = pthread_detach( &t );
19047	if( status ) return errno;
19048#endif
19049
19050#ifdef HAVE_LINUX_THREADS
19051	pthread_kill_other_threads_np();
19052#endif
19053
19054	return 0;
19055
19056}
19057
19058_ACEOF
19059if ac_fn_c_try_run "$LINENO"; then :
19060  ol_cv_pthread_lib_lpthreads=yes
19061else
19062  ol_cv_pthread_lib_lpthreads=no
19063fi
19064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19065  conftest.$ac_objext conftest.beam conftest.$ac_ext
19066fi
19067
19068
19069		# restore the LIBS
19070		LIBS="$ol_LIBS"
19071
19072fi
19073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
19074$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
19075
19076	if test $ol_cv_pthread_lib_lpthreads = yes ; then
19077		ol_link_pthreads="-lpthreads"
19078		ol_link_threads=posix
19079	fi
19080fi
19081
19082
19083		if test $ol_link_threads != no ; then
19084			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
19085
19086						save_CPPFLAGS="$CPPFLAGS"
19087			save_LIBS="$LIBS"
19088			LIBS="$LTHREAD_LIBS $LIBS"
19089
19090												for ac_func in sched_yield pthread_yield thr_yield
19091do :
19092  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19093ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19094eval as_val=\$$as_ac_var
19095   if test "x$as_val" = x""yes; then :
19096  cat >>confdefs.h <<_ACEOF
19097#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19098_ACEOF
19099
19100fi
19101done
19102
19103
19104			if test $ac_cv_func_sched_yield = no &&
19105			   test $ac_cv_func_pthread_yield = no &&
19106			   test $ac_cv_func_thr_yield = no ; then
19107								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
19108$as_echo_n "checking for sched_yield in -lrt... " >&6; }
19109if test "${ac_cv_lib_rt_sched_yield+set}" = set; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  ac_check_lib_save_LIBS=$LIBS
19113LIBS="-lrt  $LIBS"
19114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19115/* end confdefs.h.  */
19116
19117/* Override any GCC internal prototype to avoid an error.
19118   Use char because int might match the return type of a GCC
19119   builtin and then its argument prototype would still apply.  */
19120#ifdef __cplusplus
19121extern "C"
19122#endif
19123char sched_yield ();
19124int
19125main ()
19126{
19127return sched_yield ();
19128  ;
19129  return 0;
19130}
19131_ACEOF
19132if ac_fn_c_try_link "$LINENO"; then :
19133  ac_cv_lib_rt_sched_yield=yes
19134else
19135  ac_cv_lib_rt_sched_yield=no
19136fi
19137rm -f core conftest.err conftest.$ac_objext \
19138    conftest$ac_exeext conftest.$ac_ext
19139LIBS=$ac_check_lib_save_LIBS
19140fi
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
19142$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
19143if test "x$ac_cv_lib_rt_sched_yield" = x""yes; then :
19144  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
19145
19146$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
19147
19148					ac_cv_func_sched_yield=yes
19149else
19150  ac_cv_func_sched_yield=no
19151fi
19152
19153			fi
19154			if test $ac_cv_func_sched_yield = no &&
19155			   test $ac_cv_func_pthread_yield = no &&
19156			   test "$ac_cv_func_thr_yield" = no ; then
19157				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
19158$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
19159			fi
19160
19161						for ac_func in pthread_kill
19162do :
19163  ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
19164if test "x$ac_cv_func_pthread_kill" = x""yes; then :
19165  cat >>confdefs.h <<_ACEOF
19166#define HAVE_PTHREAD_KILL 1
19167_ACEOF
19168
19169fi
19170done
19171
19172
19173									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
19174$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
19175if test "${ol_cv_func_pthread_rwlock_destroy+set}" = set; then :
19176  $as_echo_n "(cached) " >&6
19177else
19178
19179								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19180/* end confdefs.h.  */
19181
19182#include <pthread.h>
19183pthread_rwlock_t rwlock;
19184
19185int
19186main ()
19187{
19188pthread_rwlock_destroy(&rwlock);
19189  ;
19190  return 0;
19191}
19192_ACEOF
19193if ac_fn_c_try_link "$LINENO"; then :
19194  ol_cv_func_pthread_rwlock_destroy=yes
19195else
19196  ol_cv_func_pthread_rwlock_destroy=no
19197fi
19198rm -f core conftest.err conftest.$ac_objext \
19199    conftest$ac_exeext conftest.$ac_ext
19200
19201fi
19202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
19203$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
19204			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
19205
19206$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
19207
19208			fi
19209
19210									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
19211$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
19212if test "${ol_cv_func_pthread_detach+set}" = set; then :
19213  $as_echo_n "(cached) " >&6
19214else
19215
19216								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19217/* end confdefs.h.  */
19218
19219#include <pthread.h>
19220#ifndef NULL
19221#define NULL (void*)0
19222#endif
19223
19224int
19225main ()
19226{
19227pthread_detach(NULL);
19228  ;
19229  return 0;
19230}
19231_ACEOF
19232if ac_fn_c_try_link "$LINENO"; then :
19233  ol_cv_func_pthread_detach=yes
19234else
19235  ol_cv_func_pthread_detach=no
19236fi
19237rm -f core conftest.err conftest.$ac_objext \
19238    conftest$ac_exeext conftest.$ac_ext
19239
19240fi
19241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
19242$as_echo "$ol_cv_func_pthread_detach" >&6; }
19243
19244			if test $ol_cv_func_pthread_detach = no ; then
19245				as_fn_error "could not locate pthread_detach()" "$LINENO" 5
19246			fi
19247
19248
19249$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
19250
19251
19252						for ac_func in \
19253				pthread_setconcurrency \
19254				pthread_getconcurrency \
19255				thr_setconcurrency \
19256				thr_getconcurrency \
19257
19258do :
19259  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19260ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19261eval as_val=\$$as_ac_var
19262   if test "x$as_val" = x""yes; then :
19263  cat >>confdefs.h <<_ACEOF
19264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19265_ACEOF
19266
19267fi
19268done
19269
19270
19271
19272	for ac_func in pthread_kill_other_threads_np
19273do :
19274  ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
19275if test "x$ac_cv_func_pthread_kill_other_threads_np" = x""yes; then :
19276  cat >>confdefs.h <<_ACEOF
19277#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
19278_ACEOF
19279
19280fi
19281done
19282
19283	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
19284$as_echo_n "checking for LinuxThreads implementation... " >&6; }
19285if test "${ol_cv_sys_linux_threads+set}" = set; then :
19286  $as_echo_n "(cached) " >&6
19287else
19288  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
19289fi
19290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
19291$as_echo "$ol_cv_sys_linux_threads" >&6; }
19292
19293
19294
19295
19296	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
19297$as_echo_n "checking for LinuxThreads consistency... " >&6; }
19298if test "${ol_cv_linux_threads+set}" = set; then :
19299  $as_echo_n "(cached) " >&6
19300else
19301
19302		if test $ol_cv_header_linux_threads = yes &&
19303		   test $ol_cv_sys_linux_threads = yes; then
19304			ol_cv_linux_threads=yes
19305		elif test $ol_cv_header_linux_threads = no &&
19306		     test $ol_cv_sys_linux_threads = no; then
19307			ol_cv_linux_threads=no
19308		else
19309			ol_cv_linux_threads=error
19310		fi
19311
19312fi
19313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
19314$as_echo "$ol_cv_linux_threads" >&6; }
19315
19316
19317			if test $ol_cv_linux_threads = error; then
19318				as_fn_error "LinuxThreads header/library mismatch" "$LINENO" 5;
19319			fi
19320
19321			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
19322$as_echo_n "checking if pthread_create() works... " >&6; }
19323if test "${ol_cv_pthread_create_works+set}" = set; then :
19324  $as_echo_n "(cached) " >&6
19325else
19326
19327			if test "$cross_compiling" = yes; then :
19328  				ol_cv_pthread_create_works=yes
19329else
19330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19331/* end confdefs.h.  */
19332
19333/* pthread test headers */
19334#include <pthread.h>
19335#if HAVE_PTHREADS < 7
19336#include <errno.h>
19337#endif
19338#ifndef NULL
19339#define NULL (void*)0
19340#endif
19341
19342static void *task(p)
19343	void *p;
19344{
19345	return (void *) (p == NULL);
19346}
19347
19348
19349int main(argc, argv)
19350	int argc;
19351	char **argv;
19352{
19353
19354	/* pthread test function */
19355#ifndef PTHREAD_CREATE_DETACHED
19356#define	PTHREAD_CREATE_DETACHED	1
19357#endif
19358	pthread_t t;
19359	int status;
19360	int detach = PTHREAD_CREATE_DETACHED;
19361
19362#if HAVE_PTHREADS > 4
19363	/* Final pthreads */
19364	pthread_attr_t attr;
19365
19366	status = pthread_attr_init(&attr);
19367	if( status ) return status;
19368
19369#if HAVE_PTHREADS < 7
19370	status = pthread_attr_setdetachstate(&attr, &detach);
19371	if( status < 0 ) status = errno;
19372#else
19373	status = pthread_attr_setdetachstate(&attr, detach);
19374#endif
19375	if( status ) return status;
19376	status = pthread_create( &t, &attr, task, NULL );
19377#if HAVE_PTHREADS < 7
19378	if( status < 0 ) status = errno;
19379#endif
19380	if( status ) return status;
19381#else
19382	/* Draft 4 pthreads */
19383	status = pthread_create( &t, pthread_attr_default, task, NULL );
19384	if( status ) return errno;
19385
19386	/* give thread a chance to complete */
19387	/* it should remain joinable and hence detachable */
19388	sleep( 1 );
19389
19390	status = pthread_detach( &t );
19391	if( status ) return errno;
19392#endif
19393
19394#ifdef HAVE_LINUX_THREADS
19395	pthread_kill_other_threads_np();
19396#endif
19397
19398	return 0;
19399
19400}
19401
19402_ACEOF
19403if ac_fn_c_try_run "$LINENO"; then :
19404  ol_cv_pthread_create_works=yes
19405else
19406  ol_cv_pthread_create_works=no
19407fi
19408rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19409  conftest.$ac_objext conftest.beam conftest.$ac_ext
19410fi
19411
19412fi
19413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
19414$as_echo "$ol_cv_pthread_create_works" >&6; }
19415
19416			if test $ol_cv_pthread_create_works = no ; then
19417				as_fn_error "pthread_create is not usable, check environment settings" "$LINENO" 5
19418			fi
19419
19420			ol_replace_broken_yield=no
19421
19422			if test $ol_replace_broken_yield = yes ; then
19423
19424$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
19425
19426			fi
19427
19428						if test $ol_with_yielding_select = auto ; then
19429				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
19430$as_echo_n "checking if select yields when using pthreads... " >&6; }
19431if test "${ol_cv_pthread_select_yields+set}" = set; then :
19432  $as_echo_n "(cached) " >&6
19433else
19434
19435				if test "$cross_compiling" = yes; then :
19436  ol_cv_pthread_select_yields=cross
19437else
19438  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19439/* end confdefs.h.  */
19440
19441#include <sys/types.h>
19442#include <sys/time.h>
19443#include <unistd.h>
19444#include <pthread.h>
19445#ifndef NULL
19446#define NULL (void*) 0
19447#endif
19448
19449static int fildes[2];
19450
19451static void *task(p)
19452	void *p;
19453{
19454	int i;
19455	struct timeval tv;
19456
19457	fd_set rfds;
19458
19459	tv.tv_sec=10;
19460	tv.tv_usec=0;
19461
19462	FD_ZERO(&rfds);
19463	FD_SET(fildes[0], &rfds);
19464
19465	/* we're not interested in any fds */
19466	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
19467
19468	if(i < 0) {
19469		perror("select");
19470		exit(10);
19471	}
19472
19473	exit(0); /* if we exit here, the select blocked the whole process */
19474}
19475
19476int main(argc, argv)
19477	int argc;
19478	char **argv;
19479{
19480	pthread_t t;
19481
19482	/* create a pipe to select */
19483	if(pipe(&fildes[0])) {
19484		perror("select");
19485		exit(1);
19486	}
19487
19488#ifdef HAVE_PTHREAD_SETCONCURRENCY
19489	(void) pthread_setconcurrency(2);
19490#else
19491#ifdef HAVE_THR_SETCONCURRENCY
19492	/* Set Solaris LWP concurrency to 2 */
19493	thr_setconcurrency(2);
19494#endif
19495#endif
19496
19497#if HAVE_PTHREADS < 6
19498	pthread_create(&t, pthread_attr_default, task, NULL);
19499#else
19500	pthread_create(&t, NULL, task, NULL);
19501#endif
19502
19503	/* make sure task runs first */
19504#ifdef HAVE_THR_YIELD
19505	thr_yield();
19506#elif defined( HAVE_SCHED_YIELD )
19507	sched_yield();
19508#elif defined( HAVE_PTHREAD_YIELD )
19509	pthread_yield();
19510#endif
19511
19512	exit(2);
19513}
19514_ACEOF
19515if ac_fn_c_try_run "$LINENO"; then :
19516  ol_cv_pthread_select_yields=no
19517else
19518  ol_cv_pthread_select_yields=yes
19519fi
19520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19521  conftest.$ac_objext conftest.beam conftest.$ac_ext
19522fi
19523
19524fi
19525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
19526$as_echo "$ol_cv_pthread_select_yields" >&6; }
19527
19528				if test $ol_cv_pthread_select_yields = cross ; then
19529					as_fn_error "crossing compiling: use --with-yielding_select=yes|no|manual" "$LINENO" 5
19530				fi
19531
19532				if test $ol_cv_pthread_select_yields = yes ; then
19533					ol_with_yielding_select=yes
19534				fi
19535			fi
19536
19537						CPPFLAGS="$save_CPPFLAGS"
19538			LIBS="$save_LIBS"
19539		else
19540			as_fn_error "could not locate usable POSIX Threads" "$LINENO" 5
19541		fi
19542	fi
19543
19544	if test $ol_with_threads = posix ; then
19545		as_fn_error "could not locate POSIX Threads" "$LINENO" 5
19546	fi
19547	;;
19548esac
19549
19550case $ol_with_threads in auto | yes | mach)
19551
19552		for ac_header in mach/cthreads.h cthreads.h
19553do :
19554  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19555ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19556eval as_val=\$$as_ac_Header
19557   if test "x$as_val" = x""yes; then :
19558  cat >>confdefs.h <<_ACEOF
19559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19560_ACEOF
19561
19562fi
19563
19564done
19565
19566	if test $ac_cv_header_mach_cthreads_h = yes ; then
19567		ol_with_threads=found
19568
19569				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19570if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19571  ol_link_threads=yes
19572fi
19573
19574
19575		if test $ol_link_threads = no ; then
19576									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
19577$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
19578if test "${ol_cv_cthread_all_load+set}" = set; then :
19579  $as_echo_n "(cached) " >&6
19580else
19581
19582								save_LIBS="$LIBS"
19583				LIBS="-all_load $LIBS"
19584				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19585/* end confdefs.h.  */
19586#include <mach/cthreads.h>
19587int
19588main ()
19589{
19590
19591					cthread_fork((void *)0, (void *)0);
19592
19593  ;
19594  return 0;
19595}
19596_ACEOF
19597if ac_fn_c_try_link "$LINENO"; then :
19598  ol_cv_cthread_all_load=yes
19599else
19600  ol_cv_cthread_all_load=no
19601fi
19602rm -f core conftest.err conftest.$ac_objext \
19603    conftest$ac_exeext conftest.$ac_ext
19604								LIBS="$save_LIBS"
19605
19606fi
19607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
19608$as_echo "$ol_cv_cthread_all_load" >&6; }
19609
19610			if test $ol_cv_cthread_all_load = yes ; then
19611				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
19612				ol_link_threads=mach
19613				ol_with_threads=found
19614			fi
19615		fi
19616
19617	elif test $ac_cv_header_cthreads_h = yes ; then
19618
19619		ol_with_threads=found
19620
19621				save_LIBS="$LIBS"
19622		LIBS="$LIBS -lthreads"
19623		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
19624if test "x$ac_cv_func_cthread_fork" = x""yes; then :
19625  ol_link_threads=yes
19626fi
19627
19628		LIBS="$save_LIBS"
19629
19630		if test $ol_link_threads = yes ; then
19631			LTHREAD_LIBS="-lthreads"
19632			ol_link_threads=mach
19633			ol_with_threads=found
19634		else
19635			as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19636		fi
19637
19638	elif test $ol_with_threads = mach ; then
19639		as_fn_error "could not locate Mach CThreads" "$LINENO" 5
19640	fi
19641
19642	if test $ol_link_threads = mach ; then
19643
19644$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
19645
19646	elif test $ol_with_threads = found ; then
19647		as_fn_error "could not link with Mach CThreads" "$LINENO" 5
19648	fi
19649	;;
19650esac
19651
19652case $ol_with_threads in auto | yes | pth)
19653
19654	for ac_header in pth.h
19655do :
19656  ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
19657if test "x$ac_cv_header_pth_h" = x""yes; then :
19658  cat >>confdefs.h <<_ACEOF
19659#define HAVE_PTH_H 1
19660_ACEOF
19661
19662fi
19663
19664done
19665
19666
19667	if test $ac_cv_header_pth_h = yes ; then
19668		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
19669$as_echo_n "checking for pth_version in -lpth... " >&6; }
19670if test "${ac_cv_lib_pth_pth_version+set}" = set; then :
19671  $as_echo_n "(cached) " >&6
19672else
19673  ac_check_lib_save_LIBS=$LIBS
19674LIBS="-lpth  $LIBS"
19675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19676/* end confdefs.h.  */
19677
19678/* Override any GCC internal prototype to avoid an error.
19679   Use char because int might match the return type of a GCC
19680   builtin and then its argument prototype would still apply.  */
19681#ifdef __cplusplus
19682extern "C"
19683#endif
19684char pth_version ();
19685int
19686main ()
19687{
19688return pth_version ();
19689  ;
19690  return 0;
19691}
19692_ACEOF
19693if ac_fn_c_try_link "$LINENO"; then :
19694  ac_cv_lib_pth_pth_version=yes
19695else
19696  ac_cv_lib_pth_pth_version=no
19697fi
19698rm -f core conftest.err conftest.$ac_objext \
19699    conftest$ac_exeext conftest.$ac_ext
19700LIBS=$ac_check_lib_save_LIBS
19701fi
19702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
19703$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
19704if test "x$ac_cv_lib_pth_pth_version" = x""yes; then :
19705  have_pth=yes
19706else
19707  have_pth=no
19708fi
19709
19710
19711		if test $have_pth = yes ; then
19712
19713$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
19714
19715			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
19716			ol_link_threads=pth
19717			ol_with_threads=found
19718
19719			if test $ol_with_yielding_select = auto ; then
19720				ol_with_yielding_select=yes
19721			fi
19722		fi
19723	fi
19724	;;
19725esac
19726
19727case $ol_with_threads in auto | yes | lwp)
19728
19729		for ac_header in thread.h synch.h
19730do :
19731  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19732ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19733eval as_val=\$$as_ac_Header
19734   if test "x$as_val" = x""yes; then :
19735  cat >>confdefs.h <<_ACEOF
19736#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19737_ACEOF
19738
19739fi
19740
19741done
19742
19743	if test $ac_cv_header_thread_h = yes &&
19744	   test $ac_cv_header_synch_h = yes ; then
19745		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
19746$as_echo_n "checking for thr_create in -lthread... " >&6; }
19747if test "${ac_cv_lib_thread_thr_create+set}" = set; then :
19748  $as_echo_n "(cached) " >&6
19749else
19750  ac_check_lib_save_LIBS=$LIBS
19751LIBS="-lthread  $LIBS"
19752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19753/* end confdefs.h.  */
19754
19755/* Override any GCC internal prototype to avoid an error.
19756   Use char because int might match the return type of a GCC
19757   builtin and then its argument prototype would still apply.  */
19758#ifdef __cplusplus
19759extern "C"
19760#endif
19761char thr_create ();
19762int
19763main ()
19764{
19765return thr_create ();
19766  ;
19767  return 0;
19768}
19769_ACEOF
19770if ac_fn_c_try_link "$LINENO"; then :
19771  ac_cv_lib_thread_thr_create=yes
19772else
19773  ac_cv_lib_thread_thr_create=no
19774fi
19775rm -f core conftest.err conftest.$ac_objext \
19776    conftest$ac_exeext conftest.$ac_ext
19777LIBS=$ac_check_lib_save_LIBS
19778fi
19779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
19780$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
19781if test "x$ac_cv_lib_thread_thr_create" = x""yes; then :
19782  have_thr=yes
19783else
19784  have_thr=no
19785fi
19786
19787
19788		if test $have_thr = yes ; then
19789
19790$as_echo "#define HAVE_THR 1" >>confdefs.h
19791
19792			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
19793			ol_link_threads=thr
19794
19795			if test $ol_with_yielding_select = auto ; then
19796				ol_with_yielding_select=yes
19797			fi
19798
19799						for ac_func in \
19800				thr_setconcurrency \
19801				thr_getconcurrency \
19802
19803do :
19804  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19806eval as_val=\$$as_ac_var
19807   if test "x$as_val" = x""yes; then :
19808  cat >>confdefs.h <<_ACEOF
19809#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19810_ACEOF
19811
19812fi
19813done
19814
19815		fi
19816	fi
19817	;;
19818esac
19819
19820if test $ol_with_yielding_select = yes ; then
19821
19822$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
19823
19824fi
19825
19826if test $ol_with_threads = manual ; then
19827		ol_link_threads=yes
19828
19829	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
19830$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
19831
19832	for ac_header in pthread.h sched.h
19833do :
19834  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19835ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19836eval as_val=\$$as_ac_Header
19837   if test "x$as_val" = x""yes; then :
19838  cat >>confdefs.h <<_ACEOF
19839#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19840_ACEOF
19841
19842fi
19843
19844done
19845
19846	for ac_func in sched_yield pthread_yield
19847do :
19848  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19849ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19850eval as_val=\$$as_ac_var
19851   if test "x$as_val" = x""yes; then :
19852  cat >>confdefs.h <<_ACEOF
19853#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
19854_ACEOF
19855
19856fi
19857done
19858
19859
19860	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19861$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
19862if test "${ol_cv_header_linux_threads+set}" = set; then :
19863  $as_echo_n "(cached) " >&6
19864else
19865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19866/* end confdefs.h.  */
19867#include <pthread.h>
19868_ACEOF
19869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19870  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
19871  ol_cv_header_linux_threads=yes
19872else
19873  ol_cv_header_linux_threads=no
19874fi
19875rm -f conftest*
19876
19877
19878fi
19879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19880$as_echo "$ol_cv_header_linux_threads" >&6; }
19881	if test $ol_cv_header_linux_threads = yes; then
19882
19883$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19884
19885	fi
19886
19887
19888	for ac_header in mach/cthreads.h
19889do :
19890  ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
19891if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then :
19892  cat >>confdefs.h <<_ACEOF
19893#define HAVE_MACH_CTHREADS_H 1
19894_ACEOF
19895
19896fi
19897
19898done
19899
19900	for ac_header in thread.h synch.h
19901do :
19902  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
19903ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
19904eval as_val=\$$as_ac_Header
19905   if test "x$as_val" = x""yes; then :
19906  cat >>confdefs.h <<_ACEOF
19907#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
19908_ACEOF
19909
19910fi
19911
19912done
19913
19914fi
19915
19916if test $ol_link_threads != no && test $ol_link_threads != nt ; then
19917			$as_echo "#define REENTRANT 1" >>confdefs.h
19918
19919	$as_echo "#define _REENTRANT 1" >>confdefs.h
19920
19921	$as_echo "#define THREAD_SAFE 1" >>confdefs.h
19922
19923	$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
19924
19925	$as_echo "#define THREADSAFE 1" >>confdefs.h
19926
19927	$as_echo "#define _THREADSAFE 1" >>confdefs.h
19928
19929	$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
19930
19931
19932			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
19933$as_echo_n "checking for thread specific errno... " >&6; }
19934if test "${ol_cv_errno_thread_specific+set}" = set; then :
19935  $as_echo_n "(cached) " >&6
19936else
19937
19938		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19939/* end confdefs.h.  */
19940#include <errno.h>
19941int
19942main ()
19943{
19944errno = 0;
19945  ;
19946  return 0;
19947}
19948_ACEOF
19949if ac_fn_c_try_link "$LINENO"; then :
19950  ol_cv_errno_thread_specific=yes
19951else
19952  ol_cv_errno_thread_specific=no
19953fi
19954rm -f core conftest.err conftest.$ac_objext \
19955    conftest$ac_exeext conftest.$ac_ext
19956
19957fi
19958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
19959$as_echo "$ol_cv_errno_thread_specific" >&6; }
19960
19961			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
19962$as_echo_n "checking for thread specific h_errno... " >&6; }
19963if test "${ol_cv_h_errno_thread_specific+set}" = set; then :
19964  $as_echo_n "(cached) " >&6
19965else
19966
19967		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19968/* end confdefs.h.  */
19969#include <netdb.h>
19970int
19971main ()
19972{
19973h_errno = 0;
19974  ;
19975  return 0;
19976}
19977_ACEOF
19978if ac_fn_c_try_link "$LINENO"; then :
19979  ol_cv_h_errno_thread_specific=yes
19980else
19981  ol_cv_h_errno_thread_specific=no
19982fi
19983rm -f core conftest.err conftest.$ac_objext \
19984    conftest$ac_exeext conftest.$ac_ext
19985
19986fi
19987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
19988$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
19989
19990	if test $ol_cv_errno_thread_specific != yes ||
19991	   test $ol_cv_h_errno_thread_specific != yes ; then
19992		LIBS="$LTHREAD_LIBS $LIBS"
19993		LTHREAD_LIBS=""
19994	fi
19995
19996fi
19997
19998if test $ol_link_threads = no ; then
19999	if test $ol_with_threads = yes ; then
20000		as_fn_error "no suitable thread support" "$LINENO" 5
20001	fi
20002
20003	if test $ol_with_threads = auto ; then
20004		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
20005$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
20006		ol_with_threads=no
20007	fi
20008
20009
20010$as_echo "#define NO_THREADS 1" >>confdefs.h
20011
20012	LTHREAD_LIBS=""
20013	BUILD_THREAD=no
20014else
20015	BUILD_THREAD=yes
20016fi
20017
20018if test $ol_link_threads != no ; then
20019
20020$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
20021
20022fi
20023
20024for ac_func in \
20025	ctime_r			\
20026	gmtime_r localtime_r \
20027	gethostbyname_r	gethostbyaddr_r \
20028
20029do :
20030  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20031ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20032eval as_val=\$$as_ac_var
20033   if test "x$as_val" = x""yes; then :
20034  cat >>confdefs.h <<_ACEOF
20035#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20036_ACEOF
20037
20038fi
20039done
20040
20041
20042if test "$ac_cv_func_ctime_r" = no ; then
20043	ol_cv_func_ctime_r_nargs=0
20044else
20045	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of ctime_r" >&5
20046$as_echo_n "checking number of arguments of ctime_r... " >&6; }
20047if test "${ol_cv_func_ctime_r_nargs+set}" = set; then :
20048  $as_echo_n "(cached) " >&6
20049else
20050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20051/* end confdefs.h.  */
20052#include <time.h>
20053int
20054main ()
20055{
20056time_t ti; char *buffer; ctime_r(&ti,buffer,32);
20057  ;
20058  return 0;
20059}
20060_ACEOF
20061if ac_fn_c_try_compile "$LINENO"; then :
20062  ol_cv_func_ctime_r_nargs3=yes
20063else
20064  ol_cv_func_ctime_r_nargs3=no
20065fi
20066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20067
20068	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20069/* end confdefs.h.  */
20070#include <time.h>
20071int
20072main ()
20073{
20074time_t ti; char *buffer; ctime_r(&ti,buffer);
20075  ;
20076  return 0;
20077}
20078_ACEOF
20079if ac_fn_c_try_compile "$LINENO"; then :
20080  ol_cv_func_ctime_r_nargs2=yes
20081else
20082  ol_cv_func_ctime_r_nargs2=no
20083fi
20084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20085
20086	if test $ol_cv_func_ctime_r_nargs3 = yes &&
20087	   test $ol_cv_func_ctime_r_nargs2 = no ; then
20088
20089		ol_cv_func_ctime_r_nargs=3
20090
20091	elif test $ol_cv_func_ctime_r_nargs3 = no &&
20092	     test $ol_cv_func_ctime_r_nargs2 = yes ; then
20093
20094		ol_cv_func_ctime_r_nargs=2
20095
20096	else
20097		ol_cv_func_ctime_r_nargs=0
20098	fi
20099
20100fi
20101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_ctime_r_nargs" >&5
20102$as_echo "$ol_cv_func_ctime_r_nargs" >&6; }
20103
20104  if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
20105
20106cat >>confdefs.h <<_ACEOF
20107#define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
20108_ACEOF
20109
20110  fi
20111
20112fi
20113
20114if test "$ac_cv_func_gethostbyname_r" = yes ; then
20115 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyname_r" >&5
20116$as_echo_n "checking number of arguments of gethostbyname_r... " >&6; }
20117if test "${ol_cv_func_gethostbyname_r_nargs+set}" = set; then :
20118  $as_echo_n "(cached) " >&6
20119else
20120  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20121/* end confdefs.h.  */
20122#include <sys/types.h>
20123#include <sys/socket.h>
20124#include <netinet/in.h>
20125#include <netdb.h>
20126#define BUFSIZE (sizeof(struct hostent)+10)
20127int
20128main ()
20129{
20130struct hostent hent; char buffer[BUFSIZE];
20131		int bufsize=BUFSIZE;int h_errno;
20132		(void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
20133			buffer, bufsize, &h_errno);
20134  ;
20135  return 0;
20136}
20137_ACEOF
20138if ac_fn_c_try_compile "$LINENO"; then :
20139  ol_cv_func_gethostbyname_r_nargs5=yes
20140else
20141  ol_cv_func_gethostbyname_r_nargs5=no
20142fi
20143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20144
20145	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20146/* end confdefs.h.  */
20147#include <sys/types.h>
20148#include <sys/socket.h>
20149#include <netinet/in.h>
20150#include <netdb.h>
20151#define BUFSIZE (sizeof(struct hostent)+10)
20152int
20153main ()
20154{
20155struct hostent hent;struct hostent *rhent;
20156		char buffer[BUFSIZE];
20157		int bufsize=BUFSIZE;int h_errno;
20158		(void)gethostbyname_r("localhost", &hent, buffer, bufsize,
20159			&rhent, &h_errno);
20160  ;
20161  return 0;
20162}
20163_ACEOF
20164if ac_fn_c_try_compile "$LINENO"; then :
20165  ol_cv_func_gethostbyname_r_nargs6=yes
20166else
20167  ol_cv_func_gethostbyname_r_nargs6=no
20168fi
20169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20170
20171	if test $ol_cv_func_gethostbyname_r_nargs5 = yes &&
20172	   test $ol_cv_func_gethostbyname_r_nargs6 = no ; then
20173
20174		ol_cv_func_gethostbyname_r_nargs=5
20175
20176	elif test $ol_cv_func_gethostbyname_r_nargs5 = no &&
20177	     test $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
20178
20179		ol_cv_func_gethostbyname_r_nargs=6
20180
20181	else
20182		ol_cv_func_gethostbyname_r_nargs=0
20183	fi
20184
20185fi
20186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyname_r_nargs" >&5
20187$as_echo "$ol_cv_func_gethostbyname_r_nargs" >&6; }
20188  if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
20189
20190cat >>confdefs.h <<_ACEOF
20191#define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
20192_ACEOF
20193
20194  fi
20195
20196else
20197 	ol_cv_func_gethostbyname_r_nargs=0
20198fi
20199
20200if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
20201 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments of gethostbyaddr_r" >&5
20202$as_echo_n "checking number of arguments of gethostbyaddr_r... " >&6; }
20203if test "${ol_cv_func_gethostbyaddr_r_nargs+set}" = set; then :
20204  $as_echo_n "(cached) " >&6
20205else
20206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20207/* end confdefs.h.  */
20208#include <sys/types.h>
20209#include <sys/socket.h>
20210#include <netinet/in.h>
20211#include <netdb.h>
20212#define BUFSIZE (sizeof(struct hostent)+10)
20213int
20214main ()
20215{
20216struct hostent hent; char buffer[BUFSIZE];
20217	    struct in_addr add;
20218	    size_t alen=sizeof(struct in_addr);
20219	    int bufsize=BUFSIZE;int h_errno;
20220		(void)gethostbyaddr_r( (void *)&(add.s_addr),
20221			alen, AF_INET, &hent, buffer, bufsize, &h_errno);
20222  ;
20223  return 0;
20224}
20225_ACEOF
20226if ac_fn_c_try_compile "$LINENO"; then :
20227  ol_cv_func_gethostbyaddr_r_nargs7=yes
20228else
20229  ol_cv_func_gethostbyaddr_r_nargs7=no
20230fi
20231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20232
20233	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20234/* end confdefs.h.  */
20235#include <sys/types.h>
20236#include <sys/socket.h>
20237#include <netinet/in.h>
20238#include <netdb.h>
20239#define BUFSIZE (sizeof(struct hostent)+10)
20240int
20241main ()
20242{
20243struct hostent hent;
20244		struct hostent *rhent; char buffer[BUFSIZE];
20245		struct in_addr add;
20246		size_t alen=sizeof(struct in_addr);
20247		int bufsize=BUFSIZE;int h_errno;
20248		(void)gethostbyaddr_r( (void *)&(add.s_addr),
20249			alen, AF_INET, &hent, buffer, bufsize,
20250			&rhent, &h_errno);
20251  ;
20252  return 0;
20253}
20254_ACEOF
20255if ac_fn_c_try_compile "$LINENO"; then :
20256  ol_cv_func_gethostbyaddr_r_nargs8=yes
20257else
20258  ol_cv_func_gethostbyaddr_r_nargs8=no
20259fi
20260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20261
20262	if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes &&
20263	   test $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
20264
20265		ol_cv_func_gethostbyaddr_r_nargs=7
20266
20267	elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no &&
20268	     test $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
20269
20270		ol_cv_func_gethostbyaddr_r_nargs=8
20271
20272	else
20273		ol_cv_func_gethostbyaddr_r_nargs=0
20274	fi
20275
20276fi
20277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_gethostbyaddr_r_nargs" >&5
20278$as_echo "$ol_cv_func_gethostbyaddr_r_nargs" >&6; }
20279  if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
20280
20281cat >>confdefs.h <<_ACEOF
20282#define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
20283_ACEOF
20284
20285  fi
20286
20287else
20288 	ol_cv_func_gethostbyaddr_r_nargs=0
20289fi
20290
20291ol_link_bdb=no
20292
20293if test $ol_enable_bdb/$ol_enable_hdb != no/no; then
20294	ol_cv_berkeley_db=no
20295for ac_header in db.h
20296do :
20297  ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default"
20298if test "x$ac_cv_header_db_h" = x""yes; then :
20299  cat >>confdefs.h <<_ACEOF
20300#define HAVE_DB_H 1
20301_ACEOF
20302
20303fi
20304
20305done
20306
20307if test $ac_cv_header_db_h = yes; then
20308	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB major version in db.h" >&5
20309$as_echo_n "checking for Berkeley DB major version in db.h... " >&6; }
20310if test "${ol_cv_bdb_major+set}" = set; then :
20311  $as_echo_n "(cached) " >&6
20312else
20313
20314	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20315/* end confdefs.h.  */
20316
20317#include <db.h>
20318#ifndef DB_VERSION_MAJOR
20319#	define DB_VERSION_MAJOR 1
20320#endif
20321__db_version DB_VERSION_MAJOR
20322
20323_ACEOF
20324	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20325	ol_cv_bdb_major=${3}
20326
20327fi
20328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_major" >&5
20329$as_echo "$ol_cv_bdb_major" >&6; }
20330case $ol_cv_bdb_major in [1-9]*) : ;; *)
20331	as_fn_error "Unknown Berkeley DB major version in db.h" "$LINENO" 5 ;;
20332esac
20333
20334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB minor version in db.h" >&5
20335$as_echo_n "checking for Berkeley DB minor version in db.h... " >&6; }
20336if test "${ol_cv_bdb_minor+set}" = set; then :
20337  $as_echo_n "(cached) " >&6
20338else
20339
20340	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20341/* end confdefs.h.  */
20342
20343#include <db.h>
20344#ifndef DB_VERSION_MINOR
20345#	define DB_VERSION_MINOR 0
20346#endif
20347__db_version DB_VERSION_MINOR
20348
20349_ACEOF
20350	set X `eval "$ac_cpp -P conftest.$ac_ext" | $EGREP __db_version` none none
20351	ol_cv_bdb_minor=${3}
20352
20353fi
20354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_minor" >&5
20355$as_echo "$ol_cv_bdb_minor" >&6; }
20356case $ol_cv_bdb_minor in [0-9]*) : ;; *)
20357	as_fn_error "Unknown Berkeley DB minor version in db.h" "$LINENO" 5 ;;
20358esac
20359
20360	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if Berkeley DB version supported by BDB/HDB backends" >&5
20361$as_echo_n "checking if Berkeley DB version supported by BDB/HDB backends... " >&6; }
20362if test "${ol_cv_bdb_compat+set}" = set; then :
20363  $as_echo_n "(cached) " >&6
20364else
20365
20366	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20367/* end confdefs.h.  */
20368
20369#include <db.h>
20370
20371 /* this check could be improved */
20372#ifndef DB_VERSION_MAJOR
20373#	define DB_VERSION_MAJOR 1
20374#endif
20375#ifndef DB_VERSION_MINOR
20376#	define DB_VERSION_MINOR 0
20377#endif
20378#ifndef DB_VERSION_PATCH
20379#      define DB_VERSION_PATCH 0
20380#endif
20381
20382#define DB_VERSION_FULL        ((DB_VERSION_MAJOR<<16)|(DB_VERSION_MINOR<<8)|DB_VERSION_PATCH)
20383
20384/* require 4.4 or later, but less than 6.0.20 */
20385#if DB_VERSION_FULL >= 0x040400 && DB_VERSION_FULL < 0x060014
20386	__db_version_compat
20387#endif
20388#if DB_VERSION_FULL >= 0x060014
20389#error "BerkeleyDB 6.0.20+ license is incompatible with LDAP"
20390#endif
20391
20392_ACEOF
20393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20394  $EGREP "__db_version_compat" >/dev/null 2>&1; then :
20395  ol_cv_bdb_compat=yes
20396else
20397  ol_cv_bdb_compat=no
20398fi
20399rm -f conftest*
20400
20401fi
20402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_bdb_compat" >&5
20403$as_echo "$ol_cv_bdb_compat" >&6; }
20404
20405
20406	if test $ol_cv_bdb_compat != yes ; then
20407		as_fn_error "BerkeleyDB version incompatible with BDB/HDB backends" "$LINENO" 5
20408	fi
20409
20410	ol_cv_lib_db=no
20411
20412if test $ol_cv_bdb_major = 5 ; then
20413	if test $ol_cv_lib_db = no ; then
20414	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)" >&5
20415$as_echo_n "checking for Berkeley DB link (-ldb-5.$ol_cv_bdb_minor)... " >&6; }
20416if test "${ol_cv_db_db_5_dot_m+set}" = set; then :
20417  $as_echo_n "(cached) " >&6
20418else
20419
20420	ol_DB_LIB=-ldb-5.$ol_cv_bdb_minor
20421	ol_LIBS=$LIBS
20422	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20423
20424	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20425/* end confdefs.h.  */
20426
20427#ifdef HAVE_DB_185_H
20428# include <db_185.h>
20429#else
20430# include <db.h>
20431#endif
20432
20433#ifndef DB_VERSION_MAJOR
20434# define DB_VERSION_MAJOR 1
20435#endif
20436
20437#ifndef NULL
20438#define NULL ((void*)0)
20439#endif
20440
20441int
20442main ()
20443{
20444
20445#if DB_VERSION_MAJOR > 2
20446	db_env_create( NULL, 0 );
20447#elif DB_VERSION_MAJOR > 1
20448	db_appexit( NULL );
20449#else
20450	(void) dbopen( NULL, 0, 0, 0, NULL);
20451#endif
20452
20453  ;
20454  return 0;
20455}
20456_ACEOF
20457if ac_fn_c_try_link "$LINENO"; then :
20458  ol_cv_db_db_5_dot_m=yes
20459else
20460  ol_cv_db_db_5_dot_m=no
20461fi
20462rm -f core conftest.err conftest.$ac_objext \
20463    conftest$ac_exeext conftest.$ac_ext
20464
20465	LIBS="$ol_LIBS"
20466
20467fi
20468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_dot_m" >&5
20469$as_echo "$ol_cv_db_db_5_dot_m" >&6; }
20470
20471	if test $ol_cv_db_db_5_dot_m = yes ; then
20472		ol_cv_lib_db=-ldb-5.$ol_cv_bdb_minor
20473	fi
20474fi
20475
20476	if test $ol_cv_lib_db = no ; then
20477	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)" >&5
20478$as_echo_n "checking for Berkeley DB link (-ldb5$ol_cv_bdb_minor)... " >&6; }
20479if test "${ol_cv_db_db5m+set}" = set; then :
20480  $as_echo_n "(cached) " >&6
20481else
20482
20483	ol_DB_LIB=-ldb5$ol_cv_bdb_minor
20484	ol_LIBS=$LIBS
20485	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20486
20487	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20488/* end confdefs.h.  */
20489
20490#ifdef HAVE_DB_185_H
20491# include <db_185.h>
20492#else
20493# include <db.h>
20494#endif
20495
20496#ifndef DB_VERSION_MAJOR
20497# define DB_VERSION_MAJOR 1
20498#endif
20499
20500#ifndef NULL
20501#define NULL ((void*)0)
20502#endif
20503
20504int
20505main ()
20506{
20507
20508#if DB_VERSION_MAJOR > 2
20509	db_env_create( NULL, 0 );
20510#elif DB_VERSION_MAJOR > 1
20511	db_appexit( NULL );
20512#else
20513	(void) dbopen( NULL, 0, 0, 0, NULL);
20514#endif
20515
20516  ;
20517  return 0;
20518}
20519_ACEOF
20520if ac_fn_c_try_link "$LINENO"; then :
20521  ol_cv_db_db5m=yes
20522else
20523  ol_cv_db_db5m=no
20524fi
20525rm -f core conftest.err conftest.$ac_objext \
20526    conftest$ac_exeext conftest.$ac_ext
20527
20528	LIBS="$ol_LIBS"
20529
20530fi
20531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5m" >&5
20532$as_echo "$ol_cv_db_db5m" >&6; }
20533
20534	if test $ol_cv_db_db5m = yes ; then
20535		ol_cv_lib_db=-ldb5$ol_cv_bdb_minor
20536	fi
20537fi
20538
20539	if test $ol_cv_lib_db = no ; then
20540	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)" >&5
20541$as_echo_n "checking for Berkeley DB link (-ldb-5$ol_cv_bdb_minor)... " >&6; }
20542if test "${ol_cv_db_db_5m+set}" = set; then :
20543  $as_echo_n "(cached) " >&6
20544else
20545
20546	ol_DB_LIB=-ldb-5$ol_cv_bdb_minor
20547	ol_LIBS=$LIBS
20548	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20549
20550	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20551/* end confdefs.h.  */
20552
20553#ifdef HAVE_DB_185_H
20554# include <db_185.h>
20555#else
20556# include <db.h>
20557#endif
20558
20559#ifndef DB_VERSION_MAJOR
20560# define DB_VERSION_MAJOR 1
20561#endif
20562
20563#ifndef NULL
20564#define NULL ((void*)0)
20565#endif
20566
20567int
20568main ()
20569{
20570
20571#if DB_VERSION_MAJOR > 2
20572	db_env_create( NULL, 0 );
20573#elif DB_VERSION_MAJOR > 1
20574	db_appexit( NULL );
20575#else
20576	(void) dbopen( NULL, 0, 0, 0, NULL);
20577#endif
20578
20579  ;
20580  return 0;
20581}
20582_ACEOF
20583if ac_fn_c_try_link "$LINENO"; then :
20584  ol_cv_db_db_5m=yes
20585else
20586  ol_cv_db_db_5m=no
20587fi
20588rm -f core conftest.err conftest.$ac_objext \
20589    conftest$ac_exeext conftest.$ac_ext
20590
20591	LIBS="$ol_LIBS"
20592
20593fi
20594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5m" >&5
20595$as_echo "$ol_cv_db_db_5m" >&6; }
20596
20597	if test $ol_cv_db_db_5m = yes ; then
20598		ol_cv_lib_db=-ldb-5$ol_cv_bdb_minor
20599	fi
20600fi
20601
20602	if test $ol_cv_lib_db = no ; then
20603	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)" >&5
20604$as_echo_n "checking for Berkeley DB link (-ldb-5-$ol_cv_bdb_minor)... " >&6; }
20605if test "${ol_cv_db_db_5_m+set}" = set; then :
20606  $as_echo_n "(cached) " >&6
20607else
20608
20609	ol_DB_LIB=-ldb-5-$ol_cv_bdb_minor
20610	ol_LIBS=$LIBS
20611	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20612
20613	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20614/* end confdefs.h.  */
20615
20616#ifdef HAVE_DB_185_H
20617# include <db_185.h>
20618#else
20619# include <db.h>
20620#endif
20621
20622#ifndef DB_VERSION_MAJOR
20623# define DB_VERSION_MAJOR 1
20624#endif
20625
20626#ifndef NULL
20627#define NULL ((void*)0)
20628#endif
20629
20630int
20631main ()
20632{
20633
20634#if DB_VERSION_MAJOR > 2
20635	db_env_create( NULL, 0 );
20636#elif DB_VERSION_MAJOR > 1
20637	db_appexit( NULL );
20638#else
20639	(void) dbopen( NULL, 0, 0, 0, NULL);
20640#endif
20641
20642  ;
20643  return 0;
20644}
20645_ACEOF
20646if ac_fn_c_try_link "$LINENO"; then :
20647  ol_cv_db_db_5_m=yes
20648else
20649  ol_cv_db_db_5_m=no
20650fi
20651rm -f core conftest.err conftest.$ac_objext \
20652    conftest$ac_exeext conftest.$ac_ext
20653
20654	LIBS="$ol_LIBS"
20655
20656fi
20657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5_m" >&5
20658$as_echo "$ol_cv_db_db_5_m" >&6; }
20659
20660	if test $ol_cv_db_db_5_m = yes ; then
20661		ol_cv_lib_db=-ldb-5-$ol_cv_bdb_minor
20662	fi
20663fi
20664
20665	if test $ol_cv_lib_db = no ; then
20666	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-5)" >&5
20667$as_echo_n "checking for Berkeley DB link (-ldb-5)... " >&6; }
20668if test "${ol_cv_db_db_5+set}" = set; then :
20669  $as_echo_n "(cached) " >&6
20670else
20671
20672	ol_DB_LIB=-ldb-5
20673	ol_LIBS=$LIBS
20674	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20675
20676	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20677/* end confdefs.h.  */
20678
20679#ifdef HAVE_DB_185_H
20680# include <db_185.h>
20681#else
20682# include <db.h>
20683#endif
20684
20685#ifndef DB_VERSION_MAJOR
20686# define DB_VERSION_MAJOR 1
20687#endif
20688
20689#ifndef NULL
20690#define NULL ((void*)0)
20691#endif
20692
20693int
20694main ()
20695{
20696
20697#if DB_VERSION_MAJOR > 2
20698	db_env_create( NULL, 0 );
20699#elif DB_VERSION_MAJOR > 1
20700	db_appexit( NULL );
20701#else
20702	(void) dbopen( NULL, 0, 0, 0, NULL);
20703#endif
20704
20705  ;
20706  return 0;
20707}
20708_ACEOF
20709if ac_fn_c_try_link "$LINENO"; then :
20710  ol_cv_db_db_5=yes
20711else
20712  ol_cv_db_db_5=no
20713fi
20714rm -f core conftest.err conftest.$ac_objext \
20715    conftest$ac_exeext conftest.$ac_ext
20716
20717	LIBS="$ol_LIBS"
20718
20719fi
20720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_5" >&5
20721$as_echo "$ol_cv_db_db_5" >&6; }
20722
20723	if test $ol_cv_db_db_5 = yes ; then
20724		ol_cv_lib_db=-ldb-5
20725	fi
20726fi
20727
20728	if test $ol_cv_lib_db = no ; then
20729	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb5)" >&5
20730$as_echo_n "checking for Berkeley DB link (-ldb5)... " >&6; }
20731if test "${ol_cv_db_db5+set}" = set; then :
20732  $as_echo_n "(cached) " >&6
20733else
20734
20735	ol_DB_LIB=-ldb5
20736	ol_LIBS=$LIBS
20737	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20738
20739	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20740/* end confdefs.h.  */
20741
20742#ifdef HAVE_DB_185_H
20743# include <db_185.h>
20744#else
20745# include <db.h>
20746#endif
20747
20748#ifndef DB_VERSION_MAJOR
20749# define DB_VERSION_MAJOR 1
20750#endif
20751
20752#ifndef NULL
20753#define NULL ((void*)0)
20754#endif
20755
20756int
20757main ()
20758{
20759
20760#if DB_VERSION_MAJOR > 2
20761	db_env_create( NULL, 0 );
20762#elif DB_VERSION_MAJOR > 1
20763	db_appexit( NULL );
20764#else
20765	(void) dbopen( NULL, 0, 0, 0, NULL);
20766#endif
20767
20768  ;
20769  return 0;
20770}
20771_ACEOF
20772if ac_fn_c_try_link "$LINENO"; then :
20773  ol_cv_db_db5=yes
20774else
20775  ol_cv_db_db5=no
20776fi
20777rm -f core conftest.err conftest.$ac_objext \
20778    conftest$ac_exeext conftest.$ac_ext
20779
20780	LIBS="$ol_LIBS"
20781
20782fi
20783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db5" >&5
20784$as_echo "$ol_cv_db_db5" >&6; }
20785
20786	if test $ol_cv_db_db5 = yes ; then
20787		ol_cv_lib_db=-ldb5
20788	fi
20789fi
20790
20791elif test $ol_cv_bdb_major = 4 ; then
20792	if test $ol_cv_lib_db = no ; then
20793	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)" >&5
20794$as_echo_n "checking for Berkeley DB link (-ldb-4.$ol_cv_bdb_minor)... " >&6; }
20795if test "${ol_cv_db_db_4_dot_m+set}" = set; then :
20796  $as_echo_n "(cached) " >&6
20797else
20798
20799	ol_DB_LIB=-ldb-4.$ol_cv_bdb_minor
20800	ol_LIBS=$LIBS
20801	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20802
20803	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20804/* end confdefs.h.  */
20805
20806#ifdef HAVE_DB_185_H
20807# include <db_185.h>
20808#else
20809# include <db.h>
20810#endif
20811
20812#ifndef DB_VERSION_MAJOR
20813# define DB_VERSION_MAJOR 1
20814#endif
20815
20816#ifndef NULL
20817#define NULL ((void*)0)
20818#endif
20819
20820int
20821main ()
20822{
20823
20824#if DB_VERSION_MAJOR > 2
20825	db_env_create( NULL, 0 );
20826#elif DB_VERSION_MAJOR > 1
20827	db_appexit( NULL );
20828#else
20829	(void) dbopen( NULL, 0, 0, 0, NULL);
20830#endif
20831
20832  ;
20833  return 0;
20834}
20835_ACEOF
20836if ac_fn_c_try_link "$LINENO"; then :
20837  ol_cv_db_db_4_dot_m=yes
20838else
20839  ol_cv_db_db_4_dot_m=no
20840fi
20841rm -f core conftest.err conftest.$ac_objext \
20842    conftest$ac_exeext conftest.$ac_ext
20843
20844	LIBS="$ol_LIBS"
20845
20846fi
20847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_dot_m" >&5
20848$as_echo "$ol_cv_db_db_4_dot_m" >&6; }
20849
20850	if test $ol_cv_db_db_4_dot_m = yes ; then
20851		ol_cv_lib_db=-ldb-4.$ol_cv_bdb_minor
20852	fi
20853fi
20854
20855	if test $ol_cv_lib_db = no ; then
20856	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)" >&5
20857$as_echo_n "checking for Berkeley DB link (-ldb4$ol_cv_bdb_minor)... " >&6; }
20858if test "${ol_cv_db_db4m+set}" = set; then :
20859  $as_echo_n "(cached) " >&6
20860else
20861
20862	ol_DB_LIB=-ldb4$ol_cv_bdb_minor
20863	ol_LIBS=$LIBS
20864	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20865
20866	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20867/* end confdefs.h.  */
20868
20869#ifdef HAVE_DB_185_H
20870# include <db_185.h>
20871#else
20872# include <db.h>
20873#endif
20874
20875#ifndef DB_VERSION_MAJOR
20876# define DB_VERSION_MAJOR 1
20877#endif
20878
20879#ifndef NULL
20880#define NULL ((void*)0)
20881#endif
20882
20883int
20884main ()
20885{
20886
20887#if DB_VERSION_MAJOR > 2
20888	db_env_create( NULL, 0 );
20889#elif DB_VERSION_MAJOR > 1
20890	db_appexit( NULL );
20891#else
20892	(void) dbopen( NULL, 0, 0, 0, NULL);
20893#endif
20894
20895  ;
20896  return 0;
20897}
20898_ACEOF
20899if ac_fn_c_try_link "$LINENO"; then :
20900  ol_cv_db_db4m=yes
20901else
20902  ol_cv_db_db4m=no
20903fi
20904rm -f core conftest.err conftest.$ac_objext \
20905    conftest$ac_exeext conftest.$ac_ext
20906
20907	LIBS="$ol_LIBS"
20908
20909fi
20910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4m" >&5
20911$as_echo "$ol_cv_db_db4m" >&6; }
20912
20913	if test $ol_cv_db_db4m = yes ; then
20914		ol_cv_lib_db=-ldb4$ol_cv_bdb_minor
20915	fi
20916fi
20917
20918	if test $ol_cv_lib_db = no ; then
20919	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)" >&5
20920$as_echo_n "checking for Berkeley DB link (-ldb-4$ol_cv_bdb_minor)... " >&6; }
20921if test "${ol_cv_db_db_4m+set}" = set; then :
20922  $as_echo_n "(cached) " >&6
20923else
20924
20925	ol_DB_LIB=-ldb-4$ol_cv_bdb_minor
20926	ol_LIBS=$LIBS
20927	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20928
20929	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20930/* end confdefs.h.  */
20931
20932#ifdef HAVE_DB_185_H
20933# include <db_185.h>
20934#else
20935# include <db.h>
20936#endif
20937
20938#ifndef DB_VERSION_MAJOR
20939# define DB_VERSION_MAJOR 1
20940#endif
20941
20942#ifndef NULL
20943#define NULL ((void*)0)
20944#endif
20945
20946int
20947main ()
20948{
20949
20950#if DB_VERSION_MAJOR > 2
20951	db_env_create( NULL, 0 );
20952#elif DB_VERSION_MAJOR > 1
20953	db_appexit( NULL );
20954#else
20955	(void) dbopen( NULL, 0, 0, 0, NULL);
20956#endif
20957
20958  ;
20959  return 0;
20960}
20961_ACEOF
20962if ac_fn_c_try_link "$LINENO"; then :
20963  ol_cv_db_db_4m=yes
20964else
20965  ol_cv_db_db_4m=no
20966fi
20967rm -f core conftest.err conftest.$ac_objext \
20968    conftest$ac_exeext conftest.$ac_ext
20969
20970	LIBS="$ol_LIBS"
20971
20972fi
20973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4m" >&5
20974$as_echo "$ol_cv_db_db_4m" >&6; }
20975
20976	if test $ol_cv_db_db_4m = yes ; then
20977		ol_cv_lib_db=-ldb-4$ol_cv_bdb_minor
20978	fi
20979fi
20980
20981	if test $ol_cv_lib_db = no ; then
20982	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)" >&5
20983$as_echo_n "checking for Berkeley DB link (-ldb-4-$ol_cv_bdb_minor)... " >&6; }
20984if test "${ol_cv_db_db_4_m+set}" = set; then :
20985  $as_echo_n "(cached) " >&6
20986else
20987
20988	ol_DB_LIB=-ldb-4-$ol_cv_bdb_minor
20989	ol_LIBS=$LIBS
20990	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
20991
20992	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20993/* end confdefs.h.  */
20994
20995#ifdef HAVE_DB_185_H
20996# include <db_185.h>
20997#else
20998# include <db.h>
20999#endif
21000
21001#ifndef DB_VERSION_MAJOR
21002# define DB_VERSION_MAJOR 1
21003#endif
21004
21005#ifndef NULL
21006#define NULL ((void*)0)
21007#endif
21008
21009int
21010main ()
21011{
21012
21013#if DB_VERSION_MAJOR > 2
21014	db_env_create( NULL, 0 );
21015#elif DB_VERSION_MAJOR > 1
21016	db_appexit( NULL );
21017#else
21018	(void) dbopen( NULL, 0, 0, 0, NULL);
21019#endif
21020
21021  ;
21022  return 0;
21023}
21024_ACEOF
21025if ac_fn_c_try_link "$LINENO"; then :
21026  ol_cv_db_db_4_m=yes
21027else
21028  ol_cv_db_db_4_m=no
21029fi
21030rm -f core conftest.err conftest.$ac_objext \
21031    conftest$ac_exeext conftest.$ac_ext
21032
21033	LIBS="$ol_LIBS"
21034
21035fi
21036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4_m" >&5
21037$as_echo "$ol_cv_db_db_4_m" >&6; }
21038
21039	if test $ol_cv_db_db_4_m = yes ; then
21040		ol_cv_lib_db=-ldb-4-$ol_cv_bdb_minor
21041	fi
21042fi
21043
21044	if test $ol_cv_lib_db = no ; then
21045	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb-4)" >&5
21046$as_echo_n "checking for Berkeley DB link (-ldb-4)... " >&6; }
21047if test "${ol_cv_db_db_4+set}" = set; then :
21048  $as_echo_n "(cached) " >&6
21049else
21050
21051	ol_DB_LIB=-ldb-4
21052	ol_LIBS=$LIBS
21053	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21054
21055	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21056/* end confdefs.h.  */
21057
21058#ifdef HAVE_DB_185_H
21059# include <db_185.h>
21060#else
21061# include <db.h>
21062#endif
21063
21064#ifndef DB_VERSION_MAJOR
21065# define DB_VERSION_MAJOR 1
21066#endif
21067
21068#ifndef NULL
21069#define NULL ((void*)0)
21070#endif
21071
21072int
21073main ()
21074{
21075
21076#if DB_VERSION_MAJOR > 2
21077	db_env_create( NULL, 0 );
21078#elif DB_VERSION_MAJOR > 1
21079	db_appexit( NULL );
21080#else
21081	(void) dbopen( NULL, 0, 0, 0, NULL);
21082#endif
21083
21084  ;
21085  return 0;
21086}
21087_ACEOF
21088if ac_fn_c_try_link "$LINENO"; then :
21089  ol_cv_db_db_4=yes
21090else
21091  ol_cv_db_db_4=no
21092fi
21093rm -f core conftest.err conftest.$ac_objext \
21094    conftest$ac_exeext conftest.$ac_ext
21095
21096	LIBS="$ol_LIBS"
21097
21098fi
21099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db_4" >&5
21100$as_echo "$ol_cv_db_db_4" >&6; }
21101
21102	if test $ol_cv_db_db_4 = yes ; then
21103		ol_cv_lib_db=-ldb-4
21104	fi
21105fi
21106
21107	if test $ol_cv_lib_db = no ; then
21108	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb4)" >&5
21109$as_echo_n "checking for Berkeley DB link (-ldb4)... " >&6; }
21110if test "${ol_cv_db_db4+set}" = set; then :
21111  $as_echo_n "(cached) " >&6
21112else
21113
21114	ol_DB_LIB=-ldb4
21115	ol_LIBS=$LIBS
21116	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21117
21118	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21119/* end confdefs.h.  */
21120
21121#ifdef HAVE_DB_185_H
21122# include <db_185.h>
21123#else
21124# include <db.h>
21125#endif
21126
21127#ifndef DB_VERSION_MAJOR
21128# define DB_VERSION_MAJOR 1
21129#endif
21130
21131#ifndef NULL
21132#define NULL ((void*)0)
21133#endif
21134
21135int
21136main ()
21137{
21138
21139#if DB_VERSION_MAJOR > 2
21140	db_env_create( NULL, 0 );
21141#elif DB_VERSION_MAJOR > 1
21142	db_appexit( NULL );
21143#else
21144	(void) dbopen( NULL, 0, 0, 0, NULL);
21145#endif
21146
21147  ;
21148  return 0;
21149}
21150_ACEOF
21151if ac_fn_c_try_link "$LINENO"; then :
21152  ol_cv_db_db4=yes
21153else
21154  ol_cv_db_db4=no
21155fi
21156rm -f core conftest.err conftest.$ac_objext \
21157    conftest$ac_exeext conftest.$ac_ext
21158
21159	LIBS="$ol_LIBS"
21160
21161fi
21162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db4" >&5
21163$as_echo "$ol_cv_db_db4" >&6; }
21164
21165	if test $ol_cv_db_db4 = yes ; then
21166		ol_cv_lib_db=-ldb4
21167	fi
21168fi
21169
21170fi
21171if test $ol_cv_lib_db = no ; then
21172	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (-ldb)" >&5
21173$as_echo_n "checking for Berkeley DB link (-ldb)... " >&6; }
21174if test "${ol_cv_db_db+set}" = set; then :
21175  $as_echo_n "(cached) " >&6
21176else
21177
21178	ol_DB_LIB=-ldb
21179	ol_LIBS=$LIBS
21180	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21181
21182	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21183/* end confdefs.h.  */
21184
21185#ifdef HAVE_DB_185_H
21186# include <db_185.h>
21187#else
21188# include <db.h>
21189#endif
21190
21191#ifndef DB_VERSION_MAJOR
21192# define DB_VERSION_MAJOR 1
21193#endif
21194
21195#ifndef NULL
21196#define NULL ((void*)0)
21197#endif
21198
21199int
21200main ()
21201{
21202
21203#if DB_VERSION_MAJOR > 2
21204	db_env_create( NULL, 0 );
21205#elif DB_VERSION_MAJOR > 1
21206	db_appexit( NULL );
21207#else
21208	(void) dbopen( NULL, 0, 0, 0, NULL);
21209#endif
21210
21211  ;
21212  return 0;
21213}
21214_ACEOF
21215if ac_fn_c_try_link "$LINENO"; then :
21216  ol_cv_db_db=yes
21217else
21218  ol_cv_db_db=no
21219fi
21220rm -f core conftest.err conftest.$ac_objext \
21221    conftest$ac_exeext conftest.$ac_ext
21222
21223	LIBS="$ol_LIBS"
21224
21225fi
21226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_db" >&5
21227$as_echo "$ol_cv_db_db" >&6; }
21228
21229	if test $ol_cv_db_db = yes ; then
21230		ol_cv_lib_db=-ldb
21231	fi
21232fi
21233
21234if test $ol_cv_lib_db = no ; then
21235	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB link (default)" >&5
21236$as_echo_n "checking for Berkeley DB link (default)... " >&6; }
21237if test "${ol_cv_db_none+set}" = set; then :
21238  $as_echo_n "(cached) " >&6
21239else
21240
21241	ol_DB_LIB=
21242	ol_LIBS=$LIBS
21243	LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
21244
21245	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21246/* end confdefs.h.  */
21247
21248#ifdef HAVE_DB_185_H
21249# include <db_185.h>
21250#else
21251# include <db.h>
21252#endif
21253
21254#ifndef DB_VERSION_MAJOR
21255# define DB_VERSION_MAJOR 1
21256#endif
21257
21258#ifndef NULL
21259#define NULL ((void*)0)
21260#endif
21261
21262int
21263main ()
21264{
21265
21266#if DB_VERSION_MAJOR > 2
21267	db_env_create( NULL, 0 );
21268#elif DB_VERSION_MAJOR > 1
21269	db_appexit( NULL );
21270#else
21271	(void) dbopen( NULL, 0, 0, 0, NULL);
21272#endif
21273
21274  ;
21275  return 0;
21276}
21277_ACEOF
21278if ac_fn_c_try_link "$LINENO"; then :
21279  ol_cv_db_none=yes
21280else
21281  ol_cv_db_none=no
21282fi
21283rm -f core conftest.err conftest.$ac_objext \
21284    conftest$ac_exeext conftest.$ac_ext
21285
21286	LIBS="$ol_LIBS"
21287
21288fi
21289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_db_none" >&5
21290$as_echo "$ol_cv_db_none" >&6; }
21291
21292	if test $ol_cv_db_none = yes ; then
21293		ol_cv_lib_db=yes
21294	fi
21295fi
21296
21297
21298	if test "$ol_cv_lib_db" != no ; then
21299		ol_cv_berkeley_db=yes
21300		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB library and header version match" >&5
21301$as_echo_n "checking for Berkeley DB library and header version match... " >&6; }
21302if test "${ol_cv_berkeley_db_version+set}" = set; then :
21303  $as_echo_n "(cached) " >&6
21304else
21305
21306	ol_LIBS="$LIBS"
21307	LIBS="$LTHREAD_LIBS $LIBS"
21308	if test $ol_cv_lib_db != yes ; then
21309		LIBS="$ol_cv_lib_db $LIBS"
21310	fi
21311
21312	if test "$cross_compiling" = yes; then :
21313  ol_cv_berkeley_db_version=cross
21314else
21315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21316/* end confdefs.h.  */
21317
21318#ifdef HAVE_DB_185_H
21319	choke me;
21320#else
21321#include <db.h>
21322#endif
21323#ifndef DB_VERSION_MAJOR
21324# define DB_VERSION_MAJOR 1
21325#endif
21326#ifndef NULL
21327#define NULL ((void *)0)
21328#endif
21329main()
21330{
21331#if DB_VERSION_MAJOR > 1
21332	char *version;
21333	int major, minor, patch;
21334
21335	version = db_version( &major, &minor, &patch );
21336
21337	if( major != DB_VERSION_MAJOR ||
21338		minor != DB_VERSION_MINOR ||
21339		patch != DB_VERSION_PATCH )
21340	{
21341		printf("Berkeley DB version mismatch\n"
21342			"\theader: %s\n\tlibrary: %s\n",
21343			DB_VERSION_STRING, version);
21344		return 1;
21345	}
21346#endif
21347
21348	return 0;
21349}
21350_ACEOF
21351if ac_fn_c_try_run "$LINENO"; then :
21352  ol_cv_berkeley_db_version=yes
21353else
21354  ol_cv_berkeley_db_version=no
21355fi
21356rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21357  conftest.$ac_objext conftest.beam conftest.$ac_ext
21358fi
21359
21360
21361	LIBS="$ol_LIBS"
21362
21363fi
21364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_version" >&5
21365$as_echo "$ol_cv_berkeley_db_version" >&6; }
21366
21367	if test $ol_cv_berkeley_db_version = no ; then
21368		as_fn_error "Berkeley DB version mismatch" "$LINENO" 5
21369	fi
21370
21371		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Berkeley DB thread support" >&5
21372$as_echo_n "checking for Berkeley DB thread support... " >&6; }
21373if test "${ol_cv_berkeley_db_thread+set}" = set; then :
21374  $as_echo_n "(cached) " >&6
21375else
21376
21377	ol_LIBS="$LIBS"
21378	LIBS="$LTHREAD_LIBS $LIBS"
21379	if test $ol_cv_lib_db != yes ; then
21380		LIBS="$ol_cv_lib_db $LIBS"
21381	fi
21382
21383	if test "$cross_compiling" = yes; then :
21384  ol_cv_berkeley_db_thread=cross
21385else
21386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21387/* end confdefs.h.  */
21388
21389#ifdef HAVE_DB_185_H
21390	choke me;
21391#else
21392#include <db.h>
21393#endif
21394#ifndef NULL
21395#define NULL ((void *)0)
21396#endif
21397main()
21398{
21399	int rc;
21400	u_int32_t flags = DB_CREATE |
21401#ifdef DB_PRIVATE
21402		DB_PRIVATE |
21403#endif
21404		DB_THREAD;
21405
21406#if DB_VERSION_MAJOR > 2
21407	DB_ENV *env = NULL;
21408
21409	rc = db_env_create( &env, 0 );
21410
21411	flags |= DB_INIT_MPOOL;
21412#ifdef DB_MPOOL_PRIVATE
21413	flags |= DB_MPOOL_PRIVATE;
21414#endif
21415
21416	if( rc ) {
21417		printf("BerkeleyDB: %s\n", db_strerror(rc) );
21418		return rc;
21419	}
21420
21421#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
21422	rc = (env->open)( env, NULL, flags, 0 );
21423#else
21424	rc = (env->open)( env, NULL, NULL, flags, 0 );
21425#endif
21426
21427	if ( rc == 0 ) {
21428		rc = env->close( env, 0 );
21429	}
21430
21431	if( rc ) {
21432		printf("BerkeleyDB: %s\n", db_strerror(rc) );
21433		return rc;
21434	}
21435
21436#else
21437	DB_ENV env;
21438	memset( &env, '\0', sizeof(env) );
21439
21440	rc = db_appinit( NULL, NULL, &env, flags );
21441
21442	if( rc == 0 ) {
21443		db_appexit( &env );
21444	}
21445
21446	unlink("__db_mpool.share");
21447	unlink("__db_lock.share");
21448#endif
21449
21450	return rc;
21451}
21452_ACEOF
21453if ac_fn_c_try_run "$LINENO"; then :
21454  ol_cv_berkeley_db_thread=yes
21455else
21456  ol_cv_berkeley_db_thread=no
21457fi
21458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21459  conftest.$ac_objext conftest.beam conftest.$ac_ext
21460fi
21461
21462
21463	LIBS="$ol_LIBS"
21464
21465fi
21466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_berkeley_db_thread" >&5
21467$as_echo "$ol_cv_berkeley_db_thread" >&6; }
21468
21469	if test $ol_cv_berkeley_db_thread != no ; then
21470
21471$as_echo "#define HAVE_BERKELEY_DB_THREAD 1" >>confdefs.h
21472
21473	fi
21474
21475	fi
21476fi
21477
21478
21479	if test $ol_cv_berkeley_db = no ; then
21480		as_fn_error "BDB/HDB: BerkeleyDB not available" "$LINENO" 5
21481	fi
21482
21483
21484$as_echo "#define HAVE_BERKELEY_DB 1" >>confdefs.h
21485
21486
21487			if test $ol_cv_lib_db != yes ; then
21488		BDB_LIBS="$BDB_LIBS $ol_cv_lib_db"
21489	fi
21490
21491			if test $ol_enable_bdb/$ol_enable_hdb != mod/mod ; then
21492		if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
21493			SLAPD_LIBS="$SLAPD_LIBS \$(BDB_LIBS)"
21494		fi
21495	fi
21496
21497	ol_link_bdb=yes
21498fi
21499
21500
21501if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
21502	BUILD_LIBS_DYNAMIC=shared
21503
21504$as_echo "#define LDAP_LIBS_DYNAMIC 1" >>confdefs.h
21505
21506	LTSTATIC=""
21507else
21508	BUILD_LIBS_DYNAMIC=static
21509	LTSTATIC="-static"
21510fi
21511
21512if test $ol_enable_wrappers != no ; then
21513	for ac_header in tcpd.h
21514do :
21515  ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default"
21516if test "x$ac_cv_header_tcpd_h" = x""yes; then :
21517  cat >>confdefs.h <<_ACEOF
21518#define HAVE_TCPD_H 1
21519_ACEOF
21520
21521		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCP wrappers library" >&5
21522$as_echo_n "checking for TCP wrappers library... " >&6; }
21523		save_LIBS="$LIBS"
21524		LIBS="$LIBS -lwrap"
21525		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21526/* end confdefs.h.  */
21527
21528#include <tcpd.h>
21529int allow_severity = 0;
21530int deny_severity  = 0;
21531
21532struct request_info *req;
21533
21534int
21535main ()
21536{
21537
21538hosts_access(req)
21539
21540  ;
21541  return 0;
21542}
21543_ACEOF
21544if ac_fn_c_try_link "$LINENO"; then :
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap" >&5
21546$as_echo "-lwrap" >&6; }
21547		have_wrappers=yes
21548		LIBS="$save_LIBS"
21549else
21550
21551				LIBS="$LIBS -lnsl"
21552		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21553/* end confdefs.h.  */
21554
21555#include <tcpd.h>
21556int allow_severity = 0;
21557int deny_severity  = 0;
21558
21559struct request_info *req;
21560
21561int
21562main ()
21563{
21564
21565hosts_access(req)
21566
21567  ;
21568  return 0;
21569}
21570_ACEOF
21571if ac_fn_c_try_link "$LINENO"; then :
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: -lwrap -lnsl" >&5
21573$as_echo "-lwrap -lnsl" >&6; }
21574		have_wrappers=yes
21575		LIBS="$save_LIBS -lnsl"
21576else
21577
21578		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21579$as_echo "no" >&6; }
21580		have_wrappers=no
21581		LIBS=$save_LIBS
21582fi
21583rm -f core conftest.err conftest.$ac_objext \
21584    conftest$ac_exeext conftest.$ac_ext
21585fi
21586rm -f core conftest.err conftest.$ac_objext \
21587    conftest$ac_exeext conftest.$ac_ext
21588else
21589  have_wrappers=no
21590fi
21591
21592done
21593
21594
21595	if test $have_wrappers = yes ; then
21596
21597$as_echo "#define HAVE_TCPD 1" >>confdefs.h
21598
21599		WRAP_LIBS="-lwrap"
21600	elif test $ol_enable_wrappers = yes ; then
21601		as_fn_error "could not find TCP wrappers, select apppropriate options or disable" "$LINENO" 5
21602	else
21603		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find TCP wrappers, support disabled" >&5
21604$as_echo "$as_me: WARNING: could not find TCP wrappers, support disabled" >&2;}
21605		WRAP_LIBS=""
21606	fi
21607fi
21608
21609if test $ol_enable_syslog != no ; then
21610	ac_fn_c_check_func "$LINENO" "openlog" "ac_cv_func_openlog"
21611if test "x$ac_cv_func_openlog" = x""yes; then :
21612
21613fi
21614
21615	if test $ac_cv_func_openlog = no && test $ol_enable_syslog = yes; then
21616		{ as_fn_set_status select appropriate options or disable
21617as_fn_error "could not find syslog" "$LINENO" 5; }
21618	fi
21619	ol_enable_syslog=$ac_cv_func_openlog
21620fi
21621
21622ol_link_sql=no
21623if test $ol_enable_sql != no ; then
21624	for ac_header in sql.h sqlext.h
21625do :
21626  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21627ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21628eval as_val=\$$as_ac_Header
21629   if test "x$as_val" = x""yes; then :
21630  cat >>confdefs.h <<_ACEOF
21631#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21632_ACEOF
21633
21634else
21635
21636		as_fn_error "could not locate SQL headers" "$LINENO" 5
21637
21638fi
21639
21640done
21641
21642
21643	sql_LIBS="$LIBS"
21644	LIBS="$LTHREAD_LIBS $LIBS"
21645
21646	if test $ol_with_odbc = auto ; then
21647		ol_with_odbc="iodbc unixodbc odbc32"
21648	fi
21649
21650	for odbc in $ol_with_odbc ; do
21651		if test $ol_link_sql = no ; then
21652			case $odbc in
21653			iodbc)
21654				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -liodbc" >&5
21655$as_echo_n "checking for SQLDriverConnect in -liodbc... " >&6; }
21656if test "${ac_cv_lib_iodbc_SQLDriverConnect+set}" = set; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  ac_check_lib_save_LIBS=$LIBS
21660LIBS="-liodbc  $LIBS"
21661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21662/* end confdefs.h.  */
21663
21664/* Override any GCC internal prototype to avoid an error.
21665   Use char because int might match the return type of a GCC
21666   builtin and then its argument prototype would still apply.  */
21667#ifdef __cplusplus
21668extern "C"
21669#endif
21670char SQLDriverConnect ();
21671int
21672main ()
21673{
21674return SQLDriverConnect ();
21675  ;
21676  return 0;
21677}
21678_ACEOF
21679if ac_fn_c_try_link "$LINENO"; then :
21680  ac_cv_lib_iodbc_SQLDriverConnect=yes
21681else
21682  ac_cv_lib_iodbc_SQLDriverConnect=no
21683fi
21684rm -f core conftest.err conftest.$ac_objext \
21685    conftest$ac_exeext conftest.$ac_ext
21686LIBS=$ac_check_lib_save_LIBS
21687fi
21688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iodbc_SQLDriverConnect" >&5
21689$as_echo "$ac_cv_lib_iodbc_SQLDriverConnect" >&6; }
21690if test "x$ac_cv_lib_iodbc_SQLDriverConnect" = x""yes; then :
21691  have_iodbc=yes
21692else
21693  have_iodbc=no
21694fi
21695
21696				if test $have_iodbc = yes ; then
21697					ol_link_sql="-liodbc"
21698				fi
21699				;;
21700
21701			unixodbc)
21702				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc" >&5
21703$as_echo_n "checking for SQLDriverConnect in -lodbc... " >&6; }
21704if test "${ac_cv_lib_odbc_SQLDriverConnect+set}" = set; then :
21705  $as_echo_n "(cached) " >&6
21706else
21707  ac_check_lib_save_LIBS=$LIBS
21708LIBS="-lodbc  $LIBS"
21709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21710/* end confdefs.h.  */
21711
21712/* Override any GCC internal prototype to avoid an error.
21713   Use char because int might match the return type of a GCC
21714   builtin and then its argument prototype would still apply.  */
21715#ifdef __cplusplus
21716extern "C"
21717#endif
21718char SQLDriverConnect ();
21719int
21720main ()
21721{
21722return SQLDriverConnect ();
21723  ;
21724  return 0;
21725}
21726_ACEOF
21727if ac_fn_c_try_link "$LINENO"; then :
21728  ac_cv_lib_odbc_SQLDriverConnect=yes
21729else
21730  ac_cv_lib_odbc_SQLDriverConnect=no
21731fi
21732rm -f core conftest.err conftest.$ac_objext \
21733    conftest$ac_exeext conftest.$ac_ext
21734LIBS=$ac_check_lib_save_LIBS
21735fi
21736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc_SQLDriverConnect" >&5
21737$as_echo "$ac_cv_lib_odbc_SQLDriverConnect" >&6; }
21738if test "x$ac_cv_lib_odbc_SQLDriverConnect" = x""yes; then :
21739  have_odbc=yes
21740else
21741  have_odbc=no
21742fi
21743
21744				if test $have_odbc = yes ; then
21745					ol_link_sql="-lodbc"
21746				fi
21747				;;
21748
21749			odbc32)
21750				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32" >&5
21751$as_echo_n "checking for SQLDriverConnect in -lodbc32... " >&6; }
21752if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then :
21753  $as_echo_n "(cached) " >&6
21754else
21755  ac_check_lib_save_LIBS=$LIBS
21756LIBS="-lodbc32  $LIBS"
21757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21758/* end confdefs.h.  */
21759
21760/* Override any GCC internal prototype to avoid an error.
21761   Use char because int might match the return type of a GCC
21762   builtin and then its argument prototype would still apply.  */
21763#ifdef __cplusplus
21764extern "C"
21765#endif
21766char SQLDriverConnect ();
21767int
21768main ()
21769{
21770return SQLDriverConnect ();
21771  ;
21772  return 0;
21773}
21774_ACEOF
21775if ac_fn_c_try_link "$LINENO"; then :
21776  ac_cv_lib_odbc32_SQLDriverConnect=yes
21777else
21778  ac_cv_lib_odbc32_SQLDriverConnect=no
21779fi
21780rm -f core conftest.err conftest.$ac_objext \
21781    conftest$ac_exeext conftest.$ac_ext
21782LIBS=$ac_check_lib_save_LIBS
21783fi
21784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
21785$as_echo "$ac_cv_lib_odbc32_SQLDriverConnect" >&6; }
21786if test "x$ac_cv_lib_odbc32_SQLDriverConnect" = x""yes; then :
21787  have_odbc32=yes
21788else
21789  have_odbc32=no
21790fi
21791
21792
21793								if test $have_odbc32 = no ; then
21794					{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLDriverConnect in -lodbc32 with windows.h" >&5
21795$as_echo_n "checking for SQLDriverConnect in -lodbc32 with windows.h... " >&6; }
21796					save_LIBS="$LIBS"
21797					LIBS="$LIBS -lodbc32"
21798					cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21799/* end confdefs.h.  */
21800#include <windows.h>
21801					#include <sqlext.h>
21802
21803int
21804main ()
21805{
21806
21807						SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0);
21808
21809  ;
21810  return 0;
21811}
21812_ACEOF
21813if ac_fn_c_try_link "$LINENO"; then :
21814  have_odbc32=yes
21815else
21816  have_odbc32=no
21817fi
21818rm -f core conftest.err conftest.$ac_objext \
21819    conftest$ac_exeext conftest.$ac_ext
21820					LIBS="$save_LIBS"
21821					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_odbc32" >&5
21822$as_echo "$have_odbc32" >&6; }
21823				fi
21824
21825				if test $have_odbc32 = yes ; then
21826					ol_link_sql="-lodbc32"
21827				fi
21828				;;
21829
21830			*)
21831				as_fn_error "unknown ODBC library" "$LINENO" 5
21832				;;
21833			esac
21834		fi
21835	done
21836
21837	LIBS="$sql_LIBS"
21838
21839	if test $ol_link_sql != no ; then
21840		SLAPD_SQL_LIBS="$ol_link_sql"
21841
21842	elif test $ol_enable_sql != auto ; then
21843		as_fn_error "could not locate suitable ODBC library" "$LINENO" 5
21844	fi
21845fi
21846
21847ol_link_ndb=no
21848if test $ol_enable_ndb != no ; then
21849	# Extract the first word of "mysql_config", so it can be a program name with args.
21850set dummy mysql_config; ac_word=$2
21851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21852$as_echo_n "checking for $ac_word... " >&6; }
21853if test "${ac_cv_prog_MYSQL+set}" = set; then :
21854  $as_echo_n "(cached) " >&6
21855else
21856  if test -n "$MYSQL"; then
21857  ac_cv_prog_MYSQL="$MYSQL" # Let the user override the test.
21858else
21859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21860for as_dir in $PATH
21861do
21862  IFS=$as_save_IFS
21863  test -z "$as_dir" && as_dir=.
21864    for ac_exec_ext in '' $ac_executable_extensions; do
21865  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21866    ac_cv_prog_MYSQL="yes"
21867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21868    break 2
21869  fi
21870done
21871  done
21872IFS=$as_save_IFS
21873
21874fi
21875fi
21876MYSQL=$ac_cv_prog_MYSQL
21877if test -n "$MYSQL"; then
21878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MYSQL" >&5
21879$as_echo "$MYSQL" >&6; }
21880else
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21882$as_echo "no" >&6; }
21883fi
21884
21885
21886	if test "$MYSQL" != yes ; then
21887		as_fn_error "could not locate mysql_config" "$LINENO" 5
21888	fi
21889
21890	SQL_INC=`mysql_config --include`
21891	SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
21892
21893	save_CPPFLAGS="$CPPFLAGS"
21894	CPPFLAGS="$SLAPD_NDB_INCS"
21895	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NdbApi.hpp" >&5
21896$as_echo_n "checking for NdbApi.hpp... " >&6; }
21897	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21898/* end confdefs.h.  */
21899#include <NdbApi.hpp>
21900_ACEOF
21901if ac_fn_c_try_cpp "$LINENO"; then :
21902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21903$as_echo "yes" >&6; }
21904else
21905  as_fn_error "could not locate NdbApi headers" "$LINENO" 5
21906
21907fi
21908rm -f conftest.err conftest.$ac_ext
21909	CPPFLAGS="$save_CPPFLAGS"
21910
21911	SQL_LIB=`mysql_config --libs_r`
21912	SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
21913
21914	save_LDFLAGS="$LDFLAGS"
21915	save_LIBS="$LIBS"
21916	LDFLAGS="$SQL_LIB"
21917	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ndb_init in -lndbclient" >&5
21918$as_echo_n "checking for ndb_init in -lndbclient... " >&6; }
21919if test "${ac_cv_lib_ndbclient_ndb_init+set}" = set; then :
21920  $as_echo_n "(cached) " >&6
21921else
21922  ac_check_lib_save_LIBS=$LIBS
21923LIBS="-lndbclient -lstdc++ $LIBS"
21924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21925/* end confdefs.h.  */
21926
21927/* Override any GCC internal prototype to avoid an error.
21928   Use char because int might match the return type of a GCC
21929   builtin and then its argument prototype would still apply.  */
21930#ifdef __cplusplus
21931extern "C"
21932#endif
21933char ndb_init ();
21934int
21935main ()
21936{
21937return ndb_init ();
21938  ;
21939  return 0;
21940}
21941_ACEOF
21942if ac_fn_c_try_link "$LINENO"; then :
21943  ac_cv_lib_ndbclient_ndb_init=yes
21944else
21945  ac_cv_lib_ndbclient_ndb_init=no
21946fi
21947rm -f core conftest.err conftest.$ac_objext \
21948    conftest$ac_exeext conftest.$ac_ext
21949LIBS=$ac_check_lib_save_LIBS
21950fi
21951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ndbclient_ndb_init" >&5
21952$as_echo "$ac_cv_lib_ndbclient_ndb_init" >&6; }
21953if test "x$ac_cv_lib_ndbclient_ndb_init" = x""yes; then :
21954  : ok
21955else
21956
21957		as_fn_error "could not locate ndbclient library" "$LINENO" 5
21958
21959fi
21960
21961	LIBS="$save_LIBS"
21962	LDFLAGS="$save_LDFLAGS"
21963
21964	if test "$ol_enable_ndb" = yes ; then
21965		SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
21966	fi
21967fi
21968
21969WITH_SASL=no
21970ol_link_sasl=no
21971ol_link_spasswd=no
21972if test $ol_with_cyrus_sasl != no ; then
21973	for ac_header in sasl/sasl.h sasl.h
21974do :
21975  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21976ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21977eval as_val=\$$as_ac_Header
21978   if test "x$as_val" = x""yes; then :
21979  cat >>confdefs.h <<_ACEOF
21980#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21981_ACEOF
21982
21983fi
21984
21985done
21986
21987
21988	if test $ac_cv_header_sasl_sasl_h = yes ||
21989	   test $ac_cv_header_sasl_h = yes; then
21990		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl2" >&5
21991$as_echo_n "checking for sasl_client_init in -lsasl2... " >&6; }
21992if test "${ac_cv_lib_sasl2_sasl_client_init+set}" = set; then :
21993  $as_echo_n "(cached) " >&6
21994else
21995  ac_check_lib_save_LIBS=$LIBS
21996LIBS="-lsasl2  $LIBS"
21997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21998/* end confdefs.h.  */
21999
22000/* Override any GCC internal prototype to avoid an error.
22001   Use char because int might match the return type of a GCC
22002   builtin and then its argument prototype would still apply.  */
22003#ifdef __cplusplus
22004extern "C"
22005#endif
22006char sasl_client_init ();
22007int
22008main ()
22009{
22010return sasl_client_init ();
22011  ;
22012  return 0;
22013}
22014_ACEOF
22015if ac_fn_c_try_link "$LINENO"; then :
22016  ac_cv_lib_sasl2_sasl_client_init=yes
22017else
22018  ac_cv_lib_sasl2_sasl_client_init=no
22019fi
22020rm -f core conftest.err conftest.$ac_objext \
22021    conftest$ac_exeext conftest.$ac_ext
22022LIBS=$ac_check_lib_save_LIBS
22023fi
22024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_client_init" >&5
22025$as_echo "$ac_cv_lib_sasl2_sasl_client_init" >&6; }
22026if test "x$ac_cv_lib_sasl2_sasl_client_init" = x""yes; then :
22027  ol_link_sasl="-lsasl2"
22028else
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_client_init in -lsasl" >&5
22030$as_echo_n "checking for sasl_client_init in -lsasl... " >&6; }
22031if test "${ac_cv_lib_sasl_sasl_client_init+set}" = set; then :
22032  $as_echo_n "(cached) " >&6
22033else
22034  ac_check_lib_save_LIBS=$LIBS
22035LIBS="-lsasl  $LIBS"
22036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22037/* end confdefs.h.  */
22038
22039/* Override any GCC internal prototype to avoid an error.
22040   Use char because int might match the return type of a GCC
22041   builtin and then its argument prototype would still apply.  */
22042#ifdef __cplusplus
22043extern "C"
22044#endif
22045char sasl_client_init ();
22046int
22047main ()
22048{
22049return sasl_client_init ();
22050  ;
22051  return 0;
22052}
22053_ACEOF
22054if ac_fn_c_try_link "$LINENO"; then :
22055  ac_cv_lib_sasl_sasl_client_init=yes
22056else
22057  ac_cv_lib_sasl_sasl_client_init=no
22058fi
22059rm -f core conftest.err conftest.$ac_objext \
22060    conftest$ac_exeext conftest.$ac_ext
22061LIBS=$ac_check_lib_save_LIBS
22062fi
22063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl_sasl_client_init" >&5
22064$as_echo "$ac_cv_lib_sasl_sasl_client_init" >&6; }
22065if test "x$ac_cv_lib_sasl_sasl_client_init" = x""yes; then :
22066  ol_link_sasl="-lsasl"
22067fi
22068
22069fi
22070
22071	fi
22072
22073	if test $ol_link_sasl = no ; then
22074		if test $ol_with_cyrus_sasl != auto ; then
22075			as_fn_error "Could not locate Cyrus SASL" "$LINENO" 5
22076		else
22077			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not locate Cyrus SASL" >&5
22078$as_echo "$as_me: WARNING: Could not locate Cyrus SASL" >&2;}
22079			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22080$as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22081			if test $ol_link_tls = no ; then
22082				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22083$as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22084			fi
22085		fi
22086	else
22087		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Cyrus SASL library version" >&5
22088$as_echo_n "checking Cyrus SASL library version... " >&6; }
22089if test "${ol_cv_sasl_compat+set}" = set; then :
22090  $as_echo_n "(cached) " >&6
22091else
22092
22093	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22094/* end confdefs.h.  */
22095
22096#ifdef HAVE_SASL_SASL_H
22097#include <sasl/sasl.h>
22098#else
22099#include <sasl.h>
22100#endif
22101
22102/* Require 2.1.15+ */
22103#if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
22104	char *__sasl_compat = "2.2+ or better okay (we guess)";
22105#elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
22106	&& SASL_VERSION_STEP >=15
22107	char *__sasl_compat = "2.1.15+ or better okay";
22108#endif
22109
22110_ACEOF
22111if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22112  $EGREP "__sasl_compat" >/dev/null 2>&1; then :
22113  ol_cv_sasl_compat=yes
22114else
22115  ol_cv_sasl_compat=no
22116fi
22117rm -f conftest*
22118
22119fi
22120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sasl_compat" >&5
22121$as_echo "$ol_cv_sasl_compat" >&6; }
22122
22123		if test $ol_cv_sasl_compat = no ; then
22124			ol_link_sasl=no
22125			as_fn_error "Cyrus SASL library located but is incompatible" "$LINENO" 5
22126		fi
22127
22128
22129$as_echo "#define HAVE_CYRUS_SASL 1" >>confdefs.h
22130
22131		SASL_LIBS="$ol_link_sasl"
22132		if test $ol_enable_spasswd != no ; then
22133			ol_link_spasswd=yes
22134		fi
22135
22136		ac_save_LIBS="$LIBS"
22137		LIBS="$LIBS $ol_link_sasl"
22138		ac_fn_c_check_func "$LINENO" "sasl_version" "ac_cv_func_sasl_version"
22139if test "x$ac_cv_func_sasl_version" = x""yes; then :
22140
22141$as_echo "#define HAVE_SASL_VERSION 1" >>confdefs.h
22142
22143fi
22144
22145		LIBS="$ac_save_LIBS"
22146
22147		WITH_SASL=yes
22148	fi
22149
22150else
22151	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SASL authentication not supported!" >&5
22152$as_echo "$as_me: WARNING: SASL authentication not supported!" >&2;}
22153	if test $ol_link_tls = no ; then
22154		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Strong authentication not supported!" >&5
22155$as_echo "$as_me: WARNING: Strong authentication not supported!" >&2;}
22156	fi
22157fi
22158
22159if test $cross_compiling != yes && test "$ac_cv_mingw32" != yes ; then
22160	dev=no
22161	if test -r /dev/urandom ; then
22162		dev="/dev/urandom";
22163	elif test -r /idev/urandom ; then
22164		dev="/idev/urandom";
22165	elif test -r /dev/srandom ; then
22166		dev="/dev/srandom";
22167	elif test -r /dev/random ; then
22168		dev="/dev/random";
22169	elif test -r /idev/random ; then
22170		dev="/idev/random";
22171	fi
22172
22173	if test $dev != no ; then
22174
22175cat >>confdefs.h <<_ACEOF
22176#define URANDOM_DEVICE "$dev"
22177_ACEOF
22178
22179	fi
22180fi
22181
22182ol_link_fetch=no
22183if test $ol_with_fetch != no ; then
22184	ol_LIBS=$LIBS
22185LIBS="-lfetch -lcom_err $LIBS"
22186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking fetch(3) library" >&5
22187$as_echo_n "checking fetch(3) library... " >&6; }
22188if test "${ol_cv_lib_fetch+set}" = set; then :
22189  $as_echo_n "(cached) " >&6
22190else
22191
22192	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22193/* end confdefs.h.  */
22194
22195#ifdef HAVE_SYS_PARAM_H
22196#include <sys/param.h>
22197#endif
22198#include <stdio.h>
22199#include <fetch.h>
22200int
22201main ()
22202{
22203struct url *u = fetchParseURL("file:///");
22204  ;
22205  return 0;
22206}
22207_ACEOF
22208if ac_fn_c_try_link "$LINENO"; then :
22209  ol_cv_lib_fetch=yes
22210else
22211  ol_cv_lib_fetch=no
22212fi
22213rm -f core conftest.err conftest.$ac_objext \
22214    conftest$ac_exeext conftest.$ac_ext
22215fi
22216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_lib_fetch" >&5
22217$as_echo "$ol_cv_lib_fetch" >&6; }
22218LIBS=$ol_LIBS
22219if test $ol_cv_lib_fetch != no ; then
22220	ol_link_fetch="-lfetch -lcom_err"
22221
22222$as_echo "#define HAVE_FETCH 1" >>confdefs.h
22223
22224fi
22225
22226
22227	if test $ol_cv_lib_fetch != no ; then
22228		LIBS="$LIBS $ol_link_fetch"
22229		ol_link_fetch=freebsd
22230
22231	elif test $ol_with_fetch != auto ; then
22232		as_fn_error "no suitable API for --with-fetch=$ol_with_fetch" "$LINENO" 5
22233	fi
22234fi
22235
22236if test $ol_enable_crypt != no ; then
22237	save_LIBS="$LIBS"
22238	LIBS="$TLS_LIBS $LIBS"
22239
22240	ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
22241if test "x$ac_cv_func_crypt" = x""yes; then :
22242  have_crypt=yes
22243else
22244
22245		LIBS="$save_LIBS"
22246		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
22247$as_echo_n "checking for crypt in -lcrypt... " >&6; }
22248if test "${ac_cv_lib_crypt_crypt+set}" = set; then :
22249  $as_echo_n "(cached) " >&6
22250else
22251  ac_check_lib_save_LIBS=$LIBS
22252LIBS="-lcrypt  $LIBS"
22253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22254/* end confdefs.h.  */
22255
22256/* Override any GCC internal prototype to avoid an error.
22257   Use char because int might match the return type of a GCC
22258   builtin and then its argument prototype would still apply.  */
22259#ifdef __cplusplus
22260extern "C"
22261#endif
22262char crypt ();
22263int
22264main ()
22265{
22266return crypt ();
22267  ;
22268  return 0;
22269}
22270_ACEOF
22271if ac_fn_c_try_link "$LINENO"; then :
22272  ac_cv_lib_crypt_crypt=yes
22273else
22274  ac_cv_lib_crypt_crypt=no
22275fi
22276rm -f core conftest.err conftest.$ac_objext \
22277    conftest$ac_exeext conftest.$ac_ext
22278LIBS=$ac_check_lib_save_LIBS
22279fi
22280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
22281$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
22282if test "x$ac_cv_lib_crypt_crypt" = x""yes; then :
22283  LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
22284			have_crypt=yes
22285else
22286  have_crypt=no
22287fi
22288
22289fi
22290
22291
22292	LIBS="$save_LIBS"
22293
22294	if test $have_crypt = yes ; then
22295
22296$as_echo "#define HAVE_CRYPT 1" >>confdefs.h
22297
22298	else
22299		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find crypt" >&5
22300$as_echo "$as_me: WARNING: could not find crypt" >&2;}
22301		if test $ol_enable_crypt = yes ; then
22302			as_fn_error "could not find crypt, select appropriate options or disable" "$LINENO" 5
22303		fi
22304
22305		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling crypt support" >&5
22306$as_echo "$as_me: WARNING: disabling crypt support" >&2;}
22307		ol_enable_crypt=no
22308	fi
22309fi
22310
22311if test $ol_enable_proctitle != no ; then
22312	ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle"
22313if test "x$ac_cv_func_setproctitle" = x""yes; then :
22314  have_setproctitle=yes
22315else
22316
22317		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5
22318$as_echo_n "checking for setproctitle in -lutil... " >&6; }
22319if test "${ac_cv_lib_util_setproctitle+set}" = set; then :
22320  $as_echo_n "(cached) " >&6
22321else
22322  ac_check_lib_save_LIBS=$LIBS
22323LIBS="-lutil  $LIBS"
22324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22325/* end confdefs.h.  */
22326
22327/* Override any GCC internal prototype to avoid an error.
22328   Use char because int might match the return type of a GCC
22329   builtin and then its argument prototype would still apply.  */
22330#ifdef __cplusplus
22331extern "C"
22332#endif
22333char setproctitle ();
22334int
22335main ()
22336{
22337return setproctitle ();
22338  ;
22339  return 0;
22340}
22341_ACEOF
22342if ac_fn_c_try_link "$LINENO"; then :
22343  ac_cv_lib_util_setproctitle=yes
22344else
22345  ac_cv_lib_util_setproctitle=no
22346fi
22347rm -f core conftest.err conftest.$ac_objext \
22348    conftest$ac_exeext conftest.$ac_ext
22349LIBS=$ac_check_lib_save_LIBS
22350fi
22351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_setproctitle" >&5
22352$as_echo "$ac_cv_lib_util_setproctitle" >&6; }
22353if test "x$ac_cv_lib_util_setproctitle" = x""yes; then :
22354  have_setproctitle=yes
22355			LUTIL_LIBS="$LUTIL_LIBS -lutil"
22356else
22357  have_setproctitle=no
22358			case " $LIBOBJS " in
22359  *" setproctitle.$ac_objext "* ) ;;
22360  *) LIBOBJS="$LIBOBJS setproctitle.$ac_objext"
22361 ;;
22362esac
22363
22364			LIBSRCS="$LIBSRCS setproctitle.c"
22365fi
22366
22367fi
22368
22369
22370	if test $have_setproctitle = yes ; then
22371
22372$as_echo "#define HAVE_SETPROCTITLE 1" >>confdefs.h
22373
22374	fi
22375fi
22376
22377if test $ol_enable_slp != no ; then
22378	for ac_header in slp.h
22379do :
22380  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
22381ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
22382eval as_val=\$$as_ac_Header
22383   if test "x$as_val" = x""yes; then :
22384  cat >>confdefs.h <<_ACEOF
22385#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
22386_ACEOF
22387
22388fi
22389
22390done
22391
22392
22393	if test $ac_cv_header_slp_h = yes ; then
22394		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SLPOpen in -lslp" >&5
22395$as_echo_n "checking for SLPOpen in -lslp... " >&6; }
22396if test "${ac_cv_lib_slp_SLPOpen+set}" = set; then :
22397  $as_echo_n "(cached) " >&6
22398else
22399  ac_check_lib_save_LIBS=$LIBS
22400LIBS="-lslp  $LIBS"
22401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22402/* end confdefs.h.  */
22403
22404/* Override any GCC internal prototype to avoid an error.
22405   Use char because int might match the return type of a GCC
22406   builtin and then its argument prototype would still apply.  */
22407#ifdef __cplusplus
22408extern "C"
22409#endif
22410char SLPOpen ();
22411int
22412main ()
22413{
22414return SLPOpen ();
22415  ;
22416  return 0;
22417}
22418_ACEOF
22419if ac_fn_c_try_link "$LINENO"; then :
22420  ac_cv_lib_slp_SLPOpen=yes
22421else
22422  ac_cv_lib_slp_SLPOpen=no
22423fi
22424rm -f core conftest.err conftest.$ac_objext \
22425    conftest$ac_exeext conftest.$ac_ext
22426LIBS=$ac_check_lib_save_LIBS
22427fi
22428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_slp_SLPOpen" >&5
22429$as_echo "$ac_cv_lib_slp_SLPOpen" >&6; }
22430if test "x$ac_cv_lib_slp_SLPOpen" = x""yes; then :
22431  have_slp=yes
22432else
22433  have_slp=no
22434fi
22435
22436		if test $have_slp = yes ; then
22437
22438$as_echo "#define HAVE_SLP 1" >>confdefs.h
22439
22440			SLAPD_SLP_LIBS=-lslp
22441		fi
22442
22443	elif test $ol_enable_slp = yes ; then
22444		as_fn_error "SLP not found" "$LINENO" 5
22445	fi
22446fi
22447
22448
22449ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
22450if test "x$ac_cv_type_mode_t" = x""yes; then :
22451
22452else
22453
22454cat >>confdefs.h <<_ACEOF
22455#define mode_t int
22456_ACEOF
22457
22458fi
22459
22460ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
22461if test "x$ac_cv_type_off_t" = x""yes; then :
22462
22463else
22464
22465cat >>confdefs.h <<_ACEOF
22466#define off_t long
22467_ACEOF
22468
22469fi
22470
22471ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
22472if test "x$ac_cv_type_pid_t" = x""yes; then :
22473
22474else
22475
22476cat >>confdefs.h <<_ACEOF
22477#define pid_t int
22478_ACEOF
22479
22480fi
22481
22482ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
22483if test "x$ac_cv_type_ssize_t" = x""yes; then :
22484
22485else
22486
22487cat >>confdefs.h <<_ACEOF
22488#define ssize_t signed int
22489_ACEOF
22490
22491fi
22492
22493ac_fn_c_check_type "$LINENO" "caddr_t" "ac_cv_type_caddr_t" "$ac_includes_default"
22494if test "x$ac_cv_type_caddr_t" = x""yes; then :
22495
22496else
22497
22498cat >>confdefs.h <<_ACEOF
22499#define caddr_t char *
22500_ACEOF
22501
22502fi
22503
22504ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
22505if test "x$ac_cv_type_size_t" = x""yes; then :
22506
22507else
22508
22509cat >>confdefs.h <<_ACEOF
22510#define size_t unsigned
22511_ACEOF
22512
22513fi
22514
22515
22516ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
22517if test "x$ac_cv_type_long_long" = x""yes; then :
22518
22519cat >>confdefs.h <<_ACEOF
22520#define HAVE_LONG_LONG 1
22521_ACEOF
22522
22523
22524fi
22525
22526ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
22527if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
22528
22529cat >>confdefs.h <<_ACEOF
22530#define HAVE_PTRDIFF_T 1
22531_ACEOF
22532
22533
22534fi
22535
22536
22537
22538ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "$ac_includes_default
22539#ifdef HAVE_SYS_SOCKET_H
22540#include <sys/socket.h>
22541#endif
22542#ifdef HAVE_WINSOCK2
22543#include <ws2tcpip.h>
22544#endif
22545"
22546if test "x$ac_cv_type_socklen_t" = x""yes; then :
22547
22548fi
22549
22550
22551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the type of arg 3 to accept()" >&5
22552$as_echo_n "checking the type of arg 3 to accept()... " >&6; }
22553if test "${ol_cv_type_ber_socklen_t+set}" = set; then :
22554  $as_echo_n "(cached) " >&6
22555else
22556
22557	set socklen_t int unsigned "unsigned long" long size_t
22558	test "$ac_cv_type_socklen_t" = yes || shift
22559	ol_cv_type_ber_socklen_t=$1 guessing="guessing "
22560	for lentype in "$@" ; do for addrtype in "struct sockaddr" void ; do
22561		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22562/* end confdefs.h.  */
22563$ac_includes_default
22564#ifdef HAVE_SYS_SOCKET_H
22565#include <sys/socket.h>
22566#endif
22567extern int accept(int s, $addrtype *ap, $lentype *lp);
22568
22569int
22570main ()
22571{
22572
22573accept(0, (struct sockaddr *) 0, ($lentype *) 0);
22574
22575  ;
22576  return 0;
22577}
22578_ACEOF
22579if ac_fn_c_try_compile "$LINENO"; then :
22580  ol_cv_type_ber_socklen_t=$lentype guessing= ; break 2
22581fi
22582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22583	done ; done
22584fi
22585
22586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $guessing$ol_cv_type_ber_socklen_t *" >&5
22587$as_echo "$guessing$ol_cv_type_ber_socklen_t *" >&6; }
22588
22589cat >>confdefs.h <<_ACEOF
22590#define ber_socklen_t $ol_cv_type_ber_socklen_t
22591_ACEOF
22592
22593
22594if test "$ac_cv_type_socklen_t" != yes; then
22595
22596cat >>confdefs.h <<_ACEOF
22597#define socklen_t $ol_cv_type_ber_socklen_t
22598_ACEOF
22599
22600fi
22601
22602
22603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
22604$as_echo_n "checking return type of signal handlers... " >&6; }
22605if test "${ac_cv_type_signal+set}" = set; then :
22606  $as_echo_n "(cached) " >&6
22607else
22608  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22609/* end confdefs.h.  */
22610#include <sys/types.h>
22611#include <signal.h>
22612
22613int
22614main ()
22615{
22616return *(signal (0, 0)) (0) == 1;
22617  ;
22618  return 0;
22619}
22620_ACEOF
22621if ac_fn_c_try_compile "$LINENO"; then :
22622  ac_cv_type_signal=int
22623else
22624  ac_cv_type_signal=void
22625fi
22626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22627fi
22628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
22629$as_echo "$ac_cv_type_signal" >&6; }
22630
22631cat >>confdefs.h <<_ACEOF
22632#define RETSIGTYPE $ac_cv_type_signal
22633_ACEOF
22634
22635
22636
22637ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "$ac_includes_default
22638#include <signal.h>
22639
22640"
22641if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
22642
22643else
22644
22645cat >>confdefs.h <<_ACEOF
22646#define sig_atomic_t int
22647_ACEOF
22648
22649fi
22650
22651
22652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
22653$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
22654if test "${ac_cv_type_uid_t+set}" = set; then :
22655  $as_echo_n "(cached) " >&6
22656else
22657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22658/* end confdefs.h.  */
22659#include <sys/types.h>
22660
22661_ACEOF
22662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22663  $EGREP "uid_t" >/dev/null 2>&1; then :
22664  ac_cv_type_uid_t=yes
22665else
22666  ac_cv_type_uid_t=no
22667fi
22668rm -f conftest*
22669
22670fi
22671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
22672$as_echo "$ac_cv_type_uid_t" >&6; }
22673if test $ac_cv_type_uid_t = no; then
22674
22675$as_echo "#define uid_t int" >>confdefs.h
22676
22677
22678$as_echo "#define gid_t int" >>confdefs.h
22679
22680fi
22681
22682
22683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
22684$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
22685if test "${ac_cv_header_time+set}" = set; then :
22686  $as_echo_n "(cached) " >&6
22687else
22688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22689/* end confdefs.h.  */
22690#include <sys/types.h>
22691#include <sys/time.h>
22692#include <time.h>
22693
22694int
22695main ()
22696{
22697if ((struct tm *) 0)
22698return 0;
22699  ;
22700  return 0;
22701}
22702_ACEOF
22703if ac_fn_c_try_compile "$LINENO"; then :
22704  ac_cv_header_time=yes
22705else
22706  ac_cv_header_time=no
22707fi
22708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22709fi
22710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
22711$as_echo "$ac_cv_header_time" >&6; }
22712if test $ac_cv_header_time = yes; then
22713
22714$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
22715
22716fi
22717
22718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
22719$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
22720if test "${ac_cv_struct_tm+set}" = set; then :
22721  $as_echo_n "(cached) " >&6
22722else
22723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22724/* end confdefs.h.  */
22725#include <sys/types.h>
22726#include <time.h>
22727
22728int
22729main ()
22730{
22731struct tm tm;
22732				     int *p = &tm.tm_sec;
22733				     return !p;
22734  ;
22735  return 0;
22736}
22737_ACEOF
22738if ac_fn_c_try_compile "$LINENO"; then :
22739  ac_cv_struct_tm=time.h
22740else
22741  ac_cv_struct_tm=sys/time.h
22742fi
22743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22744fi
22745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
22746$as_echo "$ac_cv_struct_tm" >&6; }
22747if test $ac_cv_struct_tm = sys/time.h; then
22748
22749$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
22750
22751fi
22752
22753ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
22754if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then :
22755
22756cat >>confdefs.h <<_ACEOF
22757#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
22758_ACEOF
22759
22760
22761fi
22762
22763ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "$ac_includes_default
22764#include <pwd.h>
22765"
22766if test "x$ac_cv_member_struct_passwd_pw_gecos" = x""yes; then :
22767
22768cat >>confdefs.h <<_ACEOF
22769#define HAVE_STRUCT_PASSWD_PW_GECOS 1
22770_ACEOF
22771
22772
22773fi
22774
22775ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "$ac_includes_default
22776#include <pwd.h>
22777"
22778if test "x$ac_cv_member_struct_passwd_pw_passwd" = x""yes; then :
22779
22780cat >>confdefs.h <<_ACEOF
22781#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
22782_ACEOF
22783
22784
22785fi
22786
22787
22788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if toupper() requires islower()" >&5
22789$as_echo_n "checking if toupper() requires islower()... " >&6; }
22790if test "${ol_cv_c_upper_lower+set}" = set; then :
22791  $as_echo_n "(cached) " >&6
22792else
22793
22794	if test "$cross_compiling" = yes; then :
22795  ol_cv_c_upper_lower=safe
22796else
22797  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22798/* end confdefs.h.  */
22799
22800#include <ctype.h>
22801main()
22802{
22803	if ('C' == toupper('C'))
22804		exit(0);
22805	else
22806		exit(1);
22807}
22808_ACEOF
22809if ac_fn_c_try_run "$LINENO"; then :
22810  ol_cv_c_upper_lower=no
22811else
22812  ol_cv_c_upper_lower=yes
22813fi
22814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22815  conftest.$ac_objext conftest.beam conftest.$ac_ext
22816fi
22817
22818fi
22819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_upper_lower" >&5
22820$as_echo "$ol_cv_c_upper_lower" >&6; }
22821if test $ol_cv_c_upper_lower != no ; then
22822
22823$as_echo "#define C_UPPER_LOWER 1" >>confdefs.h
22824
22825fi
22826
22827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
22828$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
22829if test "${ac_cv_c_const+set}" = set; then :
22830  $as_echo_n "(cached) " >&6
22831else
22832  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22833/* end confdefs.h.  */
22834
22835int
22836main ()
22837{
22838/* FIXME: Include the comments suggested by Paul. */
22839#ifndef __cplusplus
22840  /* Ultrix mips cc rejects this.  */
22841  typedef int charset[2];
22842  const charset cs;
22843  /* SunOS 4.1.1 cc rejects this.  */
22844  char const *const *pcpcc;
22845  char **ppc;
22846  /* NEC SVR4.0.2 mips cc rejects this.  */
22847  struct point {int x, y;};
22848  static struct point const zero = {0,0};
22849  /* AIX XL C 1.02.0.0 rejects this.
22850     It does not let you subtract one const X* pointer from another in
22851     an arm of an if-expression whose if-part is not a constant
22852     expression */
22853  const char *g = "string";
22854  pcpcc = &g + (g ? g-g : 0);
22855  /* HPUX 7.0 cc rejects these. */
22856  ++pcpcc;
22857  ppc = (char**) pcpcc;
22858  pcpcc = (char const *const *) ppc;
22859  { /* SCO 3.2v4 cc rejects this.  */
22860    char *t;
22861    char const *s = 0 ? (char *) 0 : (char const *) 0;
22862
22863    *t++ = 0;
22864    if (s) return 0;
22865  }
22866  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22867    int x[] = {25, 17};
22868    const int *foo = &x[0];
22869    ++foo;
22870  }
22871  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22872    typedef const int *iptr;
22873    iptr p = 0;
22874    ++p;
22875  }
22876  { /* AIX XL C 1.02.0.0 rejects this saying
22877       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22878    struct s { int j; const int *ap[3]; };
22879    struct s *b; b->j = 5;
22880  }
22881  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22882    const int foo = 10;
22883    if (!foo) return 0;
22884  }
22885  return !cs[0] && !zero.x;
22886#endif
22887
22888  ;
22889  return 0;
22890}
22891_ACEOF
22892if ac_fn_c_try_compile "$LINENO"; then :
22893  ac_cv_c_const=yes
22894else
22895  ac_cv_c_const=no
22896fi
22897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22898fi
22899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
22900$as_echo "$ac_cv_c_const" >&6; }
22901if test $ac_cv_c_const = no; then
22902
22903$as_echo "#define const /**/" >>confdefs.h
22904
22905fi
22906
22907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler understands volatile" >&5
22908$as_echo_n "checking if compiler understands volatile... " >&6; }
22909if test "${ol_cv_c_volatile+set}" = set; then :
22910  $as_echo_n "(cached) " >&6
22911else
22912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22913/* end confdefs.h.  */
22914int x, y, z;
22915int
22916main ()
22917{
22918volatile int a; int * volatile b = x ? &y : &z;
22919      /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22920      *b = 0;
22921  ;
22922  return 0;
22923}
22924_ACEOF
22925if ac_fn_c_try_compile "$LINENO"; then :
22926  ol_cv_c_volatile=yes
22927else
22928  ol_cv_c_volatile=no
22929fi
22930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22931fi
22932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_c_volatile" >&5
22933$as_echo "$ol_cv_c_volatile" >&6; }
22934  if test $ol_cv_c_volatile = yes; then
22935    :
22936  else
22937
22938$as_echo "#define volatile /**/" >>confdefs.h
22939
22940  fi
22941
22942
22943if test $cross_compiling = yes ; then
22944	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Crossing compiling... all bets are off!" >&5
22945$as_echo "$as_me: WARNING: Crossing compiling... all bets are off!" >&2;}
22946
22947$as_echo "#define CROSS_COMPILING 1" >>confdefs.h
22948
22949else
22950	 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
22951$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
22952if test "${ac_cv_c_bigendian+set}" = set; then :
22953  $as_echo_n "(cached) " >&6
22954else
22955  ac_cv_c_bigendian=unknown
22956    # See if we're dealing with a universal compiler.
22957    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22958/* end confdefs.h.  */
22959#ifndef __APPLE_CC__
22960	       not a universal capable compiler
22961	     #endif
22962	     typedef int dummy;
22963
22964_ACEOF
22965if ac_fn_c_try_compile "$LINENO"; then :
22966
22967	# Check for potential -arch flags.  It is not universal unless
22968	# there are at least two -arch flags with different values.
22969	ac_arch=
22970	ac_prev=
22971	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
22972	 if test -n "$ac_prev"; then
22973	   case $ac_word in
22974	     i?86 | x86_64 | ppc | ppc64)
22975	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
22976		 ac_arch=$ac_word
22977	       else
22978		 ac_cv_c_bigendian=universal
22979		 break
22980	       fi
22981	       ;;
22982	   esac
22983	   ac_prev=
22984	 elif test "x$ac_word" = "x-arch"; then
22985	   ac_prev=arch
22986	 fi
22987       done
22988fi
22989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22990    if test $ac_cv_c_bigendian = unknown; then
22991      # See if sys/param.h defines the BYTE_ORDER macro.
22992      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22993/* end confdefs.h.  */
22994#include <sys/types.h>
22995	     #include <sys/param.h>
22996
22997int
22998main ()
22999{
23000#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23001		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23002		     && LITTLE_ENDIAN)
23003	      bogus endian macros
23004	     #endif
23005
23006  ;
23007  return 0;
23008}
23009_ACEOF
23010if ac_fn_c_try_compile "$LINENO"; then :
23011  # It does; now see whether it defined to BIG_ENDIAN or not.
23012	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23013/* end confdefs.h.  */
23014#include <sys/types.h>
23015		#include <sys/param.h>
23016
23017int
23018main ()
23019{
23020#if BYTE_ORDER != BIG_ENDIAN
23021		 not big endian
23022		#endif
23023
23024  ;
23025  return 0;
23026}
23027_ACEOF
23028if ac_fn_c_try_compile "$LINENO"; then :
23029  ac_cv_c_bigendian=yes
23030else
23031  ac_cv_c_bigendian=no
23032fi
23033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23034fi
23035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23036    fi
23037    if test $ac_cv_c_bigendian = unknown; then
23038      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23039      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23040/* end confdefs.h.  */
23041#include <limits.h>
23042
23043int
23044main ()
23045{
23046#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23047	      bogus endian macros
23048	     #endif
23049
23050  ;
23051  return 0;
23052}
23053_ACEOF
23054if ac_fn_c_try_compile "$LINENO"; then :
23055  # It does; now see whether it defined to _BIG_ENDIAN or not.
23056	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23057/* end confdefs.h.  */
23058#include <limits.h>
23059
23060int
23061main ()
23062{
23063#ifndef _BIG_ENDIAN
23064		 not big endian
23065		#endif
23066
23067  ;
23068  return 0;
23069}
23070_ACEOF
23071if ac_fn_c_try_compile "$LINENO"; then :
23072  ac_cv_c_bigendian=yes
23073else
23074  ac_cv_c_bigendian=no
23075fi
23076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23077fi
23078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23079    fi
23080    if test $ac_cv_c_bigendian = unknown; then
23081      # Compile a test program.
23082      if test "$cross_compiling" = yes; then :
23083  # Try to guess by grepping values from an object file.
23084	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23085/* end confdefs.h.  */
23086short int ascii_mm[] =
23087		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23088		short int ascii_ii[] =
23089		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23090		int use_ascii (int i) {
23091		  return ascii_mm[i] + ascii_ii[i];
23092		}
23093		short int ebcdic_ii[] =
23094		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23095		short int ebcdic_mm[] =
23096		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23097		int use_ebcdic (int i) {
23098		  return ebcdic_mm[i] + ebcdic_ii[i];
23099		}
23100		extern int foo;
23101
23102int
23103main ()
23104{
23105return use_ascii (foo) == use_ebcdic (foo);
23106  ;
23107  return 0;
23108}
23109_ACEOF
23110if ac_fn_c_try_compile "$LINENO"; then :
23111  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23112	      ac_cv_c_bigendian=yes
23113	    fi
23114	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23115	      if test "$ac_cv_c_bigendian" = unknown; then
23116		ac_cv_c_bigendian=no
23117	      else
23118		# finding both strings is unlikely to happen, but who knows?
23119		ac_cv_c_bigendian=unknown
23120	      fi
23121	    fi
23122fi
23123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23124else
23125  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23126/* end confdefs.h.  */
23127$ac_includes_default
23128int
23129main ()
23130{
23131
23132	     /* Are we little or big endian?  From Harbison&Steele.  */
23133	     union
23134	     {
23135	       long int l;
23136	       char c[sizeof (long int)];
23137	     } u;
23138	     u.l = 1;
23139	     return u.c[sizeof (long int) - 1] == 1;
23140
23141  ;
23142  return 0;
23143}
23144_ACEOF
23145if ac_fn_c_try_run "$LINENO"; then :
23146  ac_cv_c_bigendian=no
23147else
23148  ac_cv_c_bigendian=yes
23149fi
23150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23151  conftest.$ac_objext conftest.beam conftest.$ac_ext
23152fi
23153
23154    fi
23155fi
23156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
23157$as_echo "$ac_cv_c_bigendian" >&6; }
23158 case $ac_cv_c_bigendian in #(
23159   yes)
23160     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
23161;; #(
23162   no)
23163      ;; #(
23164   universal)
23165
23166$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
23167
23168     ;; #(
23169   *)
23170     as_fn_error "unknown endianness
23171 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
23172 esac
23173
23174fi
23175
23176# The cast to long int works around a bug in the HP C Compiler
23177# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23178# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23179# This bug is HP SR number 8606223364.
23180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23181$as_echo_n "checking size of short... " >&6; }
23182if test "${ac_cv_sizeof_short+set}" = set; then :
23183  $as_echo_n "(cached) " >&6
23184else
23185  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23186
23187else
23188  if test "$ac_cv_type_short" = yes; then
23189     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23191{ as_fn_set_status 77
23192as_fn_error "cannot compute sizeof (short)
23193See \`config.log' for more details." "$LINENO" 5; }; }
23194   else
23195     ac_cv_sizeof_short=0
23196   fi
23197fi
23198
23199fi
23200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23201$as_echo "$ac_cv_sizeof_short" >&6; }
23202
23203
23204
23205cat >>confdefs.h <<_ACEOF
23206#define SIZEOF_SHORT $ac_cv_sizeof_short
23207_ACEOF
23208
23209
23210# The cast to long int works around a bug in the HP C Compiler
23211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23213# This bug is HP SR number 8606223364.
23214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23215$as_echo_n "checking size of int... " >&6; }
23216if test "${ac_cv_sizeof_int+set}" = set; then :
23217  $as_echo_n "(cached) " >&6
23218else
23219  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23220
23221else
23222  if test "$ac_cv_type_int" = yes; then
23223     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23225{ as_fn_set_status 77
23226as_fn_error "cannot compute sizeof (int)
23227See \`config.log' for more details." "$LINENO" 5; }; }
23228   else
23229     ac_cv_sizeof_int=0
23230   fi
23231fi
23232
23233fi
23234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23235$as_echo "$ac_cv_sizeof_int" >&6; }
23236
23237
23238
23239cat >>confdefs.h <<_ACEOF
23240#define SIZEOF_INT $ac_cv_sizeof_int
23241_ACEOF
23242
23243
23244# The cast to long int works around a bug in the HP C Compiler
23245# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23246# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23247# This bug is HP SR number 8606223364.
23248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23249$as_echo_n "checking size of long... " >&6; }
23250if test "${ac_cv_sizeof_long+set}" = set; then :
23251  $as_echo_n "(cached) " >&6
23252else
23253  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23254
23255else
23256  if test "$ac_cv_type_long" = yes; then
23257     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23258$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23259{ as_fn_set_status 77
23260as_fn_error "cannot compute sizeof (long)
23261See \`config.log' for more details." "$LINENO" 5; }; }
23262   else
23263     ac_cv_sizeof_long=0
23264   fi
23265fi
23266
23267fi
23268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23269$as_echo "$ac_cv_sizeof_long" >&6; }
23270
23271
23272
23273cat >>confdefs.h <<_ACEOF
23274#define SIZEOF_LONG $ac_cv_sizeof_long
23275_ACEOF
23276
23277
23278# The cast to long int works around a bug in the HP C Compiler
23279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23281# This bug is HP SR number 8606223364.
23282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
23283$as_echo_n "checking size of long long... " >&6; }
23284if test "${ac_cv_sizeof_long_long+set}" = set; then :
23285  $as_echo_n "(cached) " >&6
23286else
23287  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
23288
23289else
23290  if test "$ac_cv_type_long_long" = yes; then
23291     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23293{ as_fn_set_status 77
23294as_fn_error "cannot compute sizeof (long long)
23295See \`config.log' for more details." "$LINENO" 5; }; }
23296   else
23297     ac_cv_sizeof_long_long=0
23298   fi
23299fi
23300
23301fi
23302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
23303$as_echo "$ac_cv_sizeof_long_long" >&6; }
23304
23305
23306
23307cat >>confdefs.h <<_ACEOF
23308#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
23309_ACEOF
23310
23311
23312# The cast to long int works around a bug in the HP C Compiler
23313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23315# This bug is HP SR number 8606223364.
23316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
23317$as_echo_n "checking size of wchar_t... " >&6; }
23318if test "${ac_cv_sizeof_wchar_t+set}" = set; then :
23319  $as_echo_n "(cached) " >&6
23320else
23321  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t"        "$ac_includes_default"; then :
23322
23323else
23324  if test "$ac_cv_type_wchar_t" = yes; then
23325     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23327{ as_fn_set_status 77
23328as_fn_error "cannot compute sizeof (wchar_t)
23329See \`config.log' for more details." "$LINENO" 5; }; }
23330   else
23331     ac_cv_sizeof_wchar_t=0
23332   fi
23333fi
23334
23335fi
23336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
23337$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
23338
23339
23340
23341cat >>confdefs.h <<_ACEOF
23342#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
23343_ACEOF
23344
23345
23346
23347if test "$ac_cv_sizeof_int" -lt 4 ; then
23348	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&5
23349$as_echo "$as_me: WARNING: OpenLDAP requires 'int' to be 32 bits or greater." >&2;}
23350
23351
23352$as_echo "#define LBER_INT_T long" >>confdefs.h
23353
23354else
23355
23356$as_echo "#define LBER_INT_T int" >>confdefs.h
23357
23358fi
23359
23360
23361$as_echo "#define LBER_LEN_T long" >>confdefs.h
23362
23363
23364$as_echo "#define LBER_SOCKET_T int" >>confdefs.h
23365
23366
23367$as_echo "#define LBER_TAG_T long" >>confdefs.h
23368
23369
23370if test $ol_with_mp = longlong || test $ol_with_mp = auto ; then
23371	if test $ac_cv_sizeof_long_long -gt 4 ; then
23372		ol_with_mp=longlong
23373
23374$as_echo "#define USE_MP_LONG_LONG 1" >>confdefs.h
23375
23376	elif test $ol_with_mp = longlong ; then
23377		as_fn_error "long long unusable for multiple precision" "$LINENO" 5
23378	fi
23379fi
23380if test $ol_with_mp = long || test $ol_with_mp = auto ; then
23381	if test $ac_cv_sizeof_long -gt 4 ; then
23382		ol_with_mp=long
23383
23384$as_echo "#define USE_MP_LONG 1" >>confdefs.h
23385
23386	elif test $ol_with_mp = long ; then
23387		as_fn_error "long unusable for multiple precision" "$LINENO" 5
23388	fi
23389fi
23390if test $ol_with_mp = bignum || test $ol_with_mp = auto ; then
23391	for ac_header in openssl/bn.h
23392do :
23393  ac_fn_c_check_header_mongrel "$LINENO" "openssl/bn.h" "ac_cv_header_openssl_bn_h" "$ac_includes_default"
23394if test "x$ac_cv_header_openssl_bn_h" = x""yes; then :
23395  cat >>confdefs.h <<_ACEOF
23396#define HAVE_OPENSSL_BN_H 1
23397_ACEOF
23398
23399fi
23400
23401done
23402
23403	for ac_header in openssl/crypto.h
23404do :
23405  ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
23406if test "x$ac_cv_header_openssl_crypto_h" = x""yes; then :
23407  cat >>confdefs.h <<_ACEOF
23408#define HAVE_OPENSSL_CRYPTO_H 1
23409_ACEOF
23410
23411fi
23412
23413done
23414
23415	if test "$ac_cv_header_openssl_bn_h" = "yes" &&
23416		test "$ac_cv_header_openssl_crypto_h" = "yes" &&
23417		test "$ol_with_tls" = "found" ; then
23418		ol_with_mp=bignum
23419
23420$as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h
23421
23422	elif test $ol_with_mp = bignum ; then
23423		as_fn_error "bignum not available" "$LINENO" 5
23424	fi
23425fi
23426if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
23427	for ac_header in gmp.h
23428do :
23429  ac_fn_c_check_header_mongrel "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default"
23430if test "x$ac_cv_header_gmp_h" = x""yes; then :
23431  cat >>confdefs.h <<_ACEOF
23432#define HAVE_GMP_H 1
23433_ACEOF
23434
23435fi
23436
23437done
23438
23439	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __gmpz_add_ui in -lgmp" >&5
23440$as_echo_n "checking for __gmpz_add_ui in -lgmp... " >&6; }
23441if test "${ac_cv_lib_gmp___gmpz_add_ui+set}" = set; then :
23442  $as_echo_n "(cached) " >&6
23443else
23444  ac_check_lib_save_LIBS=$LIBS
23445LIBS="-lgmp  $LIBS"
23446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23447/* end confdefs.h.  */
23448
23449/* Override any GCC internal prototype to avoid an error.
23450   Use char because int might match the return type of a GCC
23451   builtin and then its argument prototype would still apply.  */
23452#ifdef __cplusplus
23453extern "C"
23454#endif
23455char __gmpz_add_ui ();
23456int
23457main ()
23458{
23459return __gmpz_add_ui ();
23460  ;
23461  return 0;
23462}
23463_ACEOF
23464if ac_fn_c_try_link "$LINENO"; then :
23465  ac_cv_lib_gmp___gmpz_add_ui=yes
23466else
23467  ac_cv_lib_gmp___gmpz_add_ui=no
23468fi
23469rm -f core conftest.err conftest.$ac_objext \
23470    conftest$ac_exeext conftest.$ac_ext
23471LIBS=$ac_check_lib_save_LIBS
23472fi
23473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gmp___gmpz_add_ui" >&5
23474$as_echo "$ac_cv_lib_gmp___gmpz_add_ui" >&6; }
23475if test "x$ac_cv_lib_gmp___gmpz_add_ui" = x""yes; then :
23476  cat >>confdefs.h <<_ACEOF
23477#define HAVE_LIBGMP 1
23478_ACEOF
23479
23480  LIBS="-lgmp $LIBS"
23481
23482fi
23483
23484	if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
23485
23486$as_echo "#define USE_MP_GMP 1" >>confdefs.h
23487
23488		ol_with_mp=gmp
23489	elif test $ol_with_mp = gmp ; then
23490		as_fn_error "gmp not available" "$LINENO" 5
23491	fi
23492fi
23493if test $ol_with_mp = auto ; then
23494	ol_with_mp=no
23495fi
23496
23497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5
23498$as_echo_n "checking for working memcmp... " >&6; }
23499if test "${ac_cv_func_memcmp_working+set}" = set; then :
23500  $as_echo_n "(cached) " >&6
23501else
23502  if test "$cross_compiling" = yes; then :
23503  ac_cv_func_memcmp_working=no
23504else
23505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23506/* end confdefs.h.  */
23507$ac_includes_default
23508int
23509main ()
23510{
23511
23512  /* Some versions of memcmp are not 8-bit clean.  */
23513  char c0 = '\100', c1 = '\200', c2 = '\201';
23514  if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0)
23515    return 1;
23516
23517  /* The Next x86 OpenStep bug shows up only when comparing 16 bytes
23518     or more and with at least one buffer not starting on a 4-byte boundary.
23519     William Lewis provided this test program.   */
23520  {
23521    char foo[21];
23522    char bar[21];
23523    int i;
23524    for (i = 0; i < 4; i++)
23525      {
23526	char *a = foo + i;
23527	char *b = bar + i;
23528	strcpy (a, "--------01111111");
23529	strcpy (b, "--------10000000");
23530	if (memcmp (a, b, 16) >= 0)
23531	  return 1;
23532      }
23533    return 0;
23534  }
23535
23536  ;
23537  return 0;
23538}
23539_ACEOF
23540if ac_fn_c_try_run "$LINENO"; then :
23541  ac_cv_func_memcmp_working=yes
23542else
23543  ac_cv_func_memcmp_working=no
23544fi
23545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23546  conftest.$ac_objext conftest.beam conftest.$ac_ext
23547fi
23548
23549fi
23550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5
23551$as_echo "$ac_cv_func_memcmp_working" >&6; }
23552test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in
23553  *" memcmp.$ac_objext "* ) ;;
23554  *) LIBOBJS="$LIBOBJS memcmp.$ac_objext"
23555 ;;
23556esac
23557
23558
23559
23560if test $ac_cv_func_memcmp_working = no ; then
23561
23562$as_echo "#define NEED_MEMCMP_REPLACEMENT 1" >>confdefs.h
23563
23564fi
23565
23566for ac_func in strftime
23567do :
23568  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
23569if test "x$ac_cv_func_strftime" = x""yes; then :
23570  cat >>confdefs.h <<_ACEOF
23571#define HAVE_STRFTIME 1
23572_ACEOF
23573
23574else
23575  # strftime is in -lintl on SCO UNIX.
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
23577$as_echo_n "checking for strftime in -lintl... " >&6; }
23578if test "${ac_cv_lib_intl_strftime+set}" = set; then :
23579  $as_echo_n "(cached) " >&6
23580else
23581  ac_check_lib_save_LIBS=$LIBS
23582LIBS="-lintl  $LIBS"
23583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23584/* end confdefs.h.  */
23585
23586/* Override any GCC internal prototype to avoid an error.
23587   Use char because int might match the return type of a GCC
23588   builtin and then its argument prototype would still apply.  */
23589#ifdef __cplusplus
23590extern "C"
23591#endif
23592char strftime ();
23593int
23594main ()
23595{
23596return strftime ();
23597  ;
23598  return 0;
23599}
23600_ACEOF
23601if ac_fn_c_try_link "$LINENO"; then :
23602  ac_cv_lib_intl_strftime=yes
23603else
23604  ac_cv_lib_intl_strftime=no
23605fi
23606rm -f core conftest.err conftest.$ac_objext \
23607    conftest$ac_exeext conftest.$ac_ext
23608LIBS=$ac_check_lib_save_LIBS
23609fi
23610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
23611$as_echo "$ac_cv_lib_intl_strftime" >&6; }
23612if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
23613  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
23614
23615LIBS="-lintl $LIBS"
23616fi
23617
23618fi
23619done
23620
23621
23622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton()" >&5
23623$as_echo_n "checking for inet_aton()... " >&6; }
23624if test "${ol_cv_func_inet_aton+set}" = set; then :
23625  $as_echo_n "(cached) " >&6
23626else
23627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23628/* end confdefs.h.  */
23629
23630#ifdef HAVE_SYS_TYPES_H
23631#	include <sys/types.h>
23632#endif
23633#ifdef HAVE_SYS_SOCKET_H
23634#	include <sys/socket.h>
23635#	ifdef HAVE_SYS_SELECT_H
23636#		include <sys/select.h>
23637#	endif
23638#	include <netinet/in.h>
23639#	ifdef HAVE_ARPA_INET_H
23640#		include <arpa/inet.h>
23641#	endif
23642#endif
23643
23644int
23645main ()
23646{
23647struct in_addr in;
23648int rc = inet_aton( "255.255.255.255", &in );
23649  ;
23650  return 0;
23651}
23652_ACEOF
23653if ac_fn_c_try_link "$LINENO"; then :
23654  ol_cv_func_inet_aton=yes
23655else
23656  ol_cv_func_inet_aton=no
23657fi
23658rm -f core conftest.err conftest.$ac_objext \
23659    conftest$ac_exeext conftest.$ac_ext
23660fi
23661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_inet_aton" >&5
23662$as_echo "$ol_cv_func_inet_aton" >&6; }
23663  if test $ol_cv_func_inet_aton != no; then
23664
23665$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
23666
23667  fi
23668
23669
23670ac_fn_c_check_func "$LINENO" "_spawnlp" "ac_cv_func__spawnlp"
23671if test "x$ac_cv_func__spawnlp" = x""yes; then :
23672
23673$as_echo "#define HAVE_SPAWNLP 1" >>confdefs.h
23674
23675fi
23676
23677
23678ac_fn_c_check_func "$LINENO" "_snprintf" "ac_cv_func__snprintf"
23679if test "x$ac_cv_func__snprintf" = x""yes; then :
23680  ac_cv_func_snprintf=yes
23681
23682$as_echo "#define snprintf _snprintf" >>confdefs.h
23683
23684
23685fi
23686
23687
23688for ac_func in vsnprintf _vsnprintf
23689do :
23690  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23691ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23692eval as_val=\$$as_ac_var
23693   if test "x$as_val" = x""yes; then :
23694  cat >>confdefs.h <<_ACEOF
23695#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23696_ACEOF
23697
23698fi
23699done
23700
23701
23702if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
23703	ac_cv_func_vsnprintf=yes
23704
23705$as_echo "#define vsnprintf _vsnprintf" >>confdefs.h
23706
23707fi
23708
23709for ac_func in vprintf
23710do :
23711  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23712if test "x$ac_cv_func_vprintf" = x""yes; then :
23713  cat >>confdefs.h <<_ACEOF
23714#define HAVE_VPRINTF 1
23715_ACEOF
23716
23717ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23718if test "x$ac_cv_func__doprnt" = x""yes; then :
23719
23720$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23721
23722fi
23723
23724fi
23725done
23726
23727
23728
23729if test $ac_cv_func_vprintf = yes ; then
23730		for ac_func in snprintf vsnprintf
23731do :
23732  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23733ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23734eval as_val=\$$as_ac_var
23735   if test "x$as_val" = x""yes; then :
23736  cat >>confdefs.h <<_ACEOF
23737#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23738_ACEOF
23739
23740fi
23741done
23742
23743fi
23744
23745for ac_func in \
23746	bcopy			\
23747	closesocket		\
23748	chroot			\
23749	endgrent		\
23750	endpwent		\
23751	fcntl			\
23752	flock			\
23753	fstat			\
23754	getdtablesize		\
23755	geteuid			\
23756	getgrgid		\
23757	gethostname		\
23758	getpassphrase		\
23759	getpwuid		\
23760	getpwnam		\
23761	getspnam		\
23762	gettimeofday		\
23763	initgroups		\
23764	inet_ntoa_b		\
23765	ioctl			\
23766	lockf			\
23767	memcpy			\
23768	memmove			\
23769	memrchr			\
23770	mkstemp			\
23771	mktemp			\
23772	pipe			\
23773	read			\
23774	recv			\
23775	recvfrom		\
23776	setpwfile		\
23777	setgid			\
23778	setegid			\
23779	setsid			\
23780	setuid			\
23781	seteuid			\
23782	signal			\
23783	strdup			\
23784	strpbrk			\
23785	strrchr			\
23786	strsep			\
23787	strstr			\
23788	strtol			\
23789	strtoul			\
23790	strtoq			\
23791	strtouq			\
23792	strtoll			\
23793	strtoull		\
23794	strspn			\
23795	sysconf			\
23796	waitpid			\
23797	wait4			\
23798	write			\
23799	send			\
23800	sendmsg			\
23801	sendto			\
23802
23803do :
23804  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23806eval as_val=\$$as_ac_var
23807   if test "x$as_val" = x""yes; then :
23808  cat >>confdefs.h <<_ACEOF
23809#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23810_ACEOF
23811
23812fi
23813done
23814
23815
23816for ac_func in getopt getpeereid
23817do :
23818  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23819ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23820eval as_val=\$$as_ac_var
23821   if test "x$as_val" = x""yes; then :
23822  cat >>confdefs.h <<_ACEOF
23823#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23824_ACEOF
23825
23826else
23827  case " $LIBOBJS " in
23828  *" $ac_func.$ac_objext "* ) ;;
23829  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
23830 ;;
23831esac
23832
23833fi
23834done
23835
23836
23837
23838if test "$ac_cv_func_getopt" != yes; then
23839	LIBSRCS="$LIBSRCS getopt.c"
23840fi
23841
23842if test "$ac_cv_func_getpeereid" != yes; then
23843	for ac_func in getpeerucred
23844do :
23845  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23846ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23847eval as_val=\$$as_ac_var
23848   if test "x$as_val" = x""yes; then :
23849  cat >>confdefs.h <<_ACEOF
23850#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23851_ACEOF
23852
23853fi
23854done
23855
23856	if test "$ac_cv_func_getpeerucred" != yes ; then
23857		ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrightslen" "ac_cv_member_struct_msghdr_msg_accrightslen" "$ac_includes_default
23858#ifdef HAVE_SYS_SOCKET_H
23859#include <sys/socket.h>
23860#endif
23861"
23862if test "x$ac_cv_member_struct_msghdr_msg_accrightslen" = x""yes; then :
23863
23864cat >>confdefs.h <<_ACEOF
23865#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTSLEN 1
23866_ACEOF
23867
23868
23869fi
23870
23871		if test "$ac_cv_member_struct_msghdr_msg_accrightslen" != yes; then
23872			ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "$ac_includes_default
23873#ifdef HAVE_SYS_SOCKET_H
23874#include <sys/socket.h>
23875#endif
23876"
23877if test "x$ac_cv_member_struct_msghdr_msg_control" = x""yes; then :
23878
23879cat >>confdefs.h <<_ACEOF
23880#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
23881_ACEOF
23882
23883
23884fi
23885
23886		fi
23887		ac_fn_c_check_member "$LINENO" "struct stat" "st_fstype" "ac_cv_member_struct_stat_st_fstype" "$ac_includes_default"
23888if test "x$ac_cv_member_struct_stat_st_fstype" = x""yes; then :
23889
23890cat >>confdefs.h <<_ACEOF
23891#define HAVE_STRUCT_STAT_ST_FSTYPE 1
23892_ACEOF
23893
23894
23895fi
23896ac_fn_c_check_member "$LINENO" "struct stat" "st_vfstype" "ac_cv_member_struct_stat_st_vfstype" "$ac_includes_default"
23897if test "x$ac_cv_member_struct_stat_st_vfstype" = x""yes; then :
23898
23899cat >>confdefs.h <<_ACEOF
23900#define HAVE_STRUCT_STAT_ST_VFSTYPE 1
23901_ACEOF
23902
23903
23904fi
23905
23906		if test "$ac_cv_member_struct_stat_st_fstype" = yes; then
23907			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23908/* end confdefs.h.  */
23909struct stat st; char *ptr=st.st_fstype;
23910_ACEOF
23911if ac_fn_c_try_compile "$LINENO"; then :
23912
23913$as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_CHAR 1" >>confdefs.h
23914
23915else
23916
23917$as_echo "#define HAVE_STRUCT_STAT_ST_FSTYPE_INT 1" >>confdefs.h
23918
23919fi
23920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23921		fi
23922	fi
23923	LIBSRCS="$LIBSRCS getpeereid.c"
23924fi
23925
23926if test "$ac_cv_func_snprintf" != yes ||
23927   test "$ac_cv_func_vsnprintf" != yes; then
23928	if test "$ac_cv_func_snprintf" != yes; then
23929
23930$as_echo "#define snprintf ber_pvt_snprintf" >>confdefs.h
23931
23932	fi
23933	if test "$ac_cv_func_vsnprintf" != yes; then
23934
23935$as_echo "#define vsnprintf ber_pvt_vsnprintf" >>confdefs.h
23936
23937	fi
23938fi
23939
23940
23941if test "$ol_enable_slapi" != no ; then
23942			for ac_header in ltdl.h
23943do :
23944  ac_fn_c_check_header_mongrel "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default"
23945if test "x$ac_cv_header_ltdl_h" = x""yes; then :
23946  cat >>confdefs.h <<_ACEOF
23947#define HAVE_LTDL_H 1
23948_ACEOF
23949
23950fi
23951
23952done
23953
23954
23955	if test $ac_cv_header_ltdl_h != yes ; then
23956		as_fn_error "could not locate <ltdl.h>" "$LINENO" 5
23957	fi
23958	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlinit in -lltdl" >&5
23959$as_echo_n "checking for lt_dlinit in -lltdl... " >&6; }
23960if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then :
23961  $as_echo_n "(cached) " >&6
23962else
23963  ac_check_lib_save_LIBS=$LIBS
23964LIBS="-lltdl  $LIBS"
23965cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23966/* end confdefs.h.  */
23967
23968/* Override any GCC internal prototype to avoid an error.
23969   Use char because int might match the return type of a GCC
23970   builtin and then its argument prototype would still apply.  */
23971#ifdef __cplusplus
23972extern "C"
23973#endif
23974char lt_dlinit ();
23975int
23976main ()
23977{
23978return lt_dlinit ();
23979  ;
23980  return 0;
23981}
23982_ACEOF
23983if ac_fn_c_try_link "$LINENO"; then :
23984  ac_cv_lib_ltdl_lt_dlinit=yes
23985else
23986  ac_cv_lib_ltdl_lt_dlinit=no
23987fi
23988rm -f core conftest.err conftest.$ac_objext \
23989    conftest$ac_exeext conftest.$ac_ext
23990LIBS=$ac_check_lib_save_LIBS
23991fi
23992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlinit" >&5
23993$as_echo "$ac_cv_lib_ltdl_lt_dlinit" >&6; }
23994if test "x$ac_cv_lib_ltdl_lt_dlinit" = x""yes; then :
23995
23996		SLAPI_LIBS=-lltdl
23997		LIBSLAPI=slapi/libslapi.la
23998
23999$as_echo "#define HAVE_LIBLTDL 1" >>confdefs.h
24000
24001
24002else
24003  as_fn_error "could not locate libtool -lltdl" "$LINENO" 5
24004fi
24005
24006
24007
24008$as_echo "#define LDAP_SLAPI 1" >>confdefs.h
24009
24010fi
24011
24012if test "$ol_enable_debug" != no ; then
24013	if test "$ol_enable_debug" = traditional; then
24014
24015$as_echo "#define OLD_DEBUG 1" >>confdefs.h
24016
24017	fi
24018
24019$as_echo "#define LDAP_DEBUG 1" >>confdefs.h
24020
24021fi
24022if test "$ol_enable_syslog" = yes ; then
24023
24024$as_echo "#define LDAP_SYSLOG 1" >>confdefs.h
24025
24026fi
24027if test "$ol_enable_proctitle" != no ; then
24028
24029$as_echo "#define LDAP_PROCTITLE 1" >>confdefs.h
24030
24031fi
24032if test "$ol_enable_referrals" != no ; then
24033
24034$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION" >>confdefs.h
24035
24036fi
24037if test "$ol_enable_local" != no; then
24038
24039$as_echo "#define LDAP_PF_LOCAL 1" >>confdefs.h
24040
24041fi
24042if test "$ol_link_ipv6" != no; then
24043
24044$as_echo "#define LDAP_PF_INET6 1" >>confdefs.h
24045
24046fi
24047if test "$ol_enable_cleartext" != no ; then
24048
24049$as_echo "#define SLAPD_CLEARTEXT 1" >>confdefs.h
24050
24051fi
24052if test "$ol_enable_crypt" != no ; then
24053
24054$as_echo "#define SLAPD_CRYPT 1" >>confdefs.h
24055
24056fi
24057if test "$ol_link_spasswd" != no ; then
24058
24059$as_echo "#define SLAPD_SPASSWD 1" >>confdefs.h
24060
24061fi
24062if test "$ol_enable_rlookups" != no ; then
24063
24064$as_echo "#define SLAPD_RLOOKUPS 1" >>confdefs.h
24065
24066fi
24067if test "$ol_enable_aci" != no ; then
24068	if test $ol_enable_dynacl = no ; then
24069		ol_enable_dynacl=yes
24070		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ACIs need dynacl" >&5
24071$as_echo "$as_me: WARNING: ACIs need dynacl" >&2;}
24072	fi
24073	if test "$ol_enable_aci" = mod ; then
24074		MFLAG=SLAPD_MOD_DYNAMIC
24075				as_fn_error "ACI build as dynamic module not supported (yet)" "$LINENO" 5
24076	else
24077		MFLAG=SLAPD_MOD_STATIC
24078	fi
24079	WITH_ACI_ENABLED=$ol_enable_aci
24080
24081cat >>confdefs.h <<_ACEOF
24082#define SLAPD_ACI_ENABLED $MFLAG
24083_ACEOF
24084
24085else
24086	WITH_ACI_ENABLED=no
24087fi
24088if test "$ol_enable_dynacl" != no ; then
24089
24090$as_echo "#define SLAP_DYNACL 1" >>confdefs.h
24091
24092fi
24093
24094if test "$ol_link_modules" != no ; then
24095
24096$as_echo "#define SLAPD_MODULES 1" >>confdefs.h
24097
24098	BUILD_SLAPD=yes
24099	SLAPD_MODULES_LDFLAGS="-dlopen self"
24100fi
24101
24102
24103$as_echo "#define SLAPD_MOD_STATIC 1" >>confdefs.h
24104
24105
24106$as_echo "#define SLAPD_MOD_DYNAMIC 2" >>confdefs.h
24107
24108
24109if test "$ol_enable_monitor" != no ; then
24110	BUILD_SLAPD=yes
24111	BUILD_MONITOR=$ol_enable_monitor
24112	if test "$ol_enable_monitor" = mod ; then
24113		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24114		MFLAG=SLAPD_MOD_DYNAMIC
24115	else
24116		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24117		MFLAG=SLAPD_MOD_STATIC
24118	fi
24119
24120cat >>confdefs.h <<_ACEOF
24121#define SLAPD_MONITOR $MFLAG
24122_ACEOF
24123
24124fi
24125
24126if test "$ol_enable_bdb" != no ; then
24127	BUILD_SLAPD=yes
24128	BUILD_BDB=$ol_enable_bdb
24129	if test "$ol_enable_bdb" = mod ; then
24130		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
24131		MFLAG=SLAPD_MOD_DYNAMIC
24132	else
24133		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
24134		MFLAG=SLAPD_MOD_STATIC
24135	fi
24136
24137cat >>confdefs.h <<_ACEOF
24138#define SLAPD_BDB $MFLAG
24139_ACEOF
24140
24141fi
24142
24143if test "$ol_enable_dnssrv" != no ; then
24144	BUILD_SLAPD=yes
24145	BUILD_DNSSRV=$ol_enable_dnssrv
24146	if test "$ol_enable_dnssrv" = mod ; then
24147		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
24148		MFLAG=SLAPD_MOD_DYNAMIC
24149	else
24150		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
24151		MFLAG=SLAPD_MOD_STATIC
24152	fi
24153
24154cat >>confdefs.h <<_ACEOF
24155#define SLAPD_DNSSRV $MFLAG
24156_ACEOF
24157
24158fi
24159
24160if test "$ol_enable_hdb" != no ; then
24161	BUILD_SLAPD=yes
24162	BUILD_HDB=$ol_enable_hdb
24163	if test "$ol_enable_hdb" = mod ; then
24164		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
24165		MFLAG=SLAPD_MOD_DYNAMIC
24166	else
24167		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
24168		MFLAG=SLAPD_MOD_STATIC
24169	fi
24170
24171cat >>confdefs.h <<_ACEOF
24172#define SLAPD_HDB $MFLAG
24173_ACEOF
24174
24175fi
24176
24177if test "$ol_enable_ldap" != no ; then
24178	BUILD_SLAPD=yes
24179	BUILD_LDAP=$ol_enable_ldap
24180	if test "$ol_enable_ldap" = mod ; then
24181		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24182		MFLAG=SLAPD_MOD_DYNAMIC
24183	else
24184		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24185		MFLAG=SLAPD_MOD_STATIC
24186	fi
24187
24188cat >>confdefs.h <<_ACEOF
24189#define SLAPD_LDAP $MFLAG
24190_ACEOF
24191
24192fi
24193
24194if test "$ol_enable_mdb" != no ; then
24195	BUILD_SLAPD=yes
24196	BUILD_MDB=$ol_enable_mdb
24197	if test "$ol_enable_mdb" = mod ; then
24198		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-mdb"
24199		MFLAG=SLAPD_MOD_DYNAMIC
24200	else
24201		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-mdb"
24202		MFLAG=SLAPD_MOD_STATIC
24203	fi
24204
24205cat >>confdefs.h <<_ACEOF
24206#define SLAPD_MDB $MFLAG
24207_ACEOF
24208
24209fi
24210
24211if test "$ol_enable_meta" != no ; then
24212	BUILD_SLAPD=yes
24213	BUILD_META=$ol_enable_meta
24214	BUILD_REWRITE=yes
24215	if test "$ol_enable_meta" = mod ; then
24216		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24217		MFLAG=SLAPD_MOD_DYNAMIC
24218	else
24219		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24220		MFLAG=SLAPD_MOD_STATIC
24221	fi
24222
24223cat >>confdefs.h <<_ACEOF
24224#define SLAPD_META $MFLAG
24225_ACEOF
24226
24227fi
24228
24229if test "$ol_enable_ndb" != no ; then
24230	BUILD_SLAPD=yes
24231	BUILD_NDB=$ol_enable_ndb
24232	if test "$ol_enable_ndb" = mod ; then
24233		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
24234		MFLAG=SLAPD_MOD_DYNAMIC
24235	else
24236		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
24237		MFLAG=SLAPD_MOD_STATIC
24238	fi
24239
24240cat >>confdefs.h <<_ACEOF
24241#define SLAPD_NDB $MFLAG
24242_ACEOF
24243
24244fi
24245
24246if test "$ol_enable_null" != no ; then
24247	BUILD_SLAPD=yes
24248	BUILD_NULL=$ol_enable_null
24249	if test "$ol_enable_null" = mod ; then
24250		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24251		MFLAG=SLAPD_MOD_DYNAMIC
24252	else
24253		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24254		MFLAG=SLAPD_MOD_STATIC
24255	fi
24256
24257cat >>confdefs.h <<_ACEOF
24258#define SLAPD_NULL $MFLAG
24259_ACEOF
24260
24261fi
24262
24263if test "$ol_enable_passwd" != no ; then
24264	BUILD_SLAPD=yes
24265	BUILD_PASSWD=$ol_enable_passwd
24266	if test "$ol_enable_passwd" = mod ; then
24267		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24268		MFLAG=SLAPD_MOD_DYNAMIC
24269	else
24270		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24271		MFLAG=SLAPD_MOD_STATIC
24272	fi
24273
24274cat >>confdefs.h <<_ACEOF
24275#define SLAPD_PASSWD $MFLAG
24276_ACEOF
24277
24278fi
24279
24280if test "$ol_link_perl" != no ; then
24281	BUILD_SLAPD=yes
24282	BUILD_PERL=$ol_enable_perl
24283	if test "$ol_enable_perl" = mod ; then
24284		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24285		MFLAG=SLAPD_MOD_DYNAMIC
24286	else
24287		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24288		MFLAG=SLAPD_MOD_STATIC
24289	fi
24290
24291cat >>confdefs.h <<_ACEOF
24292#define SLAPD_PERL $MFLAG
24293_ACEOF
24294
24295fi
24296
24297if test "$ol_enable_relay" != no ; then
24298	BUILD_SLAPD=yes
24299	BUILD_RELAY=$ol_enable_relay
24300	if test "$ol_enable_relay" = mod ; then
24301		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
24302		MFLAG=SLAPD_MOD_DYNAMIC
24303	else
24304		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
24305		MFLAG=SLAPD_MOD_STATIC
24306	fi
24307
24308cat >>confdefs.h <<_ACEOF
24309#define SLAPD_RELAY $MFLAG
24310_ACEOF
24311
24312fi
24313
24314if test "$ol_enable_shell" != no ; then
24315	if test "$ol_link_threads" != no ; then
24316		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Use of --without-threads is recommended with back-shell" >&5
24317$as_echo "$as_me: WARNING: Use of --without-threads is recommended with back-shell" >&2;}
24318	fi
24319	BUILD_SLAPD=yes
24320	BUILD_SHELL=$ol_enable_shell
24321	if test "$ol_enable_shell" = mod ; then
24322		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24323		MFLAG=SLAPD_MOD_DYNAMIC
24324	else
24325		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24326		MFLAG=SLAPD_MOD_STATIC
24327	fi
24328
24329cat >>confdefs.h <<_ACEOF
24330#define SLAPD_SHELL $MFLAG
24331_ACEOF
24332
24333fi
24334
24335if test "$ol_enable_sock" != no ; then
24336	BUILD_SLAPD=yes
24337	BUILD_SOCK=$ol_enable_sock
24338	if test "$ol_enable_sock" = mod ; then
24339		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sock"
24340		MFLAG=SLAPD_MOD_DYNAMIC
24341	else
24342		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sock"
24343		MFLAG=SLAPD_MOD_STATIC
24344	fi
24345
24346cat >>confdefs.h <<_ACEOF
24347#define SLAPD_SOCK $MFLAG
24348_ACEOF
24349
24350fi
24351
24352if test "$ol_link_sql" != no ; then
24353	BUILD_SLAPD=yes
24354	BUILD_SQL=$ol_enable_sql
24355	if test "$ol_enable_sql" = mod; then
24356		SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24357		MFLAG=SLAPD_MOD_DYNAMIC
24358	else
24359		SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24360		MFLAG=SLAPD_MOD_STATIC
24361	fi
24362
24363cat >>confdefs.h <<_ACEOF
24364#define SLAPD_SQL $MFLAG
24365_ACEOF
24366
24367fi
24368
24369if test "$ol_enable_accesslog" != no ; then
24370	BUILD_ACCESSLOG=$ol_enable_accesslog
24371	if test "$ol_enable_accesslog" = mod ; then
24372		MFLAG=SLAPD_MOD_DYNAMIC
24373		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS accesslog.la"
24374	else
24375		MFLAG=SLAPD_MOD_STATIC
24376		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS accesslog.o"
24377	fi
24378
24379cat >>confdefs.h <<_ACEOF
24380#define SLAPD_OVER_ACCESSLOG $MFLAG
24381_ACEOF
24382
24383fi
24384
24385if test "$ol_enable_auditlog" != no ; then
24386	BUILD_AUDITLOG=$ol_enable_auditlog
24387	if test "$ol_enable_auditlog" = mod ; then
24388		MFLAG=SLAPD_MOD_DYNAMIC
24389		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS auditlog.la"
24390	else
24391		MFLAG=SLAPD_MOD_STATIC
24392		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS auditlog.o"
24393	fi
24394
24395cat >>confdefs.h <<_ACEOF
24396#define SLAPD_OVER_AUDITLOG $MFLAG
24397_ACEOF
24398
24399fi
24400
24401if test "$ol_enable_collect" != no ; then
24402        BUILD_COLLECT=$ol_enable_collect
24403        if test "$ol_enable_collect" = mod ; then
24404                MFLAG=SLAPD_MOD_DYNAMIC
24405                SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
24406        else
24407                MFLAG=SLAPD_MOD_STATIC
24408                SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
24409        fi
24410
24411cat >>confdefs.h <<_ACEOF
24412#define SLAPD_OVER_COLLECT $MFLAG
24413_ACEOF
24414
24415fi
24416
24417if test "$ol_enable_constraint" != no ; then
24418	BUILD_CONSTRAINT=$ol_enable_constraint
24419	if test "$ol_enable_constraint" = mod ; then
24420		MFLAG=SLAPD_MOD_DYNAMIC
24421		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS constraint.la"
24422	else
24423		MFLAG=SLAPD_MOD_STATIC
24424		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS constraint.o"
24425	fi
24426
24427cat >>confdefs.h <<_ACEOF
24428#define SLAPD_OVER_CONSTRAINT $MFLAG
24429_ACEOF
24430
24431fi
24432
24433if test "$ol_enable_dds" != no ; then
24434	BUILD_DDS=$ol_enable_dds
24435	if test "$ol_enable_dds" = mod ; then
24436		MFLAG=SLAPD_MOD_DYNAMIC
24437		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dds.la"
24438	else
24439		MFLAG=SLAPD_MOD_STATIC
24440		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dds.o"
24441	fi
24442
24443cat >>confdefs.h <<_ACEOF
24444#define SLAPD_OVER_DDS $MFLAG
24445_ACEOF
24446
24447fi
24448
24449if test "$ol_enable_deref" != no ; then
24450	BUILD_DEREF=$ol_enable_deref
24451	if test "$ol_enable_deref" = mod ; then
24452		MFLAG=SLAPD_MOD_DYNAMIC
24453		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
24454	else
24455		MFLAG=SLAPD_MOD_STATIC
24456		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
24457	fi
24458
24459cat >>confdefs.h <<_ACEOF
24460#define SLAPD_OVER_DEREF $MFLAG
24461_ACEOF
24462
24463fi
24464
24465if test "$ol_enable_dyngroup" != no ; then
24466	BUILD_DYNGROUP=$ol_enable_dyngroup
24467	if test "$ol_enable_dyngroup" = mod ; then
24468		MFLAG=SLAPD_MOD_DYNAMIC
24469		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24470	else
24471		MFLAG=SLAPD_MOD_STATIC
24472		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dyngroup.o"
24473	fi
24474
24475cat >>confdefs.h <<_ACEOF
24476#define SLAPD_OVER_DYNGROUP $MFLAG
24477_ACEOF
24478
24479fi
24480
24481if test "$ol_enable_dynlist" != no ; then
24482	BUILD_DYNLIST=$ol_enable_dynlist
24483	if test "$ol_enable_dynlist" = mod ; then
24484		MFLAG=SLAPD_MOD_DYNAMIC
24485		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dynlist.la"
24486	else
24487		MFLAG=SLAPD_MOD_STATIC
24488		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS dynlist.o"
24489	fi
24490
24491cat >>confdefs.h <<_ACEOF
24492#define SLAPD_OVER_DYNLIST $MFLAG
24493_ACEOF
24494
24495fi
24496
24497if test "$ol_enable_memberof" != no ; then
24498	BUILD_MEMBEROF=$ol_enable_memberof
24499	if test "$ol_enable_memberof" = mod ; then
24500		MFLAG=SLAPD_MOD_DYNAMIC
24501		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS memberof.la"
24502	else
24503		MFLAG=SLAPD_MOD_STATIC
24504		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS memberof.o"
24505	fi
24506
24507cat >>confdefs.h <<_ACEOF
24508#define SLAPD_OVER_MEMBEROF $MFLAG
24509_ACEOF
24510
24511fi
24512
24513if test "$ol_enable_ppolicy" != no ; then
24514	BUILD_PPOLICY=$ol_enable_ppolicy
24515	if test "$ol_enable_ppolicy" = mod ; then
24516		MFLAG=SLAPD_MOD_DYNAMIC
24517		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24518	else
24519		MFLAG=SLAPD_MOD_STATIC
24520		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS ppolicy.o"
24521	fi
24522
24523cat >>confdefs.h <<_ACEOF
24524#define SLAPD_OVER_PPOLICY $MFLAG
24525_ACEOF
24526
24527fi
24528
24529if test "$ol_enable_proxycache" != no ; then
24530	BUILD_PROXYCACHE=$ol_enable_proxycache
24531	if test "$ol_enable_proxycache" = mod ; then
24532		MFLAG=SLAPD_MOD_DYNAMIC
24533		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24534	else
24535		MFLAG=SLAPD_MOD_STATIC
24536		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS pcache.o"
24537	fi
24538
24539cat >>confdefs.h <<_ACEOF
24540#define SLAPD_OVER_PROXYCACHE $MFLAG
24541_ACEOF
24542
24543fi
24544
24545if test "$ol_enable_refint" != no ; then
24546	BUILD_REFINT=$ol_enable_refint
24547	if test "$ol_enable_refint" = mod ; then
24548		MFLAG=SLAPD_MOD_DYNAMIC
24549		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24550	else
24551		MFLAG=SLAPD_MOD_STATIC
24552		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS refint.o"
24553	fi
24554
24555cat >>confdefs.h <<_ACEOF
24556#define SLAPD_OVER_REFINT $MFLAG
24557_ACEOF
24558
24559fi
24560
24561if test "$ol_enable_retcode" != no ; then
24562	BUILD_RETCODE=$ol_enable_retcode
24563	if test "$ol_enable_retcode" = mod ; then
24564		MFLAG=SLAPD_MOD_DYNAMIC
24565		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS retcode.la"
24566	else
24567		MFLAG=SLAPD_MOD_STATIC
24568		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS retcode.o"
24569	fi
24570
24571cat >>confdefs.h <<_ACEOF
24572#define SLAPD_OVER_RETCODE $MFLAG
24573_ACEOF
24574
24575fi
24576
24577if test "$ol_enable_rwm" != no ; then
24578	BUILD_REWRITE=yes
24579	BUILD_RWM=$ol_enable_rwm
24580	if test "$ol_enable_rwm" = mod ; then
24581		MFLAG=SLAPD_MOD_DYNAMIC
24582		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24583	else
24584		MFLAG=SLAPD_MOD_STATIC
24585		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS rwm_x.o"
24586	fi
24587
24588cat >>confdefs.h <<_ACEOF
24589#define SLAPD_OVER_RWM $MFLAG
24590_ACEOF
24591
24592fi
24593
24594if test "$ol_enable_seqmod" != no ; then
24595	BUILD_SEQMOD=$ol_enable_seqmod
24596	if test "$ol_enable_seqmod" = mod ; then
24597		MFLAG=SLAPD_MOD_DYNAMIC
24598		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS seqmod.la"
24599	else
24600		MFLAG=SLAPD_MOD_STATIC
24601		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS seqmod.o"
24602	fi
24603
24604cat >>confdefs.h <<_ACEOF
24605#define SLAPD_OVER_SEQMOD $MFLAG
24606_ACEOF
24607
24608fi
24609
24610if test "$ol_enable_sssvlv" != no ; then
24611	BUILD_SSSVLV=$ol_enable_sssvlv
24612	if test "$ol_enable_sssvlv" = mod ; then
24613		MFLAG=SLAPD_MOD_DYNAMIC
24614		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS sssvlv.la"
24615	else
24616		MFLAG=SLAPD_MOD_STATIC
24617		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS sssvlv.o"
24618	fi
24619
24620cat >>confdefs.h <<_ACEOF
24621#define SLAPD_OVER_SSSVLV $MFLAG
24622_ACEOF
24623
24624fi
24625
24626if test "$ol_enable_syncprov" != no ; then
24627	BUILD_SYNCPROV=$ol_enable_syncprov
24628	if test "$ol_enable_syncprov" = mod ; then
24629		MFLAG=SLAPD_MOD_DYNAMIC
24630		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS syncprov.la"
24631	else
24632		MFLAG=SLAPD_MOD_STATIC
24633		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS syncprov.o"
24634	fi
24635
24636cat >>confdefs.h <<_ACEOF
24637#define SLAPD_OVER_SYNCPROV $MFLAG
24638_ACEOF
24639
24640fi
24641
24642if test "$ol_enable_translucent" != no ; then
24643	BUILD_TRANSLUCENT=$ol_enable_translucent
24644	if test "$ol_enable_translucent" = mod ; then
24645		MFLAG=SLAPD_MOD_DYNAMIC
24646		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS translucent.la"
24647	else
24648		MFLAG=SLAPD_MOD_STATIC
24649		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS translucent.o"
24650	fi
24651
24652cat >>confdefs.h <<_ACEOF
24653#define SLAPD_OVER_TRANSLUCENT $MFLAG
24654_ACEOF
24655
24656fi
24657
24658if test "$ol_enable_unique" != no ; then
24659	BUILD_UNIQUE=$ol_enable_unique
24660	if test "$ol_enable_unique" = mod ; then
24661		MFLAG=SLAPD_MOD_DYNAMIC
24662		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24663	else
24664		MFLAG=SLAPD_MOD_STATIC
24665		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS unique.o"
24666	fi
24667
24668cat >>confdefs.h <<_ACEOF
24669#define SLAPD_OVER_UNIQUE $MFLAG
24670_ACEOF
24671
24672fi
24673
24674if test "$ol_enable_valsort" != no ; then
24675	BUILD_VALSORT=$ol_enable_valsort
24676	if test "$ol_enable_valsort" = mod ; then
24677		MFLAG=SLAPD_MOD_DYNAMIC
24678		SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS valsort.la"
24679	else
24680		MFLAG=SLAPD_MOD_STATIC
24681		SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS valsort.o"
24682	fi
24683
24684cat >>confdefs.h <<_ACEOF
24685#define SLAPD_OVER_VALSORT $MFLAG
24686_ACEOF
24687
24688fi
24689
24690if test "$ol_enable_rewrite" != no ; then
24691
24692$as_echo "#define ENABLE_REWRITE 1" >>confdefs.h
24693
24694	BUILD_REWRITE=yes
24695fi
24696
24697if test "$ol_enable_slapi" != no ; then
24698
24699$as_echo "#define ENABLE_SLAPI 1" >>confdefs.h
24700
24701	BUILD_SLAPI=yes
24702	SLAPD_SLAPI_DEPEND=libslapi.a
24703fi
24704
24705
24706
24707if test "$ac_cv_mingw32" = yes -o $ol_cv_msvc = yes ; then
24708	PLAT=NT
24709	SLAPD_MODULES_LDFLAGS=
24710else
24711	PLAT=UNIX
24712fi
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803# Check whether --with-xxinstall was given.
24804if test "${with_xxinstall+set}" = set; then :
24805  withval=$with_xxinstall;
24806fi
24807
24808
24809
24810ac_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"
24811
24812
24813ac_config_commands="$ac_config_commands default"
24814
24815
24816
24817test "x$prefix" = xNONE && prefix=$ac_default_prefix
24818# Let make expand exec_prefix.
24819test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24820
24821DEFS=-DHAVE_CONFIG_H
24822
24823ac_libobjs=
24824ac_ltlibobjs=
24825for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24826  # 1. Remove the extension, and $U if already installed.
24827  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24828  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
24829  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
24830  #    will be set to the directory where LIBOBJS objects are built.
24831  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24832  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
24833done
24834LIBOBJS=$ac_libobjs
24835
24836LTLIBOBJS=$ac_ltlibobjs
24837
24838
24839if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
24840  as_fn_error "conditional \"AMDEP\" was never defined.
24841Usually this means the macro was only invoked conditionally." "$LINENO" 5
24842fi
24843if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24844  as_fn_error "conditional \"am__fastdepCC\" was never defined.
24845Usually this means the macro was only invoked conditionally." "$LINENO" 5
24846fi
24847if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
24848  as_fn_error "conditional \"am__fastdepCC\" was never defined.
24849Usually this means the macro was only invoked conditionally." "$LINENO" 5
24850fi
24851
24852
24853: ${CONFIG_STATUS=./config.status}
24854ac_write_fail=0
24855ac_clean_files_save=$ac_clean_files
24856ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24857{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24858$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
24859as_write_fail=0
24860cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24861#! $SHELL
24862# Generated by $as_me.
24863# Run this file to recreate the current configuration.
24864# Compiler output produced by configure, useful for debugging
24865# configure, is in config.log if it exists.
24866
24867debug=false
24868ac_cs_recheck=false
24869ac_cs_silent=false
24870
24871SHELL=\${CONFIG_SHELL-$SHELL}
24872export SHELL
24873_ASEOF
24874cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24875## -------------------- ##
24876## M4sh Initialization. ##
24877## -------------------- ##
24878
24879# Be more Bourne compatible
24880DUALCASE=1; export DUALCASE # for MKS sh
24881if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24882  emulate sh
24883  NULLCMD=:
24884  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24885  # is contrary to our usage.  Disable this feature.
24886  alias -g '${1+"$@"}'='"$@"'
24887  setopt NO_GLOB_SUBST
24888else
24889  case `(set -o) 2>/dev/null` in #(
24890  *posix*) :
24891    set -o posix ;; #(
24892  *) :
24893     ;;
24894esac
24895fi
24896
24897
24898as_nl='
24899'
24900export as_nl
24901# Printing a long string crashes Solaris 7 /usr/bin/printf.
24902as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
24903as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
24904as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
24905# Prefer a ksh shell builtin over an external printf program on Solaris,
24906# but without wasting forks for bash or zsh.
24907if test -z "$BASH_VERSION$ZSH_VERSION" \
24908    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
24909  as_echo='print -r --'
24910  as_echo_n='print -rn --'
24911elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
24912  as_echo='printf %s\n'
24913  as_echo_n='printf %s'
24914else
24915  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
24916    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
24917    as_echo_n='/usr/ucb/echo -n'
24918  else
24919    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
24920    as_echo_n_body='eval
24921      arg=$1;
24922      case $arg in #(
24923      *"$as_nl"*)
24924	expr "X$arg" : "X\\(.*\\)$as_nl";
24925	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
24926      esac;
24927      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
24928    '
24929    export as_echo_n_body
24930    as_echo_n='sh -c $as_echo_n_body as_echo'
24931  fi
24932  export as_echo_body
24933  as_echo='sh -c $as_echo_body as_echo'
24934fi
24935
24936# The user is always right.
24937if test "${PATH_SEPARATOR+set}" != set; then
24938  PATH_SEPARATOR=:
24939  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24940    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24941      PATH_SEPARATOR=';'
24942  }
24943fi
24944
24945
24946# IFS
24947# We need space, tab and new line, in precisely that order.  Quoting is
24948# there to prevent editors from complaining about space-tab.
24949# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24950# splitting by setting IFS to empty value.)
24951IFS=" ""	$as_nl"
24952
24953# Find who we are.  Look in the path if we contain no directory separator.
24954case $0 in #((
24955  *[\\/]* ) as_myself=$0 ;;
24956  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24957for as_dir in $PATH
24958do
24959  IFS=$as_save_IFS
24960  test -z "$as_dir" && as_dir=.
24961    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24962  done
24963IFS=$as_save_IFS
24964
24965     ;;
24966esac
24967# We did not find ourselves, most probably we were run as `sh COMMAND'
24968# in which case we are not to be found in the path.
24969if test "x$as_myself" = x; then
24970  as_myself=$0
24971fi
24972if test ! -f "$as_myself"; then
24973  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24974  exit 1
24975fi
24976
24977# Unset variables that we do not need and which cause bugs (e.g. in
24978# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
24979# suppresses any "Segmentation fault" message there.  '((' could
24980# trigger a bug in pdksh 5.2.14.
24981for as_var in BASH_ENV ENV MAIL MAILPATH
24982do eval test x\${$as_var+set} = xset \
24983  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24984done
24985PS1='$ '
24986PS2='> '
24987PS4='+ '
24988
24989# NLS nuisances.
24990LC_ALL=C
24991export LC_ALL
24992LANGUAGE=C
24993export LANGUAGE
24994
24995# CDPATH.
24996(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24997
24998
24999# as_fn_error ERROR [LINENO LOG_FD]
25000# ---------------------------------
25001# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
25002# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
25003# script with status $?, using 1 if that was 0.
25004as_fn_error ()
25005{
25006  as_status=$?; test $as_status -eq 0 && as_status=1
25007  if test "$3"; then
25008    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
25009    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
25010  fi
25011  $as_echo "$as_me: error: $1" >&2
25012  as_fn_exit $as_status
25013} # as_fn_error
25014
25015
25016# as_fn_set_status STATUS
25017# -----------------------
25018# Set $? to STATUS, without forking.
25019as_fn_set_status ()
25020{
25021  return $1
25022} # as_fn_set_status
25023
25024# as_fn_exit STATUS
25025# -----------------
25026# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
25027as_fn_exit ()
25028{
25029  set +e
25030  as_fn_set_status $1
25031  exit $1
25032} # as_fn_exit
25033
25034# as_fn_unset VAR
25035# ---------------
25036# Portably unset VAR.
25037as_fn_unset ()
25038{
25039  { eval $1=; unset $1;}
25040}
25041as_unset=as_fn_unset
25042# as_fn_append VAR VALUE
25043# ----------------------
25044# Append the text in VALUE to the end of the definition contained in VAR. Take
25045# advantage of any shell optimizations that allow amortized linear growth over
25046# repeated appends, instead of the typical quadratic growth present in naive
25047# implementations.
25048if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
25049  eval 'as_fn_append ()
25050  {
25051    eval $1+=\$2
25052  }'
25053else
25054  as_fn_append ()
25055  {
25056    eval $1=\$$1\$2
25057  }
25058fi # as_fn_append
25059
25060# as_fn_arith ARG...
25061# ------------------
25062# Perform arithmetic evaluation on the ARGs, and store the result in the
25063# global $as_val. Take advantage of shells that can avoid forks. The arguments
25064# must be portable across $(()) and expr.
25065if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
25066  eval 'as_fn_arith ()
25067  {
25068    as_val=$(( $* ))
25069  }'
25070else
25071  as_fn_arith ()
25072  {
25073    as_val=`expr "$@" || test $? -eq 1`
25074  }
25075fi # as_fn_arith
25076
25077
25078if expr a : '\(a\)' >/dev/null 2>&1 &&
25079   test "X`expr 00001 : '.*\(...\)'`" = X001; then
25080  as_expr=expr
25081else
25082  as_expr=false
25083fi
25084
25085if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25086  as_basename=basename
25087else
25088  as_basename=false
25089fi
25090
25091if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25092  as_dirname=dirname
25093else
25094  as_dirname=false
25095fi
25096
25097as_me=`$as_basename -- "$0" ||
25098$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25099	 X"$0" : 'X\(//\)$' \| \
25100	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25101$as_echo X/"$0" |
25102    sed '/^.*\/\([^/][^/]*\)\/*$/{
25103	    s//\1/
25104	    q
25105	  }
25106	  /^X\/\(\/\/\)$/{
25107	    s//\1/
25108	    q
25109	  }
25110	  /^X\/\(\/\).*/{
25111	    s//\1/
25112	    q
25113	  }
25114	  s/.*/./; q'`
25115
25116# Avoid depending upon Character Ranges.
25117as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25118as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25119as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25120as_cr_digits='0123456789'
25121as_cr_alnum=$as_cr_Letters$as_cr_digits
25122
25123ECHO_C= ECHO_N= ECHO_T=
25124case `echo -n x` in #(((((
25125-n*)
25126  case `echo 'xy\c'` in
25127  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
25128  xy)  ECHO_C='\c';;
25129  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
25130       ECHO_T='	';;
25131  esac;;
25132*)
25133  ECHO_N='-n';;
25134esac
25135
25136rm -f conf$$ conf$$.exe conf$$.file
25137if test -d conf$$.dir; then
25138  rm -f conf$$.dir/conf$$.file
25139else
25140  rm -f conf$$.dir
25141  mkdir conf$$.dir 2>/dev/null
25142fi
25143if (echo >conf$$.file) 2>/dev/null; then
25144  if ln -s conf$$.file conf$$ 2>/dev/null; then
25145    as_ln_s='ln -s'
25146    # ... but there are two gotchas:
25147    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25148    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25149    # In both cases, we have to default to `cp -p'.
25150    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25151      as_ln_s='cp -p'
25152  elif ln conf$$.file conf$$ 2>/dev/null; then
25153    as_ln_s=ln
25154  else
25155    as_ln_s='cp -p'
25156  fi
25157else
25158  as_ln_s='cp -p'
25159fi
25160rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25161rmdir conf$$.dir 2>/dev/null
25162
25163
25164# as_fn_mkdir_p
25165# -------------
25166# Create "$as_dir" as a directory, including parents if necessary.
25167as_fn_mkdir_p ()
25168{
25169
25170  case $as_dir in #(
25171  -*) as_dir=./$as_dir;;
25172  esac
25173  test -d "$as_dir" || eval $as_mkdir_p || {
25174    as_dirs=
25175    while :; do
25176      case $as_dir in #(
25177      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
25178      *) as_qdir=$as_dir;;
25179      esac
25180      as_dirs="'$as_qdir' $as_dirs"
25181      as_dir=`$as_dirname -- "$as_dir" ||
25182$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25183	 X"$as_dir" : 'X\(//\)[^/]' \| \
25184	 X"$as_dir" : 'X\(//\)$' \| \
25185	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
25186$as_echo X"$as_dir" |
25187    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25188	    s//\1/
25189	    q
25190	  }
25191	  /^X\(\/\/\)[^/].*/{
25192	    s//\1/
25193	    q
25194	  }
25195	  /^X\(\/\/\)$/{
25196	    s//\1/
25197	    q
25198	  }
25199	  /^X\(\/\).*/{
25200	    s//\1/
25201	    q
25202	  }
25203	  s/.*/./; q'`
25204      test -d "$as_dir" && break
25205    done
25206    test -z "$as_dirs" || eval "mkdir $as_dirs"
25207  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
25208
25209
25210} # as_fn_mkdir_p
25211if mkdir -p . 2>/dev/null; then
25212  as_mkdir_p='mkdir -p "$as_dir"'
25213else
25214  test -d ./-p && rmdir ./-p
25215  as_mkdir_p=false
25216fi
25217
25218if test -x / >/dev/null 2>&1; then
25219  as_test_x='test -x'
25220else
25221  if ls -dL / >/dev/null 2>&1; then
25222    as_ls_L_option=L
25223  else
25224    as_ls_L_option=
25225  fi
25226  as_test_x='
25227    eval sh -c '\''
25228      if test -d "$1"; then
25229	test -d "$1/.";
25230      else
25231	case $1 in #(
25232	-*)set "./$1";;
25233	esac;
25234	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
25235	???[sx]*):;;*)false;;esac;fi
25236    '\'' sh
25237  '
25238fi
25239as_executable_p=$as_test_x
25240
25241# Sed expression to map a string onto a valid CPP name.
25242as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
25243
25244# Sed expression to map a string onto a valid variable name.
25245as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
25246
25247
25248exec 6>&1
25249## ----------------------------------- ##
25250## Main body of $CONFIG_STATUS script. ##
25251## ----------------------------------- ##
25252_ASEOF
25253test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
25254
25255cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25256# Save the log message, to keep $0 and so on meaningful, and to
25257# report actual input values of CONFIG_FILES etc. instead of their
25258# values after options handling.
25259ac_log="
25260This file was extended by $as_me, which was
25261generated by GNU Autoconf 2.65.  Invocation command line was
25262
25263  CONFIG_FILES    = $CONFIG_FILES
25264  CONFIG_HEADERS  = $CONFIG_HEADERS
25265  CONFIG_LINKS    = $CONFIG_LINKS
25266  CONFIG_COMMANDS = $CONFIG_COMMANDS
25267  $ $0 $@
25268
25269on `(hostname || uname -n) 2>/dev/null | sed 1q`
25270"
25271
25272_ACEOF
25273
25274case $ac_config_files in *"
25275"*) set x $ac_config_files; shift; ac_config_files=$*;;
25276esac
25277
25278case $ac_config_headers in *"
25279"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25280esac
25281
25282
25283cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25284# Files that config.status was made for.
25285config_files="$ac_config_files"
25286config_headers="$ac_config_headers"
25287config_commands="$ac_config_commands"
25288
25289_ACEOF
25290
25291cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25292ac_cs_usage="\
25293\`$as_me' instantiates files and other configuration actions
25294from templates according to the current configuration.  Unless the files
25295and actions are specified as TAGs, all are instantiated by default.
25296
25297Usage: $0 [OPTION]... [TAG]...
25298
25299  -h, --help       print this help, then exit
25300  -V, --version    print version number and configuration settings, then exit
25301      --config     print configuration, then exit
25302  -q, --quiet, --silent
25303                   do not print progress messages
25304  -d, --debug      don't remove temporary files
25305      --recheck    update $as_me by reconfiguring in the same conditions
25306      --file=FILE[:TEMPLATE]
25307                   instantiate the configuration file FILE
25308      --header=FILE[:TEMPLATE]
25309                   instantiate the configuration header FILE
25310
25311Configuration files:
25312$config_files
25313
25314Configuration headers:
25315$config_headers
25316
25317Configuration commands:
25318$config_commands
25319
25320Report bugs to <<http://www.openldap.org/its/>>."
25321
25322_ACEOF
25323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25324ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
25325ac_cs_version="\\
25326config.status
25327configured by $0, generated by GNU Autoconf 2.65,
25328  with options \\"\$ac_cs_config\\"
25329
25330Copyright (C) 2009 Free Software Foundation, Inc.
25331This config.status script is free software; the Free Software Foundation
25332gives unlimited permission to copy, distribute and modify it."
25333
25334ac_pwd='$ac_pwd'
25335srcdir='$srcdir'
25336INSTALL='$INSTALL'
25337AWK='$AWK'
25338test -n "\$AWK" || AWK=awk
25339_ACEOF
25340
25341cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25342# The default lists apply if the user does not specify any file.
25343ac_need_defaults=:
25344while test $# != 0
25345do
25346  case $1 in
25347  --*=*)
25348    ac_option=`expr "X$1" : 'X\([^=]*\)='`
25349    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
25350    ac_shift=:
25351    ;;
25352  *)
25353    ac_option=$1
25354    ac_optarg=$2
25355    ac_shift=shift
25356    ;;
25357  esac
25358
25359  case $ac_option in
25360  # Handling of the options.
25361  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25362    ac_cs_recheck=: ;;
25363  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25364    $as_echo "$ac_cs_version"; exit ;;
25365  --config | --confi | --conf | --con | --co | --c )
25366    $as_echo "$ac_cs_config"; exit ;;
25367  --debug | --debu | --deb | --de | --d | -d )
25368    debug=: ;;
25369  --file | --fil | --fi | --f )
25370    $ac_shift
25371    case $ac_optarg in
25372    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25373    esac
25374    as_fn_append CONFIG_FILES " '$ac_optarg'"
25375    ac_need_defaults=false;;
25376  --header | --heade | --head | --hea )
25377    $ac_shift
25378    case $ac_optarg in
25379    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25380    esac
25381    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
25382    ac_need_defaults=false;;
25383  --he | --h)
25384    # Conflict between --help and --header
25385    as_fn_error "ambiguous option: \`$1'
25386Try \`$0 --help' for more information.";;
25387  --help | --hel | -h )
25388    $as_echo "$ac_cs_usage"; exit ;;
25389  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25390  | -silent | --silent | --silen | --sile | --sil | --si | --s)
25391    ac_cs_silent=: ;;
25392
25393  # This is an error.
25394  -*) as_fn_error "unrecognized option: \`$1'
25395Try \`$0 --help' for more information." ;;
25396
25397  *) as_fn_append ac_config_targets " $1"
25398     ac_need_defaults=false ;;
25399
25400  esac
25401  shift
25402done
25403
25404ac_configure_extra_args=
25405
25406if $ac_cs_silent; then
25407  exec 6>/dev/null
25408  ac_configure_extra_args="$ac_configure_extra_args --silent"
25409fi
25410
25411_ACEOF
25412cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25413if \$ac_cs_recheck; then
25414  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25415  shift
25416  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25417  CONFIG_SHELL='$SHELL'
25418  export CONFIG_SHELL
25419  exec "\$@"
25420fi
25421
25422_ACEOF
25423cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25424exec 5>>config.log
25425{
25426  echo
25427  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25428## Running $as_me. ##
25429_ASBOX
25430  $as_echo "$ac_log"
25431} >&5
25432
25433_ACEOF
25434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25435#
25436# INIT-COMMANDS
25437#
25438AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
25439
25440STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS"
25441STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS"
25442
25443
25444_ACEOF
25445
25446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25447
25448# Handling of arguments.
25449for ac_config_target in $ac_config_targets
25450do
25451  case $ac_config_target in
25452    "include/portable.h") CONFIG_HEADERS="$CONFIG_HEADERS include/portable.h:include/portable.hin" ;;
25453    "include/ldap_features.h") CONFIG_HEADERS="$CONFIG_HEADERS include/ldap_features.h:include/ldap_features.hin" ;;
25454    "include/lber_types.h") CONFIG_HEADERS="$CONFIG_HEADERS include/lber_types.h:include/lber_types.hin" ;;
25455    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
25456    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:build/top.mk:Makefile.in:build/dir.mk" ;;
25457    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk" ;;
25458    "doc/man/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk" ;;
25459    "doc/man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk" ;;
25460    "doc/man/man3/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk" ;;
25461    "doc/man/man5/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk" ;;
25462    "doc/man/man8/Makefile") CONFIG_FILES="$CONFIG_FILES doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk" ;;
25463    "clients/Makefile") CONFIG_FILES="$CONFIG_FILES clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk" ;;
25464    "clients/tools/Makefile") CONFIG_FILES="$CONFIG_FILES clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk" ;;
25465    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile:build/top.mk:include/Makefile.in" ;;
25466    "libraries/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk" ;;
25467    "libraries/liblber/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25468    "libraries/libldap/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk" ;;
25469    "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" ;;
25470    "libraries/liblunicode/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25471    "libraries/liblutil/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25472    "libraries/librewrite/Makefile") CONFIG_FILES="$CONFIG_FILES libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk" ;;
25473    "servers/Makefile") CONFIG_FILES="$CONFIG_FILES servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk" ;;
25474    "servers/slapd/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk" ;;
25475    "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" ;;
25476    "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" ;;
25477    "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" ;;
25478    "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" ;;
25479    "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" ;;
25480    "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" ;;
25481    "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" ;;
25482    "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" ;;
25483    "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" ;;
25484    "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" ;;
25485    "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" ;;
25486    "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" ;;
25487    "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" ;;
25488    "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" ;;
25489    "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" ;;
25490    "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" ;;
25491    "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" ;;
25492    "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" ;;
25493    "servers/slapd/overlays/Makefile") CONFIG_FILES="$CONFIG_FILES servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk" ;;
25494    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk" ;;
25495    "tests/run") CONFIG_FILES="$CONFIG_FILES tests/run" ;;
25496    "tests/progs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk" ;;
25497    "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25498
25499  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
25500  esac
25501done
25502
25503
25504# If the user did not use the arguments to specify the items to instantiate,
25505# then the envvar interface is used.  Set only those that are not.
25506# We use the long form for the default assignment because of an extremely
25507# bizarre bug on SunOS 4.1.3.
25508if $ac_need_defaults; then
25509  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25510  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25511  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25512fi
25513
25514# Have a temporary directory for convenience.  Make it in the build tree
25515# simply because there is no reason against having it here, and in addition,
25516# creating and moving files from /tmp can sometimes cause problems.
25517# Hook for its removal unless debugging.
25518# Note that there is a small window in which the directory will not be cleaned:
25519# after its creation but before its name has been assigned to `$tmp'.
25520$debug ||
25521{
25522  tmp=
25523  trap 'exit_status=$?
25524  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25525' 0
25526  trap 'as_fn_exit 1' 1 2 13 15
25527}
25528# Create a (secure) tmp directory for tmp files.
25529
25530{
25531  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
25532  test -n "$tmp" && test -d "$tmp"
25533}  ||
25534{
25535  tmp=./conf$$-$RANDOM
25536  (umask 077 && mkdir "$tmp")
25537} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
25538
25539# Set up the scripts for CONFIG_FILES section.
25540# No need to generate them if there are no CONFIG_FILES.
25541# This happens for instance with `./config.status config.h'.
25542if test -n "$CONFIG_FILES"; then
25543
25544
25545ac_cr=`echo X | tr X '\015'`
25546# On cygwin, bash can eat \r inside `` if the user requested igncr.
25547# But we know of no other shell where ac_cr would be empty at this
25548# point, so we can use a bashism as a fallback.
25549if test "x$ac_cr" = x; then
25550  eval ac_cr=\$\'\\r\'
25551fi
25552ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
25553if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
25554  ac_cs_awk_cr='\r'
25555else
25556  ac_cs_awk_cr=$ac_cr
25557fi
25558
25559echo 'BEGIN {' >"$tmp/subs1.awk" &&
25560_ACEOF
25561
25562
25563{
25564  echo "cat >conf$$subs.awk <<_ACEOF" &&
25565  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
25566  echo "_ACEOF"
25567} >conf$$subs.sh ||
25568  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25569ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
25570ac_delim='%!_!# '
25571for ac_last_try in false false false false false :; do
25572  . ./conf$$subs.sh ||
25573    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25574
25575  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
25576  if test $ac_delim_n = $ac_delim_num; then
25577    break
25578  elif $ac_last_try; then
25579    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
25580  else
25581    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25582  fi
25583done
25584rm -f conf$$subs.sh
25585
25586cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25587cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
25588_ACEOF
25589sed -n '
25590h
25591s/^/S["/; s/!.*/"]=/
25592p
25593g
25594s/^[^!]*!//
25595:repl
25596t repl
25597s/'"$ac_delim"'$//
25598t delim
25599:nl
25600h
25601s/\(.\{148\}\)..*/\1/
25602t more1
25603s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25604p
25605n
25606b repl
25607:more1
25608s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25609p
25610g
25611s/.\{148\}//
25612t nl
25613:delim
25614h
25615s/\(.\{148\}\)..*/\1/
25616t more2
25617s/["\\]/\\&/g; s/^/"/; s/$/"/
25618p
25619b
25620:more2
25621s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25622p
25623g
25624s/.\{148\}//
25625t delim
25626' <conf$$subs.awk | sed '
25627/^[^""]/{
25628  N
25629  s/\n//
25630}
25631' >>$CONFIG_STATUS || ac_write_fail=1
25632rm -f conf$$subs.awk
25633cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25634_ACAWK
25635cat >>"\$tmp/subs1.awk" <<_ACAWK &&
25636  for (key in S) S_is_set[key] = 1
25637  FS = ""
25638
25639}
25640{
25641  line = $ 0
25642  nfields = split(line, field, "@")
25643  substed = 0
25644  len = length(field[1])
25645  for (i = 2; i < nfields; i++) {
25646    key = field[i]
25647    keylen = length(key)
25648    if (S_is_set[key]) {
25649      value = S[key]
25650      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25651      len += length(value) + length(field[++i])
25652      substed = 1
25653    } else
25654      len += 1 + keylen
25655  }
25656
25657  print line
25658}
25659
25660_ACAWK
25661_ACEOF
25662cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25663if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25664  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25665else
25666  cat
25667fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
25668  || as_fn_error "could not setup config files machinery" "$LINENO" 5
25669_ACEOF
25670
25671# VPATH may cause trouble with some makes, so we remove $(srcdir),
25672# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25673# trailing colons and then remove the whole line if VPATH becomes empty
25674# (actually we leave an empty line to preserve line numbers).
25675if test "x$srcdir" = x.; then
25676  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
25677s/:*\$(srcdir):*/:/
25678s/:*\${srcdir}:*/:/
25679s/:*@srcdir@:*/:/
25680s/^\([^=]*=[	 ]*\):*/\1/
25681s/:*$//
25682s/^[^=]*=[	 ]*$//
25683}'
25684fi
25685
25686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25687fi # test -n "$CONFIG_FILES"
25688
25689# Set up the scripts for CONFIG_HEADERS section.
25690# No need to generate them if there are no CONFIG_HEADERS.
25691# This happens for instance with `./config.status Makefile'.
25692if test -n "$CONFIG_HEADERS"; then
25693cat >"$tmp/defines.awk" <<\_ACAWK ||
25694BEGIN {
25695_ACEOF
25696
25697# Transform confdefs.h into an awk script `defines.awk', embedded as
25698# here-document in config.status, that substitutes the proper values into
25699# config.h.in to produce config.h.
25700
25701# Create a delimiter string that does not exist in confdefs.h, to ease
25702# handling of long lines.
25703ac_delim='%!_!# '
25704for ac_last_try in false false :; do
25705  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
25706  if test -z "$ac_t"; then
25707    break
25708  elif $ac_last_try; then
25709    as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
25710  else
25711    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25712  fi
25713done
25714
25715# For the awk script, D is an array of macro values keyed by name,
25716# likewise P contains macro parameters if any.  Preserve backslash
25717# newline sequences.
25718
25719ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25720sed -n '
25721s/.\{148\}/&'"$ac_delim"'/g
25722t rset
25723:rset
25724s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
25725t def
25726d
25727:def
25728s/\\$//
25729t bsnl
25730s/["\\]/\\&/g
25731s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25732D["\1"]=" \3"/p
25733s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
25734d
25735:bsnl
25736s/["\\]/\\&/g
25737s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
25738D["\1"]=" \3\\\\\\n"\\/p
25739t cont
25740s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25741t cont
25742d
25743:cont
25744n
25745s/.\{148\}/&'"$ac_delim"'/g
25746t clear
25747:clear
25748s/\\$//
25749t bsnlc
25750s/["\\]/\\&/g; s/^/"/; s/$/"/p
25751d
25752:bsnlc
25753s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25754b cont
25755' <confdefs.h | sed '
25756s/'"$ac_delim"'/"\\\
25757"/g' >>$CONFIG_STATUS || ac_write_fail=1
25758
25759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25760  for (key in D) D_is_set[key] = 1
25761  FS = ""
25762}
25763/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
25764  line = \$ 0
25765  split(line, arg, " ")
25766  if (arg[1] == "#") {
25767    defundef = arg[2]
25768    mac1 = arg[3]
25769  } else {
25770    defundef = substr(arg[1], 2)
25771    mac1 = arg[2]
25772  }
25773  split(mac1, mac2, "(") #)
25774  macro = mac2[1]
25775  prefix = substr(line, 1, index(line, defundef) - 1)
25776  if (D_is_set[macro]) {
25777    # Preserve the white space surrounding the "#".
25778    print prefix "define", macro P[macro] D[macro]
25779    next
25780  } else {
25781    # Replace #undef with comments.  This is necessary, for example,
25782    # in the case of _POSIX_SOURCE, which is predefined and required
25783    # on some systems where configure will not decide to define it.
25784    if (defundef == "undef") {
25785      print "/*", prefix defundef, macro, "*/"
25786      next
25787    }
25788  }
25789}
25790{ print }
25791_ACAWK
25792_ACEOF
25793cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25794  as_fn_error "could not setup config headers machinery" "$LINENO" 5
25795fi # test -n "$CONFIG_HEADERS"
25796
25797
25798eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
25799shift
25800for ac_tag
25801do
25802  case $ac_tag in
25803  :[FHLC]) ac_mode=$ac_tag; continue;;
25804  esac
25805  case $ac_mode$ac_tag in
25806  :[FHL]*:*);;
25807  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
25808  :[FH]-) ac_tag=-:-;;
25809  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25810  esac
25811  ac_save_IFS=$IFS
25812  IFS=:
25813  set x $ac_tag
25814  IFS=$ac_save_IFS
25815  shift
25816  ac_file=$1
25817  shift
25818
25819  case $ac_mode in
25820  :L) ac_source=$1;;
25821  :[FH])
25822    ac_file_inputs=
25823    for ac_f
25824    do
25825      case $ac_f in
25826      -) ac_f="$tmp/stdin";;
25827      *) # Look for the file first in the build tree, then in the source tree
25828	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
25829	 # because $ac_f cannot contain `:'.
25830	 test -f "$ac_f" ||
25831	   case $ac_f in
25832	   [\\/$]*) false;;
25833	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25834	   esac ||
25835	   as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25836      esac
25837      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25838      as_fn_append ac_file_inputs " '$ac_f'"
25839    done
25840
25841    # Let's still pretend it is `configure' which instantiates (i.e., don't
25842    # use $as_me), people would be surprised to read:
25843    #    /* config.h.  Generated by config.status.  */
25844    configure_input='Generated from '`
25845	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25846	`' by configure.'
25847    if test x"$ac_file" != x-; then
25848      configure_input="$ac_file.  $configure_input"
25849      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25850$as_echo "$as_me: creating $ac_file" >&6;}
25851    fi
25852    # Neutralize special characters interpreted by sed in replacement strings.
25853    case $configure_input in #(
25854    *\&* | *\|* | *\\* )
25855       ac_sed_conf_input=`$as_echo "$configure_input" |
25856       sed 's/[\\\\&|]/\\\\&/g'`;; #(
25857    *) ac_sed_conf_input=$configure_input;;
25858    esac
25859
25860    case $ac_tag in
25861    *:-:* | *:-) cat >"$tmp/stdin" \
25862      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
25863    esac
25864    ;;
25865  esac
25866
25867  ac_dir=`$as_dirname -- "$ac_file" ||
25868$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25869	 X"$ac_file" : 'X\(//\)[^/]' \| \
25870	 X"$ac_file" : 'X\(//\)$' \| \
25871	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25872$as_echo X"$ac_file" |
25873    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25874	    s//\1/
25875	    q
25876	  }
25877	  /^X\(\/\/\)[^/].*/{
25878	    s//\1/
25879	    q
25880	  }
25881	  /^X\(\/\/\)$/{
25882	    s//\1/
25883	    q
25884	  }
25885	  /^X\(\/\).*/{
25886	    s//\1/
25887	    q
25888	  }
25889	  s/.*/./; q'`
25890  as_dir="$ac_dir"; as_fn_mkdir_p
25891  ac_builddir=.
25892
25893case "$ac_dir" in
25894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25895*)
25896  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
25897  # A ".." for each directory in $ac_dir_suffix.
25898  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25899  case $ac_top_builddir_sub in
25900  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25901  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25902  esac ;;
25903esac
25904ac_abs_top_builddir=$ac_pwd
25905ac_abs_builddir=$ac_pwd$ac_dir_suffix
25906# for backward compatibility:
25907ac_top_builddir=$ac_top_build_prefix
25908
25909case $srcdir in
25910  .)  # We are building in place.
25911    ac_srcdir=.
25912    ac_top_srcdir=$ac_top_builddir_sub
25913    ac_abs_top_srcdir=$ac_pwd ;;
25914  [\\/]* | ?:[\\/]* )  # Absolute name.
25915    ac_srcdir=$srcdir$ac_dir_suffix;
25916    ac_top_srcdir=$srcdir
25917    ac_abs_top_srcdir=$srcdir ;;
25918  *) # Relative name.
25919    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25920    ac_top_srcdir=$ac_top_build_prefix$srcdir
25921    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25922esac
25923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25924
25925
25926  case $ac_mode in
25927  :F)
25928  #
25929  # CONFIG_FILE
25930  #
25931
25932  case $INSTALL in
25933  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25934  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25935  esac
25936_ACEOF
25937
25938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25939# If the template does not know about datarootdir, expand it.
25940# FIXME: This hack should be removed a few years after 2.60.
25941ac_datarootdir_hack=; ac_datarootdir_seen=
25942ac_sed_dataroot='
25943/datarootdir/ {
25944  p
25945  q
25946}
25947/@datadir@/p
25948/@docdir@/p
25949/@infodir@/p
25950/@localedir@/p
25951/@mandir@/p'
25952case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25953*datarootdir*) ac_datarootdir_seen=yes;;
25954*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25955  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25956$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25957_ACEOF
25958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25959  ac_datarootdir_hack='
25960  s&@datadir@&$datadir&g
25961  s&@docdir@&$docdir&g
25962  s&@infodir@&$infodir&g
25963  s&@localedir@&$localedir&g
25964  s&@mandir@&$mandir&g
25965  s&\\\${datarootdir}&$datarootdir&g' ;;
25966esac
25967_ACEOF
25968
25969# Neutralize VPATH when `$srcdir' = `.'.
25970# Shell code in configure.ac might set extrasub.
25971# FIXME: do we really want to maintain this feature?
25972cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25973ac_sed_extra="$ac_vpsub
25974$extrasub
25975_ACEOF
25976cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25977:t
25978/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25979s|@configure_input@|$ac_sed_conf_input|;t t
25980s&@top_builddir@&$ac_top_builddir_sub&;t t
25981s&@top_build_prefix@&$ac_top_build_prefix&;t t
25982s&@srcdir@&$ac_srcdir&;t t
25983s&@abs_srcdir@&$ac_abs_srcdir&;t t
25984s&@top_srcdir@&$ac_top_srcdir&;t t
25985s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25986s&@builddir@&$ac_builddir&;t t
25987s&@abs_builddir@&$ac_abs_builddir&;t t
25988s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25989s&@INSTALL@&$ac_INSTALL&;t t
25990$ac_datarootdir_hack
25991"
25992eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
25993  || as_fn_error "could not create $ac_file" "$LINENO" 5
25994
25995test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25996  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25997  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25998  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25999which seems to be undefined.  Please make sure it is defined." >&5
26000$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
26001which seems to be undefined.  Please make sure it is defined." >&2;}
26002
26003  rm -f "$tmp/stdin"
26004  case $ac_file in
26005  -) cat "$tmp/out" && rm -f "$tmp/out";;
26006  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26007  esac \
26008  || as_fn_error "could not create $ac_file" "$LINENO" 5
26009 ;;
26010  :H)
26011  #
26012  # CONFIG_HEADER
26013  #
26014  if test x"$ac_file" != x-; then
26015    {
26016      $as_echo "/* $configure_input  */" \
26017      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26018    } >"$tmp/config.h" \
26019      || as_fn_error "could not create $ac_file" "$LINENO" 5
26020    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26021      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
26022$as_echo "$as_me: $ac_file is unchanged" >&6;}
26023    else
26024      rm -f "$ac_file"
26025      mv "$tmp/config.h" "$ac_file" \
26026	|| as_fn_error "could not create $ac_file" "$LINENO" 5
26027    fi
26028  else
26029    $as_echo "/* $configure_input  */" \
26030      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26031      || as_fn_error "could not create -" "$LINENO" 5
26032  fi
26033# Compute "$ac_file"'s index in $config_headers.
26034_am_stamp_count=1
26035for _am_header in $config_headers :; do
26036  case $_am_header in
26037    "$ac_file" | "$ac_file":* )
26038      break ;;
26039    * )
26040      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
26041  esac
26042done
26043echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" ||
26044$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26045	 X"$ac_file" : 'X\(//\)[^/]' \| \
26046	 X"$ac_file" : 'X\(//\)$' \| \
26047	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
26048$as_echo X"$ac_file" |
26049    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26050	    s//\1/
26051	    q
26052	  }
26053	  /^X\(\/\/\)[^/].*/{
26054	    s//\1/
26055	    q
26056	  }
26057	  /^X\(\/\/\)$/{
26058	    s//\1/
26059	    q
26060	  }
26061	  /^X\(\/\).*/{
26062	    s//\1/
26063	    q
26064	  }
26065	  s/.*/./; q'`/stamp-h$_am_stamp_count
26066 ;;
26067
26068  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
26069$as_echo "$as_me: executing $ac_file commands" >&6;}
26070 ;;
26071  esac
26072
26073
26074  case $ac_file$ac_mode in
26075    "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
26076  # Strip MF so we end up with the name of the file.
26077  mf=`echo "$mf" | sed -e 's/:.*$//'`
26078  # Check whether this is an Automake generated Makefile or not.
26079  # We used to match only the files named `Makefile.in', but
26080  # some people rename them; so instead we look at the file content.
26081  # Grep'ing the first line is not enough: some people post-process
26082  # each Makefile.in and add a new line on top of each file to say so.
26083  # So let's grep whole file.
26084  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
26085    dirpart=`$as_dirname -- "$mf" ||
26086$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26087	 X"$mf" : 'X\(//\)[^/]' \| \
26088	 X"$mf" : 'X\(//\)$' \| \
26089	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
26090$as_echo X"$mf" |
26091    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26092	    s//\1/
26093	    q
26094	  }
26095	  /^X\(\/\/\)[^/].*/{
26096	    s//\1/
26097	    q
26098	  }
26099	  /^X\(\/\/\)$/{
26100	    s//\1/
26101	    q
26102	  }
26103	  /^X\(\/\).*/{
26104	    s//\1/
26105	    q
26106	  }
26107	  s/.*/./; q'`
26108  else
26109    continue
26110  fi
26111  # Extract the definition of DEPDIR, am__include, and am__quote
26112  # from the Makefile without running `make'.
26113  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
26114  test -z "$DEPDIR" && continue
26115  am__include=`sed -n 's/^am__include = //p' < "$mf"`
26116  test -z "am__include" && continue
26117  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
26118  # When using ansi2knr, U may be empty or an underscore; expand it
26119  U=`sed -n 's/^U = //p' < "$mf"`
26120  # Find all dependency output files, they are included files with
26121  # $(DEPDIR) in their names.  We invoke sed twice because it is the
26122  # simplest approach to changing $(DEPDIR) to its actual value in the
26123  # expansion.
26124  for file in `sed -n "
26125    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
26126       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
26127    # Make sure the directory exists.
26128    test -f "$dirpart/$file" && continue
26129    fdir=`$as_dirname -- "$file" ||
26130$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26131	 X"$file" : 'X\(//\)[^/]' \| \
26132	 X"$file" : 'X\(//\)$' \| \
26133	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
26134$as_echo X"$file" |
26135    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26136	    s//\1/
26137	    q
26138	  }
26139	  /^X\(\/\/\)[^/].*/{
26140	    s//\1/
26141	    q
26142	  }
26143	  /^X\(\/\/\)$/{
26144	    s//\1/
26145	    q
26146	  }
26147	  /^X\(\/\).*/{
26148	    s//\1/
26149	    q
26150	  }
26151	  s/.*/./; q'`
26152    as_dir=$dirpart/$fdir; as_fn_mkdir_p
26153    # echo "creating $dirpart/$file"
26154    echo '# dummy' > "$dirpart/$file"
26155  done
26156done
26157 ;;
26158    "default":C)
26159chmod +x tests/run
26160date > stamp-h
26161BACKENDSC="servers/slapd/backends.c"
26162echo "Making $BACKENDSC"
26163rm -f $BACKENDSC
26164cat > $BACKENDSC << ENDX
26165/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26166 *
26167 * Copyright 1998-2020 The OpenLDAP Foundation.
26168 * All rights reserved.
26169 *
26170 * Redistribution and use in source and binary forms, with or without
26171 * modification, are permitted only as authorized by the OpenLDAP
26172 * Public License.
26173 *
26174 * A copy of this license is available in the file LICENSE in the
26175 * top-level directory of the distribution or, alternatively, at
26176 * <http://www.OpenLDAP.org/license.html>.
26177 */
26178/* This file is automatically generated by configure; please do not edit. */
26179
26180#include "portable.h"
26181#include "slap.h"
26182
26183ENDX
26184if test "${STATIC_BACKENDS}"; then
26185	for b in config ${STATIC_BACKENDS}; do
26186		bb=`echo "${b}" | sed -e 's/back-//'`
26187		cat >> $BACKENDSC << ENDX
26188extern BI_init ${bb}_back_initialize;
26189ENDX
26190	done
26191
26192	cat >> $BACKENDSC << ENDX
26193
26194BackendInfo slap_binfo[] = {
26195ENDX
26196
26197	for b in config ${STATIC_BACKENDS}; do
26198		bb=`echo "${b}" | sed -e 's/back-//'`
26199		echo "    Add ${bb} ..."
26200		cat >> $BACKENDSC << ENDX
26201	{ "${bb}", ${bb}_back_initialize },
26202ENDX
26203	done
26204
26205	cat >> $BACKENDSC << ENDX
26206	{ NULL, NULL },
26207};
26208
26209/* end of generated file */
26210ENDX
26211fi
26212OVERLAYSC="servers/slapd/overlays/statover.c"
26213echo "Making $OVERLAYSC"
26214rm -f $OVERLAYSC
26215cat > $OVERLAYSC << ENDX
26216/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
26217 *
26218 * Copyright 1998-2020 The OpenLDAP Foundation.
26219 * All rights reserved.
26220 *
26221 * Redistribution and use in source and binary forms, with or without
26222 * modification, are permitted only as authorized by the OpenLDAP
26223 * Public License.
26224 *
26225 * A copy of this license is available in the file LICENSE in the
26226 * top-level directory of the distribution or, alternatively, at
26227 * <http://www.OpenLDAP.org/license.html>.
26228 */
26229/* This file is automatically generated by configure; please do not edit. */
26230
26231#include "portable.h"
26232#include "slap.h"
26233
26234ENDX
26235if test "${STATIC_OVERLAYS}"; then
26236	for o in ${STATIC_OVERLAYS}; do
26237		oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26238		cat >> $OVERLAYSC << ENDX
26239extern OV_init ${oo}_initialize;
26240ENDX
26241	done
26242fi
26243
26244cat >> $OVERLAYSC << ENDX
26245
26246OverlayInit slap_oinfo[] = {
26247ENDX
26248
26249if test "${STATIC_OVERLAYS}"; then
26250	for o in ${STATIC_OVERLAYS}; do
26251		oo=`echo "${o}" | sed -e 's/.o$//' -e 's/_x$//'`
26252		echo "    Add ${oo} ..."
26253		cat >> $OVERLAYSC << ENDX
26254	{ "${oo}", ${oo}_initialize },
26255ENDX
26256	done
26257fi
26258
26259	cat >> $OVERLAYSC << ENDX
26260	{ NULL, NULL },
26261};
26262
26263/* end of generated file */
26264ENDX
26265
26266if test "${ol_cv_mkdep}" = no; then
26267	echo '(Do not "make depend"; we do not know how to build dependencies)'
26268else
26269	echo 'Please run "make depend" to build dependencies'
26270fi
26271 ;;
26272
26273  esac
26274done # for ac_tag
26275
26276
26277as_fn_exit 0
26278_ACEOF
26279ac_clean_files=$ac_clean_files_save
26280
26281test $ac_write_fail = 0 ||
26282  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
26283
26284
26285# configure is writing to config.log, and then calls config.status.
26286# config.status does its own redirection, appending to config.log.
26287# Unfortunately, on DOS this fails, as config.log is still kept open
26288# by configure, so config.status won't be able to write to it; its
26289# output is simply discarded.  So we exec the FD to /dev/null,
26290# effectively closing config.log, so it can be properly (re)opened and
26291# appended to by config.status.  When coming back to configure, we
26292# need to make the FD available again.
26293if test "$no_create" != yes; then
26294  ac_cs_success=:
26295  ac_config_status_args=
26296  test "$silent" = yes &&
26297    ac_config_status_args="$ac_config_status_args --quiet"
26298  exec 5>/dev/null
26299  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26300  exec 5>>config.log
26301  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26302  # would make configure fail if this is the last instruction.
26303  $ac_cs_success || as_fn_exit $?
26304fi
26305if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26306  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26307$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26308fi
26309
26310