xref: /freebsd/contrib/ntp/sntp/configure (revision ec4deee4e4f2aef1b97d9424f25d04e91fd7dc10)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for sntp 4.2.8p15.
4#
5# Report bugs to <http://bugs.ntp.org./>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9#
10#
11# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
13## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
16
17# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20  emulate sh
21  NULLCMD=:
22  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
23  # is contrary to our usage.  Disable this feature.
24  alias -g '${1+"$@"}'='"$@"'
25  setopt NO_GLOB_SUBST
26else
27  case `(set -o) 2>/dev/null` in #(
28  *posix*) :
29    set -o posix ;; #(
30  *) :
31     ;;
32esac
33fi
34
35
36as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47  as_echo='print -r --'
48  as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50  as_echo='printf %s\n'
51  as_echo_n='printf %s'
52else
53  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55    as_echo_n='/usr/ucb/echo -n'
56  else
57    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58    as_echo_n_body='eval
59      arg=$1;
60      case $arg in #(
61      *"$as_nl"*)
62	expr "X$arg" : "X\\(.*\\)$as_nl";
63	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64      esac;
65      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66    '
67    export as_echo_n_body
68    as_echo_n='sh -c $as_echo_n_body as_echo'
69  fi
70  export as_echo_body
71  as_echo='sh -c $as_echo_body as_echo'
72fi
73
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
76  PATH_SEPARATOR=:
77  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79      PATH_SEPARATOR=';'
80  }
81fi
82
83
84# IFS
85# We need space, tab and new line, in precisely that order.  Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
89IFS=" ""	$as_nl"
90
91# Find who we are.  Look in the path if we contain no directory separator.
92as_myself=
93case $0 in #((
94  *[\\/]* ) as_myself=$0 ;;
95  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
96for as_dir in $PATH
97do
98  IFS=$as_save_IFS
99  test -z "$as_dir" && as_dir=.
100    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101  done
102IFS=$as_save_IFS
103
104     ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109  as_myself=$0
110fi
111if test ! -f "$as_myself"; then
112  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there.  '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
133
134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
137# Use a proper internal environment variable to ensure we don't fall
138  # into an infinite loop, continuously re-executing ourselves.
139  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140    _as_can_reexec=no; export _as_can_reexec;
141    # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149  *v*x* | *x*v* ) as_opts=-vx ;;
150  *v* ) as_opts=-v ;;
151  *x* ) as_opts=-x ;;
152  * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159  fi
160  # We don't want this to propagate to other subprocesses.
161          { _as_can_reexec=; unset _as_can_reexec;}
162if test "x$CONFIG_SHELL" = x; then
163  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164  emulate sh
165  NULLCMD=:
166  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167  # is contrary to our usage.  Disable this feature.
168  alias -g '\${1+\"\$@\"}'='\"\$@\"'
169  setopt NO_GLOB_SUBST
170else
171  case \`(set -o) 2>/dev/null\` in #(
172  *posix*) :
173    set -o posix ;; #(
174  *) :
175     ;;
176esac
177fi
178"
179  as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193  exitcode=1; echo positional parameters were not saved.
194fi
195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
197  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1
202
203  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
204    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
205    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
206    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
207    PATH=/empty FPATH=/empty; export PATH FPATH
208    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
209      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
210  if (eval "$as_required") 2>/dev/null; then :
211  as_have_required=yes
212else
213  as_have_required=no
214fi
215  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
216
217else
218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
219as_found=false
220for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
221do
222  IFS=$as_save_IFS
223  test -z "$as_dir" && as_dir=.
224  as_found=:
225  case $as_dir in #(
226	 /*)
227	   for as_base in sh bash ksh sh5; do
228	     # Try only shells that exist, to save several forks.
229	     as_shell=$as_dir/$as_base
230	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
231		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  CONFIG_SHELL=$as_shell as_have_required=yes
233		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
234  break 2
235fi
236fi
237	   done;;
238       esac
239  as_found=false
240done
241$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
242	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
243  CONFIG_SHELL=$SHELL as_have_required=yes
244fi; }
245IFS=$as_save_IFS
246
247
248      if test "x$CONFIG_SHELL" != x; then :
249  export CONFIG_SHELL
250             # We cannot yet assume a decent shell, so we have to provide a
251# neutralization value for shells without unset; and this also
252# works around shells that cannot unset nonexistent variables.
253# Preserve -v and -x to the replacement shell.
254BASH_ENV=/dev/null
255ENV=/dev/null
256(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
257case $- in # ((((
258  *v*x* | *x*v* ) as_opts=-vx ;;
259  *v* ) as_opts=-v ;;
260  *x* ) as_opts=-x ;;
261  * ) as_opts= ;;
262esac
263exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
264# Admittedly, this is quite paranoid, since all the known shells bail
265# out after a failed `exec'.
266$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno; then :
271  $as_echo "$0: This script requires a shell more modern than all"
272  $as_echo "$0: the shells that I found on your system."
273  if test x${ZSH_VERSION+set} = xset ; then
274    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
275    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
276  else
277    $as_echo "$0: Please tell bug-autoconf@gnu.org and
278$0: http://bugs.ntp.org./ about your system, including any
279$0: error possibly output before this message. Then install
280$0: a modern shell, or manually run the script under such a
281$0: shell if you do have one."
282  fi
283  exit 1
284fi
285fi
286fi
287SHELL=${CONFIG_SHELL-/bin/sh}
288export SHELL
289# Unset more variables known to interfere with behavior of common tools.
290CLICOLOR_FORCE= GREP_OPTIONS=
291unset CLICOLOR_FORCE GREP_OPTIONS
292
293## --------------------- ##
294## M4sh Shell Functions. ##
295## --------------------- ##
296# as_fn_unset VAR
297# ---------------
298# Portably unset VAR.
299as_fn_unset ()
300{
301  { eval $1=; unset $1;}
302}
303as_unset=as_fn_unset
304
305# as_fn_set_status STATUS
306# -----------------------
307# Set $? to STATUS, without forking.
308as_fn_set_status ()
309{
310  return $1
311} # as_fn_set_status
312
313# as_fn_exit STATUS
314# -----------------
315# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
316as_fn_exit ()
317{
318  set +e
319  as_fn_set_status $1
320  exit $1
321} # as_fn_exit
322
323# as_fn_mkdir_p
324# -------------
325# Create "$as_dir" as a directory, including parents if necessary.
326as_fn_mkdir_p ()
327{
328
329  case $as_dir in #(
330  -*) as_dir=./$as_dir;;
331  esac
332  test -d "$as_dir" || eval $as_mkdir_p || {
333    as_dirs=
334    while :; do
335      case $as_dir in #(
336      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
337      *) as_qdir=$as_dir;;
338      esac
339      as_dirs="'$as_qdir' $as_dirs"
340      as_dir=`$as_dirname -- "$as_dir" ||
341$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
342	 X"$as_dir" : 'X\(//\)[^/]' \| \
343	 X"$as_dir" : 'X\(//\)$' \| \
344	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
345$as_echo X"$as_dir" |
346    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
347	    s//\1/
348	    q
349	  }
350	  /^X\(\/\/\)[^/].*/{
351	    s//\1/
352	    q
353	  }
354	  /^X\(\/\/\)$/{
355	    s//\1/
356	    q
357	  }
358	  /^X\(\/\).*/{
359	    s//\1/
360	    q
361	  }
362	  s/.*/./; q'`
363      test -d "$as_dir" && break
364    done
365    test -z "$as_dirs" || eval "mkdir $as_dirs"
366  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
367
368
369} # as_fn_mkdir_p
370
371# as_fn_executable_p FILE
372# -----------------------
373# Test if FILE is an executable regular file.
374as_fn_executable_p ()
375{
376  test -f "$1" && test -x "$1"
377} # as_fn_executable_p
378# as_fn_append VAR VALUE
379# ----------------------
380# Append the text in VALUE to the end of the definition contained in VAR. Take
381# advantage of any shell optimizations that allow amortized linear growth over
382# repeated appends, instead of the typical quadratic growth present in naive
383# implementations.
384if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
385  eval 'as_fn_append ()
386  {
387    eval $1+=\$2
388  }'
389else
390  as_fn_append ()
391  {
392    eval $1=\$$1\$2
393  }
394fi # as_fn_append
395
396# as_fn_arith ARG...
397# ------------------
398# Perform arithmetic evaluation on the ARGs, and store the result in the
399# global $as_val. Take advantage of shells that can avoid forks. The arguments
400# must be portable across $(()) and expr.
401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
402  eval 'as_fn_arith ()
403  {
404    as_val=$(( $* ))
405  }'
406else
407  as_fn_arith ()
408  {
409    as_val=`expr "$@" || test $? -eq 1`
410  }
411fi # as_fn_arith
412
413
414# as_fn_error STATUS ERROR [LINENO LOG_FD]
415# ----------------------------------------
416# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
417# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
418# script with STATUS, using 1 if that was 0.
419as_fn_error ()
420{
421  as_status=$1; test $as_status -eq 0 && as_status=1
422  if test "$4"; then
423    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
424    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
425  fi
426  $as_echo "$as_me: error: $2" >&2
427  as_fn_exit $as_status
428} # as_fn_error
429
430if expr a : '\(a\)' >/dev/null 2>&1 &&
431   test "X`expr 00001 : '.*\(...\)'`" = X001; then
432  as_expr=expr
433else
434  as_expr=false
435fi
436
437if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
438  as_basename=basename
439else
440  as_basename=false
441fi
442
443if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
444  as_dirname=dirname
445else
446  as_dirname=false
447fi
448
449as_me=`$as_basename -- "$0" ||
450$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
451	 X"$0" : 'X\(//\)$' \| \
452	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
453$as_echo X/"$0" |
454    sed '/^.*\/\([^/][^/]*\)\/*$/{
455	    s//\1/
456	    q
457	  }
458	  /^X\/\(\/\/\)$/{
459	    s//\1/
460	    q
461	  }
462	  /^X\/\(\/\).*/{
463	    s//\1/
464	    q
465	  }
466	  s/.*/./; q'`
467
468# Avoid depending upon Character Ranges.
469as_cr_letters='abcdefghijklmnopqrstuvwxyz'
470as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
471as_cr_Letters=$as_cr_letters$as_cr_LETTERS
472as_cr_digits='0123456789'
473as_cr_alnum=$as_cr_Letters$as_cr_digits
474
475
476  as_lineno_1=$LINENO as_lineno_1a=$LINENO
477  as_lineno_2=$LINENO as_lineno_2a=$LINENO
478  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
479  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
480  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
481  sed -n '
482    p
483    /[$]LINENO/=
484  ' <$as_myself |
485    sed '
486      s/[$]LINENO.*/&-/
487      t lineno
488      b
489      :lineno
490      N
491      :loop
492      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
493      t loop
494      s/-\n.*//
495    ' >$as_me.lineno &&
496  chmod +x "$as_me.lineno" ||
497    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
498
499  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
500  # already done that, so ensure we don't try to do so again and fall
501  # in an infinite loop.  This has already happened in practice.
502  _as_can_reexec=no; export _as_can_reexec
503  # Don't try to exec as it changes $[0], causing all sort of problems
504  # (the dirname of $[0] is not the place where we might find the
505  # original and so on.  Autoconf is especially sensitive to this).
506  . "./$as_me.lineno"
507  # Exit status is that of the last command.
508  exit
509}
510
511ECHO_C= ECHO_N= ECHO_T=
512case `echo -n x` in #(((((
513-n*)
514  case `echo 'xy\c'` in
515  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
516  xy)  ECHO_C='\c';;
517  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
518       ECHO_T='	';;
519  esac;;
520*)
521  ECHO_N='-n';;
522esac
523
524rm -f conf$$ conf$$.exe conf$$.file
525if test -d conf$$.dir; then
526  rm -f conf$$.dir/conf$$.file
527else
528  rm -f conf$$.dir
529  mkdir conf$$.dir 2>/dev/null
530fi
531if (echo >conf$$.file) 2>/dev/null; then
532  if ln -s conf$$.file conf$$ 2>/dev/null; then
533    as_ln_s='ln -s'
534    # ... but there are two gotchas:
535    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
536    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
537    # In both cases, we have to default to `cp -pR'.
538    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
539      as_ln_s='cp -pR'
540  elif ln conf$$.file conf$$ 2>/dev/null; then
541    as_ln_s=ln
542  else
543    as_ln_s='cp -pR'
544  fi
545else
546  as_ln_s='cp -pR'
547fi
548rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
549rmdir conf$$.dir 2>/dev/null
550
551if mkdir -p . 2>/dev/null; then
552  as_mkdir_p='mkdir -p "$as_dir"'
553else
554  test -d ./-p && rmdir ./-p
555  as_mkdir_p=false
556fi
557
558as_test_x='test -x'
559as_executable_p=as_fn_executable_p
560
561# Sed expression to map a string onto a valid CPP name.
562as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
563
564# Sed expression to map a string onto a valid variable name.
565as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
566
567SHELL=${CONFIG_SHELL-/bin/sh}
568
569
570test -n "$DJDIR" || exec 7<&0 </dev/null
571exec 6>&1
572
573# Name of the host.
574# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
575# so uname gets run too.
576ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
577
578#
579# Initializations.
580#
581ac_default_prefix=/usr/local
582ac_clean_files=
583ac_config_libobj_dir=.
584LIBOBJS=
585cross_compiling=no
586subdirs=
587MFLAGS=
588MAKEFLAGS=
589
590# Identity of this package.
591PACKAGE_NAME='sntp'
592PACKAGE_TARNAME='sntp'
593PACKAGE_VERSION='4.2.8p15'
594PACKAGE_STRING='sntp 4.2.8p15'
595PACKAGE_BUGREPORT='http://bugs.ntp.org./'
596PACKAGE_URL='http://www.ntp.org./'
597
598# Factoring default headers for most tests.
599ac_includes_default="\
600#include <stdio.h>
601#ifdef HAVE_SYS_TYPES_H
602# include <sys/types.h>
603#endif
604#ifdef HAVE_SYS_STAT_H
605# include <sys/stat.h>
606#endif
607#ifdef STDC_HEADERS
608# include <stdlib.h>
609# include <stddef.h>
610#else
611# ifdef HAVE_STDLIB_H
612#  include <stdlib.h>
613# endif
614#endif
615#ifdef HAVE_STRING_H
616# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
617#  include <memory.h>
618# endif
619# include <string.h>
620#endif
621#ifdef HAVE_STRINGS_H
622# include <strings.h>
623#endif
624#ifdef HAVE_INTTYPES_H
625# include <inttypes.h>
626#endif
627#ifdef HAVE_STDINT_H
628# include <stdint.h>
629#endif
630#ifdef HAVE_UNISTD_H
631# include <unistd.h>
632#endif"
633
634ac_header_list=
635enable_option_checking=no
636ac_subst_vars='am__EXEEXT_FALSE
637am__EXEEXT_TRUE
638LTLIBOBJS
639BUILD_TEST_KODFILE_FALSE
640BUILD_TEST_KODFILE_TRUE
641BUILD_TEST_KODDATABASE_FALSE
642BUILD_TEST_KODDATABASE_TRUE
643UNITYBUILD_AVAILABLE_FALSE
644UNITYBUILD_AVAILABLE_TRUE
645PATH_RUBY
646VER_SUFFIX
647LIB_SYSLOG
648subdirs
649BUILD_LIBEVENT_FALSE
650BUILD_LIBEVENT_TRUE
651LDADD_LIBEVENT
652CPPFLAGS_LIBEVENT
653CFLAGS_LIBEVENT
654PKG_CONFIG
655NTP_FORCE_LIBEVENT_DIST
656LIBOPTS_DIR
657LIBOPTS_CFLAGS
658LIBOPTS_LDADD
659NEED_LIBOPTS_FALSE
660NEED_LIBOPTS_TRUE
661INSTALL_LIBOPTS_FALSE
662INSTALL_LIBOPTS_TRUE
663POSIX_SHELL
664GL_GENERATE_STDNORETURN_H_FALSE
665GL_GENERATE_STDNORETURN_H_TRUE
666STDNORETURN_H
667BUILD_SNTP_FALSE
668BUILD_SNTP_TRUE
669SNTP
670LIBTOOL_DEPS
671LT_SYS_LIBRARY_PATH
672OTOOL64
673OTOOL
674LIPO
675NMEDIT
676DSYMUTIL
677MANIFEST_TOOL
678RANLIB
679DLLTOOL
680OBJDUMP
681LN_S
682NM
683ac_ct_DUMPBIN
684DUMPBIN
685LIBTOOL
686LIBOBJS
687PTHREADS_FALSE
688PTHREADS_TRUE
689LIBISC_PTHREADS_NOTHREADS
690PTHREAD_LIBS
691LTHREAD_LIBS
692BUILD_THREAD
693HAVE_INLINE
694LDADD_LIBUTIL
695ALLOCA
696LIBM
697EDITLINE_LIBS
698LD
699FGREP
700SED
701LDADD_LIBNTP
702NTP_CROSSCOMPILE_FALSE
703NTP_CROSSCOMPILE_TRUE
704ac_ct_AR
705AR
706INSTALL_UPDATE_LEAP_FALSE
707INSTALL_UPDATE_LEAP_TRUE
708UPDATE_LEAP_NI
709UPDATE_LEAP_MS
710UPDATE_LEAP_DS
711UPDATE_LEAP_DL
712UPDATE_LEAP_DB
713TIMETRIM_NI
714TIMETRIM_MS
715TIMETRIM_DS
716TIMETRIM_DL
717TIMETRIM_DB
718TICKADJ_NI
719TICKADJ_MS
720TICKADJ_DS
721TICKADJ_DL
722TICKADJ_DB
723SNTP_NI
724SNTP_MS
725SNTP_DS
726SNTP_DL
727SNTP_DB
728NTP_WAIT_NI
729NTP_WAIT_MS
730NTP_WAIT_DS
731NTP_WAIT_DL
732NTP_WAIT_DB
733NTP_KEYGEN_NI
734NTP_KEYGEN_MS
735NTP_KEYGEN_DS
736NTP_KEYGEN_DL
737NTP_KEYGEN_DB
738NTPTRACE_NI
739NTPTRACE_MS
740NTPTRACE_DS
741NTPTRACE_DL
742NTPTRACE_DB
743NTPTIME_NI
744NTPTIME_MS
745NTPTIME_DS
746NTPTIME_DL
747NTPTIME_DB
748INSTALL_NTPSWEEP_FALSE
749INSTALL_NTPSWEEP_TRUE
750NTPSWEEP_NI
751NTPSWEEP_MS
752NTPSWEEP_DS
753NTPSWEEP_DL
754NTPSWEEP_DB
755NTPSNMPD_NI
756NTPSNMPD_MS
757NTPSNMPD_DS
758NTPSNMPD_DL
759NTPSNMPD_DB
760NTPQ_NI
761NTPQ_MS
762NTPQ_DS
763NTPQ_DL
764NTPQ_DB
765NTPD_NI
766NTPD_MS
767NTPD_DS
768NTPD_DL
769NTPD_DB
770NTPDSIM_NI
771NTPDSIM_MS
772NTPDSIM_DS
773NTPDSIM_DL
774NTPDSIM_DB
775NTPDC_NI
776NTPDC_MS
777NTPDC_DS
778NTPDC_DL
779NTPDC_DB
780NTPDATE_NI
781NTPDATE_MS
782NTPDATE_DS
783NTPDATE_DL
784NTPDATE_DB
785MANTAGFMT
786CALC_TICKADJ_NI
787CALC_TICKADJ_MS
788CALC_TICKADJ_DS
789CALC_TICKADJ_DL
790CALC_TICKADJ_DB
791WANT_CALC_TICKADJ_MS_FALSE
792WANT_CALC_TICKADJ_MS_TRUE
793NTP_HARD_LDFLAGS
794NTP_HARD_CPPFLAGS
795NTP_HARD_CFLAGS
796LDFLAGS_NTP
797LDADD_NTP
798CPPFLAGS_NTP
799CFLAGS_NTP
800EGREP
801GREP
802CPP
803am__fastdepCC_FALSE
804am__fastdepCC_TRUE
805CCDEPMODE
806am__nodep
807AMDEPBACKSLASH
808AMDEP_FALSE
809AMDEP_TRUE
810am__quote
811am__include
812DEPDIR
813OBJEXT
814EXEEXT
815ac_ct_CC
816CPPFLAGS
817LDFLAGS
818CFLAGS
819CC
820host_os
821host_vendor
822host_cpu
823host
824build_os
825build_vendor
826build_cpu
827build
828AM_BACKSLASH
829AM_DEFAULT_VERBOSITY
830AM_DEFAULT_V
831AM_V
832am__untar
833am__tar
834AMTAR
835am__leading_dot
836SET_MAKE
837AWK
838mkdir_p
839MKDIR_P
840INSTALL_STRIP_PROGRAM
841STRIP
842install_sh
843MAKEINFO
844AUTOHEADER
845AUTOMAKE
846AUTOCONF
847ACLOCAL
848VERSION
849PACKAGE
850CYGPATH_W
851am__isrc
852INSTALL_DATA
853INSTALL_SCRIPT
854INSTALL_PROGRAM
855target_alias
856host_alias
857build_alias
858LIBS
859ECHO_T
860ECHO_N
861ECHO_C
862DEFS
863mandir
864localedir
865libdir
866psdir
867pdfdir
868dvidir
869htmldir
870infodir
871docdir
872oldincludedir
873includedir
874localstatedir
875sharedstatedir
876sysconfdir
877datadir
878datarootdir
879libexecdir
880sbindir
881bindir
882program_transform_name
883prefix
884exec_prefix
885PACKAGE_URL
886PACKAGE_BUGREPORT
887PACKAGE_STRING
888PACKAGE_VERSION
889PACKAGE_TARNAME
890PACKAGE_NAME
891PATH_SEPARATOR
892SHELL'
893ac_subst_files=''
894ac_user_opts='
895enable_option_checking
896enable_silent_rules
897enable_dependency_tracking
898with_hardenfile
899with_locfile
900with_gnu_ld
901with_lineeditlibs
902enable_debugging
903enable_thread_support
904with_threads
905with_yielding_select
906enable_c99_snprintf
907enable_clockctl
908enable_linuxcaps
909enable_solarisprivs
910enable_trustedbsd_mac
911enable_signalled_io
912enable_shared
913enable_static
914with_pic
915enable_fast_install
916with_aix_soname
917with_sysroot
918enable_libtool_lock
919with_sntp
920enable_nls
921enable_local_libopts
922enable_libopts_install
923with_autoopts_config
924with_regex_header
925with_libregex
926with_libregex_cflags
927with_libregex_libs
928enable_optional_args
929enable_local_libevent
930with_crypto
931with_openssl_libdir
932with_openssl_incdir
933with_rpath
934enable_ipv6
935with_kame
936enable_getifaddrs
937enable_problem_tests
938'
939      ac_precious_vars='build_alias
940host_alias
941target_alias
942CC
943CFLAGS
944LDFLAGS
945LIBS
946CPPFLAGS
947CPP
948LT_SYS_LIBRARY_PATH'
949ac_subdirs_all='libevent'
950
951# Initialize some variables set by options.
952ac_init_help=
953ac_init_version=false
954ac_unrecognized_opts=
955ac_unrecognized_sep=
956# The variables have the same names as the options, with
957# dashes changed to underlines.
958cache_file=/dev/null
959exec_prefix=NONE
960no_create=
961no_recursion=
962prefix=NONE
963program_prefix=NONE
964program_suffix=NONE
965program_transform_name=s,x,x,
966silent=
967site=
968srcdir=
969verbose=
970x_includes=NONE
971x_libraries=NONE
972
973# Installation directory options.
974# These are left unexpanded so users can "make install exec_prefix=/foo"
975# and all the variables that are supposed to be based on exec_prefix
976# by default will actually change.
977# Use braces instead of parens because sh, perl, etc. also accept them.
978# (The list follows the same order as the GNU Coding Standards.)
979bindir='${exec_prefix}/bin'
980sbindir='${exec_prefix}/sbin'
981libexecdir='${exec_prefix}/libexec'
982datarootdir='${prefix}/share'
983datadir='${datarootdir}'
984sysconfdir='${prefix}/etc'
985sharedstatedir='${prefix}/com'
986localstatedir='${prefix}/var'
987includedir='${prefix}/include'
988oldincludedir='/usr/include'
989docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
990infodir='${datarootdir}/info'
991htmldir='${docdir}'
992dvidir='${docdir}'
993pdfdir='${docdir}'
994psdir='${docdir}'
995libdir='${exec_prefix}/lib'
996localedir='${datarootdir}/locale'
997mandir='${datarootdir}/man'
998
999ac_prev=
1000ac_dashdash=
1001for ac_option
1002do
1003  # If the previous option needs an argument, assign it.
1004  if test -n "$ac_prev"; then
1005    eval $ac_prev=\$ac_option
1006    ac_prev=
1007    continue
1008  fi
1009
1010  case $ac_option in
1011  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1012  *=)   ac_optarg= ;;
1013  *)    ac_optarg=yes ;;
1014  esac
1015
1016  # Accept the important Cygnus configure options, so we can diagnose typos.
1017
1018  case $ac_dashdash$ac_option in
1019  --)
1020    ac_dashdash=yes ;;
1021
1022  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1023    ac_prev=bindir ;;
1024  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1025    bindir=$ac_optarg ;;
1026
1027  -build | --build | --buil | --bui | --bu)
1028    ac_prev=build_alias ;;
1029  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1030    build_alias=$ac_optarg ;;
1031
1032  -cache-file | --cache-file | --cache-fil | --cache-fi \
1033  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1034    ac_prev=cache_file ;;
1035  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1036  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1037    cache_file=$ac_optarg ;;
1038
1039  --config-cache | -C)
1040    cache_file=config.cache ;;
1041
1042  -datadir | --datadir | --datadi | --datad)
1043    ac_prev=datadir ;;
1044  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1045    datadir=$ac_optarg ;;
1046
1047  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1048  | --dataroo | --dataro | --datar)
1049    ac_prev=datarootdir ;;
1050  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1051  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1052    datarootdir=$ac_optarg ;;
1053
1054  -disable-* | --disable-*)
1055    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1056    # Reject names that are not valid shell variable names.
1057    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1058      as_fn_error $? "invalid feature name: $ac_useropt"
1059    ac_useropt_orig=$ac_useropt
1060    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1061    case $ac_user_opts in
1062      *"
1063"enable_$ac_useropt"
1064"*) ;;
1065      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1066	 ac_unrecognized_sep=', ';;
1067    esac
1068    eval enable_$ac_useropt=no ;;
1069
1070  -docdir | --docdir | --docdi | --doc | --do)
1071    ac_prev=docdir ;;
1072  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1073    docdir=$ac_optarg ;;
1074
1075  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1076    ac_prev=dvidir ;;
1077  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1078    dvidir=$ac_optarg ;;
1079
1080  -enable-* | --enable-*)
1081    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1082    # Reject names that are not valid shell variable names.
1083    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1084      as_fn_error $? "invalid feature name: $ac_useropt"
1085    ac_useropt_orig=$ac_useropt
1086    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1087    case $ac_user_opts in
1088      *"
1089"enable_$ac_useropt"
1090"*) ;;
1091      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1092	 ac_unrecognized_sep=', ';;
1093    esac
1094    eval enable_$ac_useropt=\$ac_optarg ;;
1095
1096  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1097  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1098  | --exec | --exe | --ex)
1099    ac_prev=exec_prefix ;;
1100  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1101  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1102  | --exec=* | --exe=* | --ex=*)
1103    exec_prefix=$ac_optarg ;;
1104
1105  -gas | --gas | --ga | --g)
1106    # Obsolete; use --with-gas.
1107    with_gas=yes ;;
1108
1109  -help | --help | --hel | --he | -h)
1110    ac_init_help=long ;;
1111  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1112    ac_init_help=recursive ;;
1113  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1114    ac_init_help=short ;;
1115
1116  -host | --host | --hos | --ho)
1117    ac_prev=host_alias ;;
1118  -host=* | --host=* | --hos=* | --ho=*)
1119    host_alias=$ac_optarg ;;
1120
1121  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1122    ac_prev=htmldir ;;
1123  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1124  | --ht=*)
1125    htmldir=$ac_optarg ;;
1126
1127  -includedir | --includedir | --includedi | --included | --include \
1128  | --includ | --inclu | --incl | --inc)
1129    ac_prev=includedir ;;
1130  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1131  | --includ=* | --inclu=* | --incl=* | --inc=*)
1132    includedir=$ac_optarg ;;
1133
1134  -infodir | --infodir | --infodi | --infod | --info | --inf)
1135    ac_prev=infodir ;;
1136  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1137    infodir=$ac_optarg ;;
1138
1139  -libdir | --libdir | --libdi | --libd)
1140    ac_prev=libdir ;;
1141  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1142    libdir=$ac_optarg ;;
1143
1144  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1145  | --libexe | --libex | --libe)
1146    ac_prev=libexecdir ;;
1147  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1148  | --libexe=* | --libex=* | --libe=*)
1149    libexecdir=$ac_optarg ;;
1150
1151  -localedir | --localedir | --localedi | --localed | --locale)
1152    ac_prev=localedir ;;
1153  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1154    localedir=$ac_optarg ;;
1155
1156  -localstatedir | --localstatedir | --localstatedi | --localstated \
1157  | --localstate | --localstat | --localsta | --localst | --locals)
1158    ac_prev=localstatedir ;;
1159  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1160  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1161    localstatedir=$ac_optarg ;;
1162
1163  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1164    ac_prev=mandir ;;
1165  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1166    mandir=$ac_optarg ;;
1167
1168  -nfp | --nfp | --nf)
1169    # Obsolete; use --without-fp.
1170    with_fp=no ;;
1171
1172  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1173  | --no-cr | --no-c | -n)
1174    no_create=yes ;;
1175
1176  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1177  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1178    no_recursion=yes ;;
1179
1180  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1181  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1182  | --oldin | --oldi | --old | --ol | --o)
1183    ac_prev=oldincludedir ;;
1184  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1185  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1186  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1187    oldincludedir=$ac_optarg ;;
1188
1189  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1190    ac_prev=prefix ;;
1191  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1192    prefix=$ac_optarg ;;
1193
1194  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1195  | --program-pre | --program-pr | --program-p)
1196    ac_prev=program_prefix ;;
1197  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1198  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1199    program_prefix=$ac_optarg ;;
1200
1201  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1202  | --program-suf | --program-su | --program-s)
1203    ac_prev=program_suffix ;;
1204  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1205  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1206    program_suffix=$ac_optarg ;;
1207
1208  -program-transform-name | --program-transform-name \
1209  | --program-transform-nam | --program-transform-na \
1210  | --program-transform-n | --program-transform- \
1211  | --program-transform | --program-transfor \
1212  | --program-transfo | --program-transf \
1213  | --program-trans | --program-tran \
1214  | --progr-tra | --program-tr | --program-t)
1215    ac_prev=program_transform_name ;;
1216  -program-transform-name=* | --program-transform-name=* \
1217  | --program-transform-nam=* | --program-transform-na=* \
1218  | --program-transform-n=* | --program-transform-=* \
1219  | --program-transform=* | --program-transfor=* \
1220  | --program-transfo=* | --program-transf=* \
1221  | --program-trans=* | --program-tran=* \
1222  | --progr-tra=* | --program-tr=* | --program-t=*)
1223    program_transform_name=$ac_optarg ;;
1224
1225  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1226    ac_prev=pdfdir ;;
1227  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1228    pdfdir=$ac_optarg ;;
1229
1230  -psdir | --psdir | --psdi | --psd | --ps)
1231    ac_prev=psdir ;;
1232  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1233    psdir=$ac_optarg ;;
1234
1235  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1236  | -silent | --silent | --silen | --sile | --sil)
1237    silent=yes ;;
1238
1239  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1240    ac_prev=sbindir ;;
1241  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1242  | --sbi=* | --sb=*)
1243    sbindir=$ac_optarg ;;
1244
1245  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1246  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1247  | --sharedst | --shareds | --shared | --share | --shar \
1248  | --sha | --sh)
1249    ac_prev=sharedstatedir ;;
1250  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1251  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1252  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1253  | --sha=* | --sh=*)
1254    sharedstatedir=$ac_optarg ;;
1255
1256  -site | --site | --sit)
1257    ac_prev=site ;;
1258  -site=* | --site=* | --sit=*)
1259    site=$ac_optarg ;;
1260
1261  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1262    ac_prev=srcdir ;;
1263  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1264    srcdir=$ac_optarg ;;
1265
1266  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1267  | --syscon | --sysco | --sysc | --sys | --sy)
1268    ac_prev=sysconfdir ;;
1269  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1270  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1271    sysconfdir=$ac_optarg ;;
1272
1273  -target | --target | --targe | --targ | --tar | --ta | --t)
1274    ac_prev=target_alias ;;
1275  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1276    target_alias=$ac_optarg ;;
1277
1278  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1279    verbose=yes ;;
1280
1281  -version | --version | --versio | --versi | --vers | -V)
1282    ac_init_version=: ;;
1283
1284  -with-* | --with-*)
1285    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1286    # Reject names that are not valid shell variable names.
1287    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1288      as_fn_error $? "invalid package name: $ac_useropt"
1289    ac_useropt_orig=$ac_useropt
1290    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1291    case $ac_user_opts in
1292      *"
1293"with_$ac_useropt"
1294"*) ;;
1295      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1296	 ac_unrecognized_sep=', ';;
1297    esac
1298    eval with_$ac_useropt=\$ac_optarg ;;
1299
1300  -without-* | --without-*)
1301    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1302    # Reject names that are not valid shell variable names.
1303    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1304      as_fn_error $? "invalid package name: $ac_useropt"
1305    ac_useropt_orig=$ac_useropt
1306    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1307    case $ac_user_opts in
1308      *"
1309"with_$ac_useropt"
1310"*) ;;
1311      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1312	 ac_unrecognized_sep=', ';;
1313    esac
1314    eval with_$ac_useropt=no ;;
1315
1316  --x)
1317    # Obsolete; use --with-x.
1318    with_x=yes ;;
1319
1320  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1321  | --x-incl | --x-inc | --x-in | --x-i)
1322    ac_prev=x_includes ;;
1323  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1324  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1325    x_includes=$ac_optarg ;;
1326
1327  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1328  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1329    ac_prev=x_libraries ;;
1330  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1331  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1332    x_libraries=$ac_optarg ;;
1333
1334  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1335Try \`$0 --help' for more information"
1336    ;;
1337
1338  *=*)
1339    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1340    # Reject names that are not valid shell variable names.
1341    case $ac_envvar in #(
1342      '' | [0-9]* | *[!_$as_cr_alnum]* )
1343      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1344    esac
1345    eval $ac_envvar=\$ac_optarg
1346    export $ac_envvar ;;
1347
1348  *)
1349    # FIXME: should be removed in autoconf 3.0.
1350    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1351    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1352      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1353    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1354    ;;
1355
1356  esac
1357done
1358
1359if test -n "$ac_prev"; then
1360  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1361  as_fn_error $? "missing argument to $ac_option"
1362fi
1363
1364if test -n "$ac_unrecognized_opts"; then
1365  case $enable_option_checking in
1366    no) ;;
1367    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1368    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1369  esac
1370fi
1371
1372# Check all directory arguments for consistency.
1373for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1374		datadir sysconfdir sharedstatedir localstatedir includedir \
1375		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1376		libdir localedir mandir
1377do
1378  eval ac_val=\$$ac_var
1379  # Remove trailing slashes.
1380  case $ac_val in
1381    */ )
1382      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1383      eval $ac_var=\$ac_val;;
1384  esac
1385  # Be sure to have absolute directory names.
1386  case $ac_val in
1387    [\\/$]* | ?:[\\/]* )  continue;;
1388    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1389  esac
1390  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1391done
1392
1393# There might be people who depend on the old broken behavior: `$host'
1394# used to hold the argument of --host etc.
1395# FIXME: To remove some day.
1396build=$build_alias
1397host=$host_alias
1398target=$target_alias
1399
1400# FIXME: To remove some day.
1401if test "x$host_alias" != x; then
1402  if test "x$build_alias" = x; then
1403    cross_compiling=maybe
1404  elif test "x$build_alias" != "x$host_alias"; then
1405    cross_compiling=yes
1406  fi
1407fi
1408
1409ac_tool_prefix=
1410test -n "$host_alias" && ac_tool_prefix=$host_alias-
1411
1412test "$silent" = yes && exec 6>/dev/null
1413
1414
1415ac_pwd=`pwd` && test -n "$ac_pwd" &&
1416ac_ls_di=`ls -di .` &&
1417ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1418  as_fn_error $? "working directory cannot be determined"
1419test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1420  as_fn_error $? "pwd does not report name of working directory"
1421
1422
1423# Find the source files, if location was not specified.
1424if test -z "$srcdir"; then
1425  ac_srcdir_defaulted=yes
1426  # Try the directory containing this script, then the parent directory.
1427  ac_confdir=`$as_dirname -- "$as_myself" ||
1428$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1429	 X"$as_myself" : 'X\(//\)[^/]' \| \
1430	 X"$as_myself" : 'X\(//\)$' \| \
1431	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1432$as_echo X"$as_myself" |
1433    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1434	    s//\1/
1435	    q
1436	  }
1437	  /^X\(\/\/\)[^/].*/{
1438	    s//\1/
1439	    q
1440	  }
1441	  /^X\(\/\/\)$/{
1442	    s//\1/
1443	    q
1444	  }
1445	  /^X\(\/\).*/{
1446	    s//\1/
1447	    q
1448	  }
1449	  s/.*/./; q'`
1450  srcdir=$ac_confdir
1451  if test ! -r "$srcdir/$ac_unique_file"; then
1452    srcdir=..
1453  fi
1454else
1455  ac_srcdir_defaulted=no
1456fi
1457if test ! -r "$srcdir/$ac_unique_file"; then
1458  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1459  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1460fi
1461ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1462ac_abs_confdir=`(
1463	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1464	pwd)`
1465# When building in place, set srcdir=.
1466if test "$ac_abs_confdir" = "$ac_pwd"; then
1467  srcdir=.
1468fi
1469# Remove unnecessary trailing slashes from srcdir.
1470# Double slashes in file names in object file debugging info
1471# mess up M-x gdb in Emacs.
1472case $srcdir in
1473*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1474esac
1475for ac_var in $ac_precious_vars; do
1476  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1477  eval ac_env_${ac_var}_value=\$${ac_var}
1478  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1479  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1480done
1481
1482#
1483# Report the --help message.
1484#
1485if test "$ac_init_help" = "long"; then
1486  # Omit some internal or obsolete options to make the list less imposing.
1487  # This message is too long to be a string in the A/UX 3.1 sh.
1488  cat <<_ACEOF
1489\`configure' configures sntp 4.2.8p15 to adapt to many kinds of systems.
1490
1491Usage: $0 [OPTION]... [VAR=VALUE]...
1492
1493To assign environment variables (e.g., CC, CFLAGS...), specify them as
1494VAR=VALUE.  See below for descriptions of some of the useful variables.
1495
1496Defaults for the options are specified in brackets.
1497
1498Configuration:
1499  -h, --help              display this help and exit
1500      --help=short        display options specific to this package
1501      --help=recursive    display the short help of all the included packages
1502  -V, --version           display version information and exit
1503  -q, --quiet, --silent   do not print \`checking ...' messages
1504      --cache-file=FILE   cache test results in FILE [disabled]
1505  -C, --config-cache      alias for \`--cache-file=config.cache'
1506  -n, --no-create         do not create output files
1507      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1508
1509Installation directories:
1510  --prefix=PREFIX         install architecture-independent files in PREFIX
1511                          [$ac_default_prefix]
1512  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1513                          [PREFIX]
1514
1515By default, \`make install' will install all the files in
1516\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1517an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1518for instance \`--prefix=\$HOME'.
1519
1520For better control, use the options below.
1521
1522Fine tuning of the installation directories:
1523  --bindir=DIR            user executables [EPREFIX/bin]
1524  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1525  --libexecdir=DIR        program executables [EPREFIX/libexec]
1526  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1527  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1528  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1529  --libdir=DIR            object code libraries [EPREFIX/lib]
1530  --includedir=DIR        C header files [PREFIX/include]
1531  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1532  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1533  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1534  --infodir=DIR           info documentation [DATAROOTDIR/info]
1535  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1536  --mandir=DIR            man documentation [DATAROOTDIR/man]
1537  --docdir=DIR            documentation root [DATAROOTDIR/doc/sntp]
1538  --htmldir=DIR           html documentation [DOCDIR]
1539  --dvidir=DIR            dvi documentation [DOCDIR]
1540  --pdfdir=DIR            pdf documentation [DOCDIR]
1541  --psdir=DIR             ps documentation [DOCDIR]
1542_ACEOF
1543
1544  cat <<\_ACEOF
1545
1546Program names:
1547  --program-prefix=PREFIX            prepend PREFIX to installed program names
1548  --program-suffix=SUFFIX            append SUFFIX to installed program names
1549  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1550
1551System types:
1552  --build=BUILD     configure for building on BUILD [guessed]
1553  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1554_ACEOF
1555fi
1556
1557if test -n "$ac_init_help"; then
1558  case $ac_init_help in
1559     short | recursive ) echo "Configuration of sntp 4.2.8p15:";;
1560   esac
1561  cat <<\_ACEOF
1562
1563Optional Features:
1564  --disable-option-checking  ignore unrecognized --enable/--with options
1565  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1566  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1567  --enable-silent-rules   less verbose build output (undo: "make V=1")
1568  --disable-silent-rules  verbose build output (undo: "make V=0")
1569  --enable-dependency-tracking
1570                          do not reject slow dependency extractors
1571  --disable-dependency-tracking
1572                          speeds up one-time build
1573  defaults:               + yes, - no, s system-specific
1574  --enable-debugging      + include ntpd debugging code
1575  --enable-thread-support s use threads (+ if available)
1576  --enable-c99-snprintf   s force replacement
1577  --enable-clockctl       s Use /dev/clockctl for non-root clock control
1578  --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1579  --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1580  --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
1581                          control
1582  --enable-signalled-io   s Use signalled IO if we can
1583  --enable-shared[=PKGS]  build shared libraries [default=no]
1584  --enable-static[=PKGS]  build static libraries [default=yes]
1585  --enable-fast-install[=PKGS]
1586                          optimize for fast installation [default=yes]
1587  --disable-libtool-lock  avoid locking (might break parallel builds)
1588  --disable-nls           disable nls support in libopts
1589  --enable-local-libopts  Use the supplied libopts tearoff code
1590  --enable-libopts-install
1591                          Install libopts with client installation
1592  --disable-optional-args not wanting optional option args
1593  --enable-local-libevent Force using the supplied libevent tearoff code
1594  --enable-ipv6           s use IPv6?
1595
1596  --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1597  --enable-problem-tests  + enable tests with undiagnosed problems
1598
1599Optional Packages:
1600  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1601  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1602  --with-hardenfile=XXX   os-specific or "/dev/null"
1603  --with-locfile=XXX      os-specific or "legacy"
1604  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1605  --with-lineeditlibs     edit,editline (readline may be specified if desired)
1606  --with-threads	  with threads [auto]
1607  --with-yielding-select  with yielding select [auto]
1608  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1609                          both]
1610  --with-aix-soname=aix|svr4|both
1611                          shared library versioning (aka "SONAME") variant to
1612                          provide on AIX, [default=aix].
1613  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1614                          compiler's sysroot if not specified).
1615  --without-sntp          - disable building sntp and sntp/tests
1616  --with-autoopts-config  specify the config-info script
1617  --with-regex-header     a reg expr header is specified
1618  --with-libregex         libregex installation prefix
1619  --with-libregex-cflags  libregex compile flags
1620  --with-libregex-libs    libregex link command arguments
1621  --with-crypto           + =openssl,libcrypto
1622
1623  --with-openssl-libdir   + =/something/reasonable
1624
1625  --with-openssl-incdir   + =/something/reasonable
1626
1627  --without-rpath         s Disable auto-added -R linker paths
1628
1629  --with-kame             - =/usr/local/v6
1630
1631Some influential environment variables:
1632  CC          C compiler command
1633  CFLAGS      C compiler flags
1634  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1635              nonstandard directory <lib dir>
1636  LIBS        libraries to pass to the linker, e.g. -l<library>
1637  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1638              you have headers in a nonstandard directory <include dir>
1639  CPP         C preprocessor
1640  LT_SYS_LIBRARY_PATH
1641              User-defined run-time library search path.
1642
1643Use these variables to override the choices made by `configure' or to help
1644it to find libraries and programs with nonstandard names/locations.
1645
1646Report bugs to <http://bugs.ntp.org./>.
1647sntp home page: <http://www.ntp.org./>.
1648_ACEOF
1649ac_status=$?
1650fi
1651
1652if test "$ac_init_help" = "recursive"; then
1653  # If there are subdirs, report their specific --help.
1654  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1655    test -d "$ac_dir" ||
1656      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1657      continue
1658    ac_builddir=.
1659
1660case "$ac_dir" in
1661.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1662*)
1663  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1664  # A ".." for each directory in $ac_dir_suffix.
1665  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1666  case $ac_top_builddir_sub in
1667  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1668  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1669  esac ;;
1670esac
1671ac_abs_top_builddir=$ac_pwd
1672ac_abs_builddir=$ac_pwd$ac_dir_suffix
1673# for backward compatibility:
1674ac_top_builddir=$ac_top_build_prefix
1675
1676case $srcdir in
1677  .)  # We are building in place.
1678    ac_srcdir=.
1679    ac_top_srcdir=$ac_top_builddir_sub
1680    ac_abs_top_srcdir=$ac_pwd ;;
1681  [\\/]* | ?:[\\/]* )  # Absolute name.
1682    ac_srcdir=$srcdir$ac_dir_suffix;
1683    ac_top_srcdir=$srcdir
1684    ac_abs_top_srcdir=$srcdir ;;
1685  *) # Relative name.
1686    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1687    ac_top_srcdir=$ac_top_build_prefix$srcdir
1688    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1689esac
1690ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1691
1692    cd "$ac_dir" || { ac_status=$?; continue; }
1693    # Check for guested configure.
1694    if test -f "$ac_srcdir/configure.gnu"; then
1695      echo &&
1696      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1697    elif test -f "$ac_srcdir/configure"; then
1698      echo &&
1699      $SHELL "$ac_srcdir/configure" --help=recursive
1700    else
1701      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1702    fi || ac_status=$?
1703    cd "$ac_pwd" || { ac_status=$?; break; }
1704  done
1705fi
1706
1707test -n "$ac_init_help" && exit $ac_status
1708if $ac_init_version; then
1709  cat <<\_ACEOF
1710sntp configure 4.2.8p15
1711generated by GNU Autoconf 2.69
1712
1713Copyright (C) 2012 Free Software Foundation, Inc.
1714This configure script is free software; the Free Software Foundation
1715gives unlimited permission to copy, distribute and modify it.
1716_ACEOF
1717  exit
1718fi
1719
1720## ------------------------ ##
1721## Autoconf initialization. ##
1722## ------------------------ ##
1723
1724# ac_fn_c_try_compile LINENO
1725# --------------------------
1726# Try to compile conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_compile ()
1728{
1729  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730  rm -f conftest.$ac_objext
1731  if { { ac_try="$ac_compile"
1732case "(($ac_try" in
1733  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734  *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738  (eval "$ac_compile") 2>conftest.err
1739  ac_status=$?
1740  if test -s conftest.err; then
1741    grep -v '^ *+' conftest.err >conftest.er1
1742    cat conftest.er1 >&5
1743    mv -f conftest.er1 conftest.err
1744  fi
1745  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746  test $ac_status = 0; } && {
1747	 test -z "$ac_c_werror_flag" ||
1748	 test ! -s conftest.err
1749       } && test -s conftest.$ac_objext; then :
1750  ac_retval=0
1751else
1752  $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755	ac_retval=1
1756fi
1757  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1758  as_fn_set_status $ac_retval
1759
1760} # ac_fn_c_try_compile
1761
1762# ac_fn_c_try_cpp LINENO
1763# ----------------------
1764# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_cpp ()
1766{
1767  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768  if { { ac_try="$ac_cpp conftest.$ac_ext"
1769case "(($ac_try" in
1770  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1771  *) ac_try_echo=$ac_try;;
1772esac
1773eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1774$as_echo "$ac_try_echo"; } >&5
1775  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1776  ac_status=$?
1777  if test -s conftest.err; then
1778    grep -v '^ *+' conftest.err >conftest.er1
1779    cat conftest.er1 >&5
1780    mv -f conftest.er1 conftest.err
1781  fi
1782  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1783  test $ac_status = 0; } > conftest.i && {
1784	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1785	 test ! -s conftest.err
1786       }; then :
1787  ac_retval=0
1788else
1789  $as_echo "$as_me: failed program was:" >&5
1790sed 's/^/| /' conftest.$ac_ext >&5
1791
1792    ac_retval=1
1793fi
1794  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1795  as_fn_set_status $ac_retval
1796
1797} # ac_fn_c_try_cpp
1798
1799# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1800# -------------------------------------------------------
1801# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1802# the include files in INCLUDES and setting the cache variable VAR
1803# accordingly.
1804ac_fn_c_check_header_mongrel ()
1805{
1806  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807  if eval \${$3+:} false; then :
1808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1809$as_echo_n "checking for $2... " >&6; }
1810if eval \${$3+:} false; then :
1811  $as_echo_n "(cached) " >&6
1812fi
1813eval ac_res=\$$3
1814	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1815$as_echo "$ac_res" >&6; }
1816else
1817  # Is the header compilable?
1818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1819$as_echo_n "checking $2 usability... " >&6; }
1820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1821/* end confdefs.h.  */
1822$4
1823#include <$2>
1824_ACEOF
1825if ac_fn_c_try_compile "$LINENO"; then :
1826  ac_header_compiler=yes
1827else
1828  ac_header_compiler=no
1829fi
1830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1832$as_echo "$ac_header_compiler" >&6; }
1833
1834# Is the header present?
1835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1836$as_echo_n "checking $2 presence... " >&6; }
1837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1838/* end confdefs.h.  */
1839#include <$2>
1840_ACEOF
1841if ac_fn_c_try_cpp "$LINENO"; then :
1842  ac_header_preproc=yes
1843else
1844  ac_header_preproc=no
1845fi
1846rm -f conftest.err conftest.i conftest.$ac_ext
1847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1848$as_echo "$ac_header_preproc" >&6; }
1849
1850# So?  What about this header?
1851case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1852  yes:no: )
1853    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1854$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1855    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1856$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1857    ;;
1858  no:yes:* )
1859    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1860$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1861    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1862$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1863    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1864$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1866$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1867    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1868$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1869( $as_echo "## ------------------------------------ ##
1870## Report this to http://bugs.ntp.org./ ##
1871## ------------------------------------ ##"
1872     ) | sed "s/^/$as_me: WARNING:     /" >&2
1873    ;;
1874esac
1875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876$as_echo_n "checking for $2... " >&6; }
1877if eval \${$3+:} false; then :
1878  $as_echo_n "(cached) " >&6
1879else
1880  eval "$3=\$ac_header_compiler"
1881fi
1882eval ac_res=\$$3
1883	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1884$as_echo "$ac_res" >&6; }
1885fi
1886  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1887
1888} # ac_fn_c_check_header_mongrel
1889
1890# ac_fn_c_try_run LINENO
1891# ----------------------
1892# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1893# that executables *can* be run.
1894ac_fn_c_try_run ()
1895{
1896  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1897  if { { ac_try="$ac_link"
1898case "(($ac_try" in
1899  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1900  *) ac_try_echo=$ac_try;;
1901esac
1902eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1903$as_echo "$ac_try_echo"; } >&5
1904  (eval "$ac_link") 2>&5
1905  ac_status=$?
1906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1907  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1908  { { case "(($ac_try" in
1909  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1910  *) ac_try_echo=$ac_try;;
1911esac
1912eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1913$as_echo "$ac_try_echo"; } >&5
1914  (eval "$ac_try") 2>&5
1915  ac_status=$?
1916  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917  test $ac_status = 0; }; }; then :
1918  ac_retval=0
1919else
1920  $as_echo "$as_me: program exited with status $ac_status" >&5
1921       $as_echo "$as_me: failed program was:" >&5
1922sed 's/^/| /' conftest.$ac_ext >&5
1923
1924       ac_retval=$ac_status
1925fi
1926  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1927  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1928  as_fn_set_status $ac_retval
1929
1930} # ac_fn_c_try_run
1931
1932# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1933# -------------------------------------------------------
1934# Tests whether HEADER exists and can be compiled using the include files in
1935# INCLUDES, setting the cache variable VAR accordingly.
1936ac_fn_c_check_header_compile ()
1937{
1938  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
1941if eval \${$3+:} false; then :
1942  $as_echo_n "(cached) " >&6
1943else
1944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h.  */
1946$4
1947#include <$2>
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950  eval "$3=yes"
1951else
1952  eval "$3=no"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956eval ac_res=\$$3
1957	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1958$as_echo "$ac_res" >&6; }
1959  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1960
1961} # ac_fn_c_check_header_compile
1962
1963# ac_fn_c_try_link LINENO
1964# -----------------------
1965# Try to link conftest.$ac_ext, and return whether this succeeded.
1966ac_fn_c_try_link ()
1967{
1968  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969  rm -f conftest.$ac_objext conftest$ac_exeext
1970  if { { ac_try="$ac_link"
1971case "(($ac_try" in
1972  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1973  *) ac_try_echo=$ac_try;;
1974esac
1975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1976$as_echo "$ac_try_echo"; } >&5
1977  (eval "$ac_link") 2>conftest.err
1978  ac_status=$?
1979  if test -s conftest.err; then
1980    grep -v '^ *+' conftest.err >conftest.er1
1981    cat conftest.er1 >&5
1982    mv -f conftest.er1 conftest.err
1983  fi
1984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1985  test $ac_status = 0; } && {
1986	 test -z "$ac_c_werror_flag" ||
1987	 test ! -s conftest.err
1988       } && test -s conftest$ac_exeext && {
1989	 test "$cross_compiling" = yes ||
1990	 test -x conftest$ac_exeext
1991       }; then :
1992  ac_retval=0
1993else
1994  $as_echo "$as_me: failed program was:" >&5
1995sed 's/^/| /' conftest.$ac_ext >&5
1996
1997	ac_retval=1
1998fi
1999  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2000  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2001  # interfere with the next link command; also delete a directory that is
2002  # left behind by Apple's compiler.  We do this before executing the actions.
2003  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2004  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2005  as_fn_set_status $ac_retval
2006
2007} # ac_fn_c_try_link
2008
2009# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2010# -------------------------------------------
2011# Tests whether TYPE exists after having included INCLUDES, setting cache
2012# variable VAR accordingly.
2013ac_fn_c_check_type ()
2014{
2015  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2017$as_echo_n "checking for $2... " >&6; }
2018if eval \${$3+:} false; then :
2019  $as_echo_n "(cached) " >&6
2020else
2021  eval "$3=no"
2022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h.  */
2024$4
2025int
2026main ()
2027{
2028if (sizeof ($2))
2029	 return 0;
2030  ;
2031  return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
2035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2036/* end confdefs.h.  */
2037$4
2038int
2039main ()
2040{
2041if (sizeof (($2)))
2042	    return 0;
2043  ;
2044  return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048
2049else
2050  eval "$3=yes"
2051fi
2052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2053fi
2054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2055fi
2056eval ac_res=\$$3
2057	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2058$as_echo "$ac_res" >&6; }
2059  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2060
2061} # ac_fn_c_check_type
2062
2063# ac_fn_c_check_func LINENO FUNC VAR
2064# ----------------------------------
2065# Tests whether FUNC exists, setting the cache variable VAR accordingly
2066ac_fn_c_check_func ()
2067{
2068  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2070$as_echo_n "checking for $2... " >&6; }
2071if eval \${$3+:} false; then :
2072  $as_echo_n "(cached) " >&6
2073else
2074  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h.  */
2076/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2077   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2078#define $2 innocuous_$2
2079
2080/* System header to define __stub macros and hopefully few prototypes,
2081    which can conflict with char $2 (); below.
2082    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2083    <limits.h> exists even on freestanding compilers.  */
2084
2085#ifdef __STDC__
2086# include <limits.h>
2087#else
2088# include <assert.h>
2089#endif
2090
2091#undef $2
2092
2093/* Override any GCC internal prototype to avoid an error.
2094   Use char because int might match the return type of a GCC
2095   builtin and then its argument prototype would still apply.  */
2096#ifdef __cplusplus
2097extern "C"
2098#endif
2099char $2 ();
2100/* The GNU C library defines this for functions which it implements
2101    to always fail with ENOSYS.  Some functions are actually named
2102    something starting with __ and the normal name is an alias.  */
2103#if defined __stub_$2 || defined __stub___$2
2104choke me
2105#endif
2106
2107int
2108main ()
2109{
2110return $2 ();
2111  ;
2112  return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_link "$LINENO"; then :
2116  eval "$3=yes"
2117else
2118  eval "$3=no"
2119fi
2120rm -f core conftest.err conftest.$ac_objext \
2121    conftest$ac_exeext conftest.$ac_ext
2122fi
2123eval ac_res=\$$3
2124	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2125$as_echo "$ac_res" >&6; }
2126  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2127
2128} # ac_fn_c_check_func
2129
2130# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2131# ---------------------------------------------
2132# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2133# accordingly.
2134ac_fn_c_check_decl ()
2135{
2136  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2137  as_decl_name=`echo $2|sed 's/ *(.*//'`
2138  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2140$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2141if eval \${$3+:} false; then :
2142  $as_echo_n "(cached) " >&6
2143else
2144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145/* end confdefs.h.  */
2146$4
2147int
2148main ()
2149{
2150#ifndef $as_decl_name
2151#ifdef __cplusplus
2152  (void) $as_decl_use;
2153#else
2154  (void) $as_decl_name;
2155#endif
2156#endif
2157
2158  ;
2159  return 0;
2160}
2161_ACEOF
2162if ac_fn_c_try_compile "$LINENO"; then :
2163  eval "$3=yes"
2164else
2165  eval "$3=no"
2166fi
2167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168fi
2169eval ac_res=\$$3
2170	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2171$as_echo "$ac_res" >&6; }
2172  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2173
2174} # ac_fn_c_check_decl
2175
2176# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2177# --------------------------------------------
2178# Tries to find the compile-time value of EXPR in a program that includes
2179# INCLUDES, setting VAR accordingly. Returns whether the value could be
2180# computed
2181ac_fn_c_compute_int ()
2182{
2183  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184  if test "$cross_compiling" = yes; then
2185    # Depending upon the size, compute the lo and hi bounds.
2186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2187/* end confdefs.h.  */
2188$4
2189int
2190main ()
2191{
2192static int test_array [1 - 2 * !(($2) >= 0)];
2193test_array [0] = 0;
2194return test_array [0];
2195
2196  ;
2197  return 0;
2198}
2199_ACEOF
2200if ac_fn_c_try_compile "$LINENO"; then :
2201  ac_lo=0 ac_mid=0
2202  while :; do
2203    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204/* end confdefs.h.  */
2205$4
2206int
2207main ()
2208{
2209static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2210test_array [0] = 0;
2211return test_array [0];
2212
2213  ;
2214  return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_compile "$LINENO"; then :
2218  ac_hi=$ac_mid; break
2219else
2220  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2221			if test $ac_lo -le $ac_mid; then
2222			  ac_lo= ac_hi=
2223			  break
2224			fi
2225			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2226fi
2227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228  done
2229else
2230  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2231/* end confdefs.h.  */
2232$4
2233int
2234main ()
2235{
2236static int test_array [1 - 2 * !(($2) < 0)];
2237test_array [0] = 0;
2238return test_array [0];
2239
2240  ;
2241  return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245  ac_hi=-1 ac_mid=-1
2246  while :; do
2247    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h.  */
2249$4
2250int
2251main ()
2252{
2253static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2254test_array [0] = 0;
2255return test_array [0];
2256
2257  ;
2258  return 0;
2259}
2260_ACEOF
2261if ac_fn_c_try_compile "$LINENO"; then :
2262  ac_lo=$ac_mid; break
2263else
2264  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2265			if test $ac_mid -le $ac_hi; then
2266			  ac_lo= ac_hi=
2267			  break
2268			fi
2269			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2270fi
2271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272  done
2273else
2274  ac_lo= ac_hi=
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277fi
2278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2279# Binary search between lo and hi bounds.
2280while test "x$ac_lo" != "x$ac_hi"; do
2281  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h.  */
2284$4
2285int
2286main ()
2287{
2288static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2289test_array [0] = 0;
2290return test_array [0];
2291
2292  ;
2293  return 0;
2294}
2295_ACEOF
2296if ac_fn_c_try_compile "$LINENO"; then :
2297  ac_hi=$ac_mid
2298else
2299  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2300fi
2301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2302done
2303case $ac_lo in #((
2304?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2305'') ac_retval=1 ;;
2306esac
2307  else
2308    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2309/* end confdefs.h.  */
2310$4
2311static long int longval () { return $2; }
2312static unsigned long int ulongval () { return $2; }
2313#include <stdio.h>
2314#include <stdlib.h>
2315int
2316main ()
2317{
2318
2319  FILE *f = fopen ("conftest.val", "w");
2320  if (! f)
2321    return 1;
2322  if (($2) < 0)
2323    {
2324      long int i = longval ();
2325      if (i != ($2))
2326	return 1;
2327      fprintf (f, "%ld", i);
2328    }
2329  else
2330    {
2331      unsigned long int i = ulongval ();
2332      if (i != ($2))
2333	return 1;
2334      fprintf (f, "%lu", i);
2335    }
2336  /* Do not output a trailing newline, as this causes \r\n confusion
2337     on some platforms.  */
2338  return ferror (f) || fclose (f) != 0;
2339
2340  ;
2341  return 0;
2342}
2343_ACEOF
2344if ac_fn_c_try_run "$LINENO"; then :
2345  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2346else
2347  ac_retval=1
2348fi
2349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2350  conftest.$ac_objext conftest.beam conftest.$ac_ext
2351rm -f conftest.val
2352
2353  fi
2354  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2355  as_fn_set_status $ac_retval
2356
2357} # ac_fn_c_compute_int
2358
2359# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2360# ----------------------------------------------------
2361# Tries to find if the field MEMBER exists in type AGGR, after including
2362# INCLUDES, setting cache variable VAR accordingly.
2363ac_fn_c_check_member ()
2364{
2365  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2366  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2367$as_echo_n "checking for $2.$3... " >&6; }
2368if eval \${$4+:} false; then :
2369  $as_echo_n "(cached) " >&6
2370else
2371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h.  */
2373$5
2374int
2375main ()
2376{
2377static $2 ac_aggr;
2378if (ac_aggr.$3)
2379return 0;
2380  ;
2381  return 0;
2382}
2383_ACEOF
2384if ac_fn_c_try_compile "$LINENO"; then :
2385  eval "$4=yes"
2386else
2387  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388/* end confdefs.h.  */
2389$5
2390int
2391main ()
2392{
2393static $2 ac_aggr;
2394if (sizeof ac_aggr.$3)
2395return 0;
2396  ;
2397  return 0;
2398}
2399_ACEOF
2400if ac_fn_c_try_compile "$LINENO"; then :
2401  eval "$4=yes"
2402else
2403  eval "$4=no"
2404fi
2405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408fi
2409eval ac_res=\$$4
2410	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411$as_echo "$ac_res" >&6; }
2412  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2413
2414} # ac_fn_c_check_member
2415cat >config.log <<_ACEOF
2416This file contains any messages produced by compilers while
2417running configure, to aid debugging if configure makes a mistake.
2418
2419It was created by sntp $as_me 4.2.8p15, which was
2420generated by GNU Autoconf 2.69.  Invocation command line was
2421
2422  $ $0 $@
2423
2424_ACEOF
2425exec 5>>config.log
2426{
2427cat <<_ASUNAME
2428## --------- ##
2429## Platform. ##
2430## --------- ##
2431
2432hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2433uname -m = `(uname -m) 2>/dev/null || echo unknown`
2434uname -r = `(uname -r) 2>/dev/null || echo unknown`
2435uname -s = `(uname -s) 2>/dev/null || echo unknown`
2436uname -v = `(uname -v) 2>/dev/null || echo unknown`
2437
2438/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2439/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2440
2441/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2442/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2443/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2444/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2445/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2446/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2447/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2448
2449_ASUNAME
2450
2451as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2452for as_dir in $PATH
2453do
2454  IFS=$as_save_IFS
2455  test -z "$as_dir" && as_dir=.
2456    $as_echo "PATH: $as_dir"
2457  done
2458IFS=$as_save_IFS
2459
2460} >&5
2461
2462cat >&5 <<_ACEOF
2463
2464
2465## ----------- ##
2466## Core tests. ##
2467## ----------- ##
2468
2469_ACEOF
2470
2471
2472# Keep a trace of the command line.
2473# Strip out --no-create and --no-recursion so they do not pile up.
2474# Strip out --silent because we don't want to record it for future runs.
2475# Also quote any args containing shell meta-characters.
2476# Make two passes to allow for proper duplicate-argument suppression.
2477ac_configure_args=
2478ac_configure_args0=
2479ac_configure_args1=
2480ac_must_keep_next=false
2481for ac_pass in 1 2
2482do
2483  for ac_arg
2484  do
2485    case $ac_arg in
2486    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2487    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2488    | -silent | --silent | --silen | --sile | --sil)
2489      continue ;;
2490    *\'*)
2491      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2492    esac
2493    case $ac_pass in
2494    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2495    2)
2496      as_fn_append ac_configure_args1 " '$ac_arg'"
2497      if test $ac_must_keep_next = true; then
2498	ac_must_keep_next=false # Got value, back to normal.
2499      else
2500	case $ac_arg in
2501	  *=* | --config-cache | -C | -disable-* | --disable-* \
2502	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2503	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2504	  | -with-* | --with-* | -without-* | --without-* | --x)
2505	    case "$ac_configure_args0 " in
2506	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2507	    esac
2508	    ;;
2509	  -* ) ac_must_keep_next=true ;;
2510	esac
2511      fi
2512      as_fn_append ac_configure_args " '$ac_arg'"
2513      ;;
2514    esac
2515  done
2516done
2517{ ac_configure_args0=; unset ac_configure_args0;}
2518{ ac_configure_args1=; unset ac_configure_args1;}
2519
2520# When interrupted or exit'd, cleanup temporary files, and complete
2521# config.log.  We remove comments because anyway the quotes in there
2522# would cause problems or look ugly.
2523# WARNING: Use '\'' to represent an apostrophe within the trap.
2524# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2525trap 'exit_status=$?
2526  # Save into config.log some information that might help in debugging.
2527  {
2528    echo
2529
2530    $as_echo "## ---------------- ##
2531## Cache variables. ##
2532## ---------------- ##"
2533    echo
2534    # The following way of writing the cache mishandles newlines in values,
2535(
2536  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2537    eval ac_val=\$$ac_var
2538    case $ac_val in #(
2539    *${as_nl}*)
2540      case $ac_var in #(
2541      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2542$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2543      esac
2544      case $ac_var in #(
2545      _ | IFS | as_nl) ;; #(
2546      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2547      *) { eval $ac_var=; unset $ac_var;} ;;
2548      esac ;;
2549    esac
2550  done
2551  (set) 2>&1 |
2552    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2553    *${as_nl}ac_space=\ *)
2554      sed -n \
2555	"s/'\''/'\''\\\\'\'''\''/g;
2556	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2557      ;; #(
2558    *)
2559      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2560      ;;
2561    esac |
2562    sort
2563)
2564    echo
2565
2566    $as_echo "## ----------------- ##
2567## Output variables. ##
2568## ----------------- ##"
2569    echo
2570    for ac_var in $ac_subst_vars
2571    do
2572      eval ac_val=\$$ac_var
2573      case $ac_val in
2574      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2575      esac
2576      $as_echo "$ac_var='\''$ac_val'\''"
2577    done | sort
2578    echo
2579
2580    if test -n "$ac_subst_files"; then
2581      $as_echo "## ------------------- ##
2582## File substitutions. ##
2583## ------------------- ##"
2584      echo
2585      for ac_var in $ac_subst_files
2586      do
2587	eval ac_val=\$$ac_var
2588	case $ac_val in
2589	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2590	esac
2591	$as_echo "$ac_var='\''$ac_val'\''"
2592      done | sort
2593      echo
2594    fi
2595
2596    if test -s confdefs.h; then
2597      $as_echo "## ----------- ##
2598## confdefs.h. ##
2599## ----------- ##"
2600      echo
2601      cat confdefs.h
2602      echo
2603    fi
2604    test "$ac_signal" != 0 &&
2605      $as_echo "$as_me: caught signal $ac_signal"
2606    $as_echo "$as_me: exit $exit_status"
2607  } >&5
2608  rm -f core *.core core.conftest.* &&
2609    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2610    exit $exit_status
2611' 0
2612for ac_signal in 1 2 13 15; do
2613  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2614done
2615ac_signal=0
2616
2617# confdefs.h avoids OS command line length limits that DEFS can exceed.
2618rm -f -r conftest* confdefs.h
2619
2620$as_echo "/* confdefs.h */" > confdefs.h
2621
2622# Predefined preprocessor variables.
2623
2624cat >>confdefs.h <<_ACEOF
2625#define PACKAGE_NAME "$PACKAGE_NAME"
2626_ACEOF
2627
2628cat >>confdefs.h <<_ACEOF
2629#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2630_ACEOF
2631
2632cat >>confdefs.h <<_ACEOF
2633#define PACKAGE_VERSION "$PACKAGE_VERSION"
2634_ACEOF
2635
2636cat >>confdefs.h <<_ACEOF
2637#define PACKAGE_STRING "$PACKAGE_STRING"
2638_ACEOF
2639
2640cat >>confdefs.h <<_ACEOF
2641#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2642_ACEOF
2643
2644cat >>confdefs.h <<_ACEOF
2645#define PACKAGE_URL "$PACKAGE_URL"
2646_ACEOF
2647
2648
2649# Let the site file select an alternate cache file if it wants to.
2650# Prefer an explicitly selected file to automatically selected ones.
2651ac_site_file1=NONE
2652ac_site_file2=NONE
2653if test -n "$CONFIG_SITE"; then
2654  # We do not want a PATH search for config.site.
2655  case $CONFIG_SITE in #((
2656    -*)  ac_site_file1=./$CONFIG_SITE;;
2657    */*) ac_site_file1=$CONFIG_SITE;;
2658    *)   ac_site_file1=./$CONFIG_SITE;;
2659  esac
2660elif test "x$prefix" != xNONE; then
2661  ac_site_file1=$prefix/share/config.site
2662  ac_site_file2=$prefix/etc/config.site
2663else
2664  ac_site_file1=$ac_default_prefix/share/config.site
2665  ac_site_file2=$ac_default_prefix/etc/config.site
2666fi
2667for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2668do
2669  test "x$ac_site_file" = xNONE && continue
2670  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2671    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2672$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2673    sed 's/^/| /' "$ac_site_file" >&5
2674    . "$ac_site_file" \
2675      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677as_fn_error $? "failed to load site script $ac_site_file
2678See \`config.log' for more details" "$LINENO" 5; }
2679  fi
2680done
2681
2682if test -r "$cache_file"; then
2683  # Some versions of bash will fail to source /dev/null (special files
2684  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2685  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2686    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2687$as_echo "$as_me: loading cache $cache_file" >&6;}
2688    case $cache_file in
2689      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2690      *)                      . "./$cache_file";;
2691    esac
2692  fi
2693else
2694  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2695$as_echo "$as_me: creating cache $cache_file" >&6;}
2696  >$cache_file
2697fi
2698
2699as_fn_append ac_header_list " stdarg.h"
2700# Check that the precious variables saved in the cache have kept the same
2701# value.
2702ac_cache_corrupted=false
2703for ac_var in $ac_precious_vars; do
2704  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2705  eval ac_new_set=\$ac_env_${ac_var}_set
2706  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2707  eval ac_new_val=\$ac_env_${ac_var}_value
2708  case $ac_old_set,$ac_new_set in
2709    set,)
2710      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2711$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2712      ac_cache_corrupted=: ;;
2713    ,set)
2714      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2715$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2716      ac_cache_corrupted=: ;;
2717    ,);;
2718    *)
2719      if test "x$ac_old_val" != "x$ac_new_val"; then
2720	# differences in whitespace do not lead to failure.
2721	ac_old_val_w=`echo x $ac_old_val`
2722	ac_new_val_w=`echo x $ac_new_val`
2723	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2724	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2725$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2726	  ac_cache_corrupted=:
2727	else
2728	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2729$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2730	  eval $ac_var=\$ac_old_val
2731	fi
2732	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2733$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2734	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2735$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2736      fi;;
2737  esac
2738  # Pass precious variables to config.status.
2739  if test "$ac_new_set" = set; then
2740    case $ac_new_val in
2741    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2742    *) ac_arg=$ac_var=$ac_new_val ;;
2743    esac
2744    case " $ac_configure_args " in
2745      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2746      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2747    esac
2748  fi
2749done
2750if $ac_cache_corrupted; then
2751  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2753  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2754$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2755  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2756fi
2757## -------------------- ##
2758## Main body of script. ##
2759## -------------------- ##
2760
2761ac_ext=c
2762ac_cpp='$CPP $CPPFLAGS'
2763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2765ac_compiler_gnu=$ac_cv_c_compiler_gnu
2766
2767
2768
2769ac_aux_dir=
2770for ac_dir in libevent/build-aux "$srcdir"/libevent/build-aux; do
2771  if test -f "$ac_dir/install-sh"; then
2772    ac_aux_dir=$ac_dir
2773    ac_install_sh="$ac_aux_dir/install-sh -c"
2774    break
2775  elif test -f "$ac_dir/install.sh"; then
2776    ac_aux_dir=$ac_dir
2777    ac_install_sh="$ac_aux_dir/install.sh -c"
2778    break
2779  elif test -f "$ac_dir/shtool"; then
2780    ac_aux_dir=$ac_dir
2781    ac_install_sh="$ac_aux_dir/shtool install -c"
2782    break
2783  fi
2784done
2785if test -z "$ac_aux_dir"; then
2786  as_fn_error $? "cannot find install-sh, install.sh, or shtool in libevent/build-aux \"$srcdir\"/libevent/build-aux" "$LINENO" 5
2787fi
2788
2789# These three variables are undocumented and unsupported,
2790# and are intended to be withdrawn in a future Autoconf release.
2791# They can cause serious problems if a builder's source tree is in a directory
2792# whose full name contains unusual characters.
2793ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2794ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2795ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2796
2797
2798ac_ext=c
2799ac_cpp='$CPP $CPPFLAGS'
2800ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2801ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2802ac_compiler_gnu=$ac_cv_c_compiler_gnu
2803
2804
2805# Bump sntp_configure_cache_version for each change to configure.ac or
2806# .m4 files which invalidates cached values from previous configure
2807# runs.
2808#
2809# If the change affects cache variables used only by the main NTP
2810# configure.ac, then only its version number should be bumped, while
2811# the subdir configure.ac version numbers should be unchanged.  The
2812# same is true for a test/variable that is used only by one subdir
2813# being changed incompatibly; only that subdir's cache version needs
2814# bumping.
2815#
2816# If a change affects variables shared by all NTP configure scripts,
2817# please bump the version numbers of each.  If you are not sure, the
2818# safe choice is to bump all on any cache-invalidating change.
2819#
2820# In order to avoid the risk of version stamp collision between -stable
2821# and -dev branches, do not simply increment the version, instead use
2822# the date YYYYMMDD optionally with -HHMM if there is more than one
2823# bump in a day.
2824
2825sntp_configure_cache_version=20120806
2826
2827# When the version of config.cache and configure do not
2828# match, NTP_CACHEVERSION will flush the cache.
2829
2830
2831
2832    ntp_cache_flush=1
2833
2834    case "$ntp_cv_sntp_cache_version" in
2835     $sntp_configure_cache_version)
2836	# same version, good
2837	ntp_cache_flush=0
2838	;;
2839     '')
2840	# No cache, predates ntp_cv_sntp_cache_version, or is empty.
2841	case "$cache_file" in
2842	 /dev/null)
2843	    ntp_cache_flush=0
2844	    ;;
2845	 *)
2846	    case "$NTP_CACHEVERSION_PARENT" in
2847	     '')
2848		# Do not clear the cache immediately after it is created
2849		# empty as it is noisy.  Differentiate a newly-created
2850		# config.cache from one predating the cache version
2851		# mechanism by looking for the first cached variable set
2852		# by Autoconf
2853		case "$ac_cv_path_install" in
2854		 '')
2855		    # empty config.cache file
2856		    ntp_cache_flush=0
2857		esac
2858		;;
2859	     *)
2860		# Parent configure just created cache from empty,
2861		# flushing would be counterproductive.
2862		ntp_cache_flush=0;
2863		;;
2864	    esac
2865	esac
2866	;;
2867     *)
2868	# configure cache version mismatches config.cache version
2869	;;
2870    esac
2871
2872    case "$ntp_cache_flush" in
2873     1)
2874	c_version="${ntp_cv_sntp_cache_version:-(no version found)}"
2875
2876	# Do we flush all variables or exclude others' version stamps?
2877
2878	case "$NTP_CACHEVERSION_PARENT" in
2879	 '')
2880	    # Clear all *_cv_* variables including our child subdirs'
2881	    # ntp_cv_*_cache_version variables.  This prevents subdir
2882	    # configure scripts from noticing a version mismatch just
2883	    # after the top configure in the invocation cleared and
2884	    # recreated the cache.
2885
2886	    c_varname_list=`set |
2887			    sed -n -e 's/=.*$//' \
2888				   -e '/_cv_/p'
2889			   `
2890	    ;;
2891	 *)
2892	    # This is not the top configure this particular invocation.
2893	    # Clear all *_cv_* variables sparing the version stamps
2894	    # of other configure scripts, so we don't trigger
2895	    # useless repeated clearings.
2896
2897	    c_varname_list=`set |
2898			    sed -n -e 's/=.*$//' \
2899				   -e '/ntp_cv_.*_cache_version/d' \
2900				   -e '/_cv_/p'
2901			   `
2902	esac
2903
2904	for c_varname in $c_varname_list
2905	do
2906	    	    	    	    	    	    { eval $c_varname=; unset $c_varname; }
2907	done
2908
2909	{ $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
2910$as_echo "$as_me: $cache_file saved by another version, ignored." >&6;}
2911	{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script cache version: $sntp_configure_cache_version" >&5
2912$as_echo "$as_me: configure script cache version: $sntp_configure_cache_version" >&6;}
2913	{ $as_echo "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
2914$as_echo "$as_me: $cache_file version: $c_version" >&6;}
2915	{ c_varname=; unset c_varname;}
2916	{ c_varname_list=; unset c_varname_list;}
2917	{ c_version=; unset c_version;}
2918    esac
2919
2920    { ntp_cache_flush=; unset ntp_cache_flush;}
2921
2922    # save configure version in config.cache for next time
2923    ntp_cv_sntp_cache_version="$sntp_configure_cache_version"
2924
2925    # let any subdir configure.ac NTP_CACHEVERSION invocations
2926    # know they are not the top level.
2927    NTP_CACHEVERSION_PARENT='sntp' ; export NTP_CACHEVERSION_PARENT
2928
2929
2930am__api_version='1.15'
2931
2932# Find a good install program.  We prefer a C program (faster),
2933# so one script is as good as another.  But avoid the broken or
2934# incompatible versions:
2935# SysV /etc/install, /usr/sbin/install
2936# SunOS /usr/etc/install
2937# IRIX /sbin/install
2938# AIX /bin/install
2939# AmigaOS /C/install, which installs bootblocks on floppy discs
2940# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2941# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2942# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2943# OS/2's system install, which has a completely different semantic
2944# ./install, which can be erroneously created by make from ./install.sh.
2945# Reject install programs that cannot install multiple files.
2946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
2947$as_echo_n "checking for a BSD-compatible install... " >&6; }
2948if test -z "$INSTALL"; then
2949if ${ac_cv_path_install+:} false; then :
2950  $as_echo_n "(cached) " >&6
2951else
2952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2953for as_dir in $PATH
2954do
2955  IFS=$as_save_IFS
2956  test -z "$as_dir" && as_dir=.
2957    # Account for people who put trailing slashes in PATH elements.
2958case $as_dir/ in #((
2959  ./ | .// | /[cC]/* | \
2960  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
2961  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
2962  /usr/ucb/* ) ;;
2963  *)
2964    # OSF1 and SCO ODT 3.0 have their own names for install.
2965    # Don't use installbsd from OSF since it installs stuff as root
2966    # by default.
2967    for ac_prog in ginstall scoinst install; do
2968      for ac_exec_ext in '' $ac_executable_extensions; do
2969	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
2970	  if test $ac_prog = install &&
2971	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2972	    # AIX install.  It has an incompatible calling convention.
2973	    :
2974	  elif test $ac_prog = install &&
2975	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
2976	    # program-specific install script used by HP pwplus--don't use.
2977	    :
2978	  else
2979	    rm -rf conftest.one conftest.two conftest.dir
2980	    echo one > conftest.one
2981	    echo two > conftest.two
2982	    mkdir conftest.dir
2983	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
2984	      test -s conftest.one && test -s conftest.two &&
2985	      test -s conftest.dir/conftest.one &&
2986	      test -s conftest.dir/conftest.two
2987	    then
2988	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
2989	      break 3
2990	    fi
2991	  fi
2992	fi
2993      done
2994    done
2995    ;;
2996esac
2997
2998  done
2999IFS=$as_save_IFS
3000
3001rm -rf conftest.one conftest.two conftest.dir
3002
3003fi
3004  if test "${ac_cv_path_install+set}" = set; then
3005    INSTALL=$ac_cv_path_install
3006  else
3007    # As a last resort, use the slow shell script.  Don't cache a
3008    # value for INSTALL within a source directory, because that will
3009    # break other packages using the cache if that directory is
3010    # removed, or if the value is a relative name.
3011    INSTALL=$ac_install_sh
3012  fi
3013fi
3014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3015$as_echo "$INSTALL" >&6; }
3016
3017# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3018# It thinks the first close brace ends the variable substitution.
3019test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3020
3021test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3022
3023test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3024
3025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3026$as_echo_n "checking whether build environment is sane... " >&6; }
3027# Reject unsafe characters in $srcdir or the absolute working directory
3028# name.  Accept space and tab only in the latter.
3029am_lf='
3030'
3031case `pwd` in
3032  *[\\\"\#\$\&\'\`$am_lf]*)
3033    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3034esac
3035case $srcdir in
3036  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3037    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3038esac
3039
3040# Do 'set' in a subshell so we don't clobber the current shell's
3041# arguments.  Must try -L first in case configure is actually a
3042# symlink; some systems play weird games with the mod time of symlinks
3043# (eg FreeBSD returns the mod time of the symlink's containing
3044# directory).
3045if (
3046   am_has_slept=no
3047   for am_try in 1 2; do
3048     echo "timestamp, slept: $am_has_slept" > conftest.file
3049     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3050     if test "$*" = "X"; then
3051	# -L didn't work.
3052	set X `ls -t "$srcdir/configure" conftest.file`
3053     fi
3054     if test "$*" != "X $srcdir/configure conftest.file" \
3055	&& test "$*" != "X conftest.file $srcdir/configure"; then
3056
3057	# If neither matched, then we have a broken ls.  This can happen
3058	# if, for instance, CONFIG_SHELL is bash and it inherits a
3059	# broken ls alias from the environment.  This has actually
3060	# happened.  Such a system could not be considered "sane".
3061	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3062  alias in your environment" "$LINENO" 5
3063     fi
3064     if test "$2" = conftest.file || test $am_try -eq 2; then
3065       break
3066     fi
3067     # Just in case.
3068     sleep 1
3069     am_has_slept=yes
3070   done
3071   test "$2" = conftest.file
3072   )
3073then
3074   # Ok.
3075   :
3076else
3077   as_fn_error $? "newly created file is older than distributed files!
3078Check your system clock" "$LINENO" 5
3079fi
3080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3081$as_echo "yes" >&6; }
3082# If we didn't sleep, we still need to ensure time stamps of config.status and
3083# generated files are strictly newer.
3084am_sleep_pid=
3085if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3086  ( sleep 1 ) &
3087  am_sleep_pid=$!
3088fi
3089
3090rm -f conftest.file
3091
3092test "$program_prefix" != NONE &&
3093  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3094# Use a double $ so make ignores it.
3095test "$program_suffix" != NONE &&
3096  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3097# Double any \ or $.
3098# By default was `s,x,x', remove it if useless.
3099ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3100program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3101
3102# Expand $ac_aux_dir to an absolute path.
3103am_aux_dir=`cd "$ac_aux_dir" && pwd`
3104
3105if test x"${MISSING+set}" != xset; then
3106  case $am_aux_dir in
3107  *\ * | *\	*)
3108    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3109  *)
3110    MISSING="\${SHELL} $am_aux_dir/missing" ;;
3111  esac
3112fi
3113# Use eval to expand $SHELL
3114if eval "$MISSING --is-lightweight"; then
3115  am_missing_run="$MISSING "
3116else
3117  am_missing_run=
3118  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3119$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3120fi
3121
3122if test x"${install_sh+set}" != xset; then
3123  case $am_aux_dir in
3124  *\ * | *\	*)
3125    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3126  *)
3127    install_sh="\${SHELL} $am_aux_dir/install-sh"
3128  esac
3129fi
3130
3131# Installed binaries are usually stripped using 'strip' when the user
3132# run "make install-strip".  However 'strip' might not be the right
3133# tool to use in cross-compilation environments, therefore Automake
3134# will honor the 'STRIP' environment variable to overrule this program.
3135if test "$cross_compiling" != no; then
3136  if test -n "$ac_tool_prefix"; then
3137  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3138set dummy ${ac_tool_prefix}strip; ac_word=$2
3139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3140$as_echo_n "checking for $ac_word... " >&6; }
3141if ${ac_cv_prog_STRIP+:} false; then :
3142  $as_echo_n "(cached) " >&6
3143else
3144  if test -n "$STRIP"; then
3145  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3146else
3147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3148for as_dir in $PATH
3149do
3150  IFS=$as_save_IFS
3151  test -z "$as_dir" && as_dir=.
3152    for ac_exec_ext in '' $ac_executable_extensions; do
3153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3154    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3156    break 2
3157  fi
3158done
3159  done
3160IFS=$as_save_IFS
3161
3162fi
3163fi
3164STRIP=$ac_cv_prog_STRIP
3165if test -n "$STRIP"; then
3166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3167$as_echo "$STRIP" >&6; }
3168else
3169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3170$as_echo "no" >&6; }
3171fi
3172
3173
3174fi
3175if test -z "$ac_cv_prog_STRIP"; then
3176  ac_ct_STRIP=$STRIP
3177  # Extract the first word of "strip", so it can be a program name with args.
3178set dummy strip; ac_word=$2
3179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3180$as_echo_n "checking for $ac_word... " >&6; }
3181if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3182  $as_echo_n "(cached) " >&6
3183else
3184  if test -n "$ac_ct_STRIP"; then
3185  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3186else
3187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3188for as_dir in $PATH
3189do
3190  IFS=$as_save_IFS
3191  test -z "$as_dir" && as_dir=.
3192    for ac_exec_ext in '' $ac_executable_extensions; do
3193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3194    ac_cv_prog_ac_ct_STRIP="strip"
3195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3196    break 2
3197  fi
3198done
3199  done
3200IFS=$as_save_IFS
3201
3202fi
3203fi
3204ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3205if test -n "$ac_ct_STRIP"; then
3206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3207$as_echo "$ac_ct_STRIP" >&6; }
3208else
3209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3210$as_echo "no" >&6; }
3211fi
3212
3213  if test "x$ac_ct_STRIP" = x; then
3214    STRIP=":"
3215  else
3216    case $cross_compiling:$ac_tool_warned in
3217yes:)
3218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3220ac_tool_warned=yes ;;
3221esac
3222    STRIP=$ac_ct_STRIP
3223  fi
3224else
3225  STRIP="$ac_cv_prog_STRIP"
3226fi
3227
3228fi
3229INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3230
3231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3232$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3233if test -z "$MKDIR_P"; then
3234  if ${ac_cv_path_mkdir+:} false; then :
3235  $as_echo_n "(cached) " >&6
3236else
3237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3238for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3239do
3240  IFS=$as_save_IFS
3241  test -z "$as_dir" && as_dir=.
3242    for ac_prog in mkdir gmkdir; do
3243	 for ac_exec_ext in '' $ac_executable_extensions; do
3244	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3245	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3246	     'mkdir (GNU coreutils) '* | \
3247	     'mkdir (coreutils) '* | \
3248	     'mkdir (fileutils) '4.1*)
3249	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3250	       break 3;;
3251	   esac
3252	 done
3253       done
3254  done
3255IFS=$as_save_IFS
3256
3257fi
3258
3259  test -d ./--version && rmdir ./--version
3260  if test "${ac_cv_path_mkdir+set}" = set; then
3261    MKDIR_P="$ac_cv_path_mkdir -p"
3262  else
3263    # As a last resort, use the slow shell script.  Don't cache a
3264    # value for MKDIR_P within a source directory, because that will
3265    # break other packages using the cache if that directory is
3266    # removed, or if the value is a relative name.
3267    MKDIR_P="$ac_install_sh -d"
3268  fi
3269fi
3270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3271$as_echo "$MKDIR_P" >&6; }
3272
3273for ac_prog in gawk mawk nawk awk
3274do
3275  # Extract the first word of "$ac_prog", so it can be a program name with args.
3276set dummy $ac_prog; ac_word=$2
3277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3278$as_echo_n "checking for $ac_word... " >&6; }
3279if ${ac_cv_prog_AWK+:} false; then :
3280  $as_echo_n "(cached) " >&6
3281else
3282  if test -n "$AWK"; then
3283  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3284else
3285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3286for as_dir in $PATH
3287do
3288  IFS=$as_save_IFS
3289  test -z "$as_dir" && as_dir=.
3290    for ac_exec_ext in '' $ac_executable_extensions; do
3291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3292    ac_cv_prog_AWK="$ac_prog"
3293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3294    break 2
3295  fi
3296done
3297  done
3298IFS=$as_save_IFS
3299
3300fi
3301fi
3302AWK=$ac_cv_prog_AWK
3303if test -n "$AWK"; then
3304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3305$as_echo "$AWK" >&6; }
3306else
3307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3308$as_echo "no" >&6; }
3309fi
3310
3311
3312  test -n "$AWK" && break
3313done
3314
3315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3316$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3317set x ${MAKE-make}
3318ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3319if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3320  $as_echo_n "(cached) " >&6
3321else
3322  cat >conftest.make <<\_ACEOF
3323SHELL = /bin/sh
3324all:
3325	@echo '@@@%%%=$(MAKE)=@@@%%%'
3326_ACEOF
3327# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3328case `${MAKE-make} -f conftest.make 2>/dev/null` in
3329  *@@@%%%=?*=@@@%%%*)
3330    eval ac_cv_prog_make_${ac_make}_set=yes;;
3331  *)
3332    eval ac_cv_prog_make_${ac_make}_set=no;;
3333esac
3334rm -f conftest.make
3335fi
3336if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3338$as_echo "yes" >&6; }
3339  SET_MAKE=
3340else
3341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3342$as_echo "no" >&6; }
3343  SET_MAKE="MAKE=${MAKE-make}"
3344fi
3345
3346rm -rf .tst 2>/dev/null
3347mkdir .tst 2>/dev/null
3348if test -d .tst; then
3349  am__leading_dot=.
3350else
3351  am__leading_dot=_
3352fi
3353rmdir .tst 2>/dev/null
3354
3355# Check whether --enable-silent-rules was given.
3356if test "${enable_silent_rules+set}" = set; then :
3357  enableval=$enable_silent_rules;
3358fi
3359
3360case $enable_silent_rules in # (((
3361  yes) AM_DEFAULT_VERBOSITY=0;;
3362   no) AM_DEFAULT_VERBOSITY=1;;
3363    *) AM_DEFAULT_VERBOSITY=1;;
3364esac
3365am_make=${MAKE-make}
3366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3367$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3368if ${am_cv_make_support_nested_variables+:} false; then :
3369  $as_echo_n "(cached) " >&6
3370else
3371  if $as_echo 'TRUE=$(BAR$(V))
3372BAR0=false
3373BAR1=true
3374V=1
3375am__doit:
3376	@$(TRUE)
3377.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3378  am_cv_make_support_nested_variables=yes
3379else
3380  am_cv_make_support_nested_variables=no
3381fi
3382fi
3383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3384$as_echo "$am_cv_make_support_nested_variables" >&6; }
3385if test $am_cv_make_support_nested_variables = yes; then
3386    AM_V='$(V)'
3387  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3388else
3389  AM_V=$AM_DEFAULT_VERBOSITY
3390  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3391fi
3392AM_BACKSLASH='\'
3393
3394if test "`cd $srcdir && pwd`" != "`pwd`"; then
3395  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3396  # is not polluted with repeated "-I."
3397  am__isrc=' -I$(srcdir)'
3398  # test to see if srcdir already configured
3399  if test -f $srcdir/config.status; then
3400    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3401  fi
3402fi
3403
3404# test whether we have cygpath
3405if test -z "$CYGPATH_W"; then
3406  if (cygpath --version) >/dev/null 2>/dev/null; then
3407    CYGPATH_W='cygpath -w'
3408  else
3409    CYGPATH_W=echo
3410  fi
3411fi
3412
3413
3414# Define the identity of the package.
3415 PACKAGE='sntp'
3416 VERSION='4.2.8p15'
3417
3418
3419cat >>confdefs.h <<_ACEOF
3420#define PACKAGE "$PACKAGE"
3421_ACEOF
3422
3423
3424cat >>confdefs.h <<_ACEOF
3425#define VERSION "$VERSION"
3426_ACEOF
3427
3428# Some tools Automake needs.
3429
3430ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3431
3432
3433AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3434
3435
3436AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3437
3438
3439AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3440
3441
3442MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3443
3444# For better backward compatibility.  To be removed once Automake 1.9.x
3445# dies out for good.  For more background, see:
3446# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
3447# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
3448mkdir_p='$(MKDIR_P)'
3449
3450# We need awk for the "check" target (and possibly the TAP driver).  The
3451# system "awk" is bad on some platforms.
3452# Always define AMTAR for backward compatibility.  Yes, it's still used
3453# in the wild :-(  We should find a proper way to deprecate it ...
3454AMTAR='$${TAR-tar}'
3455
3456
3457# We'll loop over all known methods to create a tar archive until one works.
3458_am_tools='gnutar  pax cpio none'
3459
3460am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3461
3462
3463
3464
3465
3466
3467# POSIX will say in a future version that running "rm -f" with no argument
3468# is OK; and we want to be able to make that assumption in our Makefile
3469# recipes.  So use an aggressive probe to check that the usage we want is
3470# actually supported "in the wild" to an acceptable degree.
3471# See automake bug#10828.
3472# To make any issue more visible, cause the running configure to be aborted
3473# by default if the 'rm' program in use doesn't match our expectations; the
3474# user can still override this though.
3475if rm -f && rm -fr && rm -rf; then : OK; else
3476  cat >&2 <<'END'
3477Oops!
3478
3479Your 'rm' program seems unable to run without file operands specified
3480on the command line, even when the '-f' option is present.  This is contrary
3481to the behaviour of most rm programs out there, and not conforming with
3482the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
3483
3484Please tell bug-automake@gnu.org about your system, including the value
3485of your $PATH and any error possibly output before this message.  This
3486can help us improve future automake versions.
3487
3488END
3489  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
3490    echo 'Configuration will proceed anyway, since you have set the' >&2
3491    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
3492    echo >&2
3493  else
3494    cat >&2 <<'END'
3495Aborting the configuration process, to ensure you take notice of the issue.
3496
3497You can download and install GNU coreutils to get an 'rm' implementation
3498that behaves properly: <http://www.gnu.org/software/coreutils/>.
3499
3500If you want to complete the configuration process using your problematic
3501'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
3502to "yes", and re-run configure.
3503
3504END
3505    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
3506  fi
3507fi
3508
3509
3510# Check whether --enable-silent-rules was given.
3511if test "${enable_silent_rules+set}" = set; then :
3512  enableval=$enable_silent_rules;
3513fi
3514
3515case $enable_silent_rules in # (((
3516  yes) AM_DEFAULT_VERBOSITY=0;;
3517   no) AM_DEFAULT_VERBOSITY=1;;
3518    *) AM_DEFAULT_VERBOSITY=0;;
3519esac
3520am_make=${MAKE-make}
3521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3522$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3523if ${am_cv_make_support_nested_variables+:} false; then :
3524  $as_echo_n "(cached) " >&6
3525else
3526  if $as_echo 'TRUE=$(BAR$(V))
3527BAR0=false
3528BAR1=true
3529V=1
3530am__doit:
3531	@$(TRUE)
3532.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3533  am_cv_make_support_nested_variables=yes
3534else
3535  am_cv_make_support_nested_variables=no
3536fi
3537fi
3538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3539$as_echo "$am_cv_make_support_nested_variables" >&6; }
3540if test $am_cv_make_support_nested_variables = yes; then
3541    AM_V='$(V)'
3542  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3543else
3544  AM_V=$AM_DEFAULT_VERBOSITY
3545  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3546fi
3547AM_BACKSLASH='\'
3548
3549
3550# Make sure we can run config.sub.
3551$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3552  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3553
3554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3555$as_echo_n "checking build system type... " >&6; }
3556if ${ac_cv_build+:} false; then :
3557  $as_echo_n "(cached) " >&6
3558else
3559  ac_build_alias=$build_alias
3560test "x$ac_build_alias" = x &&
3561  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3562test "x$ac_build_alias" = x &&
3563  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3564ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3565  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3566
3567fi
3568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3569$as_echo "$ac_cv_build" >&6; }
3570case $ac_cv_build in
3571*-*-*) ;;
3572*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3573esac
3574build=$ac_cv_build
3575ac_save_IFS=$IFS; IFS='-'
3576set x $ac_cv_build
3577shift
3578build_cpu=$1
3579build_vendor=$2
3580shift; shift
3581# Remember, the first character of IFS is used to create $*,
3582# except with old shells:
3583build_os=$*
3584IFS=$ac_save_IFS
3585case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3586
3587
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3589$as_echo_n "checking host system type... " >&6; }
3590if ${ac_cv_host+:} false; then :
3591  $as_echo_n "(cached) " >&6
3592else
3593  if test "x$host_alias" = x; then
3594  ac_cv_host=$ac_cv_build
3595else
3596  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3597    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3598fi
3599
3600fi
3601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3602$as_echo "$ac_cv_host" >&6; }
3603case $ac_cv_host in
3604*-*-*) ;;
3605*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3606esac
3607host=$ac_cv_host
3608ac_save_IFS=$IFS; IFS='-'
3609set x $ac_cv_host
3610shift
3611host_cpu=$1
3612host_vendor=$2
3613shift; shift
3614# Remember, the first character of IFS is used to create $*,
3615# except with old shells:
3616host_os=$*
3617IFS=$ac_save_IFS
3618case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3619
3620
3621
3622cat >>confdefs.h <<_ACEOF
3623#define STR_SYSTEM "$host"
3624_ACEOF
3625
3626ac_config_headers="$ac_config_headers config.h"
3627
3628
3629DEPDIR="${am__leading_dot}deps"
3630
3631ac_config_commands="$ac_config_commands depfiles"
3632
3633
3634am_make=${MAKE-make}
3635cat > confinc << 'END'
3636am__doit:
3637	@echo this is the am__doit target
3638.PHONY: am__doit
3639END
3640# If we don't find an include directive, just comment out the code.
3641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3642$as_echo_n "checking for style of include used by $am_make... " >&6; }
3643am__include="#"
3644am__quote=
3645_am_result=none
3646# First try GNU make style include.
3647echo "include confinc" > confmf
3648# Ignore all kinds of additional output from 'make'.
3649case `$am_make -s -f confmf 2> /dev/null` in #(
3650*the\ am__doit\ target*)
3651  am__include=include
3652  am__quote=
3653  _am_result=GNU
3654  ;;
3655esac
3656# Now try BSD make style include.
3657if test "$am__include" = "#"; then
3658   echo '.include "confinc"' > confmf
3659   case `$am_make -s -f confmf 2> /dev/null` in #(
3660   *the\ am__doit\ target*)
3661     am__include=.include
3662     am__quote="\""
3663     _am_result=BSD
3664     ;;
3665   esac
3666fi
3667
3668
3669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3670$as_echo "$_am_result" >&6; }
3671rm -f confinc confmf
3672
3673# Check whether --enable-dependency-tracking was given.
3674if test "${enable_dependency_tracking+set}" = set; then :
3675  enableval=$enable_dependency_tracking;
3676fi
3677
3678if test "x$enable_dependency_tracking" != xno; then
3679  am_depcomp="$ac_aux_dir/depcomp"
3680  AMDEPBACKSLASH='\'
3681  am__nodep='_no'
3682fi
3683 if test "x$enable_dependency_tracking" != xno; then
3684  AMDEP_TRUE=
3685  AMDEP_FALSE='#'
3686else
3687  AMDEP_TRUE='#'
3688  AMDEP_FALSE=
3689fi
3690
3691
3692
3693case "$build" in
3694 *-*-freebsd1?.*)
3695    cclist=cc
3696    ;;
3697 *)
3698    cclist="cc gcc"
3699    ;;
3700esac
3701
3702
3703#AC_USE_SYSTEM_EXTENSIONS
3704
3705ac_ext=c
3706ac_cpp='$CPP $CPPFLAGS'
3707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3709ac_compiler_gnu=$ac_cv_c_compiler_gnu
3710if test -n "$ac_tool_prefix"; then
3711  for ac_prog in $cclist
3712  do
3713    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3714set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3716$as_echo_n "checking for $ac_word... " >&6; }
3717if ${ac_cv_prog_CC+:} false; then :
3718  $as_echo_n "(cached) " >&6
3719else
3720  if test -n "$CC"; then
3721  ac_cv_prog_CC="$CC" # Let the user override the test.
3722else
3723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726  IFS=$as_save_IFS
3727  test -z "$as_dir" && as_dir=.
3728    for ac_exec_ext in '' $ac_executable_extensions; do
3729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3730    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3732    break 2
3733  fi
3734done
3735  done
3736IFS=$as_save_IFS
3737
3738fi
3739fi
3740CC=$ac_cv_prog_CC
3741if test -n "$CC"; then
3742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3743$as_echo "$CC" >&6; }
3744else
3745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3746$as_echo "no" >&6; }
3747fi
3748
3749
3750    test -n "$CC" && break
3751  done
3752fi
3753if test -z "$CC"; then
3754  ac_ct_CC=$CC
3755  for ac_prog in $cclist
3756do
3757  # Extract the first word of "$ac_prog", so it can be a program name with args.
3758set dummy $ac_prog; ac_word=$2
3759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3760$as_echo_n "checking for $ac_word... " >&6; }
3761if ${ac_cv_prog_ac_ct_CC+:} false; then :
3762  $as_echo_n "(cached) " >&6
3763else
3764  if test -n "$ac_ct_CC"; then
3765  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3766else
3767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770  IFS=$as_save_IFS
3771  test -z "$as_dir" && as_dir=.
3772    for ac_exec_ext in '' $ac_executable_extensions; do
3773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3774    ac_cv_prog_ac_ct_CC="$ac_prog"
3775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3776    break 2
3777  fi
3778done
3779  done
3780IFS=$as_save_IFS
3781
3782fi
3783fi
3784ac_ct_CC=$ac_cv_prog_ac_ct_CC
3785if test -n "$ac_ct_CC"; then
3786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3787$as_echo "$ac_ct_CC" >&6; }
3788else
3789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3790$as_echo "no" >&6; }
3791fi
3792
3793
3794  test -n "$ac_ct_CC" && break
3795done
3796
3797  if test "x$ac_ct_CC" = x; then
3798    CC=""
3799  else
3800    case $cross_compiling:$ac_tool_warned in
3801yes:)
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3804ac_tool_warned=yes ;;
3805esac
3806    CC=$ac_ct_CC
3807  fi
3808fi
3809
3810
3811test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3813as_fn_error $? "no acceptable C compiler found in \$PATH
3814See \`config.log' for more details" "$LINENO" 5; }
3815
3816# Provide some information about the compiler.
3817$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3818set X $ac_compile
3819ac_compiler=$2
3820for ac_option in --version -v -V -qversion; do
3821  { { ac_try="$ac_compiler $ac_option >&5"
3822case "(($ac_try" in
3823  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3824  *) ac_try_echo=$ac_try;;
3825esac
3826eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3827$as_echo "$ac_try_echo"; } >&5
3828  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3829  ac_status=$?
3830  if test -s conftest.err; then
3831    sed '10a\
3832... rest of stderr output deleted ...
3833         10q' conftest.err >conftest.er1
3834    cat conftest.er1 >&5
3835  fi
3836  rm -f conftest.er1 conftest.err
3837  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3838  test $ac_status = 0; }
3839done
3840
3841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3842/* end confdefs.h.  */
3843
3844int
3845main ()
3846{
3847
3848  ;
3849  return 0;
3850}
3851_ACEOF
3852ac_clean_files_save=$ac_clean_files
3853ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3854# Try to create an executable without -o first, disregard a.out.
3855# It will help us diagnose broken compilers, and finding out an intuition
3856# of exeext.
3857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3858$as_echo_n "checking whether the C compiler works... " >&6; }
3859ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3860
3861# The possible output files:
3862ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3863
3864ac_rmfiles=
3865for ac_file in $ac_files
3866do
3867  case $ac_file in
3868    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3869    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3870  esac
3871done
3872rm -f $ac_rmfiles
3873
3874if { { ac_try="$ac_link_default"
3875case "(($ac_try" in
3876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3877  *) ac_try_echo=$ac_try;;
3878esac
3879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3880$as_echo "$ac_try_echo"; } >&5
3881  (eval "$ac_link_default") 2>&5
3882  ac_status=$?
3883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3884  test $ac_status = 0; }; then :
3885  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3886# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3887# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3888# so that the user can short-circuit this test for compilers unknown to
3889# Autoconf.
3890for ac_file in $ac_files ''
3891do
3892  test -f "$ac_file" || continue
3893  case $ac_file in
3894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3895	;;
3896    [ab].out )
3897	# We found the default executable, but exeext='' is most
3898	# certainly right.
3899	break;;
3900    *.* )
3901	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3902	then :; else
3903	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3904	fi
3905	# We set ac_cv_exeext here because the later test for it is not
3906	# safe: cross compilers may not add the suffix if given an `-o'
3907	# argument, so we may need to know it at that point already.
3908	# Even if this section looks crufty: it has the advantage of
3909	# actually working.
3910	break;;
3911    * )
3912	break;;
3913  esac
3914done
3915test "$ac_cv_exeext" = no && ac_cv_exeext=
3916
3917else
3918  ac_file=''
3919fi
3920if test -z "$ac_file"; then :
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923$as_echo "$as_me: failed program was:" >&5
3924sed 's/^/| /' conftest.$ac_ext >&5
3925
3926{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3928as_fn_error 77 "C compiler cannot create executables
3929See \`config.log' for more details" "$LINENO" 5; }
3930else
3931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3932$as_echo "yes" >&6; }
3933fi
3934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3935$as_echo_n "checking for C compiler default output file name... " >&6; }
3936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3937$as_echo "$ac_file" >&6; }
3938ac_exeext=$ac_cv_exeext
3939
3940rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3941ac_clean_files=$ac_clean_files_save
3942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3943$as_echo_n "checking for suffix of executables... " >&6; }
3944if { { ac_try="$ac_link"
3945case "(($ac_try" in
3946  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947  *) ac_try_echo=$ac_try;;
3948esac
3949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
3951  (eval "$ac_link") 2>&5
3952  ac_status=$?
3953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954  test $ac_status = 0; }; then :
3955  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3956# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3957# work properly (i.e., refer to `conftest.exe'), while it won't with
3958# `rm'.
3959for ac_file in conftest.exe conftest conftest.*; do
3960  test -f "$ac_file" || continue
3961  case $ac_file in
3962    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3963    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964	  break;;
3965    * ) break;;
3966  esac
3967done
3968else
3969  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3971as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3972See \`config.log' for more details" "$LINENO" 5; }
3973fi
3974rm -f conftest conftest$ac_cv_exeext
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3976$as_echo "$ac_cv_exeext" >&6; }
3977
3978rm -f conftest.$ac_ext
3979EXEEXT=$ac_cv_exeext
3980ac_exeext=$EXEEXT
3981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3982/* end confdefs.h.  */
3983#include <stdio.h>
3984int
3985main ()
3986{
3987FILE *f = fopen ("conftest.out", "w");
3988 return ferror (f) || fclose (f) != 0;
3989
3990  ;
3991  return 0;
3992}
3993_ACEOF
3994ac_clean_files="$ac_clean_files conftest.out"
3995# Check that the compiler produces executables we can run.  If not, either
3996# the compiler is broken, or we cross compile.
3997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3998$as_echo_n "checking whether we are cross compiling... " >&6; }
3999if test "$cross_compiling" != yes; then
4000  { { ac_try="$ac_link"
4001case "(($ac_try" in
4002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4003  *) ac_try_echo=$ac_try;;
4004esac
4005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4006$as_echo "$ac_try_echo"; } >&5
4007  (eval "$ac_link") 2>&5
4008  ac_status=$?
4009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4010  test $ac_status = 0; }
4011  if { ac_try='./conftest$ac_cv_exeext'
4012  { { case "(($ac_try" in
4013  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014  *) ac_try_echo=$ac_try;;
4015esac
4016eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4017$as_echo "$ac_try_echo"; } >&5
4018  (eval "$ac_try") 2>&5
4019  ac_status=$?
4020  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4021  test $ac_status = 0; }; }; then
4022    cross_compiling=no
4023  else
4024    if test "$cross_compiling" = maybe; then
4025	cross_compiling=yes
4026    else
4027	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4029as_fn_error $? "cannot run C compiled programs.
4030If you meant to cross compile, use \`--host'.
4031See \`config.log' for more details" "$LINENO" 5; }
4032    fi
4033  fi
4034fi
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4036$as_echo "$cross_compiling" >&6; }
4037
4038rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4039ac_clean_files=$ac_clean_files_save
4040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4041$as_echo_n "checking for suffix of object files... " >&6; }
4042if ${ac_cv_objext+:} false; then :
4043  $as_echo_n "(cached) " >&6
4044else
4045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046/* end confdefs.h.  */
4047
4048int
4049main ()
4050{
4051
4052  ;
4053  return 0;
4054}
4055_ACEOF
4056rm -f conftest.o conftest.obj
4057if { { ac_try="$ac_compile"
4058case "(($ac_try" in
4059  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060  *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064  (eval "$ac_compile") 2>&5
4065  ac_status=$?
4066  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067  test $ac_status = 0; }; then :
4068  for ac_file in conftest.o conftest.obj conftest.*; do
4069  test -f "$ac_file" || continue;
4070  case $ac_file in
4071    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4072    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4073       break;;
4074  esac
4075done
4076else
4077  $as_echo "$as_me: failed program was:" >&5
4078sed 's/^/| /' conftest.$ac_ext >&5
4079
4080{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4082as_fn_error $? "cannot compute suffix of object files: cannot compile
4083See \`config.log' for more details" "$LINENO" 5; }
4084fi
4085rm -f conftest.$ac_cv_objext conftest.$ac_ext
4086fi
4087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4088$as_echo "$ac_cv_objext" >&6; }
4089OBJEXT=$ac_cv_objext
4090ac_objext=$OBJEXT
4091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4092$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4093if ${ac_cv_c_compiler_gnu+:} false; then :
4094  $as_echo_n "(cached) " >&6
4095else
4096  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4097/* end confdefs.h.  */
4098
4099int
4100main ()
4101{
4102#ifndef __GNUC__
4103       choke me
4104#endif
4105
4106  ;
4107  return 0;
4108}
4109_ACEOF
4110if ac_fn_c_try_compile "$LINENO"; then :
4111  ac_compiler_gnu=yes
4112else
4113  ac_compiler_gnu=no
4114fi
4115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4116ac_cv_c_compiler_gnu=$ac_compiler_gnu
4117
4118fi
4119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4120$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4121if test $ac_compiler_gnu = yes; then
4122  GCC=yes
4123else
4124  GCC=
4125fi
4126ac_test_CFLAGS=${CFLAGS+set}
4127ac_save_CFLAGS=$CFLAGS
4128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4129$as_echo_n "checking whether $CC accepts -g... " >&6; }
4130if ${ac_cv_prog_cc_g+:} false; then :
4131  $as_echo_n "(cached) " >&6
4132else
4133  ac_save_c_werror_flag=$ac_c_werror_flag
4134   ac_c_werror_flag=yes
4135   ac_cv_prog_cc_g=no
4136   CFLAGS="-g"
4137   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4138/* end confdefs.h.  */
4139
4140int
4141main ()
4142{
4143
4144  ;
4145  return 0;
4146}
4147_ACEOF
4148if ac_fn_c_try_compile "$LINENO"; then :
4149  ac_cv_prog_cc_g=yes
4150else
4151  CFLAGS=""
4152      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4153/* end confdefs.h.  */
4154
4155int
4156main ()
4157{
4158
4159  ;
4160  return 0;
4161}
4162_ACEOF
4163if ac_fn_c_try_compile "$LINENO"; then :
4164
4165else
4166  ac_c_werror_flag=$ac_save_c_werror_flag
4167	 CFLAGS="-g"
4168	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4169/* end confdefs.h.  */
4170
4171int
4172main ()
4173{
4174
4175  ;
4176  return 0;
4177}
4178_ACEOF
4179if ac_fn_c_try_compile "$LINENO"; then :
4180  ac_cv_prog_cc_g=yes
4181fi
4182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4183fi
4184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4185fi
4186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4187   ac_c_werror_flag=$ac_save_c_werror_flag
4188fi
4189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4190$as_echo "$ac_cv_prog_cc_g" >&6; }
4191if test "$ac_test_CFLAGS" = set; then
4192  CFLAGS=$ac_save_CFLAGS
4193elif test $ac_cv_prog_cc_g = yes; then
4194  if test "$GCC" = yes; then
4195    CFLAGS="-g -O2"
4196  else
4197    CFLAGS="-g"
4198  fi
4199else
4200  if test "$GCC" = yes; then
4201    CFLAGS="-O2"
4202  else
4203    CFLAGS=
4204  fi
4205fi
4206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4207$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4208if ${ac_cv_prog_cc_c89+:} false; then :
4209  $as_echo_n "(cached) " >&6
4210else
4211  ac_cv_prog_cc_c89=no
4212ac_save_CC=$CC
4213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4214/* end confdefs.h.  */
4215#include <stdarg.h>
4216#include <stdio.h>
4217struct stat;
4218/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4219struct buf { int x; };
4220FILE * (*rcsopen) (struct buf *, struct stat *, int);
4221static char *e (p, i)
4222     char **p;
4223     int i;
4224{
4225  return p[i];
4226}
4227static char *f (char * (*g) (char **, int), char **p, ...)
4228{
4229  char *s;
4230  va_list v;
4231  va_start (v,p);
4232  s = g (p, va_arg (v,int));
4233  va_end (v);
4234  return s;
4235}
4236
4237/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4238   function prototypes and stuff, but not '\xHH' hex character constants.
4239   These don't provoke an error unfortunately, instead are silently treated
4240   as 'x'.  The following induces an error, until -std is added to get
4241   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4242   array size at least.  It's necessary to write '\x00'==0 to get something
4243   that's true only with -std.  */
4244int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4245
4246/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4247   inside strings and character constants.  */
4248#define FOO(x) 'x'
4249int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4250
4251int test (int i, double x);
4252struct s1 {int (*f) (int a);};
4253struct s2 {int (*f) (double a);};
4254int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4255int argc;
4256char **argv;
4257int
4258main ()
4259{
4260return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4261  ;
4262  return 0;
4263}
4264_ACEOF
4265for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4266	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4267do
4268  CC="$ac_save_CC $ac_arg"
4269  if ac_fn_c_try_compile "$LINENO"; then :
4270  ac_cv_prog_cc_c89=$ac_arg
4271fi
4272rm -f core conftest.err conftest.$ac_objext
4273  test "x$ac_cv_prog_cc_c89" != "xno" && break
4274done
4275rm -f conftest.$ac_ext
4276CC=$ac_save_CC
4277
4278fi
4279# AC_CACHE_VAL
4280case "x$ac_cv_prog_cc_c89" in
4281  x)
4282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4283$as_echo "none needed" >&6; } ;;
4284  xno)
4285    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4286$as_echo "unsupported" >&6; } ;;
4287  *)
4288    CC="$CC $ac_cv_prog_cc_c89"
4289    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4290$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4291esac
4292if test "x$ac_cv_prog_cc_c89" != xno; then :
4293
4294fi
4295
4296ac_ext=c
4297ac_cpp='$CPP $CPPFLAGS'
4298ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4299ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4300ac_compiler_gnu=$ac_cv_c_compiler_gnu
4301
4302ac_ext=c
4303ac_cpp='$CPP $CPPFLAGS'
4304ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4305ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4306ac_compiler_gnu=$ac_cv_c_compiler_gnu
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4308$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4309if ${am_cv_prog_cc_c_o+:} false; then :
4310  $as_echo_n "(cached) " >&6
4311else
4312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4313/* end confdefs.h.  */
4314
4315int
4316main ()
4317{
4318
4319  ;
4320  return 0;
4321}
4322_ACEOF
4323  # Make sure it works both with $CC and with simple cc.
4324  # Following AC_PROG_CC_C_O, we do the test twice because some
4325  # compilers refuse to overwrite an existing .o file with -o,
4326  # though they will create one.
4327  am_cv_prog_cc_c_o=yes
4328  for am_i in 1 2; do
4329    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4330   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4331   ac_status=$?
4332   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4333   (exit $ac_status); } \
4334         && test -f conftest2.$ac_objext; then
4335      : OK
4336    else
4337      am_cv_prog_cc_c_o=no
4338      break
4339    fi
4340  done
4341  rm -f core conftest*
4342  unset am_i
4343fi
4344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4345$as_echo "$am_cv_prog_cc_c_o" >&6; }
4346if test "$am_cv_prog_cc_c_o" != yes; then
4347   # Losing compiler, so override with the script.
4348   # FIXME: It is wrong to rewrite CC.
4349   # But if we don't then we get into trouble of one sort or another.
4350   # A longer-term fix would be to have automake use am__CC in this case,
4351   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4352   CC="$am_aux_dir/compile $CC"
4353fi
4354ac_ext=c
4355ac_cpp='$CPP $CPPFLAGS'
4356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4358ac_compiler_gnu=$ac_cv_c_compiler_gnu
4359
4360
4361depcc="$CC"   am_compiler_list=
4362
4363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4364$as_echo_n "checking dependency style of $depcc... " >&6; }
4365if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4366  $as_echo_n "(cached) " >&6
4367else
4368  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4369  # We make a subdir and do the tests there.  Otherwise we can end up
4370  # making bogus files that we don't know about and never remove.  For
4371  # instance it was reported that on HP-UX the gcc test will end up
4372  # making a dummy file named 'D' -- because '-MD' means "put the output
4373  # in D".
4374  rm -rf conftest.dir
4375  mkdir conftest.dir
4376  # Copy depcomp to subdir because otherwise we won't find it if we're
4377  # using a relative directory.
4378  cp "$am_depcomp" conftest.dir
4379  cd conftest.dir
4380  # We will build objects and dependencies in a subdirectory because
4381  # it helps to detect inapplicable dependency modes.  For instance
4382  # both Tru64's cc and ICC support -MD to output dependencies as a
4383  # side effect of compilation, but ICC will put the dependencies in
4384  # the current directory while Tru64 will put them in the object
4385  # directory.
4386  mkdir sub
4387
4388  am_cv_CC_dependencies_compiler_type=none
4389  if test "$am_compiler_list" = ""; then
4390     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4391  fi
4392  am__universal=false
4393  case " $depcc " in #(
4394     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4395     esac
4396
4397  for depmode in $am_compiler_list; do
4398    # Setup a source with many dependencies, because some compilers
4399    # like to wrap large dependency lists on column 80 (with \), and
4400    # we should not choose a depcomp mode which is confused by this.
4401    #
4402    # We need to recreate these files for each test, as the compiler may
4403    # overwrite some of them when testing with obscure command lines.
4404    # This happens at least with the AIX C compiler.
4405    : > sub/conftest.c
4406    for i in 1 2 3 4 5 6; do
4407      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4408      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4409      # Solaris 10 /bin/sh.
4410      echo '/* dummy */' > sub/conftst$i.h
4411    done
4412    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4413
4414    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4415    # mode.  It turns out that the SunPro C++ compiler does not properly
4416    # handle '-M -o', and we need to detect this.  Also, some Intel
4417    # versions had trouble with output in subdirs.
4418    am__obj=sub/conftest.${OBJEXT-o}
4419    am__minus_obj="-o $am__obj"
4420    case $depmode in
4421    gcc)
4422      # This depmode causes a compiler race in universal mode.
4423      test "$am__universal" = false || continue
4424      ;;
4425    nosideeffect)
4426      # After this tag, mechanisms are not by side-effect, so they'll
4427      # only be used when explicitly requested.
4428      if test "x$enable_dependency_tracking" = xyes; then
4429	continue
4430      else
4431	break
4432      fi
4433      ;;
4434    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4435      # This compiler won't grok '-c -o', but also, the minuso test has
4436      # not run yet.  These depmodes are late enough in the game, and
4437      # so weak that their functioning should not be impacted.
4438      am__obj=conftest.${OBJEXT-o}
4439      am__minus_obj=
4440      ;;
4441    none) break ;;
4442    esac
4443    if depmode=$depmode \
4444       source=sub/conftest.c object=$am__obj \
4445       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4446       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4447         >/dev/null 2>conftest.err &&
4448       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4449       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4450       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4451       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4452      # icc doesn't choke on unknown options, it will just issue warnings
4453      # or remarks (even with -Werror).  So we grep stderr for any message
4454      # that says an option was ignored or not supported.
4455      # When given -MP, icc 7.0 and 7.1 complain thusly:
4456      #   icc: Command line warning: ignoring option '-M'; no argument required
4457      # The diagnosis changed in icc 8.0:
4458      #   icc: Command line remark: option '-MP' not supported
4459      if (grep 'ignoring option' conftest.err ||
4460          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4461        am_cv_CC_dependencies_compiler_type=$depmode
4462        break
4463      fi
4464    fi
4465  done
4466
4467  cd ..
4468  rm -rf conftest.dir
4469else
4470  am_cv_CC_dependencies_compiler_type=none
4471fi
4472
4473fi
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4475$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4476CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4477
4478 if
4479  test "x$enable_dependency_tracking" != xno \
4480  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4481  am__fastdepCC_TRUE=
4482  am__fastdepCC_FALSE='#'
4483else
4484  am__fastdepCC_TRUE='#'
4485  am__fastdepCC_FALSE=
4486fi
4487
4488
4489
4490
4491
4492ac_ext=c
4493ac_cpp='$CPP $CPPFLAGS'
4494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4496ac_compiler_gnu=$ac_cv_c_compiler_gnu
4497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4498$as_echo_n "checking how to run the C preprocessor... " >&6; }
4499# On Suns, sometimes $CPP names a directory.
4500if test -n "$CPP" && test -d "$CPP"; then
4501  CPP=
4502fi
4503if test -z "$CPP"; then
4504  if ${ac_cv_prog_CPP+:} false; then :
4505  $as_echo_n "(cached) " >&6
4506else
4507      # Double quotes because CPP needs to be expanded
4508    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4509    do
4510      ac_preproc_ok=false
4511for ac_c_preproc_warn_flag in '' yes
4512do
4513  # Use a header file that comes with gcc, so configuring glibc
4514  # with a fresh cross-compiler works.
4515  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4516  # <limits.h> exists even on freestanding compilers.
4517  # On the NeXT, cc -E runs the code through the compiler's parser,
4518  # not just through cpp. "Syntax error" is here to catch this case.
4519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4520/* end confdefs.h.  */
4521#ifdef __STDC__
4522# include <limits.h>
4523#else
4524# include <assert.h>
4525#endif
4526		     Syntax error
4527_ACEOF
4528if ac_fn_c_try_cpp "$LINENO"; then :
4529
4530else
4531  # Broken: fails on valid input.
4532continue
4533fi
4534rm -f conftest.err conftest.i conftest.$ac_ext
4535
4536  # OK, works on sane cases.  Now check whether nonexistent headers
4537  # can be detected and how.
4538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4539/* end confdefs.h.  */
4540#include <ac_nonexistent.h>
4541_ACEOF
4542if ac_fn_c_try_cpp "$LINENO"; then :
4543  # Broken: success on invalid input.
4544continue
4545else
4546  # Passes both tests.
4547ac_preproc_ok=:
4548break
4549fi
4550rm -f conftest.err conftest.i conftest.$ac_ext
4551
4552done
4553# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4554rm -f conftest.i conftest.err conftest.$ac_ext
4555if $ac_preproc_ok; then :
4556  break
4557fi
4558
4559    done
4560    ac_cv_prog_CPP=$CPP
4561
4562fi
4563  CPP=$ac_cv_prog_CPP
4564else
4565  ac_cv_prog_CPP=$CPP
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4568$as_echo "$CPP" >&6; }
4569ac_preproc_ok=false
4570for ac_c_preproc_warn_flag in '' yes
4571do
4572  # Use a header file that comes with gcc, so configuring glibc
4573  # with a fresh cross-compiler works.
4574  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4575  # <limits.h> exists even on freestanding compilers.
4576  # On the NeXT, cc -E runs the code through the compiler's parser,
4577  # not just through cpp. "Syntax error" is here to catch this case.
4578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4579/* end confdefs.h.  */
4580#ifdef __STDC__
4581# include <limits.h>
4582#else
4583# include <assert.h>
4584#endif
4585		     Syntax error
4586_ACEOF
4587if ac_fn_c_try_cpp "$LINENO"; then :
4588
4589else
4590  # Broken: fails on valid input.
4591continue
4592fi
4593rm -f conftest.err conftest.i conftest.$ac_ext
4594
4595  # OK, works on sane cases.  Now check whether nonexistent headers
4596  # can be detected and how.
4597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4598/* end confdefs.h.  */
4599#include <ac_nonexistent.h>
4600_ACEOF
4601if ac_fn_c_try_cpp "$LINENO"; then :
4602  # Broken: success on invalid input.
4603continue
4604else
4605  # Passes both tests.
4606ac_preproc_ok=:
4607break
4608fi
4609rm -f conftest.err conftest.i conftest.$ac_ext
4610
4611done
4612# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4613rm -f conftest.i conftest.err conftest.$ac_ext
4614if $ac_preproc_ok; then :
4615
4616else
4617  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4619as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4620See \`config.log' for more details" "$LINENO" 5; }
4621fi
4622
4623ac_ext=c
4624ac_cpp='$CPP $CPPFLAGS'
4625ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4626ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4627ac_compiler_gnu=$ac_cv_c_compiler_gnu
4628
4629
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4631$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4632if ${ac_cv_path_GREP+:} false; then :
4633  $as_echo_n "(cached) " >&6
4634else
4635  if test -z "$GREP"; then
4636  ac_path_GREP_found=false
4637  # Loop through the user's path and test for each of PROGNAME-LIST
4638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4640do
4641  IFS=$as_save_IFS
4642  test -z "$as_dir" && as_dir=.
4643    for ac_prog in grep ggrep; do
4644    for ac_exec_ext in '' $ac_executable_extensions; do
4645      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4646      as_fn_executable_p "$ac_path_GREP" || continue
4647# Check for GNU ac_path_GREP and select it if it is found.
4648  # Check for GNU $ac_path_GREP
4649case `"$ac_path_GREP" --version 2>&1` in
4650*GNU*)
4651  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4652*)
4653  ac_count=0
4654  $as_echo_n 0123456789 >"conftest.in"
4655  while :
4656  do
4657    cat "conftest.in" "conftest.in" >"conftest.tmp"
4658    mv "conftest.tmp" "conftest.in"
4659    cp "conftest.in" "conftest.nl"
4660    $as_echo 'GREP' >> "conftest.nl"
4661    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4662    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4663    as_fn_arith $ac_count + 1 && ac_count=$as_val
4664    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4665      # Best one so far, save it but keep looking for a better one
4666      ac_cv_path_GREP="$ac_path_GREP"
4667      ac_path_GREP_max=$ac_count
4668    fi
4669    # 10*(2^10) chars as input seems more than enough
4670    test $ac_count -gt 10 && break
4671  done
4672  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4673esac
4674
4675      $ac_path_GREP_found && break 3
4676    done
4677  done
4678  done
4679IFS=$as_save_IFS
4680  if test -z "$ac_cv_path_GREP"; then
4681    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4682  fi
4683else
4684  ac_cv_path_GREP=$GREP
4685fi
4686
4687fi
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4689$as_echo "$ac_cv_path_GREP" >&6; }
4690 GREP="$ac_cv_path_GREP"
4691
4692
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4694$as_echo_n "checking for egrep... " >&6; }
4695if ${ac_cv_path_EGREP+:} false; then :
4696  $as_echo_n "(cached) " >&6
4697else
4698  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4699   then ac_cv_path_EGREP="$GREP -E"
4700   else
4701     if test -z "$EGREP"; then
4702  ac_path_EGREP_found=false
4703  # Loop through the user's path and test for each of PROGNAME-LIST
4704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4705for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4706do
4707  IFS=$as_save_IFS
4708  test -z "$as_dir" && as_dir=.
4709    for ac_prog in egrep; do
4710    for ac_exec_ext in '' $ac_executable_extensions; do
4711      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4712      as_fn_executable_p "$ac_path_EGREP" || continue
4713# Check for GNU ac_path_EGREP and select it if it is found.
4714  # Check for GNU $ac_path_EGREP
4715case `"$ac_path_EGREP" --version 2>&1` in
4716*GNU*)
4717  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4718*)
4719  ac_count=0
4720  $as_echo_n 0123456789 >"conftest.in"
4721  while :
4722  do
4723    cat "conftest.in" "conftest.in" >"conftest.tmp"
4724    mv "conftest.tmp" "conftest.in"
4725    cp "conftest.in" "conftest.nl"
4726    $as_echo 'EGREP' >> "conftest.nl"
4727    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4728    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4729    as_fn_arith $ac_count + 1 && ac_count=$as_val
4730    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4731      # Best one so far, save it but keep looking for a better one
4732      ac_cv_path_EGREP="$ac_path_EGREP"
4733      ac_path_EGREP_max=$ac_count
4734    fi
4735    # 10*(2^10) chars as input seems more than enough
4736    test $ac_count -gt 10 && break
4737  done
4738  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4739esac
4740
4741      $ac_path_EGREP_found && break 3
4742    done
4743  done
4744  done
4745IFS=$as_save_IFS
4746  if test -z "$ac_cv_path_EGREP"; then
4747    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4748  fi
4749else
4750  ac_cv_path_EGREP=$EGREP
4751fi
4752
4753   fi
4754fi
4755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4756$as_echo "$ac_cv_path_EGREP" >&6; }
4757 EGREP="$ac_cv_path_EGREP"
4758
4759
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4761$as_echo_n "checking for ANSI C header files... " >&6; }
4762if ${ac_cv_header_stdc+:} false; then :
4763  $as_echo_n "(cached) " >&6
4764else
4765  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4766/* end confdefs.h.  */
4767#include <stdlib.h>
4768#include <stdarg.h>
4769#include <string.h>
4770#include <float.h>
4771
4772int
4773main ()
4774{
4775
4776  ;
4777  return 0;
4778}
4779_ACEOF
4780if ac_fn_c_try_compile "$LINENO"; then :
4781  ac_cv_header_stdc=yes
4782else
4783  ac_cv_header_stdc=no
4784fi
4785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4786
4787if test $ac_cv_header_stdc = yes; then
4788  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4790/* end confdefs.h.  */
4791#include <string.h>
4792
4793_ACEOF
4794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4795  $EGREP "memchr" >/dev/null 2>&1; then :
4796
4797else
4798  ac_cv_header_stdc=no
4799fi
4800rm -f conftest*
4801
4802fi
4803
4804if test $ac_cv_header_stdc = yes; then
4805  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4807/* end confdefs.h.  */
4808#include <stdlib.h>
4809
4810_ACEOF
4811if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4812  $EGREP "free" >/dev/null 2>&1; then :
4813
4814else
4815  ac_cv_header_stdc=no
4816fi
4817rm -f conftest*
4818
4819fi
4820
4821if test $ac_cv_header_stdc = yes; then
4822  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4823  if test "$cross_compiling" = yes; then :
4824  :
4825else
4826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4827/* end confdefs.h.  */
4828#include <ctype.h>
4829#include <stdlib.h>
4830#if ((' ' & 0x0FF) == 0x020)
4831# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4832# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4833#else
4834# define ISLOWER(c) \
4835		   (('a' <= (c) && (c) <= 'i') \
4836		     || ('j' <= (c) && (c) <= 'r') \
4837		     || ('s' <= (c) && (c) <= 'z'))
4838# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4839#endif
4840
4841#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4842int
4843main ()
4844{
4845  int i;
4846  for (i = 0; i < 256; i++)
4847    if (XOR (islower (i), ISLOWER (i))
4848	|| toupper (i) != TOUPPER (i))
4849      return 2;
4850  return 0;
4851}
4852_ACEOF
4853if ac_fn_c_try_run "$LINENO"; then :
4854
4855else
4856  ac_cv_header_stdc=no
4857fi
4858rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4859  conftest.$ac_objext conftest.beam conftest.$ac_ext
4860fi
4861
4862fi
4863fi
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4865$as_echo "$ac_cv_header_stdc" >&6; }
4866if test $ac_cv_header_stdc = yes; then
4867
4868$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4869
4870fi
4871
4872# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4873for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4874		  inttypes.h stdint.h unistd.h
4875do :
4876  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4877ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4878"
4879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4880  cat >>confdefs.h <<_ACEOF
4881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4882_ACEOF
4883
4884fi
4885
4886done
4887
4888
4889
4890  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4891if test "x$ac_cv_header_minix_config_h" = xyes; then :
4892  MINIX=yes
4893else
4894  MINIX=
4895fi
4896
4897
4898  if test "$MINIX" = yes; then
4899
4900$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4901
4902
4903$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4904
4905
4906$as_echo "#define _MINIX 1" >>confdefs.h
4907
4908  fi
4909
4910
4911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4912$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4913if ${ac_cv_safe_to_define___extensions__+:} false; then :
4914  $as_echo_n "(cached) " >&6
4915else
4916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4917/* end confdefs.h.  */
4918
4919#         define __EXTENSIONS__ 1
4920          $ac_includes_default
4921int
4922main ()
4923{
4924
4925  ;
4926  return 0;
4927}
4928_ACEOF
4929if ac_fn_c_try_compile "$LINENO"; then :
4930  ac_cv_safe_to_define___extensions__=yes
4931else
4932  ac_cv_safe_to_define___extensions__=no
4933fi
4934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4935fi
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4937$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4938  test $ac_cv_safe_to_define___extensions__ = yes &&
4939    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4940
4941  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4942
4943  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4944
4945  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4946
4947  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4948
4949
4950
4951   case $ac_cv_prog_cc_stdc in #(
4952  no) :
4953    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4954  *) :
4955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4956$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4957if ${ac_cv_prog_cc_c99+:} false; then :
4958  $as_echo_n "(cached) " >&6
4959else
4960  ac_cv_prog_cc_c99=no
4961ac_save_CC=$CC
4962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4963/* end confdefs.h.  */
4964#include <stdarg.h>
4965#include <stdbool.h>
4966#include <stdlib.h>
4967#include <wchar.h>
4968#include <stdio.h>
4969
4970// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4971#define debug(...) fprintf (stderr, __VA_ARGS__)
4972#define showlist(...) puts (#__VA_ARGS__)
4973#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4974static void
4975test_varargs_macros (void)
4976{
4977  int x = 1234;
4978  int y = 5678;
4979  debug ("Flag");
4980  debug ("X = %d\n", x);
4981  showlist (The first, second, and third items.);
4982  report (x>y, "x is %d but y is %d", x, y);
4983}
4984
4985// Check long long types.
4986#define BIG64 18446744073709551615ull
4987#define BIG32 4294967295ul
4988#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4989#if !BIG_OK
4990  your preprocessor is broken;
4991#endif
4992#if BIG_OK
4993#else
4994  your preprocessor is broken;
4995#endif
4996static long long int bignum = -9223372036854775807LL;
4997static unsigned long long int ubignum = BIG64;
4998
4999struct incomplete_array
5000{
5001  int datasize;
5002  double data[];
5003};
5004
5005struct named_init {
5006  int number;
5007  const wchar_t *name;
5008  double average;
5009};
5010
5011typedef const char *ccp;
5012
5013static inline int
5014test_restrict (ccp restrict text)
5015{
5016  // See if C++-style comments work.
5017  // Iterate through items via the restricted pointer.
5018  // Also check for declarations in for loops.
5019  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5020    continue;
5021  return 0;
5022}
5023
5024// Check varargs and va_copy.
5025static void
5026test_varargs (const char *format, ...)
5027{
5028  va_list args;
5029  va_start (args, format);
5030  va_list args_copy;
5031  va_copy (args_copy, args);
5032
5033  const char *str;
5034  int number;
5035  float fnumber;
5036
5037  while (*format)
5038    {
5039      switch (*format++)
5040	{
5041	case 's': // string
5042	  str = va_arg (args_copy, const char *);
5043	  break;
5044	case 'd': // int
5045	  number = va_arg (args_copy, int);
5046	  break;
5047	case 'f': // float
5048	  fnumber = va_arg (args_copy, double);
5049	  break;
5050	default:
5051	  break;
5052	}
5053    }
5054  va_end (args_copy);
5055  va_end (args);
5056}
5057
5058int
5059main ()
5060{
5061
5062  // Check bool.
5063  _Bool success = false;
5064
5065  // Check restrict.
5066  if (test_restrict ("String literal") == 0)
5067    success = true;
5068  char *restrict newvar = "Another string";
5069
5070  // Check varargs.
5071  test_varargs ("s, d' f .", "string", 65, 34.234);
5072  test_varargs_macros ();
5073
5074  // Check flexible array members.
5075  struct incomplete_array *ia =
5076    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5077  ia->datasize = 10;
5078  for (int i = 0; i < ia->datasize; ++i)
5079    ia->data[i] = i * 1.234;
5080
5081  // Check named initializers.
5082  struct named_init ni = {
5083    .number = 34,
5084    .name = L"Test wide string",
5085    .average = 543.34343,
5086  };
5087
5088  ni.number = 58;
5089
5090  int dynamic_array[ni.number];
5091  dynamic_array[ni.number - 1] = 543;
5092
5093  // work around unused variable warnings
5094  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5095	  || dynamic_array[ni.number - 1] != 543);
5096
5097  ;
5098  return 0;
5099}
5100_ACEOF
5101for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5102do
5103  CC="$ac_save_CC $ac_arg"
5104  if ac_fn_c_try_compile "$LINENO"; then :
5105  ac_cv_prog_cc_c99=$ac_arg
5106fi
5107rm -f core conftest.err conftest.$ac_objext
5108  test "x$ac_cv_prog_cc_c99" != "xno" && break
5109done
5110rm -f conftest.$ac_ext
5111CC=$ac_save_CC
5112
5113fi
5114# AC_CACHE_VAL
5115case "x$ac_cv_prog_cc_c99" in
5116  x)
5117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5118$as_echo "none needed" >&6; } ;;
5119  xno)
5120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5121$as_echo "unsupported" >&6; } ;;
5122  *)
5123    CC="$CC $ac_cv_prog_cc_c99"
5124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5125$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5126esac
5127if test "x$ac_cv_prog_cc_c99" != xno; then :
5128  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5129else
5130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5131$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5132if ${ac_cv_prog_cc_c89+:} false; then :
5133  $as_echo_n "(cached) " >&6
5134else
5135  ac_cv_prog_cc_c89=no
5136ac_save_CC=$CC
5137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5138/* end confdefs.h.  */
5139#include <stdarg.h>
5140#include <stdio.h>
5141struct stat;
5142/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5143struct buf { int x; };
5144FILE * (*rcsopen) (struct buf *, struct stat *, int);
5145static char *e (p, i)
5146     char **p;
5147     int i;
5148{
5149  return p[i];
5150}
5151static char *f (char * (*g) (char **, int), char **p, ...)
5152{
5153  char *s;
5154  va_list v;
5155  va_start (v,p);
5156  s = g (p, va_arg (v,int));
5157  va_end (v);
5158  return s;
5159}
5160
5161/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5162   function prototypes and stuff, but not '\xHH' hex character constants.
5163   These don't provoke an error unfortunately, instead are silently treated
5164   as 'x'.  The following induces an error, until -std is added to get
5165   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5166   array size at least.  It's necessary to write '\x00'==0 to get something
5167   that's true only with -std.  */
5168int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5169
5170/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5171   inside strings and character constants.  */
5172#define FOO(x) 'x'
5173int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5174
5175int test (int i, double x);
5176struct s1 {int (*f) (int a);};
5177struct s2 {int (*f) (double a);};
5178int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5179int argc;
5180char **argv;
5181int
5182main ()
5183{
5184return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5185  ;
5186  return 0;
5187}
5188_ACEOF
5189for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5190	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5191do
5192  CC="$ac_save_CC $ac_arg"
5193  if ac_fn_c_try_compile "$LINENO"; then :
5194  ac_cv_prog_cc_c89=$ac_arg
5195fi
5196rm -f core conftest.err conftest.$ac_objext
5197  test "x$ac_cv_prog_cc_c89" != "xno" && break
5198done
5199rm -f conftest.$ac_ext
5200CC=$ac_save_CC
5201
5202fi
5203# AC_CACHE_VAL
5204case "x$ac_cv_prog_cc_c89" in
5205  x)
5206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5207$as_echo "none needed" >&6; } ;;
5208  xno)
5209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5210$as_echo "unsupported" >&6; } ;;
5211  *)
5212    CC="$CC $ac_cv_prog_cc_c89"
5213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5214$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5215esac
5216if test "x$ac_cv_prog_cc_c89" != xno; then :
5217  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5218else
5219  ac_cv_prog_cc_stdc=no
5220fi
5221
5222fi
5223 ;;
5224esac
5225  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5226$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5227  if ${ac_cv_prog_cc_stdc+:} false; then :
5228  $as_echo_n "(cached) " >&6
5229fi
5230
5231  case $ac_cv_prog_cc_stdc in #(
5232  no) :
5233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5234$as_echo "unsupported" >&6; } ;; #(
5235  '') :
5236    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5237$as_echo "none needed" >&6; } ;; #(
5238  *) :
5239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5240$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5241esac
5242
5243
5244
5245
5246
5247# Ralf Wildenhues: With per-target flags we need CC_C_O
5248# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
5249
5250if test $ac_cv_c_compiler_gnu = yes; then
5251    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5252$as_echo_n "checking whether $CC needs -traditional... " >&6; }
5253if ${ac_cv_prog_gcc_traditional+:} false; then :
5254  $as_echo_n "(cached) " >&6
5255else
5256    ac_pattern="Autoconf.*'x'"
5257  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5258/* end confdefs.h.  */
5259#include <sgtty.h>
5260Autoconf TIOCGETP
5261_ACEOF
5262if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5263  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5264  ac_cv_prog_gcc_traditional=yes
5265else
5266  ac_cv_prog_gcc_traditional=no
5267fi
5268rm -f conftest*
5269
5270
5271  if test $ac_cv_prog_gcc_traditional = no; then
5272    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5273/* end confdefs.h.  */
5274#include <termio.h>
5275Autoconf TCGETA
5276_ACEOF
5277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5278  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5279  ac_cv_prog_gcc_traditional=yes
5280fi
5281rm -f conftest*
5282
5283  fi
5284fi
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5286$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5287  if test $ac_cv_prog_gcc_traditional = yes; then
5288    CC="$CC -traditional"
5289  fi
5290fi
5291
5292
5293
5294CFLAGS_NTP=
5295CPPFLAGS_NTP=
5296LDADD_NTP=
5297LDFLAGS_NTP=
5298
5299
5300
5301
5302
5303case "$ac_cv_prog_cc_c89" in
5304 no)
5305    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5306		 version 4.2.5 and higher." >&5
5307$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5308		 version 4.2.5 and higher." >&2;}
5309    ;;
5310esac
5311
5312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5313$as_echo_n "checking if $CC can handle #warning... " >&6; }
5314if ${ntp_cv_cpp_warning+:} false; then :
5315  $as_echo_n "(cached) " >&6
5316else
5317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318/* end confdefs.h.  */
5319
5320int
5321main ()
5322{
5323#warning foo
5324  ;
5325  return 0;
5326}
5327_ACEOF
5328if ac_fn_c_try_compile "$LINENO"; then :
5329  ntp_cv_cpp_warning=yes
5330else
5331  ntp_cv_cpp_warning=no
5332
5333fi
5334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5335
5336fi
5337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5338$as_echo "$ntp_cv_cpp_warning" >&6; }
5339case "$ntp_cv_cpp_warning" in
5340 no)
5341
5342$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5343
5344esac
5345
5346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5347$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
5348if ${ntp_cv_cc_attribute+:} false; then :
5349  $as_echo_n "(cached) " >&6
5350else
5351  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5352/* end confdefs.h.  */
5353
5354int
5355main ()
5356{
5357void foo(void) __attribute__((__noreturn__));
5358
5359  ;
5360  return 0;
5361}
5362_ACEOF
5363if ac_fn_c_try_compile "$LINENO"; then :
5364  ntp_cv_cc_attribute=yes
5365else
5366  ntp_cv_cc_attribute=no
5367
5368fi
5369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5370
5371fi
5372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5373$as_echo "$ntp_cv_cc_attribute" >&6; }
5374case "$ntp_cv_cc_attribute" in
5375 yes)
5376
5377$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5378
5379esac
5380
5381
5382case "$GCC" in
5383 yes)
5384    SAVED_CFLAGS="$CFLAGS"
5385    CFLAGS="$CFLAGS -Wstrict-overflow"
5386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5387$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
5388if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
5389  $as_echo_n "(cached) " >&6
5390else
5391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5392/* end confdefs.h.  */
5393
5394int
5395main ()
5396{
5397
5398  ;
5399  return 0;
5400}
5401_ACEOF
5402if ac_fn_c_try_compile "$LINENO"; then :
5403  ntp_cv_gcc_Wstrict_overflow=yes
5404else
5405  ntp_cv_gcc_Wstrict_overflow=no
5406
5407fi
5408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409
5410fi
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5412$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5413    #
5414    # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5415    # flag to CFLAGS.
5416    #
5417    CFLAGS="$SAVED_CFLAGS -Winit-self"
5418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5419$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
5420if ${ntp_cv_gcc_Winit_self+:} false; then :
5421  $as_echo_n "(cached) " >&6
5422else
5423
5424	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425/* end confdefs.h.  */
5426
5427int
5428main ()
5429{
5430
5431  ;
5432  return 0;
5433}
5434_ACEOF
5435if ac_fn_c_try_compile "$LINENO"; then :
5436  ntp_cv_gcc_Winit_self=yes
5437else
5438  ntp_cv_gcc_Winit_self=no
5439
5440fi
5441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5442
5443
5444fi
5445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5446$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
5447    CFLAGS="$SAVED_CFLAGS"
5448    { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5449    #
5450    # $ntp_cv_gcc_Winit_self is tested later to add the
5451    # flag to CFLAGS_NTP.
5452    #
5453    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5454$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
5455if ${ntp_cv_gc_sections_runs+:} false; then :
5456  $as_echo_n "(cached) " >&6
5457else
5458
5459	    	    	    	    	    	    	    	    	    	    	    origCFLAGS="$CFLAGS"
5460	    CFLAGS="$CFLAGS -Wl,--gc-sections"
5461	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h.  */
5463
5464			#include <stdlib.h>
5465			#include <stdio.h>
5466
5467int
5468main ()
5469{
5470
5471			FILE *	fpC;
5472			char	buf[32];
5473			size_t	cch;
5474			int	read_success_once;
5475
5476			fpC = fopen("conftest.c", "r");
5477			if (NULL == fpC)
5478				exit(1);
5479			do {
5480				cch = fread(buf, sizeof(buf), 1, fpC);
5481				read_success_once |= (0 != cch);
5482			} while (0 != cch);
5483			if (!read_success_once)
5484				exit(2);
5485			if (!feof(fpC))
5486				exit(3);
5487			if (0 != fclose(fpC))
5488				exit(4);
5489
5490			exit(EXIT_SUCCESS);
5491
5492
5493  ;
5494  return 0;
5495}
5496_ACEOF
5497if ac_fn_c_try_link "$LINENO"; then :
5498
5499		    if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5500			ntp_cv_gc_sections_runs=no
5501		    else
5502			ntp_cv_gc_sections_runs=no
5503			./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5504		    fi
5505
5506else
5507  ntp_cv_gc_sections_runs=no
5508
5509fi
5510rm -f core conftest.err conftest.$ac_objext \
5511    conftest$ac_exeext conftest.$ac_ext
5512	    CFLAGS="$origCFLAGS"
5513	    { origCFLAGS=; unset origCFLAGS;}
5514
5515
5516fi
5517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5518$as_echo "$ntp_cv_gc_sections_runs" >&6; }
5519    case "$ntp_cv_gc_sections_runs" in
5520     yes)
5521	LDADD_LIBNTP="-Wl,--gc-sections"
5522	CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5523	;;
5524     no)
5525	LDADD_LIBNTP=
5526	;;
5527    esac
5528    CFLAGS_NTP="$CFLAGS_NTP -Wall"
5529    CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5530    CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5531    # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5532    # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5533    # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5534    # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5535    CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5536    CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5537    CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5538    # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5539    # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5540    case "$ntp_cv_gcc_Winit_self" in
5541     yes)
5542	CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5543    esac
5544    case "$ntp_cv_gcc_Wstrict_overflow" in
5545     yes)
5546	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5547    esac
5548    # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5549esac
5550
5551
5552    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5553$as_echo_n "checking additional compiler flags... " >&6; }
5554    # allow ntp_os_cflags to be preset to skip this stuff
5555    case "${ntp_os_cflags+set}" in
5556     set)
5557	;;
5558     *)
5559	ntp_os_cflags=
5560	case "$host_os" in
5561	 aix[1-3]*)
5562	    ;;
5563	 aix4.[0-2]*)
5564	    # turn on additional headers
5565	    ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5566	    ;;
5567	 aix5.3*)
5568	    # avoid circular dependencies in yp headers, and more
5569	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5570	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5571	    ;;
5572	 aix*)
5573	    # XXX Only verified thru AIX6.
5574	    # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5575	    # avoid circular dependencies in yp headers
5576	    # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5577	    # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5578	    # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5579	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5580	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5581	    ;;
5582	 amigaos)
5583	    ntp_os_cflags="-DSYS_AMIGA"
5584	    ;;
5585	 darwin*|macosx*|rhapsody*)
5586	    ntp_os_cflags="-D_P1003_1B_VISIBLE"
5587	    ;;
5588	 hpux10.*)		# at least for hppa2.0-hp-hpux10.20
5589	    case "$GCC" in
5590	     yes)
5591		;;
5592	     *)
5593		# use Ansi compiler on HPUX, and some -Wp magic
5594		ntp_os_cflags="-Ae -Wp,-H18816"
5595		;;
5596	    esac
5597	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5598	    ;;
5599	 hpux*)
5600	    case "$GCC" in
5601	     yes)
5602		;;
5603	     *)
5604		# use Ansi compiler on HPUX
5605		ntp_os_cflags="-Ae"
5606	    esac
5607	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5608	    ;;
5609	 irix6*)
5610	    case "$CC" in
5611	     cc)
5612		# do not use 64-bit compiler
5613		ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5614	    esac
5615	    ;;
5616	 nextstep3)
5617	    ntp_os_cflags="-posix"
5618	    ;;
5619	 solaris1*|solaris2.[0-5]|solaris2.5.*)
5620	    ;;
5621	 sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5622	    ;;
5623	 solaris2*|sunos5*)
5624	    # turn on 64-bit file offset interface
5625	    ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5626	    ;;
5627	 vxworks*)
5628	    case "$build" in
5629	     $host)
5630		;;
5631	     *)
5632		# Quick and dirty sanity check
5633		case "$VX_KERNEL" in
5634		 '')
5635		    as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5636		esac
5637		ntp_os_cflags="-DSYS_VXWORKS"
5638	    esac
5639	    ;;
5640	esac
5641    esac
5642    case "$ntp_os_cflags" in
5643     '')
5644	ntp_os_cflags_msg="none needed"
5645	;;
5646     *)
5647	ntp_os_cflags_msg="$ntp_os_cflags"
5648    esac
5649    CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5651$as_echo "$ntp_os_cflags_msg" >&6; }
5652    { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5653    ###
5654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5655$as_echo_n "checking additional linker flags... " >&6; }
5656    # HMS: The following might still need tweaking
5657    # allow ntp_os_ldflags to be preset to skip this stuff
5658    case "${ntp_os_ldflags+set}" in
5659     set)
5660	;;
5661     *)
5662	ntp_os_ldflags=
5663	case "$host_os" in
5664	 hpux*)
5665	    case "$GCC" in
5666	     yes)
5667		ntp_os_ldflags="-Wl,+allowdups"
5668		;;
5669	    esac
5670	    ;;
5671	esac
5672	;;
5673    esac
5674    case "$ntp_os_ldflags" in
5675     '')
5676	ntp_os_ldflags_msg="none needed"
5677	;;
5678     *)
5679	ntp_os_ldflags_msg="$ntp_os_ldflags"
5680    esac
5681    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5682    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5683$as_echo "$ntp_os_ldflags_msg" >&6; }
5684    { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5685
5686
5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5688$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5689if ${ac_cv_c_bigendian+:} false; then :
5690  $as_echo_n "(cached) " >&6
5691else
5692  ac_cv_c_bigendian=unknown
5693    # See if we're dealing with a universal compiler.
5694    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5695/* end confdefs.h.  */
5696#ifndef __APPLE_CC__
5697	       not a universal capable compiler
5698	     #endif
5699	     typedef int dummy;
5700
5701_ACEOF
5702if ac_fn_c_try_compile "$LINENO"; then :
5703
5704	# Check for potential -arch flags.  It is not universal unless
5705	# there are at least two -arch flags with different values.
5706	ac_arch=
5707	ac_prev=
5708	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5709	 if test -n "$ac_prev"; then
5710	   case $ac_word in
5711	     i?86 | x86_64 | ppc | ppc64)
5712	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5713		 ac_arch=$ac_word
5714	       else
5715		 ac_cv_c_bigendian=universal
5716		 break
5717	       fi
5718	       ;;
5719	   esac
5720	   ac_prev=
5721	 elif test "x$ac_word" = "x-arch"; then
5722	   ac_prev=arch
5723	 fi
5724       done
5725fi
5726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5727    if test $ac_cv_c_bigendian = unknown; then
5728      # See if sys/param.h defines the BYTE_ORDER macro.
5729      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5730/* end confdefs.h.  */
5731#include <sys/types.h>
5732	     #include <sys/param.h>
5733
5734int
5735main ()
5736{
5737#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5738		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5739		     && LITTLE_ENDIAN)
5740	      bogus endian macros
5741	     #endif
5742
5743  ;
5744  return 0;
5745}
5746_ACEOF
5747if ac_fn_c_try_compile "$LINENO"; then :
5748  # It does; now see whether it defined to BIG_ENDIAN or not.
5749	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5750/* end confdefs.h.  */
5751#include <sys/types.h>
5752		#include <sys/param.h>
5753
5754int
5755main ()
5756{
5757#if BYTE_ORDER != BIG_ENDIAN
5758		 not big endian
5759		#endif
5760
5761  ;
5762  return 0;
5763}
5764_ACEOF
5765if ac_fn_c_try_compile "$LINENO"; then :
5766  ac_cv_c_bigendian=yes
5767else
5768  ac_cv_c_bigendian=no
5769fi
5770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5771fi
5772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5773    fi
5774    if test $ac_cv_c_bigendian = unknown; then
5775      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5776      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5777/* end confdefs.h.  */
5778#include <limits.h>
5779
5780int
5781main ()
5782{
5783#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5784	      bogus endian macros
5785	     #endif
5786
5787  ;
5788  return 0;
5789}
5790_ACEOF
5791if ac_fn_c_try_compile "$LINENO"; then :
5792  # It does; now see whether it defined to _BIG_ENDIAN or not.
5793	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5794/* end confdefs.h.  */
5795#include <limits.h>
5796
5797int
5798main ()
5799{
5800#ifndef _BIG_ENDIAN
5801		 not big endian
5802		#endif
5803
5804  ;
5805  return 0;
5806}
5807_ACEOF
5808if ac_fn_c_try_compile "$LINENO"; then :
5809  ac_cv_c_bigendian=yes
5810else
5811  ac_cv_c_bigendian=no
5812fi
5813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5814fi
5815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5816    fi
5817    if test $ac_cv_c_bigendian = unknown; then
5818      # Compile a test program.
5819      if test "$cross_compiling" = yes; then :
5820  # Try to guess by grepping values from an object file.
5821	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5822/* end confdefs.h.  */
5823short int ascii_mm[] =
5824		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5825		short int ascii_ii[] =
5826		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5827		int use_ascii (int i) {
5828		  return ascii_mm[i] + ascii_ii[i];
5829		}
5830		short int ebcdic_ii[] =
5831		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5832		short int ebcdic_mm[] =
5833		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5834		int use_ebcdic (int i) {
5835		  return ebcdic_mm[i] + ebcdic_ii[i];
5836		}
5837		extern int foo;
5838
5839int
5840main ()
5841{
5842return use_ascii (foo) == use_ebcdic (foo);
5843  ;
5844  return 0;
5845}
5846_ACEOF
5847if ac_fn_c_try_compile "$LINENO"; then :
5848  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5849	      ac_cv_c_bigendian=yes
5850	    fi
5851	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5852	      if test "$ac_cv_c_bigendian" = unknown; then
5853		ac_cv_c_bigendian=no
5854	      else
5855		# finding both strings is unlikely to happen, but who knows?
5856		ac_cv_c_bigendian=unknown
5857	      fi
5858	    fi
5859fi
5860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5861else
5862  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5863/* end confdefs.h.  */
5864$ac_includes_default
5865int
5866main ()
5867{
5868
5869	     /* Are we little or big endian?  From Harbison&Steele.  */
5870	     union
5871	     {
5872	       long int l;
5873	       char c[sizeof (long int)];
5874	     } u;
5875	     u.l = 1;
5876	     return u.c[sizeof (long int) - 1] == 1;
5877
5878  ;
5879  return 0;
5880}
5881_ACEOF
5882if ac_fn_c_try_run "$LINENO"; then :
5883  ac_cv_c_bigendian=no
5884else
5885  ac_cv_c_bigendian=yes
5886fi
5887rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5888  conftest.$ac_objext conftest.beam conftest.$ac_ext
5889fi
5890
5891    fi
5892fi
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5894$as_echo "$ac_cv_c_bigendian" >&6; }
5895 case $ac_cv_c_bigendian in #(
5896   yes)
5897     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5898;; #(
5899   no)
5900      ;; #(
5901   universal)
5902
5903$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5904
5905     ;; #(
5906   *)
5907     as_fn_error $? "unknown endianness
5908 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5909 esac
5910
5911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
5912$as_echo_n "checking for working volatile... " >&6; }
5913if ${ac_cv_c_volatile+:} false; then :
5914  $as_echo_n "(cached) " >&6
5915else
5916  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917/* end confdefs.h.  */
5918
5919int
5920main ()
5921{
5922
5923volatile int x;
5924int * volatile y = (int *) 0;
5925return !x && !y;
5926  ;
5927  return 0;
5928}
5929_ACEOF
5930if ac_fn_c_try_compile "$LINENO"; then :
5931  ac_cv_c_volatile=yes
5932else
5933  ac_cv_c_volatile=no
5934fi
5935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5936fi
5937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
5938$as_echo "$ac_cv_c_volatile" >&6; }
5939if test $ac_cv_c_volatile = no; then
5940
5941$as_echo "#define volatile /**/" >>confdefs.h
5942
5943fi
5944
5945ac_ext=c
5946ac_cpp='$CPP $CPPFLAGS'
5947ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5948ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5949ac_compiler_gnu=$ac_cv_c_compiler_gnu
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5951$as_echo_n "checking how to run the C preprocessor... " >&6; }
5952# On Suns, sometimes $CPP names a directory.
5953if test -n "$CPP" && test -d "$CPP"; then
5954  CPP=
5955fi
5956if test -z "$CPP"; then
5957  if ${ac_cv_prog_CPP+:} false; then :
5958  $as_echo_n "(cached) " >&6
5959else
5960      # Double quotes because CPP needs to be expanded
5961    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5962    do
5963      ac_preproc_ok=false
5964for ac_c_preproc_warn_flag in '' yes
5965do
5966  # Use a header file that comes with gcc, so configuring glibc
5967  # with a fresh cross-compiler works.
5968  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5969  # <limits.h> exists even on freestanding compilers.
5970  # On the NeXT, cc -E runs the code through the compiler's parser,
5971  # not just through cpp. "Syntax error" is here to catch this case.
5972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973/* end confdefs.h.  */
5974#ifdef __STDC__
5975# include <limits.h>
5976#else
5977# include <assert.h>
5978#endif
5979		     Syntax error
5980_ACEOF
5981if ac_fn_c_try_cpp "$LINENO"; then :
5982
5983else
5984  # Broken: fails on valid input.
5985continue
5986fi
5987rm -f conftest.err conftest.i conftest.$ac_ext
5988
5989  # OK, works on sane cases.  Now check whether nonexistent headers
5990  # can be detected and how.
5991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5992/* end confdefs.h.  */
5993#include <ac_nonexistent.h>
5994_ACEOF
5995if ac_fn_c_try_cpp "$LINENO"; then :
5996  # Broken: success on invalid input.
5997continue
5998else
5999  # Passes both tests.
6000ac_preproc_ok=:
6001break
6002fi
6003rm -f conftest.err conftest.i conftest.$ac_ext
6004
6005done
6006# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6007rm -f conftest.i conftest.err conftest.$ac_ext
6008if $ac_preproc_ok; then :
6009  break
6010fi
6011
6012    done
6013    ac_cv_prog_CPP=$CPP
6014
6015fi
6016  CPP=$ac_cv_prog_CPP
6017else
6018  ac_cv_prog_CPP=$CPP
6019fi
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6021$as_echo "$CPP" >&6; }
6022ac_preproc_ok=false
6023for ac_c_preproc_warn_flag in '' yes
6024do
6025  # Use a header file that comes with gcc, so configuring glibc
6026  # with a fresh cross-compiler works.
6027  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6028  # <limits.h> exists even on freestanding compilers.
6029  # On the NeXT, cc -E runs the code through the compiler's parser,
6030  # not just through cpp. "Syntax error" is here to catch this case.
6031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6032/* end confdefs.h.  */
6033#ifdef __STDC__
6034# include <limits.h>
6035#else
6036# include <assert.h>
6037#endif
6038		     Syntax error
6039_ACEOF
6040if ac_fn_c_try_cpp "$LINENO"; then :
6041
6042else
6043  # Broken: fails on valid input.
6044continue
6045fi
6046rm -f conftest.err conftest.i conftest.$ac_ext
6047
6048  # OK, works on sane cases.  Now check whether nonexistent headers
6049  # can be detected and how.
6050  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051/* end confdefs.h.  */
6052#include <ac_nonexistent.h>
6053_ACEOF
6054if ac_fn_c_try_cpp "$LINENO"; then :
6055  # Broken: success on invalid input.
6056continue
6057else
6058  # Passes both tests.
6059ac_preproc_ok=:
6060break
6061fi
6062rm -f conftest.err conftest.i conftest.$ac_ext
6063
6064done
6065# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6066rm -f conftest.i conftest.err conftest.$ac_ext
6067if $ac_preproc_ok; then :
6068
6069else
6070  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6072as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6073See \`config.log' for more details" "$LINENO" 5; }
6074fi
6075
6076ac_ext=c
6077ac_cpp='$CPP $CPPFLAGS'
6078ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6079ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6080ac_compiler_gnu=$ac_cv_c_compiler_gnu
6081
6082
6083
6084
6085
6086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6087$as_echo_n "checking for compile/link hardening flags... " >&6; }
6088
6089
6090# Check whether --with-hardenfile was given.
6091if test "${with_hardenfile+set}" = set; then :
6092  withval=$with_hardenfile;
6093else
6094  with_hardenfile=no
6095
6096fi
6097
6098
6099(									\
6100    SENTINEL_DIR="$PWD" &&						\
6101    cd $srcdir/ &&							\
6102    case "$with_hardenfile" in						\
6103     yes|no|'')								\
6104	scripts/genHardFlags -d "$SENTINEL_DIR"				\
6105	;;								\
6106     *)									\
6107	scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile"	\
6108	;;								\
6109    esac								\
6110) > genHardFlags.i 2> genHardFlags.err
6111. ./genHardFlags.i
6112
6113case "$GENHARDFLAG" in
6114 OK)
6115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6116$as_echo "in file $GENHARDFLAGFILE" >&6; }
6117    rm genHardFlags.err genHardFlags.i
6118    ;;
6119 *)
6120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6121$as_echo "failed." >&6; }
6122    as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6123    ;;
6124esac
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6135$as_echo_n "checking for install dir and man conventions... " >&6; }
6136
6137
6138# Check whether --with-locfile was given.
6139if test "${with_locfile+set}" = set; then :
6140  withval=$with_locfile;
6141else
6142  with_locfile=no
6143
6144fi
6145
6146
6147(									\
6148    SENTINEL_DIR="$PWD" &&						\
6149    cd $srcdir/ &&							\
6150    case "$with_locfile" in						\
6151     yes|no|'')								\
6152	scripts/genLocInfo -d "$SENTINEL_DIR"				\
6153	;;								\
6154     *)									\
6155	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
6156	;;								\
6157    esac								\
6158) > genLocInfo.i 2> genLocInfo.err
6159. ./genLocInfo.i
6160
6161case "$GENLOCINFO" in
6162 OK)
6163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6164$as_echo "in file $GENLOCINFOFILE" >&6; }
6165    rm genLocInfo.err genLocInfo.i
6166    ;;
6167 *)
6168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6169$as_echo "failed." >&6; }
6170    as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6171    ;;
6172esac
6173
6174 if test "$CALC_TICKADJ_MS" ; then
6175  WANT_CALC_TICKADJ_MS_TRUE=
6176  WANT_CALC_TICKADJ_MS_FALSE='#'
6177else
6178  WANT_CALC_TICKADJ_MS_TRUE='#'
6179  WANT_CALC_TICKADJ_MS_FALSE=
6180fi
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224 if test -z "$NTPSWEEP_NI" ; then
6225  INSTALL_NTPSWEEP_TRUE=
6226  INSTALL_NTPSWEEP_FALSE='#'
6227else
6228  INSTALL_NTPSWEEP_TRUE='#'
6229  INSTALL_NTPSWEEP_FALSE=
6230fi
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272 if test -z "$UPDATE_LEAP_NI" ; then
6273  INSTALL_UPDATE_LEAP_TRUE=
6274  INSTALL_UPDATE_LEAP_FALSE='#'
6275else
6276  INSTALL_UPDATE_LEAP_TRUE='#'
6277  INSTALL_UPDATE_LEAP_FALSE=
6278fi
6279
6280
6281
6282
6283if test -n "$ac_tool_prefix"; then
6284  for ac_prog in ar lib "link -lib"
6285  do
6286    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6287set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if ${ac_cv_prog_AR+:} false; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  if test -n "$AR"; then
6294  ac_cv_prog_AR="$AR" # Let the user override the test.
6295else
6296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6303    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311fi
6312fi
6313AR=$ac_cv_prog_AR
6314if test -n "$AR"; then
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6316$as_echo "$AR" >&6; }
6317else
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }
6320fi
6321
6322
6323    test -n "$AR" && break
6324  done
6325fi
6326if test -z "$AR"; then
6327  ac_ct_AR=$AR
6328  for ac_prog in ar lib "link -lib"
6329do
6330  # Extract the first word of "$ac_prog", so it can be a program name with args.
6331set dummy $ac_prog; ac_word=$2
6332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6333$as_echo_n "checking for $ac_word... " >&6; }
6334if ${ac_cv_prog_ac_ct_AR+:} false; then :
6335  $as_echo_n "(cached) " >&6
6336else
6337  if test -n "$ac_ct_AR"; then
6338  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6339else
6340as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6341for as_dir in $PATH
6342do
6343  IFS=$as_save_IFS
6344  test -z "$as_dir" && as_dir=.
6345    for ac_exec_ext in '' $ac_executable_extensions; do
6346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6347    ac_cv_prog_ac_ct_AR="$ac_prog"
6348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6349    break 2
6350  fi
6351done
6352  done
6353IFS=$as_save_IFS
6354
6355fi
6356fi
6357ac_ct_AR=$ac_cv_prog_ac_ct_AR
6358if test -n "$ac_ct_AR"; then
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6360$as_echo "$ac_ct_AR" >&6; }
6361else
6362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
6364fi
6365
6366
6367  test -n "$ac_ct_AR" && break
6368done
6369
6370  if test "x$ac_ct_AR" = x; then
6371    AR="false"
6372  else
6373    case $cross_compiling:$ac_tool_warned in
6374yes:)
6375{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6376$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6377ac_tool_warned=yes ;;
6378esac
6379    AR=$ac_ct_AR
6380  fi
6381fi
6382
6383: ${AR=ar}
6384
6385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6386$as_echo_n "checking the archiver ($AR) interface... " >&6; }
6387if ${am_cv_ar_interface+:} false; then :
6388  $as_echo_n "(cached) " >&6
6389else
6390  ac_ext=c
6391ac_cpp='$CPP $CPPFLAGS'
6392ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6393ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6394ac_compiler_gnu=$ac_cv_c_compiler_gnu
6395
6396   am_cv_ar_interface=ar
6397   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6398/* end confdefs.h.  */
6399int some_variable = 0;
6400_ACEOF
6401if ac_fn_c_try_compile "$LINENO"; then :
6402  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6403      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6404  (eval $am_ar_try) 2>&5
6405  ac_status=$?
6406  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6407  test $ac_status = 0; }
6408      if test "$ac_status" -eq 0; then
6409        am_cv_ar_interface=ar
6410      else
6411        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6412        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6413  (eval $am_ar_try) 2>&5
6414  ac_status=$?
6415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6416  test $ac_status = 0; }
6417        if test "$ac_status" -eq 0; then
6418          am_cv_ar_interface=lib
6419        else
6420          am_cv_ar_interface=unknown
6421        fi
6422      fi
6423      rm -f conftest.lib libconftest.a
6424
6425fi
6426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6427   ac_ext=c
6428ac_cpp='$CPP $CPPFLAGS'
6429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6431ac_compiler_gnu=$ac_cv_c_compiler_gnu
6432
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6435$as_echo "$am_cv_ar_interface" >&6; }
6436
6437case $am_cv_ar_interface in
6438ar)
6439  ;;
6440lib)
6441  # Microsoft lib, so override with the ar-lib wrapper script.
6442  # FIXME: It is wrong to rewrite AR.
6443  # But if we don't then we get into trouble of one sort or another.
6444  # A longer-term fix would be to have automake use am__AR in this case,
6445  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6446  # similar.
6447  AR="$am_aux_dir/ar-lib $AR"
6448  ;;
6449unknown)
6450  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6451  ;;
6452esac
6453
6454
6455
6456
6457
6458# Expose a cross-compilation indicator to makefiles
6459 if test $build != $host; then
6460  NTP_CROSSCOMPILE_TRUE=
6461  NTP_CROSSCOMPILE_FALSE='#'
6462else
6463  NTP_CROSSCOMPILE_TRUE='#'
6464  NTP_CROSSCOMPILE_FALSE=
6465fi
6466
6467
6468
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6470$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6471if ${ac_cv_path_SED+:} false; then :
6472  $as_echo_n "(cached) " >&6
6473else
6474            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6475     for ac_i in 1 2 3 4 5 6 7; do
6476       ac_script="$ac_script$as_nl$ac_script"
6477     done
6478     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6479     { ac_script=; unset ac_script;}
6480     if test -z "$SED"; then
6481  ac_path_SED_found=false
6482  # Loop through the user's path and test for each of PROGNAME-LIST
6483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484for as_dir in $PATH
6485do
6486  IFS=$as_save_IFS
6487  test -z "$as_dir" && as_dir=.
6488    for ac_prog in sed gsed; do
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6491      as_fn_executable_p "$ac_path_SED" || continue
6492# Check for GNU ac_path_SED and select it if it is found.
6493  # Check for GNU $ac_path_SED
6494case `"$ac_path_SED" --version 2>&1` in
6495*GNU*)
6496  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6497*)
6498  ac_count=0
6499  $as_echo_n 0123456789 >"conftest.in"
6500  while :
6501  do
6502    cat "conftest.in" "conftest.in" >"conftest.tmp"
6503    mv "conftest.tmp" "conftest.in"
6504    cp "conftest.in" "conftest.nl"
6505    $as_echo '' >> "conftest.nl"
6506    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6507    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6508    as_fn_arith $ac_count + 1 && ac_count=$as_val
6509    if test $ac_count -gt ${ac_path_SED_max-0}; then
6510      # Best one so far, save it but keep looking for a better one
6511      ac_cv_path_SED="$ac_path_SED"
6512      ac_path_SED_max=$ac_count
6513    fi
6514    # 10*(2^10) chars as input seems more than enough
6515    test $ac_count -gt 10 && break
6516  done
6517  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6518esac
6519
6520      $ac_path_SED_found && break 3
6521    done
6522  done
6523  done
6524IFS=$as_save_IFS
6525  if test -z "$ac_cv_path_SED"; then
6526    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6527  fi
6528else
6529  ac_cv_path_SED=$SED
6530fi
6531
6532fi
6533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6534$as_echo "$ac_cv_path_SED" >&6; }
6535 SED="$ac_cv_path_SED"
6536  rm -f conftest.sed
6537
6538test -z "$SED" && SED=sed
6539Xsed="$SED -e 1s/^X//"
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6552$as_echo_n "checking for fgrep... " >&6; }
6553if ${ac_cv_path_FGREP+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6557   then ac_cv_path_FGREP="$GREP -F"
6558   else
6559     if test -z "$FGREP"; then
6560  ac_path_FGREP_found=false
6561  # Loop through the user's path and test for each of PROGNAME-LIST
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_prog in fgrep; do
6568    for ac_exec_ext in '' $ac_executable_extensions; do
6569      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6570      as_fn_executable_p "$ac_path_FGREP" || continue
6571# Check for GNU ac_path_FGREP and select it if it is found.
6572  # Check for GNU $ac_path_FGREP
6573case `"$ac_path_FGREP" --version 2>&1` in
6574*GNU*)
6575  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6576*)
6577  ac_count=0
6578  $as_echo_n 0123456789 >"conftest.in"
6579  while :
6580  do
6581    cat "conftest.in" "conftest.in" >"conftest.tmp"
6582    mv "conftest.tmp" "conftest.in"
6583    cp "conftest.in" "conftest.nl"
6584    $as_echo 'FGREP' >> "conftest.nl"
6585    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6586    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6587    as_fn_arith $ac_count + 1 && ac_count=$as_val
6588    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6589      # Best one so far, save it but keep looking for a better one
6590      ac_cv_path_FGREP="$ac_path_FGREP"
6591      ac_path_FGREP_max=$ac_count
6592    fi
6593    # 10*(2^10) chars as input seems more than enough
6594    test $ac_count -gt 10 && break
6595  done
6596  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6597esac
6598
6599      $ac_path_FGREP_found && break 3
6600    done
6601  done
6602  done
6603IFS=$as_save_IFS
6604  if test -z "$ac_cv_path_FGREP"; then
6605    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6606  fi
6607else
6608  ac_cv_path_FGREP=$FGREP
6609fi
6610
6611   fi
6612fi
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6614$as_echo "$ac_cv_path_FGREP" >&6; }
6615 FGREP="$ac_cv_path_FGREP"
6616
6617
6618test -z "$GREP" && GREP=grep
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6637ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6638ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6639
6640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6641$as_echo_n "checking how to print strings... " >&6; }
6642# Test print first, because it will be a builtin if present.
6643if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6644   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6645  ECHO='print -r --'
6646elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6647  ECHO='printf %s\n'
6648else
6649  # Use this function as a fallback that always works.
6650  func_fallback_echo ()
6651  {
6652    eval 'cat <<_LTECHO_EOF
6653$1
6654_LTECHO_EOF'
6655  }
6656  ECHO='func_fallback_echo'
6657fi
6658
6659# func_echo_all arg...
6660# Invoke $ECHO with all args, space-separated.
6661func_echo_all ()
6662{
6663    $ECHO ""
6664}
6665
6666case $ECHO in
6667  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6668$as_echo "printf" >&6; } ;;
6669  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6670$as_echo "print -r" >&6; } ;;
6671  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6672$as_echo "cat" >&6; } ;;
6673esac
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6689if test "x$ac_cv_type_pid_t" = xyes; then :
6690
6691else
6692
6693cat >>confdefs.h <<_ACEOF
6694#define pid_t int
6695_ACEOF
6696
6697fi
6698
6699ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6700if test "x$ac_cv_type_size_t" = xyes; then :
6701
6702else
6703
6704cat >>confdefs.h <<_ACEOF
6705#define size_t unsigned int
6706_ACEOF
6707
6708fi
6709
6710
6711            # Check whether --enable-c99-snprintf was given.
6712if test "${enable_c99_snprintf+set}" = set; then :
6713  enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
6714else
6715  force_c99_snprintf=no
6716
6717fi
6718
6719    case "$force_c99_snprintf" in
6720     yes)
6721	hw_force_rpl_snprintf=yes
6722	hw_force_rpl_vsnprintf=yes
6723    esac
6724
6725
6726
6727
6728
6729
6730  for ac_header in $ac_header_list
6731do :
6732  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6733ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6734"
6735if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6736  cat >>confdefs.h <<_ACEOF
6737#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6738_ACEOF
6739
6740fi
6741
6742done
6743
6744
6745
6746
6747
6748
6749
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6751$as_echo_n "checking for unsigned long long int... " >&6; }
6752if ${ac_cv_type_unsigned_long_long_int+:} false; then :
6753  $as_echo_n "(cached) " >&6
6754else
6755  ac_cv_type_unsigned_long_long_int=yes
6756     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6757       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6758/* end confdefs.h.  */
6759
6760  /* For now, do not test the preprocessor; as of 2007 there are too many
6761         implementations with broken preprocessors.  Perhaps this can
6762         be revisited in 2012.  In the meantime, code should not expect
6763         #if to work with literals wider than 32 bits.  */
6764      /* Test literals.  */
6765      long long int ll = 9223372036854775807ll;
6766      long long int nll = -9223372036854775807LL;
6767      unsigned long long int ull = 18446744073709551615ULL;
6768      /* Test constant expressions.   */
6769      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6770                     ? 1 : -1)];
6771      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6772                     ? 1 : -1)];
6773      int i = 63;
6774int
6775main ()
6776{
6777/* Test availability of runtime routines for shift and division.  */
6778      long long int llmax = 9223372036854775807ll;
6779      unsigned long long int ullmax = 18446744073709551615ull;
6780      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6781              | (llmax / ll) | (llmax % ll)
6782              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6783              | (ullmax / ull) | (ullmax % ull));
6784  ;
6785  return 0;
6786}
6787
6788_ACEOF
6789if ac_fn_c_try_link "$LINENO"; then :
6790
6791else
6792  ac_cv_type_unsigned_long_long_int=no
6793fi
6794rm -f core conftest.err conftest.$ac_objext \
6795    conftest$ac_exeext conftest.$ac_ext
6796     fi
6797fi
6798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6799$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6800  if test $ac_cv_type_unsigned_long_long_int = yes; then
6801
6802$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6803
6804  fi
6805
6806
6807      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6808if test "x$ac_cv_func_vsnprintf" = xyes; then :
6809  hw_cv_func_vsnprintf=yes
6810else
6811  hw_cv_func_vsnprintf=no
6812fi
6813
6814  if test "$hw_cv_func_vsnprintf" = yes; then :
6815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
6816$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
6817if ${hw_cv_func_vsnprintf_c99+:} false; then :
6818  $as_echo_n "(cached) " >&6
6819else
6820  if test "$cross_compiling" = yes; then :
6821  hw_cv_func_vsnprintf_c99=no
6822else
6823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6824/* end confdefs.h.  */
6825#if HAVE_STDARG_H
6826          #include <stdarg.h>
6827          #endif
6828          #include <stdio.h>
6829          static int testprintf(char *buf, size_t size, const char *format, ...)
6830          {
6831            int result;
6832            va_list ap;
6833            va_start(ap, format);
6834            result = vsnprintf(buf, size, format, ap);
6835            va_end(ap);
6836            return result;
6837          }
6838int
6839main ()
6840{
6841char buf[43];
6842          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
6843              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
6844              buf[0] != 'T' || buf[3] != '\0')
6845            return 1;
6846  ;
6847  return 0;
6848}
6849_ACEOF
6850if ac_fn_c_try_run "$LINENO"; then :
6851  hw_cv_func_vsnprintf_c99=yes
6852else
6853  hw_cv_func_vsnprintf_c99=no
6854fi
6855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6856  conftest.$ac_objext conftest.beam conftest.$ac_ext
6857fi
6858
6859fi
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
6861$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
6862else
6863  hw_cv_func_vsnprintf_c99=no
6864fi
6865
6866$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
6867
6868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
6869$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
6870  if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
6871  hw_use_rpl_vsnprintf=yes
6872else
6873  hw_use_rpl_vsnprintf=no
6874fi
6875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
6876$as_echo "$hw_use_rpl_vsnprintf" >&6; }
6877  if test "$hw_use_rpl_vsnprintf" = yes; then :
6878
6879$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
6880
6881    if test ${hw_nodef_vsnprintf=no} = no; then :
6882
6883$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
6884
6885fi
6886    for ac_header in inttypes.h locale.h stddef.h stdint.h
6887do :
6888  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6889ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6890if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6891  cat >>confdefs.h <<_ACEOF
6892#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6893_ACEOF
6894
6895fi
6896
6897done
6898
6899    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
6900"
6901if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
6902
6903cat >>confdefs.h <<_ACEOF
6904#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
6905_ACEOF
6906
6907
6908fi
6909ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
6910"
6911if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
6912
6913cat >>confdefs.h <<_ACEOF
6914#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
6915_ACEOF
6916
6917
6918fi
6919
6920
6921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
6922$as_echo_n "checking for long double... " >&6; }
6923if ${ac_cv_type_long_double+:} false; then :
6924  $as_echo_n "(cached) " >&6
6925else
6926  if test "$GCC" = yes; then
6927       ac_cv_type_long_double=yes
6928     else
6929       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930/* end confdefs.h.  */
6931/* The Stardent Vistra knows sizeof (long double), but does
6932		 not support it.  */
6933	      long double foo = 0.0L;
6934int
6935main ()
6936{
6937static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
6938	      sizeof (double) <= sizeof (long double))];
6939test_array [0] = 0;
6940return test_array [0];
6941
6942  ;
6943  return 0;
6944}
6945_ACEOF
6946if ac_fn_c_try_compile "$LINENO"; then :
6947  ac_cv_type_long_double=yes
6948else
6949  ac_cv_type_long_double=no
6950fi
6951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6952     fi
6953fi
6954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
6955$as_echo "$ac_cv_type_long_double" >&6; }
6956  if test $ac_cv_type_long_double = yes; then
6957
6958$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
6959
6960  fi
6961
6962
6963
6964  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6965$as_echo_n "checking for long long int... " >&6; }
6966if ${ac_cv_type_long_long_int+:} false; then :
6967  $as_echo_n "(cached) " >&6
6968else
6969  ac_cv_type_long_long_int=yes
6970      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6971        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6972        if test $ac_cv_type_long_long_int = yes; then
6973                                        if test "$cross_compiling" = yes; then :
6974  :
6975else
6976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6977/* end confdefs.h.  */
6978#include <limits.h>
6979                 #ifndef LLONG_MAX
6980                 # define HALF \
6981                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6982                 # define LLONG_MAX (HALF - 1 + HALF)
6983                 #endif
6984int
6985main ()
6986{
6987long long int n = 1;
6988                 int i;
6989                 for (i = 0; ; i++)
6990                   {
6991                     long long int m = n << i;
6992                     if (m >> i != n)
6993                       return 1;
6994                     if (LLONG_MAX / 2 < m)
6995                       break;
6996                   }
6997                 return 0;
6998  ;
6999  return 0;
7000}
7001_ACEOF
7002if ac_fn_c_try_run "$LINENO"; then :
7003
7004else
7005  ac_cv_type_long_long_int=no
7006fi
7007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7008  conftest.$ac_objext conftest.beam conftest.$ac_ext
7009fi
7010
7011        fi
7012      fi
7013fi
7014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7015$as_echo "$ac_cv_type_long_long_int" >&6; }
7016  if test $ac_cv_type_long_long_int = yes; then
7017
7018$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7019
7020  fi
7021
7022
7023  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7024$as_echo_n "checking for unsigned long long int... " >&6; }
7025if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7026  $as_echo_n "(cached) " >&6
7027else
7028  ac_cv_type_unsigned_long_long_int=yes
7029     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7030       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7031/* end confdefs.h.  */
7032
7033  /* For now, do not test the preprocessor; as of 2007 there are too many
7034         implementations with broken preprocessors.  Perhaps this can
7035         be revisited in 2012.  In the meantime, code should not expect
7036         #if to work with literals wider than 32 bits.  */
7037      /* Test literals.  */
7038      long long int ll = 9223372036854775807ll;
7039      long long int nll = -9223372036854775807LL;
7040      unsigned long long int ull = 18446744073709551615ULL;
7041      /* Test constant expressions.   */
7042      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7043                     ? 1 : -1)];
7044      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7045                     ? 1 : -1)];
7046      int i = 63;
7047int
7048main ()
7049{
7050/* Test availability of runtime routines for shift and division.  */
7051      long long int llmax = 9223372036854775807ll;
7052      unsigned long long int ullmax = 18446744073709551615ull;
7053      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7054              | (llmax / ll) | (llmax % ll)
7055              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7056              | (ullmax / ull) | (ullmax % ull));
7057  ;
7058  return 0;
7059}
7060
7061_ACEOF
7062if ac_fn_c_try_link "$LINENO"; then :
7063
7064else
7065  ac_cv_type_unsigned_long_long_int=no
7066fi
7067rm -f core conftest.err conftest.$ac_objext \
7068    conftest$ac_exeext conftest.$ac_ext
7069     fi
7070fi
7071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7072$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7073  if test $ac_cv_type_unsigned_long_long_int = yes; then
7074
7075$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7076
7077  fi
7078
7079    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7080if test "x$ac_cv_type_size_t" = xyes; then :
7081
7082else
7083
7084cat >>confdefs.h <<_ACEOF
7085#define size_t unsigned int
7086_ACEOF
7087
7088fi
7089
7090
7091
7092  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
7093if test "x$ac_cv_type_intmax_t" = xyes; then :
7094
7095$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
7096
7097else
7098  test $ac_cv_type_long_long_int = yes \
7099       && ac_type='long long int' \
7100       || ac_type='long int'
7101
7102cat >>confdefs.h <<_ACEOF
7103#define intmax_t $ac_type
7104_ACEOF
7105
7106fi
7107
7108
7109
7110
7111  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
7112if test "x$ac_cv_type_uintmax_t" = xyes; then :
7113
7114$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
7115
7116else
7117  test $ac_cv_type_unsigned_long_long_int = yes \
7118       && ac_type='unsigned long long int' \
7119       || ac_type='unsigned long int'
7120
7121cat >>confdefs.h <<_ACEOF
7122#define uintmax_t $ac_type
7123_ACEOF
7124
7125fi
7126
7127
7128
7129  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
7130if test "x$ac_cv_type_uintptr_t" = xyes; then :
7131
7132$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
7133
7134else
7135  for ac_type in 'unsigned int' 'unsigned long int' \
7136	'unsigned long long int'; do
7137       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7138/* end confdefs.h.  */
7139$ac_includes_default
7140int
7141main ()
7142{
7143static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
7144test_array [0] = 0;
7145return test_array [0];
7146
7147  ;
7148  return 0;
7149}
7150_ACEOF
7151if ac_fn_c_try_compile "$LINENO"; then :
7152
7153cat >>confdefs.h <<_ACEOF
7154#define uintptr_t $ac_type
7155_ACEOF
7156
7157	  ac_type=
7158fi
7159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7160       test -z "$ac_type" && break
7161     done
7162fi
7163
7164
7165    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
7166if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
7167
7168cat >>confdefs.h <<_ACEOF
7169#define HAVE_PTRDIFF_T 1
7170_ACEOF
7171
7172
7173fi
7174
7175    for ac_func in localeconv
7176do :
7177  ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
7178if test "x$ac_cv_func_localeconv" = xyes; then :
7179  cat >>confdefs.h <<_ACEOF
7180#define HAVE_LOCALECONV 1
7181_ACEOF
7182
7183fi
7184done
7185
7186
7187  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7189$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7190if ${ac_cv_c_const+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7194/* end confdefs.h.  */
7195
7196int
7197main ()
7198{
7199
7200#ifndef __cplusplus
7201  /* Ultrix mips cc rejects this sort of thing.  */
7202  typedef int charset[2];
7203  const charset cs = { 0, 0 };
7204  /* SunOS 4.1.1 cc rejects this.  */
7205  char const *const *pcpcc;
7206  char **ppc;
7207  /* NEC SVR4.0.2 mips cc rejects this.  */
7208  struct point {int x, y;};
7209  static struct point const zero = {0,0};
7210  /* AIX XL C 1.02.0.0 rejects this.
7211     It does not let you subtract one const X* pointer from another in
7212     an arm of an if-expression whose if-part is not a constant
7213     expression */
7214  const char *g = "string";
7215  pcpcc = &g + (g ? g-g : 0);
7216  /* HPUX 7.0 cc rejects these. */
7217  ++pcpcc;
7218  ppc = (char**) pcpcc;
7219  pcpcc = (char const *const *) ppc;
7220  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7221    char tx;
7222    char *t = &tx;
7223    char const *s = 0 ? (char *) 0 : (char const *) 0;
7224
7225    *t++ = 0;
7226    if (s) return 0;
7227  }
7228  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7229    int x[] = {25, 17};
7230    const int *foo = &x[0];
7231    ++foo;
7232  }
7233  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7234    typedef const int *iptr;
7235    iptr p = 0;
7236    ++p;
7237  }
7238  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7239       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7240    struct s { int j; const int *ap[3]; } bx;
7241    struct s *b = &bx; b->j = 5;
7242  }
7243  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7244    const int foo = 10;
7245    if (!foo) return 0;
7246  }
7247  return !cs[0] && !zero.x;
7248#endif
7249
7250  ;
7251  return 0;
7252}
7253_ACEOF
7254if ac_fn_c_try_compile "$LINENO"; then :
7255  ac_cv_c_const=yes
7256else
7257  ac_cv_c_const=no
7258fi
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260fi
7261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7262$as_echo "$ac_cv_c_const" >&6; }
7263if test $ac_cv_c_const = no; then
7264
7265$as_echo "#define const /**/" >>confdefs.h
7266
7267fi
7268
7269
7270
7271
7272    case " $LIBOBJS " in
7273  *" snprintf.$ac_objext "* ) ;;
7274  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7275 ;;
7276esac
7277
7278    _hw_cv_func_xprintf_replace_done=yes
7279fi
7280
7281fi
7282
7283
7284    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
7285if test "x$ac_cv_func_snprintf" = xyes; then :
7286  hw_cv_func_snprintf=yes
7287else
7288  hw_cv_func_snprintf=no
7289fi
7290
7291  if test "$hw_cv_func_snprintf" = yes; then :
7292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
7293$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
7294if ${hw_cv_func_snprintf_c99+:} false; then :
7295  $as_echo_n "(cached) " >&6
7296else
7297  if test "$cross_compiling" = yes; then :
7298  hw_cv_func_snprintf_c99=no
7299else
7300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7301/* end confdefs.h.  */
7302#include <stdio.h>
7303int
7304main ()
7305{
7306char buf[43];
7307          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7308              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7309              buf[0] != 'T' || buf[3] != '\0')
7310            return 1;
7311  ;
7312  return 0;
7313}
7314_ACEOF
7315if ac_fn_c_try_run "$LINENO"; then :
7316  hw_cv_func_snprintf_c99=yes
7317else
7318  hw_cv_func_snprintf_c99=no
7319fi
7320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7321  conftest.$ac_objext conftest.beam conftest.$ac_ext
7322fi
7323
7324fi
7325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
7326$as_echo "$hw_cv_func_snprintf_c99" >&6; }
7327else
7328  hw_cv_func_snprintf_c99=no
7329fi
7330
7331$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
7332
7333  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
7334$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
7335  if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
7336  hw_use_rpl_snprintf=yes
7337else
7338  hw_use_rpl_snprintf=no
7339fi
7340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
7341$as_echo "$hw_use_rpl_snprintf" >&6; }
7342  if test "$hw_use_rpl_snprintf" = yes; then :
7343
7344$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
7345
7346    if test ${hw_nodef_snprintf=no} = no; then :
7347
7348$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
7349
7350fi
7351
7352  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7354$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7355if ${ac_cv_c_const+:} false; then :
7356  $as_echo_n "(cached) " >&6
7357else
7358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7359/* end confdefs.h.  */
7360
7361int
7362main ()
7363{
7364
7365#ifndef __cplusplus
7366  /* Ultrix mips cc rejects this sort of thing.  */
7367  typedef int charset[2];
7368  const charset cs = { 0, 0 };
7369  /* SunOS 4.1.1 cc rejects this.  */
7370  char const *const *pcpcc;
7371  char **ppc;
7372  /* NEC SVR4.0.2 mips cc rejects this.  */
7373  struct point {int x, y;};
7374  static struct point const zero = {0,0};
7375  /* AIX XL C 1.02.0.0 rejects this.
7376     It does not let you subtract one const X* pointer from another in
7377     an arm of an if-expression whose if-part is not a constant
7378     expression */
7379  const char *g = "string";
7380  pcpcc = &g + (g ? g-g : 0);
7381  /* HPUX 7.0 cc rejects these. */
7382  ++pcpcc;
7383  ppc = (char**) pcpcc;
7384  pcpcc = (char const *const *) ppc;
7385  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7386    char tx;
7387    char *t = &tx;
7388    char const *s = 0 ? (char *) 0 : (char const *) 0;
7389
7390    *t++ = 0;
7391    if (s) return 0;
7392  }
7393  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7394    int x[] = {25, 17};
7395    const int *foo = &x[0];
7396    ++foo;
7397  }
7398  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7399    typedef const int *iptr;
7400    iptr p = 0;
7401    ++p;
7402  }
7403  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7404       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7405    struct s { int j; const int *ap[3]; } bx;
7406    struct s *b = &bx; b->j = 5;
7407  }
7408  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7409    const int foo = 10;
7410    if (!foo) return 0;
7411  }
7412  return !cs[0] && !zero.x;
7413#endif
7414
7415  ;
7416  return 0;
7417}
7418_ACEOF
7419if ac_fn_c_try_compile "$LINENO"; then :
7420  ac_cv_c_const=yes
7421else
7422  ac_cv_c_const=no
7423fi
7424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7425fi
7426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7427$as_echo "$ac_cv_c_const" >&6; }
7428if test $ac_cv_c_const = no; then
7429
7430$as_echo "#define const /**/" >>confdefs.h
7431
7432fi
7433
7434
7435
7436
7437    case " $LIBOBJS " in
7438  *" snprintf.$ac_objext "* ) ;;
7439  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7440 ;;
7441esac
7442
7443    _hw_cv_func_xprintf_replace_done=yes
7444fi
7445
7446fi
7447
7448
7449
7450
7451
7452# HMS: Save $LIBS and empty it.
7453# any LIBS we add here should go in to LDADD_LIBNTP
7454
7455__LIBS=$LIBS
7456LIBS=
7457
7458
7459
7460# [Bug 2332] because we need to know if we are using GNU ld...
7461
7462
7463# Check whether --with-gnu-ld was given.
7464if test "${with_gnu_ld+set}" = set; then :
7465  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7466else
7467  with_gnu_ld=no
7468fi
7469
7470ac_prog=ld
7471if test yes = "$GCC"; then
7472  # Check if gcc -print-prog-name=ld gives a path.
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7474$as_echo_n "checking for ld used by $CC... " >&6; }
7475  case $host in
7476  *-*-mingw*)
7477    # gcc leaves a trailing carriage return, which upsets mingw
7478    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7479  *)
7480    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7481  esac
7482  case $ac_prog in
7483    # Accept absolute paths.
7484    [\\/]* | ?:[\\/]*)
7485      re_direlt='/[^/][^/]*/\.\./'
7486      # Canonicalize the pathname of ld
7487      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7488      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7489	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7490      done
7491      test -z "$LD" && LD=$ac_prog
7492      ;;
7493  "")
7494    # If it fails, then pretend we aren't using GCC.
7495    ac_prog=ld
7496    ;;
7497  *)
7498    # If it is relative, then search for the first ld in PATH.
7499    with_gnu_ld=unknown
7500    ;;
7501  esac
7502elif test yes = "$with_gnu_ld"; then
7503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7504$as_echo_n "checking for GNU ld... " >&6; }
7505else
7506  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7507$as_echo_n "checking for non-GNU ld... " >&6; }
7508fi
7509if ${lt_cv_path_LD+:} false; then :
7510  $as_echo_n "(cached) " >&6
7511else
7512  if test -z "$LD"; then
7513  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7514  for ac_dir in $PATH; do
7515    IFS=$lt_save_ifs
7516    test -z "$ac_dir" && ac_dir=.
7517    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7518      lt_cv_path_LD=$ac_dir/$ac_prog
7519      # Check to see if the program is GNU ld.  I'd rather use --version,
7520      # but apparently some variants of GNU ld only accept -v.
7521      # Break only if it was the GNU/non-GNU ld that we prefer.
7522      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7523      *GNU* | *'with BFD'*)
7524	test no != "$with_gnu_ld" && break
7525	;;
7526      *)
7527	test yes != "$with_gnu_ld" && break
7528	;;
7529      esac
7530    fi
7531  done
7532  IFS=$lt_save_ifs
7533else
7534  lt_cv_path_LD=$LD # Let the user override the test with a path.
7535fi
7536fi
7537
7538LD=$lt_cv_path_LD
7539if test -n "$LD"; then
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7541$as_echo "$LD" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7548$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7549if ${lt_cv_prog_gnu_ld+:} false; then :
7550  $as_echo_n "(cached) " >&6
7551else
7552  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7553case `$LD -v 2>&1 </dev/null` in
7554*GNU* | *'with BFD'*)
7555  lt_cv_prog_gnu_ld=yes
7556  ;;
7557*)
7558  lt_cv_prog_gnu_ld=no
7559  ;;
7560esac
7561fi
7562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7563$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7564with_gnu_ld=$lt_cv_prog_gnu_ld
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
7577$as_echo_n "checking for directory path separator... " >&6; }
7578if ${ntp_cv_dir_sep+:} false; then :
7579  $as_echo_n "(cached) " >&6
7580else
7581
7582	case "$ntp_cv_dir_sep" in
7583	 '')
7584	    case "$host_os" in
7585	     *djgpp | *mingw32* | *emx*)
7586		ntp_cv_dir_sep="'\\'"
7587		;;
7588	     *)
7589		ntp_cv_dir_sep="'/'"
7590		;;
7591	    esac
7592	esac
7593
7594
7595fi
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
7597$as_echo "$ntp_cv_dir_sep" >&6; }
7598
7599cat >>confdefs.h <<_ACEOF
7600#define DIR_SEP $ntp_cv_dir_sep
7601_ACEOF
7602
7603
7604
7605    NTP_ORIG_LIBS="$LIBS"
7606
7607# Check whether --with-lineeditlibs was given.
7608if test "${with_lineeditlibs+set}" = set; then :
7609  withval=$with_lineeditlibs; use_lineeditlibs="$withval"
7610else
7611  use_lineeditlibs="edit,editline"
7612
7613fi
7614
7615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
7616$as_echo_n "checking line editing libraries... " >&6; }
7617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
7618$as_echo "$use_lineeditlibs" >&6; }
7619    case "$use_lineeditlibs" in
7620     no)
7621	ntp_lib_lineedit=no
7622	;;
7623     *)
7624	for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
7625	    for term_lib in "" termcap curses ncurses; do
7626		case "$term_lib" in
7627		 '')
7628		    TRY_LIB="-l$lineedit_lib"
7629		    ;;
7630		 *)
7631		    TRY_LIB="-l$lineedit_lib -l$term_lib"
7632		    ;;
7633		esac
7634		LIBS="$NTP_ORIG_LIBS $TRY_LIB"
7635		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
7636$as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
7637		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7638/* end confdefs.h.  */
7639
7640/* Override any GCC internal prototype to avoid an error.
7641   Use char because int might match the return type of a GCC
7642   builtin and then its argument prototype would still apply.  */
7643#ifdef __cplusplus
7644extern "C"
7645#endif
7646char readline ();
7647int
7648main ()
7649{
7650return readline ();
7651  ;
7652  return 0;
7653}
7654_ACEOF
7655if ac_fn_c_try_link "$LINENO"; then :
7656  ntp_lib_lineedit="$TRY_LIB"
7657fi
7658rm -f core conftest.err conftest.$ac_objext \
7659    conftest$ac_exeext conftest.$ac_ext
7660		case "$ntp_lib_lineedit" in
7661		 '')
7662		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7663$as_echo "no" >&6; }
7664		    ;;
7665		 *)
7666		    # Use readline()
7667		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7668$as_echo "yes" >&6; }
7669		    break
7670		esac
7671		case "$term_lib" in
7672		 '')
7673		    # do not try el_gets without a terminal library
7674		    ;;
7675		 *)
7676		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
7677$as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
7678		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7679/* end confdefs.h.  */
7680
7681/* Override any GCC internal prototype to avoid an error.
7682   Use char because int might match the return type of a GCC
7683   builtin and then its argument prototype would still apply.  */
7684#ifdef __cplusplus
7685extern "C"
7686#endif
7687char el_gets ();
7688int
7689main ()
7690{
7691return el_gets ();
7692  ;
7693  return 0;
7694}
7695_ACEOF
7696if ac_fn_c_try_link "$LINENO"; then :
7697  ntp_lib_lineedit="$TRY_LIB"
7698fi
7699rm -f core conftest.err conftest.$ac_objext \
7700    conftest$ac_exeext conftest.$ac_ext
7701		    case "$ntp_lib_lineedit" in
7702		     '')
7703			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7704$as_echo "no" >&6; }
7705			;;
7706		     *) # Use el_gets()
7707			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7708$as_echo "yes" >&6; }
7709			break
7710			;;
7711		    esac	# $ntp_lib_lineedit
7712		esac		# $term_lib
7713	    done
7714	    case "$ntp_lib_lineedit" in
7715	     '')
7716		;;
7717	     *)
7718		break
7719		;;
7720	    esac
7721	done
7722	LIBS="$NTP_ORIG_LIBS"
7723	;;
7724    esac	# $use_lineeditlibs
7725
7726    case "$ntp_lib_lineedit" in
7727     '')
7728	ntp_lib_lineedit="no"
7729	;;
7730     no)
7731	;;
7732     *)
7733	EDITLINE_LIBS="$ntp_lib_lineedit"
7734
7735	;;
7736    esac	# $ntp_lib_lineedit
7737
7738    case "$ntp_lib_lineedit" in
7739     no)
7740	;;
7741     *)
7742	for ac_header in readline.h readline/readline.h histedit.h
7743do :
7744  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7745ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7746if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7747  cat >>confdefs.h <<_ACEOF
7748#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7749_ACEOF
7750
7751fi
7752
7753done
7754
7755	for ac_header in history.h readline/history.h
7756do :
7757  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7758ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7759if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7760  cat >>confdefs.h <<_ACEOF
7761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7762_ACEOF
7763
7764fi
7765
7766done
7767
7768
7769	case "$ac_cv_header_histedit_h" in
7770	 yes)
7771	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
7772$as_echo_n "checking number of arguments to el_init()... " >&6; }
7773if ${ntp_cv_el_init_args+:} false; then :
7774  $as_echo_n "(cached) " >&6
7775else
7776  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7777/* end confdefs.h.  */
7778
7779			    #include <stdio.h>
7780			    #include <histedit.h>
7781
7782int
7783main ()
7784{
7785
7786			    el_init("conftest", stdin, stdout, stderr);
7787
7788
7789  ;
7790  return 0;
7791}
7792_ACEOF
7793if ac_fn_c_try_compile "$LINENO"; then :
7794  ntp_cv_el_init_args=4
7795else
7796  ntp_cv_el_init_args=3
7797
7798fi
7799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7800
7801fi
7802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
7803$as_echo "$ntp_cv_el_init_args" >&6; }
7804
7805cat >>confdefs.h <<_ACEOF
7806#define EL_INIT_ARGS $ntp_cv_el_init_args
7807_ACEOF
7808
7809	esac
7810
7811	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7812$as_echo_n "checking whether readline supports history... " >&6; }
7813
7814	ntp_lib_lineedit_history="no"
7815	ORIG_LIBS="$LIBS"
7816	LIBS="$ORIG_LIBS $ntp_lib_lineedit"
7817	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7818/* end confdefs.h.  */
7819
7820/* Override any GCC internal prototype to avoid an error.
7821   Use char because int might match the return type of a GCC
7822   builtin and then its argument prototype would still apply.  */
7823#ifdef __cplusplus
7824extern "C"
7825#endif
7826char add_history ();
7827int
7828main ()
7829{
7830return add_history ();
7831  ;
7832  return 0;
7833}
7834_ACEOF
7835if ac_fn_c_try_link "$LINENO"; then :
7836  ntp_lib_lineedit_history="yes"
7837fi
7838rm -f core conftest.err conftest.$ac_objext \
7839    conftest$ac_exeext conftest.$ac_ext
7840	LIBS="$ORIG_LIBS"
7841
7842	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
7843$as_echo "$ntp_lib_lineedit_history" >&6; }
7844
7845	case "$ntp_lib_lineedit_history" in
7846	 yes)
7847
7848$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7849
7850	esac
7851    esac	# $ntp_lib_lineedit
7852    { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
7853    { ORIG_LIBS=; unset ORIG_LIBS;}
7854    { TRY_LIB=; unset TRY_LIB;}
7855    { use_lineeditlibs=; unset use_lineeditlibs;}
7856
7857
7858LIBM=
7859case "$host" in
7860 *-*-darwin*)
7861    ;;
7862 *)
7863    _libs=$LIBS
7864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
7865$as_echo_n "checking for library containing cos... " >&6; }
7866if ${ac_cv_search_cos+:} false; then :
7867  $as_echo_n "(cached) " >&6
7868else
7869  ac_func_search_save_LIBS=$LIBS
7870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7871/* end confdefs.h.  */
7872
7873/* Override any GCC internal prototype to avoid an error.
7874   Use char because int might match the return type of a GCC
7875   builtin and then its argument prototype would still apply.  */
7876#ifdef __cplusplus
7877extern "C"
7878#endif
7879char cos ();
7880int
7881main ()
7882{
7883return cos ();
7884  ;
7885  return 0;
7886}
7887_ACEOF
7888for ac_lib in '' m; do
7889  if test -z "$ac_lib"; then
7890    ac_res="none required"
7891  else
7892    ac_res=-l$ac_lib
7893    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7894  fi
7895  if ac_fn_c_try_link "$LINENO"; then :
7896  ac_cv_search_cos=$ac_res
7897fi
7898rm -f core conftest.err conftest.$ac_objext \
7899    conftest$ac_exeext
7900  if ${ac_cv_search_cos+:} false; then :
7901  break
7902fi
7903done
7904if ${ac_cv_search_cos+:} false; then :
7905
7906else
7907  ac_cv_search_cos=no
7908fi
7909rm conftest.$ac_ext
7910LIBS=$ac_func_search_save_LIBS
7911fi
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
7913$as_echo "$ac_cv_search_cos" >&6; }
7914ac_res=$ac_cv_search_cos
7915if test "$ac_res" != no; then :
7916  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7917  LIBM="-lm"
7918fi
7919
7920    LIBS=$_libs
7921    ;;
7922esac
7923
7924{ _libs=; unset _libs;}
7925
7926
7927for ac_header in vfork.h
7928do :
7929  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
7930if test "x$ac_cv_header_vfork_h" = xyes; then :
7931  cat >>confdefs.h <<_ACEOF
7932#define HAVE_VFORK_H 1
7933_ACEOF
7934
7935fi
7936
7937done
7938
7939for ac_func in fork vfork
7940do :
7941  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7942ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7943if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7944  cat >>confdefs.h <<_ACEOF
7945#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7946_ACEOF
7947
7948fi
7949done
7950
7951if test "x$ac_cv_func_fork" = xyes; then
7952  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
7953$as_echo_n "checking for working fork... " >&6; }
7954if ${ac_cv_func_fork_works+:} false; then :
7955  $as_echo_n "(cached) " >&6
7956else
7957  if test "$cross_compiling" = yes; then :
7958  ac_cv_func_fork_works=cross
7959else
7960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7961/* end confdefs.h.  */
7962$ac_includes_default
7963int
7964main ()
7965{
7966
7967	  /* By Ruediger Kuhlmann. */
7968	  return fork () < 0;
7969
7970  ;
7971  return 0;
7972}
7973_ACEOF
7974if ac_fn_c_try_run "$LINENO"; then :
7975  ac_cv_func_fork_works=yes
7976else
7977  ac_cv_func_fork_works=no
7978fi
7979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7980  conftest.$ac_objext conftest.beam conftest.$ac_ext
7981fi
7982
7983fi
7984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
7985$as_echo "$ac_cv_func_fork_works" >&6; }
7986
7987else
7988  ac_cv_func_fork_works=$ac_cv_func_fork
7989fi
7990if test "x$ac_cv_func_fork_works" = xcross; then
7991  case $host in
7992    *-*-amigaos* | *-*-msdosdjgpp*)
7993      # Override, as these systems have only a dummy fork() stub
7994      ac_cv_func_fork_works=no
7995      ;;
7996    *)
7997      ac_cv_func_fork_works=yes
7998      ;;
7999  esac
8000  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8001$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8002fi
8003ac_cv_func_vfork_works=$ac_cv_func_vfork
8004if test "x$ac_cv_func_vfork" = xyes; then
8005  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8006$as_echo_n "checking for working vfork... " >&6; }
8007if ${ac_cv_func_vfork_works+:} false; then :
8008  $as_echo_n "(cached) " >&6
8009else
8010  if test "$cross_compiling" = yes; then :
8011  ac_cv_func_vfork_works=cross
8012else
8013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8014/* end confdefs.h.  */
8015/* Thanks to Paul Eggert for this test.  */
8016$ac_includes_default
8017#include <sys/wait.h>
8018#ifdef HAVE_VFORK_H
8019# include <vfork.h>
8020#endif
8021/* On some sparc systems, changes by the child to local and incoming
8022   argument registers are propagated back to the parent.  The compiler
8023   is told about this with #include <vfork.h>, but some compilers
8024   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8025   static variable whose address is put into a register that is
8026   clobbered by the vfork.  */
8027static void
8028#ifdef __cplusplus
8029sparc_address_test (int arg)
8030# else
8031sparc_address_test (arg) int arg;
8032#endif
8033{
8034  static pid_t child;
8035  if (!child) {
8036    child = vfork ();
8037    if (child < 0) {
8038      perror ("vfork");
8039      _exit(2);
8040    }
8041    if (!child) {
8042      arg = getpid();
8043      write(-1, "", 0);
8044      _exit (arg);
8045    }
8046  }
8047}
8048
8049int
8050main ()
8051{
8052  pid_t parent = getpid ();
8053  pid_t child;
8054
8055  sparc_address_test (0);
8056
8057  child = vfork ();
8058
8059  if (child == 0) {
8060    /* Here is another test for sparc vfork register problems.  This
8061       test uses lots of local variables, at least as many local
8062       variables as main has allocated so far including compiler
8063       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
8064       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
8065       reuse the register of parent for one of the local variables,
8066       since it will think that parent can't possibly be used any more
8067       in this routine.  Assigning to the local variable will thus
8068       munge parent in the parent process.  */
8069    pid_t
8070      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8071      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8072    /* Convince the compiler that p..p7 are live; otherwise, it might
8073       use the same hardware register for all 8 local variables.  */
8074    if (p != p1 || p != p2 || p != p3 || p != p4
8075	|| p != p5 || p != p6 || p != p7)
8076      _exit(1);
8077
8078    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8079       from child file descriptors.  If the child closes a descriptor
8080       before it execs or exits, this munges the parent's descriptor
8081       as well.  Test for this by closing stdout in the child.  */
8082    _exit(close(fileno(stdout)) != 0);
8083  } else {
8084    int status;
8085    struct stat st;
8086
8087    while (wait(&status) != child)
8088      ;
8089    return (
8090	 /* Was there some problem with vforking?  */
8091	 child < 0
8092
8093	 /* Did the child fail?  (This shouldn't happen.)  */
8094	 || status
8095
8096	 /* Did the vfork/compiler bug occur?  */
8097	 || parent != getpid()
8098
8099	 /* Did the file descriptor bug occur?  */
8100	 || fstat(fileno(stdout), &st) != 0
8101	 );
8102  }
8103}
8104_ACEOF
8105if ac_fn_c_try_run "$LINENO"; then :
8106  ac_cv_func_vfork_works=yes
8107else
8108  ac_cv_func_vfork_works=no
8109fi
8110rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8111  conftest.$ac_objext conftest.beam conftest.$ac_ext
8112fi
8113
8114fi
8115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8116$as_echo "$ac_cv_func_vfork_works" >&6; }
8117
8118fi;
8119if test "x$ac_cv_func_fork_works" = xcross; then
8120  ac_cv_func_vfork_works=$ac_cv_func_vfork
8121  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8122$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8123fi
8124
8125if test "x$ac_cv_func_vfork_works" = xyes; then
8126
8127$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8128
8129else
8130
8131$as_echo "#define vfork fork" >>confdefs.h
8132
8133fi
8134if test "x$ac_cv_func_fork_works" = xyes; then
8135
8136$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8137
8138fi
8139
8140# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8141# for constant arguments.  Useless!
8142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8143$as_echo_n "checking for working alloca.h... " >&6; }
8144if ${ac_cv_working_alloca_h+:} false; then :
8145  $as_echo_n "(cached) " >&6
8146else
8147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8148/* end confdefs.h.  */
8149#include <alloca.h>
8150int
8151main ()
8152{
8153char *p = (char *) alloca (2 * sizeof (int));
8154			  if (p) return 0;
8155  ;
8156  return 0;
8157}
8158_ACEOF
8159if ac_fn_c_try_link "$LINENO"; then :
8160  ac_cv_working_alloca_h=yes
8161else
8162  ac_cv_working_alloca_h=no
8163fi
8164rm -f core conftest.err conftest.$ac_objext \
8165    conftest$ac_exeext conftest.$ac_ext
8166fi
8167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8168$as_echo "$ac_cv_working_alloca_h" >&6; }
8169if test $ac_cv_working_alloca_h = yes; then
8170
8171$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8172
8173fi
8174
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8176$as_echo_n "checking for alloca... " >&6; }
8177if ${ac_cv_func_alloca_works+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8181/* end confdefs.h.  */
8182#ifdef __GNUC__
8183# define alloca __builtin_alloca
8184#else
8185# ifdef _MSC_VER
8186#  include <malloc.h>
8187#  define alloca _alloca
8188# else
8189#  ifdef HAVE_ALLOCA_H
8190#   include <alloca.h>
8191#  else
8192#   ifdef _AIX
8193 #pragma alloca
8194#   else
8195#    ifndef alloca /* predefined by HP cc +Olibcalls */
8196void *alloca (size_t);
8197#    endif
8198#   endif
8199#  endif
8200# endif
8201#endif
8202
8203int
8204main ()
8205{
8206char *p = (char *) alloca (1);
8207				    if (p) return 0;
8208  ;
8209  return 0;
8210}
8211_ACEOF
8212if ac_fn_c_try_link "$LINENO"; then :
8213  ac_cv_func_alloca_works=yes
8214else
8215  ac_cv_func_alloca_works=no
8216fi
8217rm -f core conftest.err conftest.$ac_objext \
8218    conftest$ac_exeext conftest.$ac_ext
8219fi
8220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8221$as_echo "$ac_cv_func_alloca_works" >&6; }
8222
8223if test $ac_cv_func_alloca_works = yes; then
8224
8225$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8226
8227else
8228  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8229# that cause trouble.  Some versions do not even contain alloca or
8230# contain a buggy version.  If you still want to use their alloca,
8231# use ar to extract alloca.o from them instead of compiling alloca.c.
8232
8233ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8234
8235$as_echo "#define C_ALLOCA 1" >>confdefs.h
8236
8237
8238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8239$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8240if ${ac_cv_os_cray+:} false; then :
8241  $as_echo_n "(cached) " >&6
8242else
8243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8244/* end confdefs.h.  */
8245#if defined CRAY && ! defined CRAY2
8246webecray
8247#else
8248wenotbecray
8249#endif
8250
8251_ACEOF
8252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8253  $EGREP "webecray" >/dev/null 2>&1; then :
8254  ac_cv_os_cray=yes
8255else
8256  ac_cv_os_cray=no
8257fi
8258rm -f conftest*
8259
8260fi
8261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8262$as_echo "$ac_cv_os_cray" >&6; }
8263if test $ac_cv_os_cray = yes; then
8264  for ac_func in _getb67 GETB67 getb67; do
8265    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8266ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8267if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8268
8269cat >>confdefs.h <<_ACEOF
8270#define CRAY_STACKSEG_END $ac_func
8271_ACEOF
8272
8273    break
8274fi
8275
8276  done
8277fi
8278
8279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8280$as_echo_n "checking stack direction for C alloca... " >&6; }
8281if ${ac_cv_c_stack_direction+:} false; then :
8282  $as_echo_n "(cached) " >&6
8283else
8284  if test "$cross_compiling" = yes; then :
8285  ac_cv_c_stack_direction=0
8286else
8287  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8288/* end confdefs.h.  */
8289$ac_includes_default
8290int
8291find_stack_direction (int *addr, int depth)
8292{
8293  int dir, dummy = 0;
8294  if (! addr)
8295    addr = &dummy;
8296  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8297  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8298  return dir + dummy;
8299}
8300
8301int
8302main (int argc, char **argv)
8303{
8304  return find_stack_direction (0, argc + !argv + 20) < 0;
8305}
8306_ACEOF
8307if ac_fn_c_try_run "$LINENO"; then :
8308  ac_cv_c_stack_direction=1
8309else
8310  ac_cv_c_stack_direction=-1
8311fi
8312rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8313  conftest.$ac_objext conftest.beam conftest.$ac_ext
8314fi
8315
8316fi
8317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8318$as_echo "$ac_cv_c_stack_direction" >&6; }
8319cat >>confdefs.h <<_ACEOF
8320#define STACK_DIRECTION $ac_cv_c_stack_direction
8321_ACEOF
8322
8323
8324fi
8325
8326ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8327if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8328  ac_have_decl=1
8329else
8330  ac_have_decl=0
8331fi
8332
8333cat >>confdefs.h <<_ACEOF
8334#define HAVE_DECL_STRERROR_R $ac_have_decl
8335_ACEOF
8336
8337for ac_func in strerror_r
8338do :
8339  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8340if test "x$ac_cv_func_strerror_r" = xyes; then :
8341  cat >>confdefs.h <<_ACEOF
8342#define HAVE_STRERROR_R 1
8343_ACEOF
8344
8345fi
8346done
8347
8348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8349$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8350if ${ac_cv_func_strerror_r_char_p+:} false; then :
8351  $as_echo_n "(cached) " >&6
8352else
8353
8354    ac_cv_func_strerror_r_char_p=no
8355    if test $ac_cv_have_decl_strerror_r = yes; then
8356      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8357/* end confdefs.h.  */
8358$ac_includes_default
8359int
8360main ()
8361{
8362
8363	  char buf[100];
8364	  char x = *strerror_r (0, buf, sizeof buf);
8365	  char *p = strerror_r (0, buf, sizeof buf);
8366	  return !p || x;
8367
8368  ;
8369  return 0;
8370}
8371_ACEOF
8372if ac_fn_c_try_compile "$LINENO"; then :
8373  ac_cv_func_strerror_r_char_p=yes
8374fi
8375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8376    else
8377      # strerror_r is not declared.  Choose between
8378      # systems that have relatively inaccessible declarations for the
8379      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8380      # former has a strerror_r that returns char*, while the latter
8381      # has a strerror_r that returns `int'.
8382      # This test should segfault on the DEC system.
8383      if test "$cross_compiling" = yes; then :
8384  :
8385else
8386  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8387/* end confdefs.h.  */
8388$ac_includes_default
8389	extern char *strerror_r ();
8390int
8391main ()
8392{
8393char buf[100];
8394	  char x = *strerror_r (0, buf, sizeof buf);
8395	  return ! isalpha (x);
8396  ;
8397  return 0;
8398}
8399_ACEOF
8400if ac_fn_c_try_run "$LINENO"; then :
8401  ac_cv_func_strerror_r_char_p=yes
8402fi
8403rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8404  conftest.$ac_objext conftest.beam conftest.$ac_ext
8405fi
8406
8407    fi
8408
8409fi
8410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8411$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8412if test $ac_cv_func_strerror_r_char_p = yes; then
8413
8414$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8415
8416fi
8417
8418
8419ac_busted_vpath_in_make=no
8420case "$build" in
8421 *-*-irix6.1*)	# 64 bit only
8422    # busted vpath?
8423    ;;
8424 *-*-irix6*)	# 6.2 (and later?)
8425    ac_busted_vpath_in_make=yes
8426    ;;
8427 *-*-solaris2.5.1)
8428    ac_busted_vpath_in_make=yes
8429    ;;
8430 *-*-unicosmp*)
8431    ac_busted_vpath_in_make=yes
8432    ;;
8433esac
8434
8435case "$ac_busted_vpath_in_make$srcdir" in
8436 yes.|no*)
8437    ;;
8438 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
8439     '')
8440	as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
8441    esac
8442    ;;
8443esac
8444
8445case "$host" in
8446 *-*-aix4*)
8447	# Bug 2516:
8448	# Was *-*-aix[[4-9]]*
8449	# XXX only verified thru AIX6.  But...
8450	# Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
8451	# that this support would be in 5.3, removed in 6, and added back.
8452	#
8453	# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
8454	# (returning ENOSYS).  I didn't check 4.2.  If, in the future,
8455	# IBM pulls its thumbs out long enough to implement clock_settime,
8456	# this conditional will need to change.  Maybe use AC_TRY_RUN
8457	# instead to try to set the time to itself and check errno.
8458    ;;
8459 *)
8460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
8461$as_echo_n "checking for library containing clock_gettime... " >&6; }
8462if ${ac_cv_search_clock_gettime+:} false; then :
8463  $as_echo_n "(cached) " >&6
8464else
8465  ac_func_search_save_LIBS=$LIBS
8466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8467/* end confdefs.h.  */
8468
8469/* Override any GCC internal prototype to avoid an error.
8470   Use char because int might match the return type of a GCC
8471   builtin and then its argument prototype would still apply.  */
8472#ifdef __cplusplus
8473extern "C"
8474#endif
8475char clock_gettime ();
8476int
8477main ()
8478{
8479return clock_gettime ();
8480  ;
8481  return 0;
8482}
8483_ACEOF
8484for ac_lib in '' rt; do
8485  if test -z "$ac_lib"; then
8486    ac_res="none required"
8487  else
8488    ac_res=-l$ac_lib
8489    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8490  fi
8491  if ac_fn_c_try_link "$LINENO"; then :
8492  ac_cv_search_clock_gettime=$ac_res
8493fi
8494rm -f core conftest.err conftest.$ac_objext \
8495    conftest$ac_exeext
8496  if ${ac_cv_search_clock_gettime+:} false; then :
8497  break
8498fi
8499done
8500if ${ac_cv_search_clock_gettime+:} false; then :
8501
8502else
8503  ac_cv_search_clock_gettime=no
8504fi
8505rm conftest.$ac_ext
8506LIBS=$ac_func_search_save_LIBS
8507fi
8508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
8509$as_echo "$ac_cv_search_clock_gettime" >&6; }
8510ac_res=$ac_cv_search_clock_gettime
8511if test "$ac_res" != no; then :
8512  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8513  case "$ac_cv_search_clock_gettime" in
8514 'none required') ;;
8515 no) ;;
8516 *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
8517 esac
8518
8519fi
8520
8521    for ac_func in clock_getres clock_gettime clock_settime
8522do :
8523  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8524ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8525if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8526  cat >>confdefs.h <<_ACEOF
8527#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8528_ACEOF
8529
8530fi
8531done
8532
8533    ;;
8534esac
8535
8536for ac_func in getclock stime timegm strlcpy strlcat
8537do :
8538  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8539ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8540if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8541  cat >>confdefs.h <<_ACEOF
8542#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8543_ACEOF
8544
8545fi
8546done
8547
8548
8549# Bug 2713
8550LDADD_LIBUTIL=
8551
8552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
8553$as_echo_n "checking for library containing snprintb... " >&6; }
8554if ${ac_cv_search_snprintb+:} false; then :
8555  $as_echo_n "(cached) " >&6
8556else
8557  ac_func_search_save_LIBS=$LIBS
8558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8559/* end confdefs.h.  */
8560
8561/* Override any GCC internal prototype to avoid an error.
8562   Use char because int might match the return type of a GCC
8563   builtin and then its argument prototype would still apply.  */
8564#ifdef __cplusplus
8565extern "C"
8566#endif
8567char snprintb ();
8568int
8569main ()
8570{
8571return snprintb ();
8572  ;
8573  return 0;
8574}
8575_ACEOF
8576for ac_lib in '' util; do
8577  if test -z "$ac_lib"; then
8578    ac_res="none required"
8579  else
8580    ac_res=-l$ac_lib
8581    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8582  fi
8583  if ac_fn_c_try_link "$LINENO"; then :
8584  ac_cv_search_snprintb=$ac_res
8585fi
8586rm -f core conftest.err conftest.$ac_objext \
8587    conftest$ac_exeext
8588  if ${ac_cv_search_snprintb+:} false; then :
8589  break
8590fi
8591done
8592if ${ac_cv_search_snprintb+:} false; then :
8593
8594else
8595  ac_cv_search_snprintb=no
8596fi
8597rm conftest.$ac_ext
8598LIBS=$ac_func_search_save_LIBS
8599fi
8600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
8601$as_echo "$ac_cv_search_snprintb" >&6; }
8602ac_res=$ac_cv_search_snprintb
8603if test "$ac_res" != no; then :
8604  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8605  case "$ac_cv_search_snprintb" in
8606 'none required') ;;
8607 no) ;;
8608 *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
8609 esac
8610
8611$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
8612
8613fi
8614
8615
8616#
8617for ac_header in errno.h sys/socket.h sys/types.h time.h
8618do :
8619  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8620ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8621if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8622  cat >>confdefs.h <<_ACEOF
8623#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8624_ACEOF
8625
8626fi
8627
8628done
8629
8630for ac_header in net/if.h
8631do :
8632  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8633    #ifdef HAVE_SYS_SOCKET_H
8634    # include <sys/socket.h>
8635    #endif
8636
8637"
8638if test "x$ac_cv_header_net_if_h" = xyes; then :
8639  cat >>confdefs.h <<_ACEOF
8640#define HAVE_NET_IF_H 1
8641_ACEOF
8642
8643fi
8644
8645done
8646
8647case "$host" in
8648 *-hp-hpux*)
8649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
8650$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
8651if ${ntp_cv_predecl_mpinfou+:} false; then :
8652  $as_echo_n "(cached) " >&6
8653else
8654
8655	    np_cv_predecl_mpinfou=no
8656	    case "$ac_cv_header_net_if_h" in
8657	     no)
8658		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8659/* end confdefs.h.  */
8660
8661			    typedef union mpinfou {
8662				    struct pdk_mpinfo *pdkptr;
8663				    struct mpinfo *pikptr;
8664			    } mpinfou_t;
8665			    #ifdef HAVE_SYS_SOCKET_H
8666			    # include <sys/socket.h>
8667			    #endif
8668			    #include <net/if.h>
8669
8670int
8671main ()
8672{
8673
8674
8675
8676  ;
8677  return 0;
8678}
8679_ACEOF
8680if ac_fn_c_try_compile "$LINENO"; then :
8681
8682			ntp_cv_predecl_mpinfou=yes
8683			ac_cv_header_net_if_h=yes
8684
8685
8686fi
8687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8688	    esac
8689
8690
8691fi
8692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
8693$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
8694    case "$ntp_cv_predecl_mpinfou" in
8695     yes)
8696	cat >>confdefs.h <<_ACEOF
8697#ifndef MPINFOU_PREDECLARED
8698# define MPINFOU_PREDECLARED
8699typedef union mpinfou {
8700	struct pdk_mpinfo *pdkptr;
8701	struct mpinfo *pikptr;
8702} mpinfou_t;
8703#endif
8704_ACEOF
8705
8706    esac
8707esac
8708
8709case "$host" in
8710 *-linux*)
8711    for ac_header in linux/if_addr.h
8712do :
8713  ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
8714	#ifdef HAVE_SYS_SOCKET_H
8715	# include <sys/socket.h>
8716	#endif
8717
8718"
8719if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
8720  cat >>confdefs.h <<_ACEOF
8721#define HAVE_LINUX_IF_ADDR_H 1
8722_ACEOF
8723
8724fi
8725
8726done
8727
8728
8729$as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
8730
8731esac
8732
8733for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
8734do :
8735  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8736ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8737if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8738  cat >>confdefs.h <<_ACEOF
8739#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8740_ACEOF
8741
8742fi
8743
8744done
8745
8746# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
8747for ac_header in sys/sysctl.h
8748do :
8749  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
8750    #if defined HAVE_SYS_PARAM_H
8751    # include <sys/param.h>
8752    #endif
8753
8754"
8755if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
8756  cat >>confdefs.h <<_ACEOF
8757#define HAVE_SYS_SYSCTL_H 1
8758_ACEOF
8759
8760fi
8761
8762done
8763
8764for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
8765do :
8766  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8767ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8768if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8769  cat >>confdefs.h <<_ACEOF
8770#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8771_ACEOF
8772
8773fi
8774
8775done
8776
8777
8778for ac_header in resolv.h
8779do :
8780  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
8781    #ifdef HAVE_SYS_TYPES_H
8782    # include <sys/types.h>
8783    #endif
8784    #ifdef HAVE_NETINET_IN_H
8785    # include <netinet/in.h>
8786    #endif
8787    #ifdef HAVE_ARPA_NAMESER_H
8788    # include <arpa/nameser.h>
8789    #endif
8790
8791"
8792if test "x$ac_cv_header_resolv_h" = xyes; then :
8793  cat >>confdefs.h <<_ACEOF
8794#define HAVE_RESOLV_H 1
8795_ACEOF
8796
8797fi
8798
8799done
8800
8801
8802for ac_header in net/if_var.h
8803do :
8804  ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
8805    #if HAVE_SYS_TYPES_H
8806    # include <sys/types.h>
8807    #endif
8808    #ifdef HAVE_SYS_SOCKET_H
8809    # include <sys/socket.h>
8810    #endif
8811    #ifdef HAVE_NETINET_IN_H
8812    # include <netinet/in.h>
8813    #endif
8814    #ifdef HAVE_NET_IF_H
8815    # include <net/if.h>
8816    #endif
8817
8818"
8819if test "x$ac_cv_header_net_if_var_h" = xyes; then :
8820  cat >>confdefs.h <<_ACEOF
8821#define HAVE_NET_IF_VAR_H 1
8822_ACEOF
8823
8824fi
8825
8826done
8827
8828
8829for ac_header in netinet/ip.h netinet/in_var.h
8830do :
8831  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8832ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8833    #ifdef HAVE_SYS_TYPES_H
8834    # include <sys/types.h>
8835    #endif
8836    #ifdef HAVE_SYS_SOCKET_H
8837    # include <sys/socket.h>
8838    #endif
8839    #ifdef HAVE_NET_IF_H
8840    # include <net/if.h>
8841    #endif
8842    #ifdef HAVE_NETINET_IN_H
8843    # include <netinet/in.h>
8844    #endif
8845    #ifdef HAVE_NET_IF_VAR_H
8846    # include <net/if_var.h>
8847    #endif
8848    #ifdef HAVE_NETINET_IN_SYSTM_H
8849    # include <netinet/in_systm.h>
8850    #endif
8851
8852"
8853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8854  cat >>confdefs.h <<_ACEOF
8855#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8856_ACEOF
8857
8858fi
8859
8860done
8861
8862
8863# HMS: Do we need to check for -lsocket before or after these tests?
8864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
8865$as_echo_n "checking for library containing inet_pton... " >&6; }
8866if ${ac_cv_search_inet_pton+:} false; then :
8867  $as_echo_n "(cached) " >&6
8868else
8869  ac_func_search_save_LIBS=$LIBS
8870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8871/* end confdefs.h.  */
8872
8873/* Override any GCC internal prototype to avoid an error.
8874   Use char because int might match the return type of a GCC
8875   builtin and then its argument prototype would still apply.  */
8876#ifdef __cplusplus
8877extern "C"
8878#endif
8879char inet_pton ();
8880int
8881main ()
8882{
8883return inet_pton ();
8884  ;
8885  return 0;
8886}
8887_ACEOF
8888for ac_lib in '' nsl; do
8889  if test -z "$ac_lib"; then
8890    ac_res="none required"
8891  else
8892    ac_res=-l$ac_lib
8893    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8894  fi
8895  if ac_fn_c_try_link "$LINENO"; then :
8896  ac_cv_search_inet_pton=$ac_res
8897fi
8898rm -f core conftest.err conftest.$ac_objext \
8899    conftest$ac_exeext
8900  if ${ac_cv_search_inet_pton+:} false; then :
8901  break
8902fi
8903done
8904if ${ac_cv_search_inet_pton+:} false; then :
8905
8906else
8907  ac_cv_search_inet_pton=no
8908fi
8909rm conftest.$ac_ext
8910LIBS=$ac_func_search_save_LIBS
8911fi
8912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
8913$as_echo "$ac_cv_search_inet_pton" >&6; }
8914ac_res=$ac_cv_search_inet_pton
8915if test "$ac_res" != no; then :
8916  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8917  case "$ac_cv_search_inet_pton" in
8918 'none required') ;;
8919 no) ;;
8920 *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
8921 esac
8922
8923fi
8924
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
8926$as_echo_n "checking for library containing inet_ntop... " >&6; }
8927if ${ac_cv_search_inet_ntop+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  ac_func_search_save_LIBS=$LIBS
8931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8932/* end confdefs.h.  */
8933
8934/* Override any GCC internal prototype to avoid an error.
8935   Use char because int might match the return type of a GCC
8936   builtin and then its argument prototype would still apply.  */
8937#ifdef __cplusplus
8938extern "C"
8939#endif
8940char inet_ntop ();
8941int
8942main ()
8943{
8944return inet_ntop ();
8945  ;
8946  return 0;
8947}
8948_ACEOF
8949for ac_lib in '' resolv; do
8950  if test -z "$ac_lib"; then
8951    ac_res="none required"
8952  else
8953    ac_res=-l$ac_lib
8954    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
8955  fi
8956  if ac_fn_c_try_link "$LINENO"; then :
8957  ac_cv_search_inet_ntop=$ac_res
8958fi
8959rm -f core conftest.err conftest.$ac_objext \
8960    conftest$ac_exeext
8961  if ${ac_cv_search_inet_ntop+:} false; then :
8962  break
8963fi
8964done
8965if ${ac_cv_search_inet_ntop+:} false; then :
8966
8967else
8968  ac_cv_search_inet_ntop=no
8969fi
8970rm conftest.$ac_ext
8971LIBS=$ac_func_search_save_LIBS
8972fi
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
8974$as_echo "$ac_cv_search_inet_ntop" >&6; }
8975ac_res=$ac_cv_search_inet_ntop
8976if test "$ac_res" != no; then :
8977  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8978  case "$ac_cv_search_inet_ntop" in
8979 'none required') ;;
8980 no) ;;
8981 *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
8982 esac
8983
8984fi
8985
8986
8987# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
8988# avoid keying on the OS name:  If we find socket functions in
8989# libsocket, next try for them in libxnet without libsocket, if found,
8990# list both.  If we simply tested libxnet first, we would find the
8991# functions there and never add libsocket.  See also [Bug 660]
8992# http://bugs.ntp.org/show_bug.cgi?id=660#c9
8993saved_LIBS=$LIBS
8994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
8995$as_echo_n "checking for library containing setsockopt... " >&6; }
8996if ${ac_cv_search_setsockopt+:} false; then :
8997  $as_echo_n "(cached) " >&6
8998else
8999  ac_func_search_save_LIBS=$LIBS
9000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9001/* end confdefs.h.  */
9002
9003/* Override any GCC internal prototype to avoid an error.
9004   Use char because int might match the return type of a GCC
9005   builtin and then its argument prototype would still apply.  */
9006#ifdef __cplusplus
9007extern "C"
9008#endif
9009char setsockopt ();
9010int
9011main ()
9012{
9013return setsockopt ();
9014  ;
9015  return 0;
9016}
9017_ACEOF
9018for ac_lib in '' socket; do
9019  if test -z "$ac_lib"; then
9020    ac_res="none required"
9021  else
9022    ac_res=-l$ac_lib
9023    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9024  fi
9025  if ac_fn_c_try_link "$LINENO"; then :
9026  ac_cv_search_setsockopt=$ac_res
9027fi
9028rm -f core conftest.err conftest.$ac_objext \
9029    conftest$ac_exeext
9030  if ${ac_cv_search_setsockopt+:} false; then :
9031  break
9032fi
9033done
9034if ${ac_cv_search_setsockopt+:} false; then :
9035
9036else
9037  ac_cv_search_setsockopt=no
9038fi
9039rm conftest.$ac_ext
9040LIBS=$ac_func_search_save_LIBS
9041fi
9042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
9043$as_echo "$ac_cv_search_setsockopt" >&6; }
9044ac_res=$ac_cv_search_setsockopt
9045if test "$ac_res" != no; then :
9046  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9047  case "$ac_cv_search_setsockopt" in
9048 'none required') ;;
9049 no) ;;
9050 *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
9051 esac
9052
9053fi
9054
9055case "$ac_cv_search_setsockopt" in
9056 -lsocket)
9057    LIBS="$saved_LIBS"
9058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
9059$as_echo_n "checking for library containing getsockopt... " >&6; }
9060if ${ac_cv_search_getsockopt+:} false; then :
9061  $as_echo_n "(cached) " >&6
9062else
9063  ac_func_search_save_LIBS=$LIBS
9064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9065/* end confdefs.h.  */
9066
9067/* Override any GCC internal prototype to avoid an error.
9068   Use char because int might match the return type of a GCC
9069   builtin and then its argument prototype would still apply.  */
9070#ifdef __cplusplus
9071extern "C"
9072#endif
9073char getsockopt ();
9074int
9075main ()
9076{
9077return getsockopt ();
9078  ;
9079  return 0;
9080}
9081_ACEOF
9082for ac_lib in '' xnet; do
9083  if test -z "$ac_lib"; then
9084    ac_res="none required"
9085  else
9086    ac_res=-l$ac_lib
9087    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9088  fi
9089  if ac_fn_c_try_link "$LINENO"; then :
9090  ac_cv_search_getsockopt=$ac_res
9091fi
9092rm -f core conftest.err conftest.$ac_objext \
9093    conftest$ac_exeext
9094  if ${ac_cv_search_getsockopt+:} false; then :
9095  break
9096fi
9097done
9098if ${ac_cv_search_getsockopt+:} false; then :
9099
9100else
9101  ac_cv_search_getsockopt=no
9102fi
9103rm conftest.$ac_ext
9104LIBS=$ac_func_search_save_LIBS
9105fi
9106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
9107$as_echo "$ac_cv_search_getsockopt" >&6; }
9108ac_res=$ac_cv_search_getsockopt
9109if test "$ac_res" != no; then :
9110  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9111  case "$ac_cv_search_getsockopt" in
9112 'none required') ;;
9113 no) ;;
9114 *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
9115 esac
9116
9117fi
9118
9119    # XXX Possible trouble here - reading the comments above and looking at the
9120    # code below I wonder if we'll add -lxnet when we don't need it.
9121    # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
9122    # there when it is not needed?
9123    case "$ac_cv_search_getsockopt" in
9124     -lxnet)
9125	LIBS="-lxnet -lsocket $saved_LIBS"
9126	;;
9127     *) LIBS="-lsocket $saved_LIBS"
9128	;;
9129    esac
9130    ;;
9131esac
9132{ saved_LIBS=; unset saved_LIBS;}
9133
9134# Bug 2427 - look for recvmsg here.
9135for ac_func in recvmsg
9136do :
9137  ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
9138if test "x$ac_cv_func_recvmsg" = xyes; then :
9139  cat >>confdefs.h <<_ACEOF
9140#define HAVE_RECVMSG 1
9141_ACEOF
9142
9143fi
9144done
9145
9146
9147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9148$as_echo_n "checking for inline... " >&6; }
9149if ${ac_cv_c_inline+:} false; then :
9150  $as_echo_n "(cached) " >&6
9151else
9152  ac_cv_c_inline=no
9153for ac_kw in inline __inline__ __inline; do
9154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9155/* end confdefs.h.  */
9156#ifndef __cplusplus
9157typedef int foo_t;
9158static $ac_kw foo_t static_foo () {return 0; }
9159$ac_kw foo_t foo () {return 0; }
9160#endif
9161
9162_ACEOF
9163if ac_fn_c_try_compile "$LINENO"; then :
9164  ac_cv_c_inline=$ac_kw
9165fi
9166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9167  test "$ac_cv_c_inline" != no && break
9168done
9169
9170fi
9171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9172$as_echo "$ac_cv_c_inline" >&6; }
9173
9174case $ac_cv_c_inline in
9175  inline | yes) ;;
9176  *)
9177    case $ac_cv_c_inline in
9178      no) ac_val=;;
9179      *) ac_val=$ac_cv_c_inline;;
9180    esac
9181    cat >>confdefs.h <<_ACEOF
9182#ifndef __cplusplus
9183#define inline $ac_val
9184#endif
9185_ACEOF
9186    ;;
9187esac
9188
9189
9190case "$ac_cv_c_inline" in
9191 '')
9192    ;;
9193 *)
9194
9195$as_echo "#define HAVE_INLINE 1" >>confdefs.h
9196
9197
9198esac
9199
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9201$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9202if ${ac_cv_header_time+:} false; then :
9203  $as_echo_n "(cached) " >&6
9204else
9205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9206/* end confdefs.h.  */
9207#include <sys/types.h>
9208#include <sys/time.h>
9209#include <time.h>
9210
9211int
9212main ()
9213{
9214if ((struct tm *) 0)
9215return 0;
9216  ;
9217  return 0;
9218}
9219_ACEOF
9220if ac_fn_c_try_compile "$LINENO"; then :
9221  ac_cv_header_time=yes
9222else
9223  ac_cv_header_time=no
9224fi
9225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9226fi
9227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9228$as_echo "$ac_cv_header_time" >&6; }
9229if test $ac_cv_header_time = yes; then
9230
9231$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9232
9233fi
9234
9235# The cast to long int works around a bug in the HP C Compiler
9236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9238# This bug is HP SR number 8606223364.
9239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9240$as_echo_n "checking size of time_t... " >&6; }
9241if ${ac_cv_sizeof_time_t+:} false; then :
9242  $as_echo_n "(cached) " >&6
9243else
9244  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
9245
9246else
9247  if test "$ac_cv_type_time_t" = yes; then
9248     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9250as_fn_error 77 "cannot compute sizeof (time_t)
9251See \`config.log' for more details" "$LINENO" 5; }
9252   else
9253     ac_cv_sizeof_time_t=0
9254   fi
9255fi
9256
9257fi
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9259$as_echo "$ac_cv_sizeof_time_t" >&6; }
9260
9261
9262
9263cat >>confdefs.h <<_ACEOF
9264#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9265_ACEOF
9266
9267
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
9269$as_echo_n "checking whether char is unsigned... " >&6; }
9270if ${ac_cv_c_char_unsigned+:} false; then :
9271  $as_echo_n "(cached) " >&6
9272else
9273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9274/* end confdefs.h.  */
9275$ac_includes_default
9276int
9277main ()
9278{
9279static int test_array [1 - 2 * !(((char) -1) < 0)];
9280test_array [0] = 0;
9281return test_array [0];
9282
9283  ;
9284  return 0;
9285}
9286_ACEOF
9287if ac_fn_c_try_compile "$LINENO"; then :
9288  ac_cv_c_char_unsigned=no
9289else
9290  ac_cv_c_char_unsigned=yes
9291fi
9292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9293fi
9294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
9295$as_echo "$ac_cv_c_char_unsigned" >&6; }
9296if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
9297  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
9298
9299fi
9300		# The cast to long int works around a bug in the HP C Compiler
9301# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9302# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9303# This bug is HP SR number 8606223364.
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
9305$as_echo_n "checking size of signed char... " >&6; }
9306if ${ac_cv_sizeof_signed_char+:} false; then :
9307  $as_echo_n "(cached) " >&6
9308else
9309  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
9310
9311else
9312  if test "$ac_cv_type_signed_char" = yes; then
9313     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9314$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9315as_fn_error 77 "cannot compute sizeof (signed char)
9316See \`config.log' for more details" "$LINENO" 5; }
9317   else
9318     ac_cv_sizeof_signed_char=0
9319   fi
9320fi
9321
9322fi
9323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
9324$as_echo "$ac_cv_sizeof_signed_char" >&6; }
9325
9326
9327
9328cat >>confdefs.h <<_ACEOF
9329#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9330_ACEOF
9331
9332
9333ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
9334if test "x$ac_cv_type_s_char" = xyes; then :
9335
9336cat >>confdefs.h <<_ACEOF
9337#define HAVE_S_CHAR 1
9338_ACEOF
9339
9340
9341fi
9342ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9343if test "x$ac_cv_type_long_long" = xyes; then :
9344
9345cat >>confdefs.h <<_ACEOF
9346#define HAVE_LONG_LONG 1
9347_ACEOF
9348
9349
9350fi
9351
9352# The cast to long int works around a bug in the HP C Compiler
9353# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9354# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9355# This bug is HP SR number 8606223364.
9356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9357$as_echo_n "checking size of short... " >&6; }
9358if ${ac_cv_sizeof_short+:} false; then :
9359  $as_echo_n "(cached) " >&6
9360else
9361  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
9362
9363else
9364  if test "$ac_cv_type_short" = yes; then
9365     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9367as_fn_error 77 "cannot compute sizeof (short)
9368See \`config.log' for more details" "$LINENO" 5; }
9369   else
9370     ac_cv_sizeof_short=0
9371   fi
9372fi
9373
9374fi
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9376$as_echo "$ac_cv_sizeof_short" >&6; }
9377
9378
9379
9380cat >>confdefs.h <<_ACEOF
9381#define SIZEOF_SHORT $ac_cv_sizeof_short
9382_ACEOF
9383
9384
9385# The cast to long int works around a bug in the HP C Compiler
9386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9388# This bug is HP SR number 8606223364.
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9390$as_echo_n "checking size of int... " >&6; }
9391if ${ac_cv_sizeof_int+:} false; then :
9392  $as_echo_n "(cached) " >&6
9393else
9394  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
9395
9396else
9397  if test "$ac_cv_type_int" = yes; then
9398     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9400as_fn_error 77 "cannot compute sizeof (int)
9401See \`config.log' for more details" "$LINENO" 5; }
9402   else
9403     ac_cv_sizeof_int=0
9404   fi
9405fi
9406
9407fi
9408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9409$as_echo "$ac_cv_sizeof_int" >&6; }
9410
9411
9412
9413cat >>confdefs.h <<_ACEOF
9414#define SIZEOF_INT $ac_cv_sizeof_int
9415_ACEOF
9416
9417
9418# The cast to long int works around a bug in the HP C Compiler
9419# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9420# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9421# This bug is HP SR number 8606223364.
9422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9423$as_echo_n "checking size of long... " >&6; }
9424if ${ac_cv_sizeof_long+:} false; then :
9425  $as_echo_n "(cached) " >&6
9426else
9427  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
9428
9429else
9430  if test "$ac_cv_type_long" = yes; then
9431     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9432$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9433as_fn_error 77 "cannot compute sizeof (long)
9434See \`config.log' for more details" "$LINENO" 5; }
9435   else
9436     ac_cv_sizeof_long=0
9437   fi
9438fi
9439
9440fi
9441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9442$as_echo "$ac_cv_sizeof_long" >&6; }
9443
9444
9445
9446cat >>confdefs.h <<_ACEOF
9447#define SIZEOF_LONG $ac_cv_sizeof_long
9448_ACEOF
9449
9450
9451
9452case "$ac_cv_type_long_long" in
9453 no)
9454    ;;
9455 *)
9456    # The cast to long int works around a bug in the HP C Compiler
9457# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9458# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9459# This bug is HP SR number 8606223364.
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9461$as_echo_n "checking size of long long... " >&6; }
9462if ${ac_cv_sizeof_long_long+:} false; then :
9463  $as_echo_n "(cached) " >&6
9464else
9465  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
9466
9467else
9468  if test "$ac_cv_type_long_long" = yes; then
9469     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9470$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9471as_fn_error 77 "cannot compute sizeof (long long)
9472See \`config.log' for more details" "$LINENO" 5; }
9473   else
9474     ac_cv_sizeof_long_long=0
9475   fi
9476fi
9477
9478fi
9479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9480$as_echo "$ac_cv_sizeof_long_long" >&6; }
9481
9482
9483
9484cat >>confdefs.h <<_ACEOF
9485#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9486_ACEOF
9487
9488
9489    ;;
9490esac
9491
9492case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
9493 *yes)
9494    # We have a typedef for s_char.  Might as well believe it...
9495    ;;
9496 no0no)
9497    # We have signed chars, can't say 'signed char', no s_char typedef.
9498
9499$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9500
9501    ;;
9502 no1no)
9503    # We have signed chars, can say 'signed char', no s_char typedef.
9504
9505$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9506
9507    ;;
9508 yes0no)
9509    # We have unsigned chars, can't say 'signed char', no s_char typedef.
9510    as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
9511    ;;
9512 yes1no)
9513    # We have unsigned chars, can say 'signed char', no s_char typedef.
9514
9515$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9516
9517    ;;
9518esac
9519
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9521$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9522if ${ac_cv_type_uid_t+:} false; then :
9523  $as_echo_n "(cached) " >&6
9524else
9525  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9526/* end confdefs.h.  */
9527#include <sys/types.h>
9528
9529_ACEOF
9530if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9531  $EGREP "uid_t" >/dev/null 2>&1; then :
9532  ac_cv_type_uid_t=yes
9533else
9534  ac_cv_type_uid_t=no
9535fi
9536rm -f conftest*
9537
9538fi
9539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9540$as_echo "$ac_cv_type_uid_t" >&6; }
9541if test $ac_cv_type_uid_t = no; then
9542
9543$as_echo "#define uid_t int" >>confdefs.h
9544
9545
9546$as_echo "#define gid_t int" >>confdefs.h
9547
9548fi
9549
9550
9551
9552
9553
9554
9555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
9556$as_echo_n "checking if we're including debugging code... " >&6; }
9557# Check whether --enable-debugging was given.
9558if test "${enable_debugging+set}" = set; then :
9559  enableval=$enable_debugging; ntp_ok=$enableval
9560else
9561  ntp_ok=yes
9562
9563fi
9564
9565case "$ntp_ok" in
9566 yes)
9567
9568$as_echo "#define DEBUG 1" >>confdefs.h
9569
9570esac
9571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
9572$as_echo "$ntp_ok" >&6; }
9573
9574
9575
9576# check if we can compile with pthreads
9577for ac_header in semaphore.h
9578do :
9579  ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
9580if test "x$ac_cv_header_semaphore_h" = xyes; then :
9581  cat >>confdefs.h <<_ACEOF
9582#define HAVE_SEMAPHORE_H 1
9583_ACEOF
9584
9585fi
9586
9587done
9588
9589for ac_func in socketpair
9590do :
9591  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
9592if test "x$ac_cv_func_socketpair" = xyes; then :
9593  cat >>confdefs.h <<_ACEOF
9594#define HAVE_SOCKETPAIR 1
9595_ACEOF
9596
9597fi
9598done
9599
9600# Check whether --enable-thread-support was given.
9601if test "${enable_thread_support+set}" = set; then :
9602  enableval=$enable_thread_support;
9603else
9604  enable_thread_support=yes
9605
9606fi
9607
9608have_pthreads=no
9609case "$enable_thread_support" in
9610 no) ;;
9611 *)
9612    ol_found_pthreads=no
9613
9614
9615
9616ac_ext=c
9617ac_cpp='$CPP $CPPFLAGS'
9618ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9619ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9620ac_compiler_gnu=$ac_cv_c_compiler_gnu
9621
9622# OpenLDAP --with-threads
9623
9624# Check whether --with-threads was given.
9625if test "${with_threads+set}" = set; then :
9626  withval=$with_threads;
9627	ol_arg=invalid
9628	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
9629		if test "$withval" = "$ol_val" ; then
9630			ol_arg="$ol_val"
9631		fi
9632	done
9633	if test "$ol_arg" = "invalid" ; then
9634		as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
9635	fi
9636	ol_with_threads="$ol_arg"
9637
9638else
9639  	ol_with_threads="auto"
9640fi
9641# end --with-threads
9642
9643
9644case "$ol_with_threads$host" in
9645 auto*-*-solaris2.[0-6])
9646        ol_with_threads=no
9647    ;;
9648esac
9649
9650
9651ol_aix_threads=no
9652case "$host" in
9653*-*-aix*) 	if test -z "$CC" ; then
9654		case "$ol_with_threads" in
9655		auto | yes |  posix) ol_aix_threads=yes ;;
9656		esac
9657	fi
9658;;
9659esac
9660
9661if test $ol_aix_threads = yes ; then
9662	if test -z "${CC}" ; then
9663		for ac_prog in cc_r xlc_r cc
9664do
9665  # Extract the first word of "$ac_prog", so it can be a program name with args.
9666set dummy $ac_prog; ac_word=$2
9667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9668$as_echo_n "checking for $ac_word... " >&6; }
9669if ${ac_cv_prog_CC+:} false; then :
9670  $as_echo_n "(cached) " >&6
9671else
9672  if test -n "$CC"; then
9673  ac_cv_prog_CC="$CC" # Let the user override the test.
9674else
9675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9676for as_dir in $PATH
9677do
9678  IFS=$as_save_IFS
9679  test -z "$as_dir" && as_dir=.
9680    for ac_exec_ext in '' $ac_executable_extensions; do
9681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9682    ac_cv_prog_CC="$ac_prog"
9683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9684    break 2
9685  fi
9686done
9687  done
9688IFS=$as_save_IFS
9689
9690fi
9691fi
9692CC=$ac_cv_prog_CC
9693if test -n "$CC"; then
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
9695$as_echo "$CC" >&6; }
9696else
9697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9698$as_echo "no" >&6; }
9699fi
9700
9701
9702  test -n "$CC" && break
9703done
9704
9705
9706		if test "$CC" = cc ; then
9707						if test $ol_with_threads != auto ; then
9708				as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
9709			else
9710				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
9711$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
9712			fi
9713			ol_with_threads=no
9714  		fi
9715	fi
9716
9717	case ${CC} in cc_r | xlc_r)
9718		ol_with_threads=posix
9719		ol_cv_pthread_create=yes
9720		;;
9721	esac
9722fi
9723
9724ol_link_threads=no
9725# OpenLDAP --with-yielding_select
9726
9727# Check whether --with-yielding_select was given.
9728if test "${with_yielding_select+set}" = set; then :
9729  withval=$with_yielding_select;
9730	ol_arg=invalid
9731	for ol_val in auto yes no manual  ; do
9732		if test "$withval" = "$ol_val" ; then
9733			ol_arg="$ol_val"
9734		fi
9735	done
9736	if test "$ol_arg" = "invalid" ; then
9737		as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
9738	fi
9739	ol_with_yielding_select="$ol_arg"
9740
9741else
9742  	ol_with_yielding_select="auto"
9743fi
9744# end --with-yielding_select
9745
9746
9747case $ol_with_threads in auto | yes | nt)
9748
9749
9750	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
9751if test "x$ac_cv_func__beginthread" = xyes; then :
9752
9753fi
9754
9755
9756	if test $ac_cv_func__beginthread = yes ; then
9757
9758$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
9759
9760		ol_cv_nt_threads=yes
9761	fi
9762
9763
9764	if test "$ol_cv_nt_threads" = yes ; then
9765		ol_link_threads=nt
9766		ol_with_threads=found
9767		ol_with_yielding_select=yes
9768
9769
9770$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
9771
9772
9773$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
9774
9775	fi
9776
9777	if test $ol_with_threads = nt ; then
9778		as_fn_error $? "could not locate NT Threads" "$LINENO" 5
9779	fi
9780	;;
9781esac
9782
9783case $ol_with_threads in auto | yes | posix)
9784
9785	for ac_header in pthread.h
9786do :
9787  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9788if test "x$ac_cv_header_pthread_h" = xyes; then :
9789  cat >>confdefs.h <<_ACEOF
9790#define HAVE_PTHREAD_H 1
9791_ACEOF
9792
9793fi
9794
9795done
9796
9797
9798	if test $ac_cv_header_pthread_h = yes ; then
9799		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
9800$as_echo_n "checking POSIX thread version... " >&6; }
9801if ${ol_cv_pthread_version+:} false; then :
9802  $as_echo_n "(cached) " >&6
9803else
9804
9805	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9806/* end confdefs.h.  */
9807
9808#		include <pthread.h>
9809
9810int
9811main ()
9812{
9813
9814		int i = PTHREAD_CREATE_JOINABLE;
9815
9816  ;
9817  return 0;
9818}
9819_ACEOF
9820if ac_fn_c_try_compile "$LINENO"; then :
9821
9822	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9823/* end confdefs.h.  */
9824#include <pthread.h>
9825
9826_ACEOF
9827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9828  $EGREP "pthread_detach" >/dev/null 2>&1; then :
9829  ol_cv_pthread_version=10
9830else
9831  ol_cv_pthread_version=8
9832fi
9833rm -f conftest*
9834
9835else
9836
9837	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9838/* end confdefs.h.  */
9839
9840#		include <pthread.h>
9841#		ifdef PTHREAD_CREATE_UNDETACHED
9842		draft7
9843#		endif
9844
9845_ACEOF
9846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9847  $EGREP "draft7" >/dev/null 2>&1; then :
9848  ol_cv_pthread_version=7
9849else
9850
9851	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9852/* end confdefs.h.  */
9853#include <pthread.h>
9854
9855_ACEOF
9856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9857  $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
9858  ol_cv_pthread_version=6
9859else
9860
9861	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9862/* end confdefs.h.  */
9863
9864#		include <pthread.h>
9865#ifdef		PTHREAD_MUTEX_INITIALIZER
9866		draft5
9867#endif
9868
9869_ACEOF
9870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9871  $EGREP "draft5" >/dev/null 2>&1; then :
9872  ol_cv_pthread_version=5
9873else
9874  ol_cv_pthread_version=4
9875fi
9876rm -f conftest*
9877
9878fi
9879rm -f conftest*
9880
9881fi
9882rm -f conftest*
9883
9884fi
9885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9886
9887fi
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
9889$as_echo "$ol_cv_pthread_version" >&6; }
9890
9891
9892		if test $ol_cv_pthread_version != 0 ; then
9893
9894cat >>confdefs.h <<_ACEOF
9895#define HAVE_PTHREADS $ol_cv_pthread_version
9896_ACEOF
9897
9898		else
9899			as_fn_error $? "unknown pthread version" "$LINENO" 5
9900		fi
9901
9902		# consider threads found
9903		ol_with_threads=found
9904
9905
9906	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
9907$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
9908if ${ol_cv_header_linux_threads+:} false; then :
9909  $as_echo_n "(cached) " >&6
9910else
9911  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912/* end confdefs.h.  */
9913#include <pthread.h>
9914_ACEOF
9915if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9916  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
9917  ol_cv_header_linux_threads=yes
9918else
9919  ol_cv_header_linux_threads=no
9920fi
9921rm -f conftest*
9922
9923
9924fi
9925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
9926$as_echo "$ol_cv_header_linux_threads" >&6; }
9927	if test $ol_cv_header_linux_threads = yes; then
9928
9929$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
9930
9931	fi
9932
9933
9934	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
9935$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
9936if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
9937  $as_echo_n "(cached) " >&6
9938else
9939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9940/* end confdefs.h.  */
9941#include <pthread.h>
9942#ifdef _POSIX_THREAD_IS_GNU_PTH
9943	__gnu_pth__;
9944#endif
9945
9946_ACEOF
9947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9948  $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
9949  ol_cv_header_gnu_pth_pthread_h=yes
9950else
9951  ol_cv_header_gnu_pth_pthread_h=no
9952fi
9953rm -f conftest*
9954
9955
9956fi
9957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
9958$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
9959
9960
9961		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
9962			for ac_header in sched.h
9963do :
9964  ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
9965if test "x$ac_cv_header_sched_h" = xyes; then :
9966  cat >>confdefs.h <<_ACEOF
9967#define HAVE_SCHED_H 1
9968_ACEOF
9969
9970fi
9971
9972done
9973
9974		fi
9975
9976
9977				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
9978$as_echo_n "checking for pthread_create in default libraries... " >&6; }
9979if ${ol_cv_pthread_create+:} false; then :
9980  $as_echo_n "(cached) " >&6
9981else
9982
9983			if test "$cross_compiling" = yes; then :
9984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9985/* end confdefs.h.  */
9986
9987/* pthread test headers */
9988#include <pthread.h>
9989#if HAVE_PTHREADS < 7
9990#include <errno.h>
9991#endif
9992#ifndef NULL
9993#define NULL (void*)0
9994#endif
9995
9996static void *task(p)
9997	void *p;
9998{
9999	return (void *) (p == NULL);
10000}
10001
10002int
10003main ()
10004{
10005
10006	/* pthread test function */
10007#ifndef PTHREAD_CREATE_DETACHED
10008#define	PTHREAD_CREATE_DETACHED	1
10009#endif
10010	pthread_t t;
10011	int status;
10012	int detach = PTHREAD_CREATE_DETACHED;
10013
10014#if HAVE_PTHREADS > 4
10015	/* Final pthreads */
10016	pthread_attr_t attr;
10017
10018	status = pthread_attr_init(&attr);
10019	if( status ) return status;
10020
10021#if HAVE_PTHREADS < 7
10022	status = pthread_attr_setdetachstate(&attr, &detach);
10023	if( status < 0 ) status = errno;
10024#else
10025	status = pthread_attr_setdetachstate(&attr, detach);
10026#endif
10027	if( status ) return status;
10028	status = pthread_create( &t, &attr, task, NULL );
10029#if HAVE_PTHREADS < 7
10030	if( status < 0 ) status = errno;
10031#endif
10032	if( status ) return status;
10033#else
10034	/* Draft 4 pthreads */
10035	status = pthread_create( &t, pthread_attr_default, task, NULL );
10036	if( status ) return errno;
10037
10038	/* give thread a chance to complete */
10039	/* it should remain joinable and hence detachable */
10040	sleep( 1 );
10041
10042	status = pthread_detach( &t );
10043	if( status ) return errno;
10044#endif
10045
10046#ifdef HAVE_LINUX_THREADS
10047	pthread_kill_other_threads_np();
10048#endif
10049
10050	return 0;
10051
10052  ;
10053  return 0;
10054}
10055_ACEOF
10056if ac_fn_c_try_link "$LINENO"; then :
10057  ol_cv_pthread_create=yes
10058else
10059  ol_cv_pthread_create=no
10060fi
10061rm -f core conftest.err conftest.$ac_objext \
10062    conftest$ac_exeext conftest.$ac_ext
10063else
10064  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10065/* end confdefs.h.  */
10066
10067
10068/* pthread test headers */
10069#include <pthread.h>
10070#if HAVE_PTHREADS < 7
10071#include <errno.h>
10072#endif
10073#ifndef NULL
10074#define NULL (void*)0
10075#endif
10076
10077static void *task(p)
10078	void *p;
10079{
10080	return (void *) (p == NULL);
10081}
10082
10083
10084int main(argc, argv)
10085	int argc;
10086	char **argv;
10087{
10088
10089	/* pthread test function */
10090#ifndef PTHREAD_CREATE_DETACHED
10091#define	PTHREAD_CREATE_DETACHED	1
10092#endif
10093	pthread_t t;
10094	int status;
10095	int detach = PTHREAD_CREATE_DETACHED;
10096
10097#if HAVE_PTHREADS > 4
10098	/* Final pthreads */
10099	pthread_attr_t attr;
10100
10101	status = pthread_attr_init(&attr);
10102	if( status ) return status;
10103
10104#if HAVE_PTHREADS < 7
10105	status = pthread_attr_setdetachstate(&attr, &detach);
10106	if( status < 0 ) status = errno;
10107#else
10108	status = pthread_attr_setdetachstate(&attr, detach);
10109#endif
10110	if( status ) return status;
10111	status = pthread_create( &t, &attr, task, NULL );
10112#if HAVE_PTHREADS < 7
10113	if( status < 0 ) status = errno;
10114#endif
10115	if( status ) return status;
10116#else
10117	/* Draft 4 pthreads */
10118	status = pthread_create( &t, pthread_attr_default, task, NULL );
10119	if( status ) return errno;
10120
10121	/* give thread a chance to complete */
10122	/* it should remain joinable and hence detachable */
10123	sleep( 1 );
10124
10125	status = pthread_detach( &t );
10126	if( status ) return errno;
10127#endif
10128
10129#ifdef HAVE_LINUX_THREADS
10130	pthread_kill_other_threads_np();
10131#endif
10132
10133	return 0;
10134
10135}
10136
10137_ACEOF
10138if ac_fn_c_try_run "$LINENO"; then :
10139  ol_cv_pthread_create=yes
10140else
10141  ol_cv_pthread_create=no
10142fi
10143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10144  conftest.$ac_objext conftest.beam conftest.$ac_ext
10145fi
10146
10147fi
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
10149$as_echo "$ol_cv_pthread_create" >&6; }
10150
10151		if test $ol_cv_pthread_create != no ; then
10152			ol_link_threads=posix
10153			ol_link_pthreads=""
10154		fi
10155
10156		# Pthread try link: -kthread (ol_cv_pthread_kthread)
10157if test "$ol_link_threads" = no ; then
10158	# try -kthread
10159	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
10160$as_echo_n "checking for pthread link with -kthread... " >&6; }
10161if ${ol_cv_pthread_kthread+:} false; then :
10162  $as_echo_n "(cached) " >&6
10163else
10164
10165		# save the flags
10166		ol_LIBS="$LIBS"
10167		LIBS="-kthread $LIBS"
10168
10169		if test "$cross_compiling" = yes; then :
10170  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10171/* end confdefs.h.  */
10172
10173/* pthread test headers */
10174#include <pthread.h>
10175#if HAVE_PTHREADS < 7
10176#include <errno.h>
10177#endif
10178#ifndef NULL
10179#define NULL (void*)0
10180#endif
10181
10182static void *task(p)
10183	void *p;
10184{
10185	return (void *) (p == NULL);
10186}
10187
10188int
10189main ()
10190{
10191
10192	/* pthread test function */
10193#ifndef PTHREAD_CREATE_DETACHED
10194#define	PTHREAD_CREATE_DETACHED	1
10195#endif
10196	pthread_t t;
10197	int status;
10198	int detach = PTHREAD_CREATE_DETACHED;
10199
10200#if HAVE_PTHREADS > 4
10201	/* Final pthreads */
10202	pthread_attr_t attr;
10203
10204	status = pthread_attr_init(&attr);
10205	if( status ) return status;
10206
10207#if HAVE_PTHREADS < 7
10208	status = pthread_attr_setdetachstate(&attr, &detach);
10209	if( status < 0 ) status = errno;
10210#else
10211	status = pthread_attr_setdetachstate(&attr, detach);
10212#endif
10213	if( status ) return status;
10214	status = pthread_create( &t, &attr, task, NULL );
10215#if HAVE_PTHREADS < 7
10216	if( status < 0 ) status = errno;
10217#endif
10218	if( status ) return status;
10219#else
10220	/* Draft 4 pthreads */
10221	status = pthread_create( &t, pthread_attr_default, task, NULL );
10222	if( status ) return errno;
10223
10224	/* give thread a chance to complete */
10225	/* it should remain joinable and hence detachable */
10226	sleep( 1 );
10227
10228	status = pthread_detach( &t );
10229	if( status ) return errno;
10230#endif
10231
10232#ifdef HAVE_LINUX_THREADS
10233	pthread_kill_other_threads_np();
10234#endif
10235
10236	return 0;
10237
10238  ;
10239  return 0;
10240}
10241_ACEOF
10242if ac_fn_c_try_link "$LINENO"; then :
10243  ol_cv_pthread_kthread=yes
10244else
10245  ol_cv_pthread_kthread=no
10246fi
10247rm -f core conftest.err conftest.$ac_objext \
10248    conftest$ac_exeext conftest.$ac_ext
10249else
10250  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10251/* end confdefs.h.  */
10252
10253
10254/* pthread test headers */
10255#include <pthread.h>
10256#if HAVE_PTHREADS < 7
10257#include <errno.h>
10258#endif
10259#ifndef NULL
10260#define NULL (void*)0
10261#endif
10262
10263static void *task(p)
10264	void *p;
10265{
10266	return (void *) (p == NULL);
10267}
10268
10269
10270int main(argc, argv)
10271	int argc;
10272	char **argv;
10273{
10274
10275	/* pthread test function */
10276#ifndef PTHREAD_CREATE_DETACHED
10277#define	PTHREAD_CREATE_DETACHED	1
10278#endif
10279	pthread_t t;
10280	int status;
10281	int detach = PTHREAD_CREATE_DETACHED;
10282
10283#if HAVE_PTHREADS > 4
10284	/* Final pthreads */
10285	pthread_attr_t attr;
10286
10287	status = pthread_attr_init(&attr);
10288	if( status ) return status;
10289
10290#if HAVE_PTHREADS < 7
10291	status = pthread_attr_setdetachstate(&attr, &detach);
10292	if( status < 0 ) status = errno;
10293#else
10294	status = pthread_attr_setdetachstate(&attr, detach);
10295#endif
10296	if( status ) return status;
10297	status = pthread_create( &t, &attr, task, NULL );
10298#if HAVE_PTHREADS < 7
10299	if( status < 0 ) status = errno;
10300#endif
10301	if( status ) return status;
10302#else
10303	/* Draft 4 pthreads */
10304	status = pthread_create( &t, pthread_attr_default, task, NULL );
10305	if( status ) return errno;
10306
10307	/* give thread a chance to complete */
10308	/* it should remain joinable and hence detachable */
10309	sleep( 1 );
10310
10311	status = pthread_detach( &t );
10312	if( status ) return errno;
10313#endif
10314
10315#ifdef HAVE_LINUX_THREADS
10316	pthread_kill_other_threads_np();
10317#endif
10318
10319	return 0;
10320
10321}
10322
10323_ACEOF
10324if ac_fn_c_try_run "$LINENO"; then :
10325  ol_cv_pthread_kthread=yes
10326else
10327  ol_cv_pthread_kthread=no
10328fi
10329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10330  conftest.$ac_objext conftest.beam conftest.$ac_ext
10331fi
10332
10333
10334		# restore the LIBS
10335		LIBS="$ol_LIBS"
10336
10337fi
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
10339$as_echo "$ol_cv_pthread_kthread" >&6; }
10340
10341	if test $ol_cv_pthread_kthread = yes ; then
10342		ol_link_pthreads="-kthread"
10343		ol_link_threads=posix
10344	fi
10345fi
10346
10347		# Pthread try link: -pthread (ol_cv_pthread_pthread)
10348if test "$ol_link_threads" = no ; then
10349	# try -pthread
10350	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
10351$as_echo_n "checking for pthread link with -pthread... " >&6; }
10352if ${ol_cv_pthread_pthread+:} false; then :
10353  $as_echo_n "(cached) " >&6
10354else
10355
10356		# save the flags
10357		ol_LIBS="$LIBS"
10358		LIBS="-pthread $LIBS"
10359
10360		if test "$cross_compiling" = yes; then :
10361  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10362/* end confdefs.h.  */
10363
10364/* pthread test headers */
10365#include <pthread.h>
10366#if HAVE_PTHREADS < 7
10367#include <errno.h>
10368#endif
10369#ifndef NULL
10370#define NULL (void*)0
10371#endif
10372
10373static void *task(p)
10374	void *p;
10375{
10376	return (void *) (p == NULL);
10377}
10378
10379int
10380main ()
10381{
10382
10383	/* pthread test function */
10384#ifndef PTHREAD_CREATE_DETACHED
10385#define	PTHREAD_CREATE_DETACHED	1
10386#endif
10387	pthread_t t;
10388	int status;
10389	int detach = PTHREAD_CREATE_DETACHED;
10390
10391#if HAVE_PTHREADS > 4
10392	/* Final pthreads */
10393	pthread_attr_t attr;
10394
10395	status = pthread_attr_init(&attr);
10396	if( status ) return status;
10397
10398#if HAVE_PTHREADS < 7
10399	status = pthread_attr_setdetachstate(&attr, &detach);
10400	if( status < 0 ) status = errno;
10401#else
10402	status = pthread_attr_setdetachstate(&attr, detach);
10403#endif
10404	if( status ) return status;
10405	status = pthread_create( &t, &attr, task, NULL );
10406#if HAVE_PTHREADS < 7
10407	if( status < 0 ) status = errno;
10408#endif
10409	if( status ) return status;
10410#else
10411	/* Draft 4 pthreads */
10412	status = pthread_create( &t, pthread_attr_default, task, NULL );
10413	if( status ) return errno;
10414
10415	/* give thread a chance to complete */
10416	/* it should remain joinable and hence detachable */
10417	sleep( 1 );
10418
10419	status = pthread_detach( &t );
10420	if( status ) return errno;
10421#endif
10422
10423#ifdef HAVE_LINUX_THREADS
10424	pthread_kill_other_threads_np();
10425#endif
10426
10427	return 0;
10428
10429  ;
10430  return 0;
10431}
10432_ACEOF
10433if ac_fn_c_try_link "$LINENO"; then :
10434  ol_cv_pthread_pthread=yes
10435else
10436  ol_cv_pthread_pthread=no
10437fi
10438rm -f core conftest.err conftest.$ac_objext \
10439    conftest$ac_exeext conftest.$ac_ext
10440else
10441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10442/* end confdefs.h.  */
10443
10444
10445/* pthread test headers */
10446#include <pthread.h>
10447#if HAVE_PTHREADS < 7
10448#include <errno.h>
10449#endif
10450#ifndef NULL
10451#define NULL (void*)0
10452#endif
10453
10454static void *task(p)
10455	void *p;
10456{
10457	return (void *) (p == NULL);
10458}
10459
10460
10461int main(argc, argv)
10462	int argc;
10463	char **argv;
10464{
10465
10466	/* pthread test function */
10467#ifndef PTHREAD_CREATE_DETACHED
10468#define	PTHREAD_CREATE_DETACHED	1
10469#endif
10470	pthread_t t;
10471	int status;
10472	int detach = PTHREAD_CREATE_DETACHED;
10473
10474#if HAVE_PTHREADS > 4
10475	/* Final pthreads */
10476	pthread_attr_t attr;
10477
10478	status = pthread_attr_init(&attr);
10479	if( status ) return status;
10480
10481#if HAVE_PTHREADS < 7
10482	status = pthread_attr_setdetachstate(&attr, &detach);
10483	if( status < 0 ) status = errno;
10484#else
10485	status = pthread_attr_setdetachstate(&attr, detach);
10486#endif
10487	if( status ) return status;
10488	status = pthread_create( &t, &attr, task, NULL );
10489#if HAVE_PTHREADS < 7
10490	if( status < 0 ) status = errno;
10491#endif
10492	if( status ) return status;
10493#else
10494	/* Draft 4 pthreads */
10495	status = pthread_create( &t, pthread_attr_default, task, NULL );
10496	if( status ) return errno;
10497
10498	/* give thread a chance to complete */
10499	/* it should remain joinable and hence detachable */
10500	sleep( 1 );
10501
10502	status = pthread_detach( &t );
10503	if( status ) return errno;
10504#endif
10505
10506#ifdef HAVE_LINUX_THREADS
10507	pthread_kill_other_threads_np();
10508#endif
10509
10510	return 0;
10511
10512}
10513
10514_ACEOF
10515if ac_fn_c_try_run "$LINENO"; then :
10516  ol_cv_pthread_pthread=yes
10517else
10518  ol_cv_pthread_pthread=no
10519fi
10520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10521  conftest.$ac_objext conftest.beam conftest.$ac_ext
10522fi
10523
10524
10525		# restore the LIBS
10526		LIBS="$ol_LIBS"
10527
10528fi
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
10530$as_echo "$ol_cv_pthread_pthread" >&6; }
10531
10532	if test $ol_cv_pthread_pthread = yes ; then
10533		ol_link_pthreads="-pthread"
10534		ol_link_threads=posix
10535	fi
10536fi
10537
10538		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
10539if test "$ol_link_threads" = no ; then
10540	# try -pthreads
10541	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
10542$as_echo_n "checking for pthread link with -pthreads... " >&6; }
10543if ${ol_cv_pthread_pthreads+:} false; then :
10544  $as_echo_n "(cached) " >&6
10545else
10546
10547		# save the flags
10548		ol_LIBS="$LIBS"
10549		LIBS="-pthreads $LIBS"
10550
10551		if test "$cross_compiling" = yes; then :
10552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10553/* end confdefs.h.  */
10554
10555/* pthread test headers */
10556#include <pthread.h>
10557#if HAVE_PTHREADS < 7
10558#include <errno.h>
10559#endif
10560#ifndef NULL
10561#define NULL (void*)0
10562#endif
10563
10564static void *task(p)
10565	void *p;
10566{
10567	return (void *) (p == NULL);
10568}
10569
10570int
10571main ()
10572{
10573
10574	/* pthread test function */
10575#ifndef PTHREAD_CREATE_DETACHED
10576#define	PTHREAD_CREATE_DETACHED	1
10577#endif
10578	pthread_t t;
10579	int status;
10580	int detach = PTHREAD_CREATE_DETACHED;
10581
10582#if HAVE_PTHREADS > 4
10583	/* Final pthreads */
10584	pthread_attr_t attr;
10585
10586	status = pthread_attr_init(&attr);
10587	if( status ) return status;
10588
10589#if HAVE_PTHREADS < 7
10590	status = pthread_attr_setdetachstate(&attr, &detach);
10591	if( status < 0 ) status = errno;
10592#else
10593	status = pthread_attr_setdetachstate(&attr, detach);
10594#endif
10595	if( status ) return status;
10596	status = pthread_create( &t, &attr, task, NULL );
10597#if HAVE_PTHREADS < 7
10598	if( status < 0 ) status = errno;
10599#endif
10600	if( status ) return status;
10601#else
10602	/* Draft 4 pthreads */
10603	status = pthread_create( &t, pthread_attr_default, task, NULL );
10604	if( status ) return errno;
10605
10606	/* give thread a chance to complete */
10607	/* it should remain joinable and hence detachable */
10608	sleep( 1 );
10609
10610	status = pthread_detach( &t );
10611	if( status ) return errno;
10612#endif
10613
10614#ifdef HAVE_LINUX_THREADS
10615	pthread_kill_other_threads_np();
10616#endif
10617
10618	return 0;
10619
10620  ;
10621  return 0;
10622}
10623_ACEOF
10624if ac_fn_c_try_link "$LINENO"; then :
10625  ol_cv_pthread_pthreads=yes
10626else
10627  ol_cv_pthread_pthreads=no
10628fi
10629rm -f core conftest.err conftest.$ac_objext \
10630    conftest$ac_exeext conftest.$ac_ext
10631else
10632  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10633/* end confdefs.h.  */
10634
10635
10636/* pthread test headers */
10637#include <pthread.h>
10638#if HAVE_PTHREADS < 7
10639#include <errno.h>
10640#endif
10641#ifndef NULL
10642#define NULL (void*)0
10643#endif
10644
10645static void *task(p)
10646	void *p;
10647{
10648	return (void *) (p == NULL);
10649}
10650
10651
10652int main(argc, argv)
10653	int argc;
10654	char **argv;
10655{
10656
10657	/* pthread test function */
10658#ifndef PTHREAD_CREATE_DETACHED
10659#define	PTHREAD_CREATE_DETACHED	1
10660#endif
10661	pthread_t t;
10662	int status;
10663	int detach = PTHREAD_CREATE_DETACHED;
10664
10665#if HAVE_PTHREADS > 4
10666	/* Final pthreads */
10667	pthread_attr_t attr;
10668
10669	status = pthread_attr_init(&attr);
10670	if( status ) return status;
10671
10672#if HAVE_PTHREADS < 7
10673	status = pthread_attr_setdetachstate(&attr, &detach);
10674	if( status < 0 ) status = errno;
10675#else
10676	status = pthread_attr_setdetachstate(&attr, detach);
10677#endif
10678	if( status ) return status;
10679	status = pthread_create( &t, &attr, task, NULL );
10680#if HAVE_PTHREADS < 7
10681	if( status < 0 ) status = errno;
10682#endif
10683	if( status ) return status;
10684#else
10685	/* Draft 4 pthreads */
10686	status = pthread_create( &t, pthread_attr_default, task, NULL );
10687	if( status ) return errno;
10688
10689	/* give thread a chance to complete */
10690	/* it should remain joinable and hence detachable */
10691	sleep( 1 );
10692
10693	status = pthread_detach( &t );
10694	if( status ) return errno;
10695#endif
10696
10697#ifdef HAVE_LINUX_THREADS
10698	pthread_kill_other_threads_np();
10699#endif
10700
10701	return 0;
10702
10703}
10704
10705_ACEOF
10706if ac_fn_c_try_run "$LINENO"; then :
10707  ol_cv_pthread_pthreads=yes
10708else
10709  ol_cv_pthread_pthreads=no
10710fi
10711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10712  conftest.$ac_objext conftest.beam conftest.$ac_ext
10713fi
10714
10715
10716		# restore the LIBS
10717		LIBS="$ol_LIBS"
10718
10719fi
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
10721$as_echo "$ol_cv_pthread_pthreads" >&6; }
10722
10723	if test $ol_cv_pthread_pthreads = yes ; then
10724		ol_link_pthreads="-pthreads"
10725		ol_link_threads=posix
10726	fi
10727fi
10728
10729		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
10730if test "$ol_link_threads" = no ; then
10731	# try -mthreads
10732	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
10733$as_echo_n "checking for pthread link with -mthreads... " >&6; }
10734if ${ol_cv_pthread_mthreads+:} false; then :
10735  $as_echo_n "(cached) " >&6
10736else
10737
10738		# save the flags
10739		ol_LIBS="$LIBS"
10740		LIBS="-mthreads $LIBS"
10741
10742		if test "$cross_compiling" = yes; then :
10743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10744/* end confdefs.h.  */
10745
10746/* pthread test headers */
10747#include <pthread.h>
10748#if HAVE_PTHREADS < 7
10749#include <errno.h>
10750#endif
10751#ifndef NULL
10752#define NULL (void*)0
10753#endif
10754
10755static void *task(p)
10756	void *p;
10757{
10758	return (void *) (p == NULL);
10759}
10760
10761int
10762main ()
10763{
10764
10765	/* pthread test function */
10766#ifndef PTHREAD_CREATE_DETACHED
10767#define	PTHREAD_CREATE_DETACHED	1
10768#endif
10769	pthread_t t;
10770	int status;
10771	int detach = PTHREAD_CREATE_DETACHED;
10772
10773#if HAVE_PTHREADS > 4
10774	/* Final pthreads */
10775	pthread_attr_t attr;
10776
10777	status = pthread_attr_init(&attr);
10778	if( status ) return status;
10779
10780#if HAVE_PTHREADS < 7
10781	status = pthread_attr_setdetachstate(&attr, &detach);
10782	if( status < 0 ) status = errno;
10783#else
10784	status = pthread_attr_setdetachstate(&attr, detach);
10785#endif
10786	if( status ) return status;
10787	status = pthread_create( &t, &attr, task, NULL );
10788#if HAVE_PTHREADS < 7
10789	if( status < 0 ) status = errno;
10790#endif
10791	if( status ) return status;
10792#else
10793	/* Draft 4 pthreads */
10794	status = pthread_create( &t, pthread_attr_default, task, NULL );
10795	if( status ) return errno;
10796
10797	/* give thread a chance to complete */
10798	/* it should remain joinable and hence detachable */
10799	sleep( 1 );
10800
10801	status = pthread_detach( &t );
10802	if( status ) return errno;
10803#endif
10804
10805#ifdef HAVE_LINUX_THREADS
10806	pthread_kill_other_threads_np();
10807#endif
10808
10809	return 0;
10810
10811  ;
10812  return 0;
10813}
10814_ACEOF
10815if ac_fn_c_try_link "$LINENO"; then :
10816  ol_cv_pthread_mthreads=yes
10817else
10818  ol_cv_pthread_mthreads=no
10819fi
10820rm -f core conftest.err conftest.$ac_objext \
10821    conftest$ac_exeext conftest.$ac_ext
10822else
10823  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10824/* end confdefs.h.  */
10825
10826
10827/* pthread test headers */
10828#include <pthread.h>
10829#if HAVE_PTHREADS < 7
10830#include <errno.h>
10831#endif
10832#ifndef NULL
10833#define NULL (void*)0
10834#endif
10835
10836static void *task(p)
10837	void *p;
10838{
10839	return (void *) (p == NULL);
10840}
10841
10842
10843int main(argc, argv)
10844	int argc;
10845	char **argv;
10846{
10847
10848	/* pthread test function */
10849#ifndef PTHREAD_CREATE_DETACHED
10850#define	PTHREAD_CREATE_DETACHED	1
10851#endif
10852	pthread_t t;
10853	int status;
10854	int detach = PTHREAD_CREATE_DETACHED;
10855
10856#if HAVE_PTHREADS > 4
10857	/* Final pthreads */
10858	pthread_attr_t attr;
10859
10860	status = pthread_attr_init(&attr);
10861	if( status ) return status;
10862
10863#if HAVE_PTHREADS < 7
10864	status = pthread_attr_setdetachstate(&attr, &detach);
10865	if( status < 0 ) status = errno;
10866#else
10867	status = pthread_attr_setdetachstate(&attr, detach);
10868#endif
10869	if( status ) return status;
10870	status = pthread_create( &t, &attr, task, NULL );
10871#if HAVE_PTHREADS < 7
10872	if( status < 0 ) status = errno;
10873#endif
10874	if( status ) return status;
10875#else
10876	/* Draft 4 pthreads */
10877	status = pthread_create( &t, pthread_attr_default, task, NULL );
10878	if( status ) return errno;
10879
10880	/* give thread a chance to complete */
10881	/* it should remain joinable and hence detachable */
10882	sleep( 1 );
10883
10884	status = pthread_detach( &t );
10885	if( status ) return errno;
10886#endif
10887
10888#ifdef HAVE_LINUX_THREADS
10889	pthread_kill_other_threads_np();
10890#endif
10891
10892	return 0;
10893
10894}
10895
10896_ACEOF
10897if ac_fn_c_try_run "$LINENO"; then :
10898  ol_cv_pthread_mthreads=yes
10899else
10900  ol_cv_pthread_mthreads=no
10901fi
10902rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10903  conftest.$ac_objext conftest.beam conftest.$ac_ext
10904fi
10905
10906
10907		# restore the LIBS
10908		LIBS="$ol_LIBS"
10909
10910fi
10911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
10912$as_echo "$ol_cv_pthread_mthreads" >&6; }
10913
10914	if test $ol_cv_pthread_mthreads = yes ; then
10915		ol_link_pthreads="-mthreads"
10916		ol_link_threads=posix
10917	fi
10918fi
10919
10920		# Pthread try link: -thread (ol_cv_pthread_thread)
10921if test "$ol_link_threads" = no ; then
10922	# try -thread
10923	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
10924$as_echo_n "checking for pthread link with -thread... " >&6; }
10925if ${ol_cv_pthread_thread+:} false; then :
10926  $as_echo_n "(cached) " >&6
10927else
10928
10929		# save the flags
10930		ol_LIBS="$LIBS"
10931		LIBS="-thread $LIBS"
10932
10933		if test "$cross_compiling" = yes; then :
10934  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10935/* end confdefs.h.  */
10936
10937/* pthread test headers */
10938#include <pthread.h>
10939#if HAVE_PTHREADS < 7
10940#include <errno.h>
10941#endif
10942#ifndef NULL
10943#define NULL (void*)0
10944#endif
10945
10946static void *task(p)
10947	void *p;
10948{
10949	return (void *) (p == NULL);
10950}
10951
10952int
10953main ()
10954{
10955
10956	/* pthread test function */
10957#ifndef PTHREAD_CREATE_DETACHED
10958#define	PTHREAD_CREATE_DETACHED	1
10959#endif
10960	pthread_t t;
10961	int status;
10962	int detach = PTHREAD_CREATE_DETACHED;
10963
10964#if HAVE_PTHREADS > 4
10965	/* Final pthreads */
10966	pthread_attr_t attr;
10967
10968	status = pthread_attr_init(&attr);
10969	if( status ) return status;
10970
10971#if HAVE_PTHREADS < 7
10972	status = pthread_attr_setdetachstate(&attr, &detach);
10973	if( status < 0 ) status = errno;
10974#else
10975	status = pthread_attr_setdetachstate(&attr, detach);
10976#endif
10977	if( status ) return status;
10978	status = pthread_create( &t, &attr, task, NULL );
10979#if HAVE_PTHREADS < 7
10980	if( status < 0 ) status = errno;
10981#endif
10982	if( status ) return status;
10983#else
10984	/* Draft 4 pthreads */
10985	status = pthread_create( &t, pthread_attr_default, task, NULL );
10986	if( status ) return errno;
10987
10988	/* give thread a chance to complete */
10989	/* it should remain joinable and hence detachable */
10990	sleep( 1 );
10991
10992	status = pthread_detach( &t );
10993	if( status ) return errno;
10994#endif
10995
10996#ifdef HAVE_LINUX_THREADS
10997	pthread_kill_other_threads_np();
10998#endif
10999
11000	return 0;
11001
11002  ;
11003  return 0;
11004}
11005_ACEOF
11006if ac_fn_c_try_link "$LINENO"; then :
11007  ol_cv_pthread_thread=yes
11008else
11009  ol_cv_pthread_thread=no
11010fi
11011rm -f core conftest.err conftest.$ac_objext \
11012    conftest$ac_exeext conftest.$ac_ext
11013else
11014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11015/* end confdefs.h.  */
11016
11017
11018/* pthread test headers */
11019#include <pthread.h>
11020#if HAVE_PTHREADS < 7
11021#include <errno.h>
11022#endif
11023#ifndef NULL
11024#define NULL (void*)0
11025#endif
11026
11027static void *task(p)
11028	void *p;
11029{
11030	return (void *) (p == NULL);
11031}
11032
11033
11034int main(argc, argv)
11035	int argc;
11036	char **argv;
11037{
11038
11039	/* pthread test function */
11040#ifndef PTHREAD_CREATE_DETACHED
11041#define	PTHREAD_CREATE_DETACHED	1
11042#endif
11043	pthread_t t;
11044	int status;
11045	int detach = PTHREAD_CREATE_DETACHED;
11046
11047#if HAVE_PTHREADS > 4
11048	/* Final pthreads */
11049	pthread_attr_t attr;
11050
11051	status = pthread_attr_init(&attr);
11052	if( status ) return status;
11053
11054#if HAVE_PTHREADS < 7
11055	status = pthread_attr_setdetachstate(&attr, &detach);
11056	if( status < 0 ) status = errno;
11057#else
11058	status = pthread_attr_setdetachstate(&attr, detach);
11059#endif
11060	if( status ) return status;
11061	status = pthread_create( &t, &attr, task, NULL );
11062#if HAVE_PTHREADS < 7
11063	if( status < 0 ) status = errno;
11064#endif
11065	if( status ) return status;
11066#else
11067	/* Draft 4 pthreads */
11068	status = pthread_create( &t, pthread_attr_default, task, NULL );
11069	if( status ) return errno;
11070
11071	/* give thread a chance to complete */
11072	/* it should remain joinable and hence detachable */
11073	sleep( 1 );
11074
11075	status = pthread_detach( &t );
11076	if( status ) return errno;
11077#endif
11078
11079#ifdef HAVE_LINUX_THREADS
11080	pthread_kill_other_threads_np();
11081#endif
11082
11083	return 0;
11084
11085}
11086
11087_ACEOF
11088if ac_fn_c_try_run "$LINENO"; then :
11089  ol_cv_pthread_thread=yes
11090else
11091  ol_cv_pthread_thread=no
11092fi
11093rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11094  conftest.$ac_objext conftest.beam conftest.$ac_ext
11095fi
11096
11097
11098		# restore the LIBS
11099		LIBS="$ol_LIBS"
11100
11101fi
11102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
11103$as_echo "$ol_cv_pthread_thread" >&6; }
11104
11105	if test $ol_cv_pthread_thread = yes ; then
11106		ol_link_pthreads="-thread"
11107		ol_link_threads=posix
11108	fi
11109fi
11110
11111
11112		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
11113if test "$ol_link_threads" = no ; then
11114	# try -lpthread -lmach -lexc -lc_r
11115	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
11116$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
11117if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
11118  $as_echo_n "(cached) " >&6
11119else
11120
11121		# save the flags
11122		ol_LIBS="$LIBS"
11123		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
11124
11125		if test "$cross_compiling" = yes; then :
11126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11127/* end confdefs.h.  */
11128
11129/* pthread test headers */
11130#include <pthread.h>
11131#if HAVE_PTHREADS < 7
11132#include <errno.h>
11133#endif
11134#ifndef NULL
11135#define NULL (void*)0
11136#endif
11137
11138static void *task(p)
11139	void *p;
11140{
11141	return (void *) (p == NULL);
11142}
11143
11144int
11145main ()
11146{
11147
11148	/* pthread test function */
11149#ifndef PTHREAD_CREATE_DETACHED
11150#define	PTHREAD_CREATE_DETACHED	1
11151#endif
11152	pthread_t t;
11153	int status;
11154	int detach = PTHREAD_CREATE_DETACHED;
11155
11156#if HAVE_PTHREADS > 4
11157	/* Final pthreads */
11158	pthread_attr_t attr;
11159
11160	status = pthread_attr_init(&attr);
11161	if( status ) return status;
11162
11163#if HAVE_PTHREADS < 7
11164	status = pthread_attr_setdetachstate(&attr, &detach);
11165	if( status < 0 ) status = errno;
11166#else
11167	status = pthread_attr_setdetachstate(&attr, detach);
11168#endif
11169	if( status ) return status;
11170	status = pthread_create( &t, &attr, task, NULL );
11171#if HAVE_PTHREADS < 7
11172	if( status < 0 ) status = errno;
11173#endif
11174	if( status ) return status;
11175#else
11176	/* Draft 4 pthreads */
11177	status = pthread_create( &t, pthread_attr_default, task, NULL );
11178	if( status ) return errno;
11179
11180	/* give thread a chance to complete */
11181	/* it should remain joinable and hence detachable */
11182	sleep( 1 );
11183
11184	status = pthread_detach( &t );
11185	if( status ) return errno;
11186#endif
11187
11188#ifdef HAVE_LINUX_THREADS
11189	pthread_kill_other_threads_np();
11190#endif
11191
11192	return 0;
11193
11194  ;
11195  return 0;
11196}
11197_ACEOF
11198if ac_fn_c_try_link "$LINENO"; then :
11199  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11200else
11201  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11202fi
11203rm -f core conftest.err conftest.$ac_objext \
11204    conftest$ac_exeext conftest.$ac_ext
11205else
11206  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11207/* end confdefs.h.  */
11208
11209
11210/* pthread test headers */
11211#include <pthread.h>
11212#if HAVE_PTHREADS < 7
11213#include <errno.h>
11214#endif
11215#ifndef NULL
11216#define NULL (void*)0
11217#endif
11218
11219static void *task(p)
11220	void *p;
11221{
11222	return (void *) (p == NULL);
11223}
11224
11225
11226int main(argc, argv)
11227	int argc;
11228	char **argv;
11229{
11230
11231	/* pthread test function */
11232#ifndef PTHREAD_CREATE_DETACHED
11233#define	PTHREAD_CREATE_DETACHED	1
11234#endif
11235	pthread_t t;
11236	int status;
11237	int detach = PTHREAD_CREATE_DETACHED;
11238
11239#if HAVE_PTHREADS > 4
11240	/* Final pthreads */
11241	pthread_attr_t attr;
11242
11243	status = pthread_attr_init(&attr);
11244	if( status ) return status;
11245
11246#if HAVE_PTHREADS < 7
11247	status = pthread_attr_setdetachstate(&attr, &detach);
11248	if( status < 0 ) status = errno;
11249#else
11250	status = pthread_attr_setdetachstate(&attr, detach);
11251#endif
11252	if( status ) return status;
11253	status = pthread_create( &t, &attr, task, NULL );
11254#if HAVE_PTHREADS < 7
11255	if( status < 0 ) status = errno;
11256#endif
11257	if( status ) return status;
11258#else
11259	/* Draft 4 pthreads */
11260	status = pthread_create( &t, pthread_attr_default, task, NULL );
11261	if( status ) return errno;
11262
11263	/* give thread a chance to complete */
11264	/* it should remain joinable and hence detachable */
11265	sleep( 1 );
11266
11267	status = pthread_detach( &t );
11268	if( status ) return errno;
11269#endif
11270
11271#ifdef HAVE_LINUX_THREADS
11272	pthread_kill_other_threads_np();
11273#endif
11274
11275	return 0;
11276
11277}
11278
11279_ACEOF
11280if ac_fn_c_try_run "$LINENO"; then :
11281  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11282else
11283  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11284fi
11285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11286  conftest.$ac_objext conftest.beam conftest.$ac_ext
11287fi
11288
11289
11290		# restore the LIBS
11291		LIBS="$ol_LIBS"
11292
11293fi
11294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
11295$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
11296
11297	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
11298		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
11299		ol_link_threads=posix
11300	fi
11301fi
11302
11303		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
11304if test "$ol_link_threads" = no ; then
11305	# try -lpthread -lmach -lexc
11306	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
11307$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
11308if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
11309  $as_echo_n "(cached) " >&6
11310else
11311
11312		# save the flags
11313		ol_LIBS="$LIBS"
11314		LIBS="-lpthread -lmach -lexc $LIBS"
11315
11316		if test "$cross_compiling" = yes; then :
11317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318/* end confdefs.h.  */
11319
11320/* pthread test headers */
11321#include <pthread.h>
11322#if HAVE_PTHREADS < 7
11323#include <errno.h>
11324#endif
11325#ifndef NULL
11326#define NULL (void*)0
11327#endif
11328
11329static void *task(p)
11330	void *p;
11331{
11332	return (void *) (p == NULL);
11333}
11334
11335int
11336main ()
11337{
11338
11339	/* pthread test function */
11340#ifndef PTHREAD_CREATE_DETACHED
11341#define	PTHREAD_CREATE_DETACHED	1
11342#endif
11343	pthread_t t;
11344	int status;
11345	int detach = PTHREAD_CREATE_DETACHED;
11346
11347#if HAVE_PTHREADS > 4
11348	/* Final pthreads */
11349	pthread_attr_t attr;
11350
11351	status = pthread_attr_init(&attr);
11352	if( status ) return status;
11353
11354#if HAVE_PTHREADS < 7
11355	status = pthread_attr_setdetachstate(&attr, &detach);
11356	if( status < 0 ) status = errno;
11357#else
11358	status = pthread_attr_setdetachstate(&attr, detach);
11359#endif
11360	if( status ) return status;
11361	status = pthread_create( &t, &attr, task, NULL );
11362#if HAVE_PTHREADS < 7
11363	if( status < 0 ) status = errno;
11364#endif
11365	if( status ) return status;
11366#else
11367	/* Draft 4 pthreads */
11368	status = pthread_create( &t, pthread_attr_default, task, NULL );
11369	if( status ) return errno;
11370
11371	/* give thread a chance to complete */
11372	/* it should remain joinable and hence detachable */
11373	sleep( 1 );
11374
11375	status = pthread_detach( &t );
11376	if( status ) return errno;
11377#endif
11378
11379#ifdef HAVE_LINUX_THREADS
11380	pthread_kill_other_threads_np();
11381#endif
11382
11383	return 0;
11384
11385  ;
11386  return 0;
11387}
11388_ACEOF
11389if ac_fn_c_try_link "$LINENO"; then :
11390  ol_cv_pthread_lpthread_lmach_lexc=yes
11391else
11392  ol_cv_pthread_lpthread_lmach_lexc=no
11393fi
11394rm -f core conftest.err conftest.$ac_objext \
11395    conftest$ac_exeext conftest.$ac_ext
11396else
11397  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11398/* end confdefs.h.  */
11399
11400
11401/* pthread test headers */
11402#include <pthread.h>
11403#if HAVE_PTHREADS < 7
11404#include <errno.h>
11405#endif
11406#ifndef NULL
11407#define NULL (void*)0
11408#endif
11409
11410static void *task(p)
11411	void *p;
11412{
11413	return (void *) (p == NULL);
11414}
11415
11416
11417int main(argc, argv)
11418	int argc;
11419	char **argv;
11420{
11421
11422	/* pthread test function */
11423#ifndef PTHREAD_CREATE_DETACHED
11424#define	PTHREAD_CREATE_DETACHED	1
11425#endif
11426	pthread_t t;
11427	int status;
11428	int detach = PTHREAD_CREATE_DETACHED;
11429
11430#if HAVE_PTHREADS > 4
11431	/* Final pthreads */
11432	pthread_attr_t attr;
11433
11434	status = pthread_attr_init(&attr);
11435	if( status ) return status;
11436
11437#if HAVE_PTHREADS < 7
11438	status = pthread_attr_setdetachstate(&attr, &detach);
11439	if( status < 0 ) status = errno;
11440#else
11441	status = pthread_attr_setdetachstate(&attr, detach);
11442#endif
11443	if( status ) return status;
11444	status = pthread_create( &t, &attr, task, NULL );
11445#if HAVE_PTHREADS < 7
11446	if( status < 0 ) status = errno;
11447#endif
11448	if( status ) return status;
11449#else
11450	/* Draft 4 pthreads */
11451	status = pthread_create( &t, pthread_attr_default, task, NULL );
11452	if( status ) return errno;
11453
11454	/* give thread a chance to complete */
11455	/* it should remain joinable and hence detachable */
11456	sleep( 1 );
11457
11458	status = pthread_detach( &t );
11459	if( status ) return errno;
11460#endif
11461
11462#ifdef HAVE_LINUX_THREADS
11463	pthread_kill_other_threads_np();
11464#endif
11465
11466	return 0;
11467
11468}
11469
11470_ACEOF
11471if ac_fn_c_try_run "$LINENO"; then :
11472  ol_cv_pthread_lpthread_lmach_lexc=yes
11473else
11474  ol_cv_pthread_lpthread_lmach_lexc=no
11475fi
11476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11477  conftest.$ac_objext conftest.beam conftest.$ac_ext
11478fi
11479
11480
11481		# restore the LIBS
11482		LIBS="$ol_LIBS"
11483
11484fi
11485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
11486$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
11487
11488	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
11489		ol_link_pthreads="-lpthread -lmach -lexc"
11490		ol_link_threads=posix
11491	fi
11492fi
11493
11494
11495		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
11496if test "$ol_link_threads" = no ; then
11497	# try -lpthread -Wl,-woff,85
11498	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
11499$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
11500if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
11501  $as_echo_n "(cached) " >&6
11502else
11503
11504		# save the flags
11505		ol_LIBS="$LIBS"
11506		LIBS="-lpthread -Wl,-woff,85 $LIBS"
11507
11508		if test "$cross_compiling" = yes; then :
11509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11510/* end confdefs.h.  */
11511
11512/* pthread test headers */
11513#include <pthread.h>
11514#if HAVE_PTHREADS < 7
11515#include <errno.h>
11516#endif
11517#ifndef NULL
11518#define NULL (void*)0
11519#endif
11520
11521static void *task(p)
11522	void *p;
11523{
11524	return (void *) (p == NULL);
11525}
11526
11527int
11528main ()
11529{
11530
11531	/* pthread test function */
11532#ifndef PTHREAD_CREATE_DETACHED
11533#define	PTHREAD_CREATE_DETACHED	1
11534#endif
11535	pthread_t t;
11536	int status;
11537	int detach = PTHREAD_CREATE_DETACHED;
11538
11539#if HAVE_PTHREADS > 4
11540	/* Final pthreads */
11541	pthread_attr_t attr;
11542
11543	status = pthread_attr_init(&attr);
11544	if( status ) return status;
11545
11546#if HAVE_PTHREADS < 7
11547	status = pthread_attr_setdetachstate(&attr, &detach);
11548	if( status < 0 ) status = errno;
11549#else
11550	status = pthread_attr_setdetachstate(&attr, detach);
11551#endif
11552	if( status ) return status;
11553	status = pthread_create( &t, &attr, task, NULL );
11554#if HAVE_PTHREADS < 7
11555	if( status < 0 ) status = errno;
11556#endif
11557	if( status ) return status;
11558#else
11559	/* Draft 4 pthreads */
11560	status = pthread_create( &t, pthread_attr_default, task, NULL );
11561	if( status ) return errno;
11562
11563	/* give thread a chance to complete */
11564	/* it should remain joinable and hence detachable */
11565	sleep( 1 );
11566
11567	status = pthread_detach( &t );
11568	if( status ) return errno;
11569#endif
11570
11571#ifdef HAVE_LINUX_THREADS
11572	pthread_kill_other_threads_np();
11573#endif
11574
11575	return 0;
11576
11577  ;
11578  return 0;
11579}
11580_ACEOF
11581if ac_fn_c_try_link "$LINENO"; then :
11582  ol_cv_pthread_lib_lpthread_woff=yes
11583else
11584  ol_cv_pthread_lib_lpthread_woff=no
11585fi
11586rm -f core conftest.err conftest.$ac_objext \
11587    conftest$ac_exeext conftest.$ac_ext
11588else
11589  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11590/* end confdefs.h.  */
11591
11592
11593/* pthread test headers */
11594#include <pthread.h>
11595#if HAVE_PTHREADS < 7
11596#include <errno.h>
11597#endif
11598#ifndef NULL
11599#define NULL (void*)0
11600#endif
11601
11602static void *task(p)
11603	void *p;
11604{
11605	return (void *) (p == NULL);
11606}
11607
11608
11609int main(argc, argv)
11610	int argc;
11611	char **argv;
11612{
11613
11614	/* pthread test function */
11615#ifndef PTHREAD_CREATE_DETACHED
11616#define	PTHREAD_CREATE_DETACHED	1
11617#endif
11618	pthread_t t;
11619	int status;
11620	int detach = PTHREAD_CREATE_DETACHED;
11621
11622#if HAVE_PTHREADS > 4
11623	/* Final pthreads */
11624	pthread_attr_t attr;
11625
11626	status = pthread_attr_init(&attr);
11627	if( status ) return status;
11628
11629#if HAVE_PTHREADS < 7
11630	status = pthread_attr_setdetachstate(&attr, &detach);
11631	if( status < 0 ) status = errno;
11632#else
11633	status = pthread_attr_setdetachstate(&attr, detach);
11634#endif
11635	if( status ) return status;
11636	status = pthread_create( &t, &attr, task, NULL );
11637#if HAVE_PTHREADS < 7
11638	if( status < 0 ) status = errno;
11639#endif
11640	if( status ) return status;
11641#else
11642	/* Draft 4 pthreads */
11643	status = pthread_create( &t, pthread_attr_default, task, NULL );
11644	if( status ) return errno;
11645
11646	/* give thread a chance to complete */
11647	/* it should remain joinable and hence detachable */
11648	sleep( 1 );
11649
11650	status = pthread_detach( &t );
11651	if( status ) return errno;
11652#endif
11653
11654#ifdef HAVE_LINUX_THREADS
11655	pthread_kill_other_threads_np();
11656#endif
11657
11658	return 0;
11659
11660}
11661
11662_ACEOF
11663if ac_fn_c_try_run "$LINENO"; then :
11664  ol_cv_pthread_lib_lpthread_woff=yes
11665else
11666  ol_cv_pthread_lib_lpthread_woff=no
11667fi
11668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11669  conftest.$ac_objext conftest.beam conftest.$ac_ext
11670fi
11671
11672
11673		# restore the LIBS
11674		LIBS="$ol_LIBS"
11675
11676fi
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
11678$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
11679
11680	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
11681		ol_link_pthreads="-lpthread -Wl,-woff,85"
11682		ol_link_threads=posix
11683	fi
11684fi
11685
11686
11687		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
11688if test "$ol_link_threads" = no ; then
11689	# try -lpthread
11690	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
11691$as_echo_n "checking for pthread link with -lpthread... " >&6; }
11692if ${ol_cv_pthread_lpthread+:} false; then :
11693  $as_echo_n "(cached) " >&6
11694else
11695
11696		# save the flags
11697		ol_LIBS="$LIBS"
11698		LIBS="-lpthread $LIBS"
11699
11700		if test "$cross_compiling" = yes; then :
11701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11702/* end confdefs.h.  */
11703
11704/* pthread test headers */
11705#include <pthread.h>
11706#if HAVE_PTHREADS < 7
11707#include <errno.h>
11708#endif
11709#ifndef NULL
11710#define NULL (void*)0
11711#endif
11712
11713static void *task(p)
11714	void *p;
11715{
11716	return (void *) (p == NULL);
11717}
11718
11719int
11720main ()
11721{
11722
11723	/* pthread test function */
11724#ifndef PTHREAD_CREATE_DETACHED
11725#define	PTHREAD_CREATE_DETACHED	1
11726#endif
11727	pthread_t t;
11728	int status;
11729	int detach = PTHREAD_CREATE_DETACHED;
11730
11731#if HAVE_PTHREADS > 4
11732	/* Final pthreads */
11733	pthread_attr_t attr;
11734
11735	status = pthread_attr_init(&attr);
11736	if( status ) return status;
11737
11738#if HAVE_PTHREADS < 7
11739	status = pthread_attr_setdetachstate(&attr, &detach);
11740	if( status < 0 ) status = errno;
11741#else
11742	status = pthread_attr_setdetachstate(&attr, detach);
11743#endif
11744	if( status ) return status;
11745	status = pthread_create( &t, &attr, task, NULL );
11746#if HAVE_PTHREADS < 7
11747	if( status < 0 ) status = errno;
11748#endif
11749	if( status ) return status;
11750#else
11751	/* Draft 4 pthreads */
11752	status = pthread_create( &t, pthread_attr_default, task, NULL );
11753	if( status ) return errno;
11754
11755	/* give thread a chance to complete */
11756	/* it should remain joinable and hence detachable */
11757	sleep( 1 );
11758
11759	status = pthread_detach( &t );
11760	if( status ) return errno;
11761#endif
11762
11763#ifdef HAVE_LINUX_THREADS
11764	pthread_kill_other_threads_np();
11765#endif
11766
11767	return 0;
11768
11769  ;
11770  return 0;
11771}
11772_ACEOF
11773if ac_fn_c_try_link "$LINENO"; then :
11774  ol_cv_pthread_lpthread=yes
11775else
11776  ol_cv_pthread_lpthread=no
11777fi
11778rm -f core conftest.err conftest.$ac_objext \
11779    conftest$ac_exeext conftest.$ac_ext
11780else
11781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11782/* end confdefs.h.  */
11783
11784
11785/* pthread test headers */
11786#include <pthread.h>
11787#if HAVE_PTHREADS < 7
11788#include <errno.h>
11789#endif
11790#ifndef NULL
11791#define NULL (void*)0
11792#endif
11793
11794static void *task(p)
11795	void *p;
11796{
11797	return (void *) (p == NULL);
11798}
11799
11800
11801int main(argc, argv)
11802	int argc;
11803	char **argv;
11804{
11805
11806	/* pthread test function */
11807#ifndef PTHREAD_CREATE_DETACHED
11808#define	PTHREAD_CREATE_DETACHED	1
11809#endif
11810	pthread_t t;
11811	int status;
11812	int detach = PTHREAD_CREATE_DETACHED;
11813
11814#if HAVE_PTHREADS > 4
11815	/* Final pthreads */
11816	pthread_attr_t attr;
11817
11818	status = pthread_attr_init(&attr);
11819	if( status ) return status;
11820
11821#if HAVE_PTHREADS < 7
11822	status = pthread_attr_setdetachstate(&attr, &detach);
11823	if( status < 0 ) status = errno;
11824#else
11825	status = pthread_attr_setdetachstate(&attr, detach);
11826#endif
11827	if( status ) return status;
11828	status = pthread_create( &t, &attr, task, NULL );
11829#if HAVE_PTHREADS < 7
11830	if( status < 0 ) status = errno;
11831#endif
11832	if( status ) return status;
11833#else
11834	/* Draft 4 pthreads */
11835	status = pthread_create( &t, pthread_attr_default, task, NULL );
11836	if( status ) return errno;
11837
11838	/* give thread a chance to complete */
11839	/* it should remain joinable and hence detachable */
11840	sleep( 1 );
11841
11842	status = pthread_detach( &t );
11843	if( status ) return errno;
11844#endif
11845
11846#ifdef HAVE_LINUX_THREADS
11847	pthread_kill_other_threads_np();
11848#endif
11849
11850	return 0;
11851
11852}
11853
11854_ACEOF
11855if ac_fn_c_try_run "$LINENO"; then :
11856  ol_cv_pthread_lpthread=yes
11857else
11858  ol_cv_pthread_lpthread=no
11859fi
11860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11861  conftest.$ac_objext conftest.beam conftest.$ac_ext
11862fi
11863
11864
11865		# restore the LIBS
11866		LIBS="$ol_LIBS"
11867
11868fi
11869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
11870$as_echo "$ol_cv_pthread_lpthread" >&6; }
11871
11872	if test $ol_cv_pthread_lpthread = yes ; then
11873		ol_link_pthreads="-lpthread"
11874		ol_link_threads=posix
11875	fi
11876fi
11877
11878		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
11879if test "$ol_link_threads" = no ; then
11880	# try -lc_r
11881	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
11882$as_echo_n "checking for pthread link with -lc_r... " >&6; }
11883if ${ol_cv_pthread_lc_r+:} false; then :
11884  $as_echo_n "(cached) " >&6
11885else
11886
11887		# save the flags
11888		ol_LIBS="$LIBS"
11889		LIBS="-lc_r $LIBS"
11890
11891		if test "$cross_compiling" = yes; then :
11892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11893/* end confdefs.h.  */
11894
11895/* pthread test headers */
11896#include <pthread.h>
11897#if HAVE_PTHREADS < 7
11898#include <errno.h>
11899#endif
11900#ifndef NULL
11901#define NULL (void*)0
11902#endif
11903
11904static void *task(p)
11905	void *p;
11906{
11907	return (void *) (p == NULL);
11908}
11909
11910int
11911main ()
11912{
11913
11914	/* pthread test function */
11915#ifndef PTHREAD_CREATE_DETACHED
11916#define	PTHREAD_CREATE_DETACHED	1
11917#endif
11918	pthread_t t;
11919	int status;
11920	int detach = PTHREAD_CREATE_DETACHED;
11921
11922#if HAVE_PTHREADS > 4
11923	/* Final pthreads */
11924	pthread_attr_t attr;
11925
11926	status = pthread_attr_init(&attr);
11927	if( status ) return status;
11928
11929#if HAVE_PTHREADS < 7
11930	status = pthread_attr_setdetachstate(&attr, &detach);
11931	if( status < 0 ) status = errno;
11932#else
11933	status = pthread_attr_setdetachstate(&attr, detach);
11934#endif
11935	if( status ) return status;
11936	status = pthread_create( &t, &attr, task, NULL );
11937#if HAVE_PTHREADS < 7
11938	if( status < 0 ) status = errno;
11939#endif
11940	if( status ) return status;
11941#else
11942	/* Draft 4 pthreads */
11943	status = pthread_create( &t, pthread_attr_default, task, NULL );
11944	if( status ) return errno;
11945
11946	/* give thread a chance to complete */
11947	/* it should remain joinable and hence detachable */
11948	sleep( 1 );
11949
11950	status = pthread_detach( &t );
11951	if( status ) return errno;
11952#endif
11953
11954#ifdef HAVE_LINUX_THREADS
11955	pthread_kill_other_threads_np();
11956#endif
11957
11958	return 0;
11959
11960  ;
11961  return 0;
11962}
11963_ACEOF
11964if ac_fn_c_try_link "$LINENO"; then :
11965  ol_cv_pthread_lc_r=yes
11966else
11967  ol_cv_pthread_lc_r=no
11968fi
11969rm -f core conftest.err conftest.$ac_objext \
11970    conftest$ac_exeext conftest.$ac_ext
11971else
11972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11973/* end confdefs.h.  */
11974
11975
11976/* pthread test headers */
11977#include <pthread.h>
11978#if HAVE_PTHREADS < 7
11979#include <errno.h>
11980#endif
11981#ifndef NULL
11982#define NULL (void*)0
11983#endif
11984
11985static void *task(p)
11986	void *p;
11987{
11988	return (void *) (p == NULL);
11989}
11990
11991
11992int main(argc, argv)
11993	int argc;
11994	char **argv;
11995{
11996
11997	/* pthread test function */
11998#ifndef PTHREAD_CREATE_DETACHED
11999#define	PTHREAD_CREATE_DETACHED	1
12000#endif
12001	pthread_t t;
12002	int status;
12003	int detach = PTHREAD_CREATE_DETACHED;
12004
12005#if HAVE_PTHREADS > 4
12006	/* Final pthreads */
12007	pthread_attr_t attr;
12008
12009	status = pthread_attr_init(&attr);
12010	if( status ) return status;
12011
12012#if HAVE_PTHREADS < 7
12013	status = pthread_attr_setdetachstate(&attr, &detach);
12014	if( status < 0 ) status = errno;
12015#else
12016	status = pthread_attr_setdetachstate(&attr, detach);
12017#endif
12018	if( status ) return status;
12019	status = pthread_create( &t, &attr, task, NULL );
12020#if HAVE_PTHREADS < 7
12021	if( status < 0 ) status = errno;
12022#endif
12023	if( status ) return status;
12024#else
12025	/* Draft 4 pthreads */
12026	status = pthread_create( &t, pthread_attr_default, task, NULL );
12027	if( status ) return errno;
12028
12029	/* give thread a chance to complete */
12030	/* it should remain joinable and hence detachable */
12031	sleep( 1 );
12032
12033	status = pthread_detach( &t );
12034	if( status ) return errno;
12035#endif
12036
12037#ifdef HAVE_LINUX_THREADS
12038	pthread_kill_other_threads_np();
12039#endif
12040
12041	return 0;
12042
12043}
12044
12045_ACEOF
12046if ac_fn_c_try_run "$LINENO"; then :
12047  ol_cv_pthread_lc_r=yes
12048else
12049  ol_cv_pthread_lc_r=no
12050fi
12051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12052  conftest.$ac_objext conftest.beam conftest.$ac_ext
12053fi
12054
12055
12056		# restore the LIBS
12057		LIBS="$ol_LIBS"
12058
12059fi
12060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
12061$as_echo "$ol_cv_pthread_lc_r" >&6; }
12062
12063	if test $ol_cv_pthread_lc_r = yes ; then
12064		ol_link_pthreads="-lc_r"
12065		ol_link_threads=posix
12066	fi
12067fi
12068
12069
12070		# Pthread try link: -threads (ol_cv_pthread_threads)
12071if test "$ol_link_threads" = no ; then
12072	# try -threads
12073	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
12074$as_echo_n "checking for pthread link with -threads... " >&6; }
12075if ${ol_cv_pthread_threads+:} false; then :
12076  $as_echo_n "(cached) " >&6
12077else
12078
12079		# save the flags
12080		ol_LIBS="$LIBS"
12081		LIBS="-threads $LIBS"
12082
12083		if test "$cross_compiling" = yes; then :
12084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085/* end confdefs.h.  */
12086
12087/* pthread test headers */
12088#include <pthread.h>
12089#if HAVE_PTHREADS < 7
12090#include <errno.h>
12091#endif
12092#ifndef NULL
12093#define NULL (void*)0
12094#endif
12095
12096static void *task(p)
12097	void *p;
12098{
12099	return (void *) (p == NULL);
12100}
12101
12102int
12103main ()
12104{
12105
12106	/* pthread test function */
12107#ifndef PTHREAD_CREATE_DETACHED
12108#define	PTHREAD_CREATE_DETACHED	1
12109#endif
12110	pthread_t t;
12111	int status;
12112	int detach = PTHREAD_CREATE_DETACHED;
12113
12114#if HAVE_PTHREADS > 4
12115	/* Final pthreads */
12116	pthread_attr_t attr;
12117
12118	status = pthread_attr_init(&attr);
12119	if( status ) return status;
12120
12121#if HAVE_PTHREADS < 7
12122	status = pthread_attr_setdetachstate(&attr, &detach);
12123	if( status < 0 ) status = errno;
12124#else
12125	status = pthread_attr_setdetachstate(&attr, detach);
12126#endif
12127	if( status ) return status;
12128	status = pthread_create( &t, &attr, task, NULL );
12129#if HAVE_PTHREADS < 7
12130	if( status < 0 ) status = errno;
12131#endif
12132	if( status ) return status;
12133#else
12134	/* Draft 4 pthreads */
12135	status = pthread_create( &t, pthread_attr_default, task, NULL );
12136	if( status ) return errno;
12137
12138	/* give thread a chance to complete */
12139	/* it should remain joinable and hence detachable */
12140	sleep( 1 );
12141
12142	status = pthread_detach( &t );
12143	if( status ) return errno;
12144#endif
12145
12146#ifdef HAVE_LINUX_THREADS
12147	pthread_kill_other_threads_np();
12148#endif
12149
12150	return 0;
12151
12152  ;
12153  return 0;
12154}
12155_ACEOF
12156if ac_fn_c_try_link "$LINENO"; then :
12157  ol_cv_pthread_threads=yes
12158else
12159  ol_cv_pthread_threads=no
12160fi
12161rm -f core conftest.err conftest.$ac_objext \
12162    conftest$ac_exeext conftest.$ac_ext
12163else
12164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165/* end confdefs.h.  */
12166
12167
12168/* pthread test headers */
12169#include <pthread.h>
12170#if HAVE_PTHREADS < 7
12171#include <errno.h>
12172#endif
12173#ifndef NULL
12174#define NULL (void*)0
12175#endif
12176
12177static void *task(p)
12178	void *p;
12179{
12180	return (void *) (p == NULL);
12181}
12182
12183
12184int main(argc, argv)
12185	int argc;
12186	char **argv;
12187{
12188
12189	/* pthread test function */
12190#ifndef PTHREAD_CREATE_DETACHED
12191#define	PTHREAD_CREATE_DETACHED	1
12192#endif
12193	pthread_t t;
12194	int status;
12195	int detach = PTHREAD_CREATE_DETACHED;
12196
12197#if HAVE_PTHREADS > 4
12198	/* Final pthreads */
12199	pthread_attr_t attr;
12200
12201	status = pthread_attr_init(&attr);
12202	if( status ) return status;
12203
12204#if HAVE_PTHREADS < 7
12205	status = pthread_attr_setdetachstate(&attr, &detach);
12206	if( status < 0 ) status = errno;
12207#else
12208	status = pthread_attr_setdetachstate(&attr, detach);
12209#endif
12210	if( status ) return status;
12211	status = pthread_create( &t, &attr, task, NULL );
12212#if HAVE_PTHREADS < 7
12213	if( status < 0 ) status = errno;
12214#endif
12215	if( status ) return status;
12216#else
12217	/* Draft 4 pthreads */
12218	status = pthread_create( &t, pthread_attr_default, task, NULL );
12219	if( status ) return errno;
12220
12221	/* give thread a chance to complete */
12222	/* it should remain joinable and hence detachable */
12223	sleep( 1 );
12224
12225	status = pthread_detach( &t );
12226	if( status ) return errno;
12227#endif
12228
12229#ifdef HAVE_LINUX_THREADS
12230	pthread_kill_other_threads_np();
12231#endif
12232
12233	return 0;
12234
12235}
12236
12237_ACEOF
12238if ac_fn_c_try_run "$LINENO"; then :
12239  ol_cv_pthread_threads=yes
12240else
12241  ol_cv_pthread_threads=no
12242fi
12243rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12244  conftest.$ac_objext conftest.beam conftest.$ac_ext
12245fi
12246
12247
12248		# restore the LIBS
12249		LIBS="$ol_LIBS"
12250
12251fi
12252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
12253$as_echo "$ol_cv_pthread_threads" >&6; }
12254
12255	if test $ol_cv_pthread_threads = yes ; then
12256		ol_link_pthreads="-threads"
12257		ol_link_threads=posix
12258	fi
12259fi
12260
12261
12262		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
12263if test "$ol_link_threads" = no ; then
12264	# try -lpthreads -lmach -lexc -lc_r
12265	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
12266$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
12267if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
12268  $as_echo_n "(cached) " >&6
12269else
12270
12271		# save the flags
12272		ol_LIBS="$LIBS"
12273		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
12274
12275		if test "$cross_compiling" = yes; then :
12276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12277/* end confdefs.h.  */
12278
12279/* pthread test headers */
12280#include <pthread.h>
12281#if HAVE_PTHREADS < 7
12282#include <errno.h>
12283#endif
12284#ifndef NULL
12285#define NULL (void*)0
12286#endif
12287
12288static void *task(p)
12289	void *p;
12290{
12291	return (void *) (p == NULL);
12292}
12293
12294int
12295main ()
12296{
12297
12298	/* pthread test function */
12299#ifndef PTHREAD_CREATE_DETACHED
12300#define	PTHREAD_CREATE_DETACHED	1
12301#endif
12302	pthread_t t;
12303	int status;
12304	int detach = PTHREAD_CREATE_DETACHED;
12305
12306#if HAVE_PTHREADS > 4
12307	/* Final pthreads */
12308	pthread_attr_t attr;
12309
12310	status = pthread_attr_init(&attr);
12311	if( status ) return status;
12312
12313#if HAVE_PTHREADS < 7
12314	status = pthread_attr_setdetachstate(&attr, &detach);
12315	if( status < 0 ) status = errno;
12316#else
12317	status = pthread_attr_setdetachstate(&attr, detach);
12318#endif
12319	if( status ) return status;
12320	status = pthread_create( &t, &attr, task, NULL );
12321#if HAVE_PTHREADS < 7
12322	if( status < 0 ) status = errno;
12323#endif
12324	if( status ) return status;
12325#else
12326	/* Draft 4 pthreads */
12327	status = pthread_create( &t, pthread_attr_default, task, NULL );
12328	if( status ) return errno;
12329
12330	/* give thread a chance to complete */
12331	/* it should remain joinable and hence detachable */
12332	sleep( 1 );
12333
12334	status = pthread_detach( &t );
12335	if( status ) return errno;
12336#endif
12337
12338#ifdef HAVE_LINUX_THREADS
12339	pthread_kill_other_threads_np();
12340#endif
12341
12342	return 0;
12343
12344  ;
12345  return 0;
12346}
12347_ACEOF
12348if ac_fn_c_try_link "$LINENO"; then :
12349  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12350else
12351  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12352fi
12353rm -f core conftest.err conftest.$ac_objext \
12354    conftest$ac_exeext conftest.$ac_ext
12355else
12356  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357/* end confdefs.h.  */
12358
12359
12360/* pthread test headers */
12361#include <pthread.h>
12362#if HAVE_PTHREADS < 7
12363#include <errno.h>
12364#endif
12365#ifndef NULL
12366#define NULL (void*)0
12367#endif
12368
12369static void *task(p)
12370	void *p;
12371{
12372	return (void *) (p == NULL);
12373}
12374
12375
12376int main(argc, argv)
12377	int argc;
12378	char **argv;
12379{
12380
12381	/* pthread test function */
12382#ifndef PTHREAD_CREATE_DETACHED
12383#define	PTHREAD_CREATE_DETACHED	1
12384#endif
12385	pthread_t t;
12386	int status;
12387	int detach = PTHREAD_CREATE_DETACHED;
12388
12389#if HAVE_PTHREADS > 4
12390	/* Final pthreads */
12391	pthread_attr_t attr;
12392
12393	status = pthread_attr_init(&attr);
12394	if( status ) return status;
12395
12396#if HAVE_PTHREADS < 7
12397	status = pthread_attr_setdetachstate(&attr, &detach);
12398	if( status < 0 ) status = errno;
12399#else
12400	status = pthread_attr_setdetachstate(&attr, detach);
12401#endif
12402	if( status ) return status;
12403	status = pthread_create( &t, &attr, task, NULL );
12404#if HAVE_PTHREADS < 7
12405	if( status < 0 ) status = errno;
12406#endif
12407	if( status ) return status;
12408#else
12409	/* Draft 4 pthreads */
12410	status = pthread_create( &t, pthread_attr_default, task, NULL );
12411	if( status ) return errno;
12412
12413	/* give thread a chance to complete */
12414	/* it should remain joinable and hence detachable */
12415	sleep( 1 );
12416
12417	status = pthread_detach( &t );
12418	if( status ) return errno;
12419#endif
12420
12421#ifdef HAVE_LINUX_THREADS
12422	pthread_kill_other_threads_np();
12423#endif
12424
12425	return 0;
12426
12427}
12428
12429_ACEOF
12430if ac_fn_c_try_run "$LINENO"; then :
12431  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12432else
12433  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12434fi
12435rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12436  conftest.$ac_objext conftest.beam conftest.$ac_ext
12437fi
12438
12439
12440		# restore the LIBS
12441		LIBS="$ol_LIBS"
12442
12443fi
12444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
12445$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
12446
12447	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
12448		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
12449		ol_link_threads=posix
12450	fi
12451fi
12452
12453		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
12454if test "$ol_link_threads" = no ; then
12455	# try -lpthreads -lmach -lexc
12456	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
12457$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
12458if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
12459  $as_echo_n "(cached) " >&6
12460else
12461
12462		# save the flags
12463		ol_LIBS="$LIBS"
12464		LIBS="-lpthreads -lmach -lexc $LIBS"
12465
12466		if test "$cross_compiling" = yes; then :
12467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12468/* end confdefs.h.  */
12469
12470/* pthread test headers */
12471#include <pthread.h>
12472#if HAVE_PTHREADS < 7
12473#include <errno.h>
12474#endif
12475#ifndef NULL
12476#define NULL (void*)0
12477#endif
12478
12479static void *task(p)
12480	void *p;
12481{
12482	return (void *) (p == NULL);
12483}
12484
12485int
12486main ()
12487{
12488
12489	/* pthread test function */
12490#ifndef PTHREAD_CREATE_DETACHED
12491#define	PTHREAD_CREATE_DETACHED	1
12492#endif
12493	pthread_t t;
12494	int status;
12495	int detach = PTHREAD_CREATE_DETACHED;
12496
12497#if HAVE_PTHREADS > 4
12498	/* Final pthreads */
12499	pthread_attr_t attr;
12500
12501	status = pthread_attr_init(&attr);
12502	if( status ) return status;
12503
12504#if HAVE_PTHREADS < 7
12505	status = pthread_attr_setdetachstate(&attr, &detach);
12506	if( status < 0 ) status = errno;
12507#else
12508	status = pthread_attr_setdetachstate(&attr, detach);
12509#endif
12510	if( status ) return status;
12511	status = pthread_create( &t, &attr, task, NULL );
12512#if HAVE_PTHREADS < 7
12513	if( status < 0 ) status = errno;
12514#endif
12515	if( status ) return status;
12516#else
12517	/* Draft 4 pthreads */
12518	status = pthread_create( &t, pthread_attr_default, task, NULL );
12519	if( status ) return errno;
12520
12521	/* give thread a chance to complete */
12522	/* it should remain joinable and hence detachable */
12523	sleep( 1 );
12524
12525	status = pthread_detach( &t );
12526	if( status ) return errno;
12527#endif
12528
12529#ifdef HAVE_LINUX_THREADS
12530	pthread_kill_other_threads_np();
12531#endif
12532
12533	return 0;
12534
12535  ;
12536  return 0;
12537}
12538_ACEOF
12539if ac_fn_c_try_link "$LINENO"; then :
12540  ol_cv_pthread_lpthreads_lmach_lexc=yes
12541else
12542  ol_cv_pthread_lpthreads_lmach_lexc=no
12543fi
12544rm -f core conftest.err conftest.$ac_objext \
12545    conftest$ac_exeext conftest.$ac_ext
12546else
12547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12548/* end confdefs.h.  */
12549
12550
12551/* pthread test headers */
12552#include <pthread.h>
12553#if HAVE_PTHREADS < 7
12554#include <errno.h>
12555#endif
12556#ifndef NULL
12557#define NULL (void*)0
12558#endif
12559
12560static void *task(p)
12561	void *p;
12562{
12563	return (void *) (p == NULL);
12564}
12565
12566
12567int main(argc, argv)
12568	int argc;
12569	char **argv;
12570{
12571
12572	/* pthread test function */
12573#ifndef PTHREAD_CREATE_DETACHED
12574#define	PTHREAD_CREATE_DETACHED	1
12575#endif
12576	pthread_t t;
12577	int status;
12578	int detach = PTHREAD_CREATE_DETACHED;
12579
12580#if HAVE_PTHREADS > 4
12581	/* Final pthreads */
12582	pthread_attr_t attr;
12583
12584	status = pthread_attr_init(&attr);
12585	if( status ) return status;
12586
12587#if HAVE_PTHREADS < 7
12588	status = pthread_attr_setdetachstate(&attr, &detach);
12589	if( status < 0 ) status = errno;
12590#else
12591	status = pthread_attr_setdetachstate(&attr, detach);
12592#endif
12593	if( status ) return status;
12594	status = pthread_create( &t, &attr, task, NULL );
12595#if HAVE_PTHREADS < 7
12596	if( status < 0 ) status = errno;
12597#endif
12598	if( status ) return status;
12599#else
12600	/* Draft 4 pthreads */
12601	status = pthread_create( &t, pthread_attr_default, task, NULL );
12602	if( status ) return errno;
12603
12604	/* give thread a chance to complete */
12605	/* it should remain joinable and hence detachable */
12606	sleep( 1 );
12607
12608	status = pthread_detach( &t );
12609	if( status ) return errno;
12610#endif
12611
12612#ifdef HAVE_LINUX_THREADS
12613	pthread_kill_other_threads_np();
12614#endif
12615
12616	return 0;
12617
12618}
12619
12620_ACEOF
12621if ac_fn_c_try_run "$LINENO"; then :
12622  ol_cv_pthread_lpthreads_lmach_lexc=yes
12623else
12624  ol_cv_pthread_lpthreads_lmach_lexc=no
12625fi
12626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12627  conftest.$ac_objext conftest.beam conftest.$ac_ext
12628fi
12629
12630
12631		# restore the LIBS
12632		LIBS="$ol_LIBS"
12633
12634fi
12635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
12636$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
12637
12638	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
12639		ol_link_pthreads="-lpthreads -lmach -lexc"
12640		ol_link_threads=posix
12641	fi
12642fi
12643
12644		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
12645if test "$ol_link_threads" = no ; then
12646	# try -lpthreads -lexc
12647	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
12648$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
12649if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
12650  $as_echo_n "(cached) " >&6
12651else
12652
12653		# save the flags
12654		ol_LIBS="$LIBS"
12655		LIBS="-lpthreads -lexc $LIBS"
12656
12657		if test "$cross_compiling" = yes; then :
12658  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12659/* end confdefs.h.  */
12660
12661/* pthread test headers */
12662#include <pthread.h>
12663#if HAVE_PTHREADS < 7
12664#include <errno.h>
12665#endif
12666#ifndef NULL
12667#define NULL (void*)0
12668#endif
12669
12670static void *task(p)
12671	void *p;
12672{
12673	return (void *) (p == NULL);
12674}
12675
12676int
12677main ()
12678{
12679
12680	/* pthread test function */
12681#ifndef PTHREAD_CREATE_DETACHED
12682#define	PTHREAD_CREATE_DETACHED	1
12683#endif
12684	pthread_t t;
12685	int status;
12686	int detach = PTHREAD_CREATE_DETACHED;
12687
12688#if HAVE_PTHREADS > 4
12689	/* Final pthreads */
12690	pthread_attr_t attr;
12691
12692	status = pthread_attr_init(&attr);
12693	if( status ) return status;
12694
12695#if HAVE_PTHREADS < 7
12696	status = pthread_attr_setdetachstate(&attr, &detach);
12697	if( status < 0 ) status = errno;
12698#else
12699	status = pthread_attr_setdetachstate(&attr, detach);
12700#endif
12701	if( status ) return status;
12702	status = pthread_create( &t, &attr, task, NULL );
12703#if HAVE_PTHREADS < 7
12704	if( status < 0 ) status = errno;
12705#endif
12706	if( status ) return status;
12707#else
12708	/* Draft 4 pthreads */
12709	status = pthread_create( &t, pthread_attr_default, task, NULL );
12710	if( status ) return errno;
12711
12712	/* give thread a chance to complete */
12713	/* it should remain joinable and hence detachable */
12714	sleep( 1 );
12715
12716	status = pthread_detach( &t );
12717	if( status ) return errno;
12718#endif
12719
12720#ifdef HAVE_LINUX_THREADS
12721	pthread_kill_other_threads_np();
12722#endif
12723
12724	return 0;
12725
12726  ;
12727  return 0;
12728}
12729_ACEOF
12730if ac_fn_c_try_link "$LINENO"; then :
12731  ol_cv_pthread_lpthreads_lexc=yes
12732else
12733  ol_cv_pthread_lpthreads_lexc=no
12734fi
12735rm -f core conftest.err conftest.$ac_objext \
12736    conftest$ac_exeext conftest.$ac_ext
12737else
12738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12739/* end confdefs.h.  */
12740
12741
12742/* pthread test headers */
12743#include <pthread.h>
12744#if HAVE_PTHREADS < 7
12745#include <errno.h>
12746#endif
12747#ifndef NULL
12748#define NULL (void*)0
12749#endif
12750
12751static void *task(p)
12752	void *p;
12753{
12754	return (void *) (p == NULL);
12755}
12756
12757
12758int main(argc, argv)
12759	int argc;
12760	char **argv;
12761{
12762
12763	/* pthread test function */
12764#ifndef PTHREAD_CREATE_DETACHED
12765#define	PTHREAD_CREATE_DETACHED	1
12766#endif
12767	pthread_t t;
12768	int status;
12769	int detach = PTHREAD_CREATE_DETACHED;
12770
12771#if HAVE_PTHREADS > 4
12772	/* Final pthreads */
12773	pthread_attr_t attr;
12774
12775	status = pthread_attr_init(&attr);
12776	if( status ) return status;
12777
12778#if HAVE_PTHREADS < 7
12779	status = pthread_attr_setdetachstate(&attr, &detach);
12780	if( status < 0 ) status = errno;
12781#else
12782	status = pthread_attr_setdetachstate(&attr, detach);
12783#endif
12784	if( status ) return status;
12785	status = pthread_create( &t, &attr, task, NULL );
12786#if HAVE_PTHREADS < 7
12787	if( status < 0 ) status = errno;
12788#endif
12789	if( status ) return status;
12790#else
12791	/* Draft 4 pthreads */
12792	status = pthread_create( &t, pthread_attr_default, task, NULL );
12793	if( status ) return errno;
12794
12795	/* give thread a chance to complete */
12796	/* it should remain joinable and hence detachable */
12797	sleep( 1 );
12798
12799	status = pthread_detach( &t );
12800	if( status ) return errno;
12801#endif
12802
12803#ifdef HAVE_LINUX_THREADS
12804	pthread_kill_other_threads_np();
12805#endif
12806
12807	return 0;
12808
12809}
12810
12811_ACEOF
12812if ac_fn_c_try_run "$LINENO"; then :
12813  ol_cv_pthread_lpthreads_lexc=yes
12814else
12815  ol_cv_pthread_lpthreads_lexc=no
12816fi
12817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12818  conftest.$ac_objext conftest.beam conftest.$ac_ext
12819fi
12820
12821
12822		# restore the LIBS
12823		LIBS="$ol_LIBS"
12824
12825fi
12826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
12827$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
12828
12829	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
12830		ol_link_pthreads="-lpthreads -lexc"
12831		ol_link_threads=posix
12832	fi
12833fi
12834
12835
12836		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
12837if test "$ol_link_threads" = no ; then
12838	# try -lpthreads
12839	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
12840$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
12841if ${ol_cv_pthread_lib_lpthreads+:} false; then :
12842  $as_echo_n "(cached) " >&6
12843else
12844
12845		# save the flags
12846		ol_LIBS="$LIBS"
12847		LIBS="-lpthreads $LIBS"
12848
12849		if test "$cross_compiling" = yes; then :
12850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851/* end confdefs.h.  */
12852
12853/* pthread test headers */
12854#include <pthread.h>
12855#if HAVE_PTHREADS < 7
12856#include <errno.h>
12857#endif
12858#ifndef NULL
12859#define NULL (void*)0
12860#endif
12861
12862static void *task(p)
12863	void *p;
12864{
12865	return (void *) (p == NULL);
12866}
12867
12868int
12869main ()
12870{
12871
12872	/* pthread test function */
12873#ifndef PTHREAD_CREATE_DETACHED
12874#define	PTHREAD_CREATE_DETACHED	1
12875#endif
12876	pthread_t t;
12877	int status;
12878	int detach = PTHREAD_CREATE_DETACHED;
12879
12880#if HAVE_PTHREADS > 4
12881	/* Final pthreads */
12882	pthread_attr_t attr;
12883
12884	status = pthread_attr_init(&attr);
12885	if( status ) return status;
12886
12887#if HAVE_PTHREADS < 7
12888	status = pthread_attr_setdetachstate(&attr, &detach);
12889	if( status < 0 ) status = errno;
12890#else
12891	status = pthread_attr_setdetachstate(&attr, detach);
12892#endif
12893	if( status ) return status;
12894	status = pthread_create( &t, &attr, task, NULL );
12895#if HAVE_PTHREADS < 7
12896	if( status < 0 ) status = errno;
12897#endif
12898	if( status ) return status;
12899#else
12900	/* Draft 4 pthreads */
12901	status = pthread_create( &t, pthread_attr_default, task, NULL );
12902	if( status ) return errno;
12903
12904	/* give thread a chance to complete */
12905	/* it should remain joinable and hence detachable */
12906	sleep( 1 );
12907
12908	status = pthread_detach( &t );
12909	if( status ) return errno;
12910#endif
12911
12912#ifdef HAVE_LINUX_THREADS
12913	pthread_kill_other_threads_np();
12914#endif
12915
12916	return 0;
12917
12918  ;
12919  return 0;
12920}
12921_ACEOF
12922if ac_fn_c_try_link "$LINENO"; then :
12923  ol_cv_pthread_lib_lpthreads=yes
12924else
12925  ol_cv_pthread_lib_lpthreads=no
12926fi
12927rm -f core conftest.err conftest.$ac_objext \
12928    conftest$ac_exeext conftest.$ac_ext
12929else
12930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12931/* end confdefs.h.  */
12932
12933
12934/* pthread test headers */
12935#include <pthread.h>
12936#if HAVE_PTHREADS < 7
12937#include <errno.h>
12938#endif
12939#ifndef NULL
12940#define NULL (void*)0
12941#endif
12942
12943static void *task(p)
12944	void *p;
12945{
12946	return (void *) (p == NULL);
12947}
12948
12949
12950int main(argc, argv)
12951	int argc;
12952	char **argv;
12953{
12954
12955	/* pthread test function */
12956#ifndef PTHREAD_CREATE_DETACHED
12957#define	PTHREAD_CREATE_DETACHED	1
12958#endif
12959	pthread_t t;
12960	int status;
12961	int detach = PTHREAD_CREATE_DETACHED;
12962
12963#if HAVE_PTHREADS > 4
12964	/* Final pthreads */
12965	pthread_attr_t attr;
12966
12967	status = pthread_attr_init(&attr);
12968	if( status ) return status;
12969
12970#if HAVE_PTHREADS < 7
12971	status = pthread_attr_setdetachstate(&attr, &detach);
12972	if( status < 0 ) status = errno;
12973#else
12974	status = pthread_attr_setdetachstate(&attr, detach);
12975#endif
12976	if( status ) return status;
12977	status = pthread_create( &t, &attr, task, NULL );
12978#if HAVE_PTHREADS < 7
12979	if( status < 0 ) status = errno;
12980#endif
12981	if( status ) return status;
12982#else
12983	/* Draft 4 pthreads */
12984	status = pthread_create( &t, pthread_attr_default, task, NULL );
12985	if( status ) return errno;
12986
12987	/* give thread a chance to complete */
12988	/* it should remain joinable and hence detachable */
12989	sleep( 1 );
12990
12991	status = pthread_detach( &t );
12992	if( status ) return errno;
12993#endif
12994
12995#ifdef HAVE_LINUX_THREADS
12996	pthread_kill_other_threads_np();
12997#endif
12998
12999	return 0;
13000
13001}
13002
13003_ACEOF
13004if ac_fn_c_try_run "$LINENO"; then :
13005  ol_cv_pthread_lib_lpthreads=yes
13006else
13007  ol_cv_pthread_lib_lpthreads=no
13008fi
13009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13010  conftest.$ac_objext conftest.beam conftest.$ac_ext
13011fi
13012
13013
13014		# restore the LIBS
13015		LIBS="$ol_LIBS"
13016
13017fi
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13019$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13020
13021	if test $ol_cv_pthread_lib_lpthreads = yes ; then
13022		ol_link_pthreads="-lpthreads"
13023		ol_link_threads=posix
13024	fi
13025fi
13026
13027
13028{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13029$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13030
13031		if test $ol_link_threads != no ; then
13032			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13033
13034						save_CPPFLAGS="$CPPFLAGS"
13035			save_LIBS="$LIBS"
13036			LIBS="$LTHREAD_LIBS $LIBS"
13037
13038												for ac_func in sched_yield pthread_yield thr_yield
13039do :
13040  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13041ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13042if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13043  cat >>confdefs.h <<_ACEOF
13044#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13045_ACEOF
13046
13047fi
13048done
13049
13050
13051			if test $ac_cv_func_sched_yield = no &&
13052			   test $ac_cv_func_pthread_yield = no &&
13053			   test $ac_cv_func_thr_yield = no ; then
13054								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13055$as_echo_n "checking for sched_yield in -lrt... " >&6; }
13056if ${ac_cv_lib_rt_sched_yield+:} false; then :
13057  $as_echo_n "(cached) " >&6
13058else
13059  ac_check_lib_save_LIBS=$LIBS
13060LIBS="-lrt  $LIBS"
13061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13062/* end confdefs.h.  */
13063
13064/* Override any GCC internal prototype to avoid an error.
13065   Use char because int might match the return type of a GCC
13066   builtin and then its argument prototype would still apply.  */
13067#ifdef __cplusplus
13068extern "C"
13069#endif
13070char sched_yield ();
13071int
13072main ()
13073{
13074return sched_yield ();
13075  ;
13076  return 0;
13077}
13078_ACEOF
13079if ac_fn_c_try_link "$LINENO"; then :
13080  ac_cv_lib_rt_sched_yield=yes
13081else
13082  ac_cv_lib_rt_sched_yield=no
13083fi
13084rm -f core conftest.err conftest.$ac_objext \
13085    conftest$ac_exeext conftest.$ac_ext
13086LIBS=$ac_check_lib_save_LIBS
13087fi
13088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13089$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
13090if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
13091  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
13092
13093$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
13094
13095					ac_cv_func_sched_yield=yes
13096else
13097  ac_cv_func_sched_yield=no
13098fi
13099
13100			fi
13101			if test $ac_cv_func_sched_yield = no &&
13102			   test $ac_cv_func_pthread_yield = no &&
13103			   test "$ac_cv_func_thr_yield" = no ; then
13104				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
13105$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
13106			fi
13107
13108						for ac_func in pthread_kill
13109do :
13110  ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13111if test "x$ac_cv_func_pthread_kill" = xyes; then :
13112  cat >>confdefs.h <<_ACEOF
13113#define HAVE_PTHREAD_KILL 1
13114_ACEOF
13115
13116fi
13117done
13118
13119
13120									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
13121$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
13122if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
13123  $as_echo_n "(cached) " >&6
13124else
13125
13126								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13127/* end confdefs.h.  */
13128
13129#include <pthread.h>
13130pthread_rwlock_t rwlock;
13131
13132int
13133main ()
13134{
13135pthread_rwlock_destroy(&rwlock);
13136  ;
13137  return 0;
13138}
13139_ACEOF
13140if ac_fn_c_try_link "$LINENO"; then :
13141  ol_cv_func_pthread_rwlock_destroy=yes
13142else
13143  ol_cv_func_pthread_rwlock_destroy=no
13144fi
13145rm -f core conftest.err conftest.$ac_objext \
13146    conftest$ac_exeext conftest.$ac_ext
13147
13148fi
13149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
13150$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
13151			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
13152
13153$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
13154
13155			fi
13156
13157									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
13158$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
13159if ${ol_cv_func_pthread_detach+:} false; then :
13160  $as_echo_n "(cached) " >&6
13161else
13162
13163								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13164/* end confdefs.h.  */
13165
13166#include <pthread.h>
13167#ifndef NULL
13168#define NULL (void*)0
13169#endif
13170
13171int
13172main ()
13173{
13174pthread_detach(NULL);
13175  ;
13176  return 0;
13177}
13178_ACEOF
13179if ac_fn_c_try_link "$LINENO"; then :
13180  ol_cv_func_pthread_detach=yes
13181else
13182  ol_cv_func_pthread_detach=no
13183fi
13184rm -f core conftest.err conftest.$ac_objext \
13185    conftest$ac_exeext conftest.$ac_ext
13186
13187fi
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
13189$as_echo "$ol_cv_func_pthread_detach" >&6; }
13190
13191			if test $ol_cv_func_pthread_detach = no ; then
13192				as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
13193			fi
13194
13195
13196$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
13197
13198
13199						for ac_func in \
13200				pthread_setconcurrency \
13201				pthread_getconcurrency \
13202				thr_setconcurrency \
13203				thr_getconcurrency \
13204
13205do :
13206  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13207ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13208if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13209  cat >>confdefs.h <<_ACEOF
13210#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13211_ACEOF
13212
13213fi
13214done
13215
13216
13217
13218	for ac_func in pthread_kill_other_threads_np
13219do :
13220  ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
13221if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
13222  cat >>confdefs.h <<_ACEOF
13223#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
13224_ACEOF
13225
13226fi
13227done
13228
13229	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
13230$as_echo_n "checking for LinuxThreads implementation... " >&6; }
13231if ${ol_cv_sys_linux_threads+:} false; then :
13232  $as_echo_n "(cached) " >&6
13233else
13234  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
13235fi
13236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
13237$as_echo "$ol_cv_sys_linux_threads" >&6; }
13238
13239
13240
13241
13242	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
13243$as_echo_n "checking for LinuxThreads consistency... " >&6; }
13244if ${ol_cv_linux_threads+:} false; then :
13245  $as_echo_n "(cached) " >&6
13246else
13247
13248		if test $ol_cv_header_linux_threads = yes &&
13249		   test $ol_cv_sys_linux_threads = yes; then
13250			ol_cv_linux_threads=yes
13251		elif test $ol_cv_header_linux_threads = no &&
13252		     test $ol_cv_sys_linux_threads = no; then
13253			ol_cv_linux_threads=no
13254		else
13255			ol_cv_linux_threads=error
13256		fi
13257
13258fi
13259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
13260$as_echo "$ol_cv_linux_threads" >&6; }
13261
13262
13263			if test $ol_cv_linux_threads = error; then
13264				as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
13265			fi
13266
13267			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
13268$as_echo_n "checking if pthread_create() works... " >&6; }
13269if ${ol_cv_pthread_create_works+:} false; then :
13270  $as_echo_n "(cached) " >&6
13271else
13272
13273			if test "$cross_compiling" = yes; then :
13274  				ol_cv_pthread_create_works=yes
13275else
13276  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h.  */
13278
13279
13280/* pthread test headers */
13281#include <pthread.h>
13282#if HAVE_PTHREADS < 7
13283#include <errno.h>
13284#endif
13285#ifndef NULL
13286#define NULL (void*)0
13287#endif
13288
13289static void *task(p)
13290	void *p;
13291{
13292	return (void *) (p == NULL);
13293}
13294
13295
13296int main(argc, argv)
13297	int argc;
13298	char **argv;
13299{
13300
13301	/* pthread test function */
13302#ifndef PTHREAD_CREATE_DETACHED
13303#define	PTHREAD_CREATE_DETACHED	1
13304#endif
13305	pthread_t t;
13306	int status;
13307	int detach = PTHREAD_CREATE_DETACHED;
13308
13309#if HAVE_PTHREADS > 4
13310	/* Final pthreads */
13311	pthread_attr_t attr;
13312
13313	status = pthread_attr_init(&attr);
13314	if( status ) return status;
13315
13316#if HAVE_PTHREADS < 7
13317	status = pthread_attr_setdetachstate(&attr, &detach);
13318	if( status < 0 ) status = errno;
13319#else
13320	status = pthread_attr_setdetachstate(&attr, detach);
13321#endif
13322	if( status ) return status;
13323	status = pthread_create( &t, &attr, task, NULL );
13324#if HAVE_PTHREADS < 7
13325	if( status < 0 ) status = errno;
13326#endif
13327	if( status ) return status;
13328#else
13329	/* Draft 4 pthreads */
13330	status = pthread_create( &t, pthread_attr_default, task, NULL );
13331	if( status ) return errno;
13332
13333	/* give thread a chance to complete */
13334	/* it should remain joinable and hence detachable */
13335	sleep( 1 );
13336
13337	status = pthread_detach( &t );
13338	if( status ) return errno;
13339#endif
13340
13341#ifdef HAVE_LINUX_THREADS
13342	pthread_kill_other_threads_np();
13343#endif
13344
13345	return 0;
13346
13347}
13348
13349_ACEOF
13350if ac_fn_c_try_run "$LINENO"; then :
13351  ol_cv_pthread_create_works=yes
13352else
13353  ol_cv_pthread_create_works=no
13354fi
13355rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13356  conftest.$ac_objext conftest.beam conftest.$ac_ext
13357fi
13358
13359fi
13360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
13361$as_echo "$ol_cv_pthread_create_works" >&6; }
13362
13363			if test $ol_cv_pthread_create_works = no ; then
13364				as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
13365			fi
13366
13367			ol_replace_broken_yield=no
13368
13369			if test $ol_replace_broken_yield = yes ; then
13370
13371$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
13372
13373			fi
13374
13375						if test x$ol_with_yielding_select = xauto ; then
13376				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
13377$as_echo_n "checking if select yields when using pthreads... " >&6; }
13378if ${ol_cv_pthread_select_yields+:} false; then :
13379  $as_echo_n "(cached) " >&6
13380else
13381
13382				if test "$cross_compiling" = yes; then :
13383  ol_cv_pthread_select_yields=cross
13384else
13385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13386/* end confdefs.h.  */
13387
13388#include <sys/types.h>
13389#include <sys/time.h>
13390#include <unistd.h>
13391#include <pthread.h>
13392#ifndef NULL
13393#define NULL (void*) 0
13394#endif
13395
13396static int fildes[2];
13397
13398static void *task(p)
13399	void *p;
13400{
13401	int i;
13402	struct timeval tv;
13403
13404	fd_set rfds;
13405
13406	tv.tv_sec=10;
13407	tv.tv_usec=0;
13408
13409	FD_ZERO(&rfds);
13410	FD_SET(fildes[0], &rfds);
13411
13412	/* we're not interested in any fds */
13413	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
13414
13415	if(i < 0) {
13416		perror("select");
13417		exit(10);
13418	}
13419
13420	exit(0); /* if we exit here, the select blocked the whole process */
13421}
13422
13423int main(argc, argv)
13424	int argc;
13425	char **argv;
13426{
13427	pthread_t t;
13428
13429	/* create a pipe to select */
13430	if(pipe(&fildes[0])) {
13431		perror("select");
13432		exit(1);
13433	}
13434
13435#ifdef HAVE_PTHREAD_SETCONCURRENCY
13436	(void) pthread_setconcurrency(2);
13437#else
13438#ifdef HAVE_THR_SETCONCURRENCY
13439	/* Set Solaris LWP concurrency to 2 */
13440	thr_setconcurrency(2);
13441#endif
13442#endif
13443
13444#if HAVE_PTHREADS < 6
13445	pthread_create(&t, pthread_attr_default, task, NULL);
13446#else
13447	pthread_create(&t, NULL, task, NULL);
13448#endif
13449
13450	/* make sure task runs first */
13451#ifdef HAVE_THR_YIELD
13452	thr_yield();
13453#elif defined( HAVE_SCHED_YIELD )
13454	sched_yield();
13455#elif defined( HAVE_PTHREAD_YIELD )
13456	pthread_yield();
13457#endif
13458
13459	exit(2);
13460}
13461_ACEOF
13462if ac_fn_c_try_run "$LINENO"; then :
13463  ol_cv_pthread_select_yields=no
13464else
13465  ol_cv_pthread_select_yields=yes
13466fi
13467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13468  conftest.$ac_objext conftest.beam conftest.$ac_ext
13469fi
13470
13471fi
13472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
13473$as_echo "$ol_cv_pthread_select_yields" >&6; }
13474
13475				if test $ol_cv_pthread_select_yields = cross ; then
13476					as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
13477				fi
13478
13479				if test $ol_cv_pthread_select_yields = yes ; then
13480					ol_with_yielding_select=yes
13481				fi
13482			fi
13483
13484						CPPFLAGS="$save_CPPFLAGS"
13485			LIBS="$save_LIBS"
13486		else
13487			as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
13488		fi
13489	fi
13490
13491	if test $ol_with_threads = posix ; then
13492		as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
13493	fi
13494	;;
13495esac
13496
13497case $ol_with_threads in auto | yes | mach)
13498
13499		for ac_header in mach/cthreads.h cthreads.h
13500do :
13501  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13502ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13503if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13504  cat >>confdefs.h <<_ACEOF
13505#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13506_ACEOF
13507
13508fi
13509
13510done
13511
13512	if test $ac_cv_header_mach_cthreads_h = yes ; then
13513		ol_with_threads=found
13514
13515				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13516if test "x$ac_cv_func_cthread_fork" = xyes; then :
13517  ol_link_threads=yes
13518fi
13519
13520
13521		if test $ol_link_threads = no ; then
13522									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
13523$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
13524if ${ol_cv_cthread_all_load+:} false; then :
13525  $as_echo_n "(cached) " >&6
13526else
13527
13528								save_LIBS="$LIBS"
13529				LIBS="-all_load $LIBS"
13530				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13531/* end confdefs.h.  */
13532#include <mach/cthreads.h>
13533int
13534main ()
13535{
13536
13537					cthread_fork((void *)0, (void *)0);
13538
13539  ;
13540  return 0;
13541}
13542_ACEOF
13543if ac_fn_c_try_link "$LINENO"; then :
13544  ol_cv_cthread_all_load=yes
13545else
13546  ol_cv_cthread_all_load=no
13547fi
13548rm -f core conftest.err conftest.$ac_objext \
13549    conftest$ac_exeext conftest.$ac_ext
13550								LIBS="$save_LIBS"
13551
13552fi
13553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
13554$as_echo "$ol_cv_cthread_all_load" >&6; }
13555
13556			if test $ol_cv_cthread_all_load = yes ; then
13557				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
13558				ol_link_threads=mach
13559				ol_with_threads=found
13560			fi
13561		fi
13562
13563	elif test $ac_cv_header_cthreads_h = yes ; then
13564
13565		ol_with_threads=found
13566
13567				save_LIBS="$LIBS"
13568		LIBS="$LIBS -lthreads"
13569		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13570if test "x$ac_cv_func_cthread_fork" = xyes; then :
13571  ol_link_threads=yes
13572fi
13573
13574		LIBS="$save_LIBS"
13575
13576		if test $ol_link_threads = yes ; then
13577			LTHREAD_LIBS="-lthreads"
13578			ol_link_threads=mach
13579			ol_with_threads=found
13580		else
13581			as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13582		fi
13583
13584	elif test $ol_with_threads = mach ; then
13585		as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
13586	fi
13587
13588	if test $ol_link_threads = mach ; then
13589
13590$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
13591
13592	elif test $ol_with_threads = found ; then
13593		as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13594	fi
13595	;;
13596esac
13597
13598case $ol_with_threads in auto | yes | pth)
13599
13600	for ac_header in pth.h
13601do :
13602  ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
13603if test "x$ac_cv_header_pth_h" = xyes; then :
13604  cat >>confdefs.h <<_ACEOF
13605#define HAVE_PTH_H 1
13606_ACEOF
13607
13608fi
13609
13610done
13611
13612
13613	if test $ac_cv_header_pth_h = yes ; then
13614		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
13615$as_echo_n "checking for pth_version in -lpth... " >&6; }
13616if ${ac_cv_lib_pth_pth_version+:} false; then :
13617  $as_echo_n "(cached) " >&6
13618else
13619  ac_check_lib_save_LIBS=$LIBS
13620LIBS="-lpth  $LIBS"
13621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622/* end confdefs.h.  */
13623
13624/* Override any GCC internal prototype to avoid an error.
13625   Use char because int might match the return type of a GCC
13626   builtin and then its argument prototype would still apply.  */
13627#ifdef __cplusplus
13628extern "C"
13629#endif
13630char pth_version ();
13631int
13632main ()
13633{
13634return pth_version ();
13635  ;
13636  return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_link "$LINENO"; then :
13640  ac_cv_lib_pth_pth_version=yes
13641else
13642  ac_cv_lib_pth_pth_version=no
13643fi
13644rm -f core conftest.err conftest.$ac_objext \
13645    conftest$ac_exeext conftest.$ac_ext
13646LIBS=$ac_check_lib_save_LIBS
13647fi
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
13649$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
13650if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
13651  have_pth=yes
13652else
13653  have_pth=no
13654fi
13655
13656
13657		if test $have_pth = yes ; then
13658
13659$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
13660
13661			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
13662			ol_link_threads=pth
13663			ol_with_threads=found
13664
13665			if test x$ol_with_yielding_select = xauto ; then
13666				ol_with_yielding_select=yes
13667			fi
13668		fi
13669	fi
13670	;;
13671esac
13672
13673case $ol_with_threads in auto | yes | lwp)
13674
13675		for ac_header in thread.h synch.h
13676do :
13677  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13678ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13679if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13680  cat >>confdefs.h <<_ACEOF
13681#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13682_ACEOF
13683
13684fi
13685
13686done
13687
13688	if test $ac_cv_header_thread_h = yes &&
13689	   test $ac_cv_header_synch_h = yes ; then
13690		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
13691$as_echo_n "checking for thr_create in -lthread... " >&6; }
13692if ${ac_cv_lib_thread_thr_create+:} false; then :
13693  $as_echo_n "(cached) " >&6
13694else
13695  ac_check_lib_save_LIBS=$LIBS
13696LIBS="-lthread  $LIBS"
13697cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13698/* end confdefs.h.  */
13699
13700/* Override any GCC internal prototype to avoid an error.
13701   Use char because int might match the return type of a GCC
13702   builtin and then its argument prototype would still apply.  */
13703#ifdef __cplusplus
13704extern "C"
13705#endif
13706char thr_create ();
13707int
13708main ()
13709{
13710return thr_create ();
13711  ;
13712  return 0;
13713}
13714_ACEOF
13715if ac_fn_c_try_link "$LINENO"; then :
13716  ac_cv_lib_thread_thr_create=yes
13717else
13718  ac_cv_lib_thread_thr_create=no
13719fi
13720rm -f core conftest.err conftest.$ac_objext \
13721    conftest$ac_exeext conftest.$ac_ext
13722LIBS=$ac_check_lib_save_LIBS
13723fi
13724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
13725$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
13726if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
13727  have_thr=yes
13728else
13729  have_thr=no
13730fi
13731
13732
13733		if test $have_thr = yes ; then
13734
13735$as_echo "#define HAVE_THR 1" >>confdefs.h
13736
13737			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
13738			ol_link_threads=thr
13739
13740			if test x$ol_with_yielding_select = xauto ; then
13741				ol_with_yielding_select=yes
13742			fi
13743
13744						for ac_func in \
13745				thr_setconcurrency \
13746				thr_getconcurrency \
13747
13748do :
13749  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13750ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13751if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13752  cat >>confdefs.h <<_ACEOF
13753#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13754_ACEOF
13755
13756fi
13757done
13758
13759		fi
13760	fi
13761
13762		for ac_header in lwp/lwp.h
13763do :
13764  ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13765if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13766  cat >>confdefs.h <<_ACEOF
13767#define HAVE_LWP_LWP_H 1
13768_ACEOF
13769
13770fi
13771
13772done
13773
13774	if test $ac_cv_header_lwp_lwp_h = yes ; then
13775		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
13776$as_echo_n "checking for lwp_create in -llwp... " >&6; }
13777if ${ac_cv_lib_lwp_lwp_create+:} false; then :
13778  $as_echo_n "(cached) " >&6
13779else
13780  ac_check_lib_save_LIBS=$LIBS
13781LIBS="-llwp  $LIBS"
13782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13783/* end confdefs.h.  */
13784
13785/* Override any GCC internal prototype to avoid an error.
13786   Use char because int might match the return type of a GCC
13787   builtin and then its argument prototype would still apply.  */
13788#ifdef __cplusplus
13789extern "C"
13790#endif
13791char lwp_create ();
13792int
13793main ()
13794{
13795return lwp_create ();
13796  ;
13797  return 0;
13798}
13799_ACEOF
13800if ac_fn_c_try_link "$LINENO"; then :
13801  ac_cv_lib_lwp_lwp_create=yes
13802else
13803  ac_cv_lib_lwp_lwp_create=no
13804fi
13805rm -f core conftest.err conftest.$ac_objext \
13806    conftest$ac_exeext conftest.$ac_ext
13807LIBS=$ac_check_lib_save_LIBS
13808fi
13809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
13810$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
13811if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
13812  have_lwp=yes
13813else
13814  have_lwp=no
13815fi
13816
13817
13818		if test $have_lwp = yes ; then
13819
13820$as_echo "#define HAVE_LWP 1" >>confdefs.h
13821
13822			LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
13823			ol_link_threads=lwp
13824
13825			if test x$ol_with_yielding_select = xauto ; then
13826				ol_with_yielding_select=no
13827			fi
13828		fi
13829	fi
13830	;;
13831esac
13832
13833if test $ol_with_yielding_select = yes ; then
13834
13835$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
13836
13837fi
13838
13839if test $ol_with_threads = manual ; then
13840		ol_link_threads=yes
13841
13842	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
13843$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
13844
13845	for ac_header in pthread.h sched.h
13846do :
13847  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13848ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13849if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13850  cat >>confdefs.h <<_ACEOF
13851#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13852_ACEOF
13853
13854fi
13855
13856done
13857
13858	for ac_func in sched_yield pthread_yield
13859do :
13860  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13861ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13862if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13863  cat >>confdefs.h <<_ACEOF
13864#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13865_ACEOF
13866
13867fi
13868done
13869
13870
13871	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
13872$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
13873if ${ol_cv_header_linux_threads+:} false; then :
13874  $as_echo_n "(cached) " >&6
13875else
13876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13877/* end confdefs.h.  */
13878#include <pthread.h>
13879_ACEOF
13880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13881  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
13882  ol_cv_header_linux_threads=yes
13883else
13884  ol_cv_header_linux_threads=no
13885fi
13886rm -f conftest*
13887
13888
13889fi
13890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
13891$as_echo "$ol_cv_header_linux_threads" >&6; }
13892	if test $ol_cv_header_linux_threads = yes; then
13893
13894$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
13895
13896	fi
13897
13898
13899	for ac_header in mach/cthreads.h
13900do :
13901  ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
13902if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
13903  cat >>confdefs.h <<_ACEOF
13904#define HAVE_MACH_CTHREADS_H 1
13905_ACEOF
13906
13907fi
13908
13909done
13910
13911	for ac_header in lwp/lwp.h
13912do :
13913  ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13914if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13915  cat >>confdefs.h <<_ACEOF
13916#define HAVE_LWP_LWP_H 1
13917_ACEOF
13918
13919fi
13920
13921done
13922
13923	for ac_header in thread.h synch.h
13924do :
13925  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13926ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13927if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13928  cat >>confdefs.h <<_ACEOF
13929#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13930_ACEOF
13931
13932fi
13933
13934done
13935
13936fi
13937
13938if test $ol_link_threads != no && test $ol_link_threads != nt ; then
13939
13940$as_echo "#define REENTRANT 1" >>confdefs.h
13941
13942
13943$as_echo "#define _REENTRANT 1" >>confdefs.h
13944
13945
13946$as_echo "#define THREAD_SAFE 1" >>confdefs.h
13947
13948
13949$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
13950
13951
13952$as_echo "#define THREADSAFE 1" >>confdefs.h
13953
13954
13955$as_echo "#define _THREADSAFE 1" >>confdefs.h
13956
13957
13958$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
13959
13960
13961			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
13962$as_echo_n "checking for thread specific errno... " >&6; }
13963if ${ol_cv_errno_thread_specific+:} false; then :
13964  $as_echo_n "(cached) " >&6
13965else
13966
13967		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13968/* end confdefs.h.  */
13969#include <errno.h>
13970int
13971main ()
13972{
13973errno = 0;
13974  ;
13975  return 0;
13976}
13977_ACEOF
13978if ac_fn_c_try_link "$LINENO"; then :
13979  ol_cv_errno_thread_specific=yes
13980else
13981  ol_cv_errno_thread_specific=no
13982fi
13983rm -f core conftest.err conftest.$ac_objext \
13984    conftest$ac_exeext conftest.$ac_ext
13985
13986fi
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
13988$as_echo "$ol_cv_errno_thread_specific" >&6; }
13989
13990			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
13991$as_echo_n "checking for thread specific h_errno... " >&6; }
13992if ${ol_cv_h_errno_thread_specific+:} false; then :
13993  $as_echo_n "(cached) " >&6
13994else
13995
13996		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997/* end confdefs.h.  */
13998#include <netdb.h>
13999int
14000main ()
14001{
14002h_errno = 0;
14003  ;
14004  return 0;
14005}
14006_ACEOF
14007if ac_fn_c_try_link "$LINENO"; then :
14008  ol_cv_h_errno_thread_specific=yes
14009else
14010  ol_cv_h_errno_thread_specific=no
14011fi
14012rm -f core conftest.err conftest.$ac_objext \
14013    conftest$ac_exeext conftest.$ac_ext
14014
14015fi
14016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14017$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14018
14019	if test $ol_cv_errno_thread_specific != yes ||
14020	   test $ol_cv_h_errno_thread_specific != yes ; then
14021		LIBS="$LTHREAD_LIBS $LIBS"
14022		LTHREAD_LIBS=""
14023	fi
14024
14025fi
14026
14027if test $ol_link_threads = no ; then
14028	if test $ol_with_threads = yes ; then
14029		as_fn_error $? "no suitable thread support" "$LINENO" 5
14030	fi
14031
14032	if test $ol_with_threads = auto ; then
14033		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14034$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14035		ol_with_threads=no
14036	fi
14037
14038
14039$as_echo "#define NO_THREADS 1" >>confdefs.h
14040
14041	LTHREAD_LIBS=""
14042	BUILD_THREAD=no
14043else
14044	BUILD_THREAD=yes
14045fi
14046
14047if test $ol_link_threads != no ; then
14048
14049$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
14050
14051fi
14052
14053# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14054case "$ol_with_threads" in
14055 no)
14056    ol_pthread_ok=no
14057
14058    ;;
14059 *)
14060    ol_found_pthreads=yes
14061    ;;
14062esac
14063
14064ac_ext=c
14065ac_cpp='$CPP $CPPFLAGS'
14066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14068ac_compiler_gnu=$ac_cv_c_compiler_gnu
14069
14070
14071
14072
14073
14074
14075    case "$ol_found_pthreads" in
14076     yes)
14077	saved_LIBS="$LIBS"
14078	LIBS="$LTHREAD_LIBS $LIBS"
14079	saved_CFLAGS="$CFLAGS"
14080	CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14081	for ac_func in sem_timedwait
14082do :
14083  ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
14084if test "x$ac_cv_func_sem_timedwait" = xyes; then :
14085  cat >>confdefs.h <<_ACEOF
14086#define HAVE_SEM_TIMEDWAIT 1
14087_ACEOF
14088
14089fi
14090done
14091
14092	LIBS="$saved_LIBS"
14093	{ saved_LIBS=; unset saved_LIBS;}
14094	CFLAGS="$saved_CFLAGS"
14095	{ saved_CFLAGS=; unset saved_CFLAGS;}
14096	case "$ac_cv_func_sem_timedwait" in
14097	 yes)
14098	    PTHREAD_LIBS="$LTHREAD_LIBS"
14099	    have_pthreads=yes
14100	esac
14101    esac
14102esac
14103
14104case "$have_pthreads" in
14105 yes)
14106    CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
14107    saved_LIBS="$LIBS"
14108    LIBS="$LTHREAD_LIBS $LIBS"
14109    saved_CFLAGS="$CFLAGS"
14110    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14111    # The cast to long int works around a bug in the HP C Compiler
14112# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14113# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14114# This bug is HP SR number 8606223364.
14115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
14116$as_echo_n "checking size of pthread_t... " >&6; }
14117if ${ac_cv_sizeof_pthread_t+:} false; then :
14118  $as_echo_n "(cached) " >&6
14119else
14120  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
14121	    $ac_includes_default
14122	    #include <pthread.h>
14123
14124
14125"; then :
14126
14127else
14128  if test "$ac_cv_type_pthread_t" = yes; then
14129     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14131as_fn_error 77 "cannot compute sizeof (pthread_t)
14132See \`config.log' for more details" "$LINENO" 5; }
14133   else
14134     ac_cv_sizeof_pthread_t=0
14135   fi
14136fi
14137
14138fi
14139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
14140$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
14141
14142
14143
14144cat >>confdefs.h <<_ACEOF
14145#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
14146_ACEOF
14147
14148
14149    LIBISC_PTHREADS_NOTHREADS=pthreads
14150
14151$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
14152
14153    #
14154    # We'd like to use sigwait() too
14155    #
14156    ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
14157if test "x$ac_cv_func_sigwait" = xyes; then :
14158  have_sigwait=yes
14159else
14160  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
14161$as_echo_n "checking for sigwait in -lc... " >&6; }
14162if ${ac_cv_lib_c_sigwait+:} false; then :
14163  $as_echo_n "(cached) " >&6
14164else
14165  ac_check_lib_save_LIBS=$LIBS
14166LIBS="-lc  $LIBS"
14167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14168/* end confdefs.h.  */
14169
14170/* Override any GCC internal prototype to avoid an error.
14171   Use char because int might match the return type of a GCC
14172   builtin and then its argument prototype would still apply.  */
14173#ifdef __cplusplus
14174extern "C"
14175#endif
14176char sigwait ();
14177int
14178main ()
14179{
14180return sigwait ();
14181  ;
14182  return 0;
14183}
14184_ACEOF
14185if ac_fn_c_try_link "$LINENO"; then :
14186  ac_cv_lib_c_sigwait=yes
14187else
14188  ac_cv_lib_c_sigwait=no
14189fi
14190rm -f core conftest.err conftest.$ac_objext \
14191    conftest$ac_exeext conftest.$ac_ext
14192LIBS=$ac_check_lib_save_LIBS
14193fi
14194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
14195$as_echo "$ac_cv_lib_c_sigwait" >&6; }
14196if test "x$ac_cv_lib_c_sigwait" = xyes; then :
14197  have_sigwait=yes
14198else
14199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
14200$as_echo_n "checking for sigwait in -lpthread... " >&6; }
14201if ${ac_cv_lib_pthread_sigwait+:} false; then :
14202  $as_echo_n "(cached) " >&6
14203else
14204  ac_check_lib_save_LIBS=$LIBS
14205LIBS="-lpthread  $LIBS"
14206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14207/* end confdefs.h.  */
14208
14209/* Override any GCC internal prototype to avoid an error.
14210   Use char because int might match the return type of a GCC
14211   builtin and then its argument prototype would still apply.  */
14212#ifdef __cplusplus
14213extern "C"
14214#endif
14215char sigwait ();
14216int
14217main ()
14218{
14219return sigwait ();
14220  ;
14221  return 0;
14222}
14223_ACEOF
14224if ac_fn_c_try_link "$LINENO"; then :
14225  ac_cv_lib_pthread_sigwait=yes
14226else
14227  ac_cv_lib_pthread_sigwait=no
14228fi
14229rm -f core conftest.err conftest.$ac_objext \
14230    conftest$ac_exeext conftest.$ac_ext
14231LIBS=$ac_check_lib_save_LIBS
14232fi
14233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
14234$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
14235if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
14236  have_sigwait=yes
14237else
14238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
14239$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
14240if ${ac_cv_lib_pthread__Psigwait+:} false; then :
14241  $as_echo_n "(cached) " >&6
14242else
14243  ac_check_lib_save_LIBS=$LIBS
14244LIBS="-lpthread  $LIBS"
14245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14246/* end confdefs.h.  */
14247
14248/* Override any GCC internal prototype to avoid an error.
14249   Use char because int might match the return type of a GCC
14250   builtin and then its argument prototype would still apply.  */
14251#ifdef __cplusplus
14252extern "C"
14253#endif
14254char _Psigwait ();
14255int
14256main ()
14257{
14258return _Psigwait ();
14259  ;
14260  return 0;
14261}
14262_ACEOF
14263if ac_fn_c_try_link "$LINENO"; then :
14264  ac_cv_lib_pthread__Psigwait=yes
14265else
14266  ac_cv_lib_pthread__Psigwait=no
14267fi
14268rm -f core conftest.err conftest.$ac_objext \
14269    conftest$ac_exeext conftest.$ac_ext
14270LIBS=$ac_check_lib_save_LIBS
14271fi
14272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
14273$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
14274if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
14275  have_sigwait=yes
14276else
14277  have_sigwait=no
14278
14279fi
14280
14281
14282fi
14283
14284
14285fi
14286
14287
14288fi
14289
14290    case "$host:$have_sigwait" in
14291     *-freebsd*:no)
14292	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
14293$as_echo_n "checking for sigwait in -lc_r... " >&6; }
14294if ${ac_cv_lib_c_r_sigwait+:} false; then :
14295  $as_echo_n "(cached) " >&6
14296else
14297  ac_check_lib_save_LIBS=$LIBS
14298LIBS="-lc_r  $LIBS"
14299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14300/* end confdefs.h.  */
14301
14302/* Override any GCC internal prototype to avoid an error.
14303   Use char because int might match the return type of a GCC
14304   builtin and then its argument prototype would still apply.  */
14305#ifdef __cplusplus
14306extern "C"
14307#endif
14308char sigwait ();
14309int
14310main ()
14311{
14312return sigwait ();
14313  ;
14314  return 0;
14315}
14316_ACEOF
14317if ac_fn_c_try_link "$LINENO"; then :
14318  ac_cv_lib_c_r_sigwait=yes
14319else
14320  ac_cv_lib_c_r_sigwait=no
14321fi
14322rm -f core conftest.err conftest.$ac_objext \
14323    conftest$ac_exeext conftest.$ac_ext
14324LIBS=$ac_check_lib_save_LIBS
14325fi
14326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
14327$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
14328if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
14329  have_sigwait=yes
14330
14331fi
14332
14333    esac
14334    case "$have_sigwait" in
14335     yes)
14336	ac_cv_func_sigwait=yes
14337
14338$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
14339
14340    esac
14341
14342    for ac_func in pthread_attr_getstacksize
14343do :
14344  ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
14345if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
14346  cat >>confdefs.h <<_ACEOF
14347#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
14348_ACEOF
14349
14350fi
14351done
14352
14353    for ac_func in pthread_attr_setstacksize sysconf
14354do :
14355  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14356ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14357if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14358  cat >>confdefs.h <<_ACEOF
14359#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14360_ACEOF
14361
14362fi
14363done
14364
14365
14366    case "$host" in
14367     *-freebsd5.[012]|*-freebsd5.[012].*)
14368	;;
14369     *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
14370
14371$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
14372
14373	;;
14374     *-bsdi3.*|*-bsdi4.0*)
14375
14376$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
14377
14378	;;
14379     *-linux*)
14380
14381$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
14382
14383	;;
14384     *-solaris*)
14385	$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
14386
14387	for ac_func in pthread_setconcurrency
14388do :
14389  ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
14390if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
14391  cat >>confdefs.h <<_ACEOF
14392#define HAVE_PTHREAD_SETCONCURRENCY 1
14393_ACEOF
14394
14395fi
14396done
14397
14398	case "$ac_cv_func_pthread_setconcurrency" in
14399	 yes)
14400
14401$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
14402
14403	esac
14404	;;
14405     *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
14406
14407$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
14408
14409	;;
14410    esac
14411    hack_shutup_pthreadonceinit=no
14412    case "$host" in
14413     *-aix5.[123].*)
14414	hack_shutup_pthreadonceinit=yes
14415	;;
14416     *-solaris2.[89])
14417	hack_shutup_pthreadonceinit=yes
14418	;;
14419     *-solaris2.1[0-9])
14420	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
14421$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
14422if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
14423  $as_echo_n "(cached) " >&6
14424else
14425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14426/* end confdefs.h.  */
14427
14428			#include <pthread.h>
14429
14430int
14431main ()
14432{
14433
14434		        static pthread_once_t once_test =
14435						PTHREAD_ONCE_INIT;
14436
14437
14438  ;
14439  return 0;
14440}
14441_ACEOF
14442if ac_fn_c_try_compile "$LINENO"; then :
14443  ntp_cv_braces_around_pthread_once_init=no
14444else
14445  ntp_cv_braces_around_pthread_once_init=yes
14446
14447fi
14448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14449
14450fi
14451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
14452$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
14453	case "$ntp_cv_braces_around_pthread_once_init" in
14454	 yes)
14455	    hack_shutup_pthreadonceinit=yes
14456	esac
14457	;;
14458    esac
14459    case "$hack_shutup_pthreadonceinit" in
14460     yes)
14461
14462$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
14463
14464    esac
14465    LIBS="$saved_LIBS"
14466    { saved_LIBS=; unset saved_LIBS;}
14467    CFLAGS="$saved_CFLAGS"
14468    { saved_CFLAGS=; unset saved_CFLAGS;}
14469    ;;
14470 *)
14471    LIBISC_PTHREADS_NOTHREADS=nothreads
14472    ;;
14473esac
14474
14475 if test "$have_pthreads" != "no"; then
14476  PTHREADS_TRUE=
14477  PTHREADS_FALSE='#'
14478else
14479  PTHREADS_TRUE='#'
14480  PTHREADS_FALSE=
14481fi
14482
14483
14484
14485
14486
14487
14488
14489case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
14490 no:yes)
14491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
14492$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
14493if ${ntp_cv_vsnprintf_percent_m+:} false; then :
14494  $as_echo_n "(cached) " >&6
14495else
14496  if test "$cross_compiling" = yes; then :
14497  ntp_cv_vsnprintf_percent_m=no
14498
14499else
14500  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14501/* end confdefs.h.  */
14502
14503		    #include <stdarg.h>
14504		    #include <errno.h>
14505		    #include <stdio.h>
14506		    #include <string.h>
14507
14508		    int call_vsnprintf(
14509			    char *	dst,
14510			    size_t	sz,
14511			    const char *fmt,
14512			    ...
14513			    );
14514
14515		    int call_vsnprintf(
14516			    char *	dst,
14517			    size_t	sz,
14518			    const char *fmt,
14519			    ...
14520			    )
14521		    {
14522			    va_list	ap;
14523			    int		rc;
14524
14525			    va_start(ap, fmt);
14526			    rc = vsnprintf(dst, sz, fmt, ap);
14527			    va_end(ap);
14528
14529			    return rc;
14530		    }
14531
14532int
14533main ()
14534{
14535
14536		    char	sbuf[512];
14537		    char	pbuf[512];
14538		    int		slen;
14539
14540		    strcpy(sbuf, strerror(ENOENT));
14541		    errno = ENOENT;
14542		    slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
14543					  "wrong");
14544		    return strcmp(sbuf, pbuf);
14545
14546
14547  ;
14548  return 0;
14549}
14550_ACEOF
14551if ac_fn_c_try_run "$LINENO"; then :
14552  ntp_cv_vsnprintf_percent_m=yes
14553else
14554  ntp_cv_vsnprintf_percent_m=no
14555fi
14556rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14557  conftest.$ac_objext conftest.beam conftest.$ac_ext
14558fi
14559
14560
14561fi
14562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
14563$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
14564    case "$ntp_cv_vsnprintf_percent_m" in
14565     yes)
14566
14567$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
14568
14569    esac
14570esac
14571
14572for ac_header in sys/clockctl.h
14573do :
14574  ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
14575if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
14576  cat >>confdefs.h <<_ACEOF
14577#define HAVE_SYS_CLOCKCTL_H 1
14578_ACEOF
14579
14580fi
14581
14582done
14583
14584
14585# Check whether --enable-clockctl was given.
14586if test "${enable_clockctl+set}" = set; then :
14587  enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
14588else
14589  ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
14590
14591fi
14592
14593
14594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
14595$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
14596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
14597$as_echo "$ntp_use_dev_clockctl" >&6; }
14598
14599
14600for ac_header in sys/capability.h sys/prctl.h
14601do :
14602  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14603ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14604if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14605  cat >>confdefs.h <<_ACEOF
14606#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14607_ACEOF
14608
14609fi
14610
14611done
14612
14613
14614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
14615$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
14616
14617case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
14618 yesyes)
14619    case "$host" in
14620     mips-sgi-irix*)
14621	ntp_have_linuxcaps=no
14622	;;
14623     *) ntp_have_linuxcaps=yes
14624	;;
14625    esac
14626    ;;
14627 *)
14628    ntp_have_linuxcaps=no
14629    ;;
14630esac
14631
14632# Check whether --enable-linuxcaps was given.
14633if test "${enable_linuxcaps+set}" = set; then :
14634  enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
14635
14636fi
14637
14638
14639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
14640$as_echo "$ntp_have_linuxcaps" >&6; }
14641
14642case "$ntp_have_linuxcaps" in
14643 yes)
14644
14645$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
14646
14647    LIBS="$LIBS -lcap"
14648    ;;
14649esac
14650
14651
14652for ac_header in priv.h
14653do :
14654  ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
14655if test "x$ac_cv_header_priv_h" = xyes; then :
14656  cat >>confdefs.h <<_ACEOF
14657#define HAVE_PRIV_H 1
14658_ACEOF
14659
14660fi
14661
14662done
14663
14664case "$ac_cv_header_priv_h" in
14665 yes)
14666    case "$host" in
14667     *-solaris*)
14668	ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
14669if test "x$ac_cv_func_setppriv" = xyes; then :
14670  ntp_have_solarisprivs=yes
14671else
14672  ntp_have_solarisprivs=no
14673
14674fi
14675
14676	;;
14677    esac
14678esac
14679
14680# Check whether --enable-solarisprivs was given.
14681if test "${enable_solarisprivs+set}" = set; then :
14682  enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
14683
14684fi
14685
14686
14687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
14688$as_echo_n "checking if we have solaris privileges... " >&6; }
14689
14690case "$ntp_have_solarisprivs" in
14691 yes)
14692
14693$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
14694
14695    ;;
14696 '') ntp_have_solarisprivs="no"
14697    ;;
14698esac
14699
14700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
14701$as_echo "$ntp_have_solarisprivs" >&6; }
14702
14703for ac_header in sys/mac.h
14704do :
14705  ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
14706if test "x$ac_cv_header_sys_mac_h" = xyes; then :
14707  cat >>confdefs.h <<_ACEOF
14708#define HAVE_SYS_MAC_H 1
14709_ACEOF
14710
14711fi
14712
14713done
14714
14715
14716# Check whether --enable-trustedbsd_mac was given.
14717if test "${enable_trustedbsd_mac+set}" = set; then :
14718  enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
14719
14720fi
14721
14722
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
14724$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; }
14725
14726case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
14727 yesyes)
14728
14729$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
14730
14731    ;;
14732 *) ntp_use_trustedbsd_mac="no";
14733    ;;
14734esac
14735
14736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
14737$as_echo "$ntp_use_trustedbsd_mac" >&6; }
14738
14739case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
14740 *yes*)
14741
14742$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
14743
14744esac
14745
14746case "$host" in
14747 *-*-darwin*)
14748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
14749$as_echo_n "checking for library containing res_9_init... " >&6; }
14750if ${ac_cv_search_res_9_init+:} false; then :
14751  $as_echo_n "(cached) " >&6
14752else
14753  ac_func_search_save_LIBS=$LIBS
14754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14755/* end confdefs.h.  */
14756
14757/* Override any GCC internal prototype to avoid an error.
14758   Use char because int might match the return type of a GCC
14759   builtin and then its argument prototype would still apply.  */
14760#ifdef __cplusplus
14761extern "C"
14762#endif
14763char res_9_init ();
14764int
14765main ()
14766{
14767return res_9_init ();
14768  ;
14769  return 0;
14770}
14771_ACEOF
14772for ac_lib in '' resolv; do
14773  if test -z "$ac_lib"; then
14774    ac_res="none required"
14775  else
14776    ac_res=-l$ac_lib
14777    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14778  fi
14779  if ac_fn_c_try_link "$LINENO"; then :
14780  ac_cv_search_res_9_init=$ac_res
14781fi
14782rm -f core conftest.err conftest.$ac_objext \
14783    conftest$ac_exeext
14784  if ${ac_cv_search_res_9_init+:} false; then :
14785  break
14786fi
14787done
14788if ${ac_cv_search_res_9_init+:} false; then :
14789
14790else
14791  ac_cv_search_res_9_init=no
14792fi
14793rm conftest.$ac_ext
14794LIBS=$ac_func_search_save_LIBS
14795fi
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
14797$as_echo "$ac_cv_search_res_9_init" >&6; }
14798ac_res=$ac_cv_search_res_9_init
14799if test "$ac_res" != no; then :
14800  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14801
14802fi
14803
14804    ;;
14805 *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
14806$as_echo_n "checking for library containing res_init... " >&6; }
14807if ${ac_cv_search_res_init+:} false; 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 res_init ();
14821int
14822main ()
14823{
14824return res_init ();
14825  ;
14826  return 0;
14827}
14828_ACEOF
14829for ac_lib in '' resolv; 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_res_init=$ac_res
14838fi
14839rm -f core conftest.err conftest.$ac_objext \
14840    conftest$ac_exeext
14841  if ${ac_cv_search_res_init+:} false; then :
14842  break
14843fi
14844done
14845if ${ac_cv_search_res_init+:} false; then :
14846
14847else
14848  ac_cv_search_res_init=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_res_init" >&5
14854$as_echo "$ac_cv_search_res_init" >&6; }
14855ac_res=$ac_cv_search_res_init
14856if test "$ac_res" != no; then :
14857  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14858
14859fi
14860
14861    ;;
14862esac
14863for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
14864do :
14865  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14866ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
14867#  include <sys/types.h>
14868#endif
14869#ifdef HAVE_NETINET_IN_H
14870#  include <netinet/in.h>   /* inet_ functions / structs */
14871#endif
14872#ifdef HAVE_ARPA_NAMESER_H
14873#  include <arpa/nameser.h> /* DNS HEADER struct */
14874#endif
14875#ifdef HAVE_NETDB_H
14876#  include <netdb.h>
14877#endif
14878"
14879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14880  cat >>confdefs.h <<_ACEOF
14881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14882_ACEOF
14883
14884fi
14885
14886done
14887
14888
14889#HMS: Why do we do this check so "early"?
14890for ac_func in res_init
14891do :
14892  ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
14893if test "x$ac_cv_func_res_init" = xyes; then :
14894  cat >>confdefs.h <<_ACEOF
14895#define HAVE_RES_INIT 1
14896_ACEOF
14897
14898else
14899  for ac_func in __res_init
14900do :
14901  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
14902if test "x$ac_cv_func___res_init" = xyes; then :
14903  cat >>confdefs.h <<_ACEOF
14904#define HAVE___RES_INIT 1
14905_ACEOF
14906
14907fi
14908done
14909
14910fi
14911done
14912
14913
14914# We also need -lsocket, but we have tested for that already.
14915ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
14916if test "x$ac_cv_func_inet_ntop" = xyes; then :
14917
14918else
14919
14920$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
14921
14922fi
14923
14924ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
14925if test "x$ac_cv_func_inet_pton" = xyes; then :
14926
14927else
14928
14929$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
14930
14931fi
14932
14933
14934ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14935if test "x$ac_cv_type_uintptr_t" = xyes; then :
14936
14937cat >>confdefs.h <<_ACEOF
14938#define HAVE_UINTPTR_T 1
14939_ACEOF
14940
14941
14942fi
14943ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
14944if test "x$ac_cv_type_int32" = xyes; then :
14945
14946cat >>confdefs.h <<_ACEOF
14947#define HAVE_INT32 1
14948_ACEOF
14949
14950
14951fi
14952ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
14953if test "x$ac_cv_type_u_int32" = xyes; then :
14954
14955cat >>confdefs.h <<_ACEOF
14956#define HAVE_U_INT32 1
14957_ACEOF
14958
14959
14960fi
14961
14962
14963
14964
14965case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
14966 no::yes)
14967    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
14968$as_echo_n "checking for int32 with DNS headers included... " >&6; }
14969if ${ntp_cv_type_int32_with_dns+:} false; then :
14970  $as_echo_n "(cached) " >&6
14971else
14972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14973/* end confdefs.h.  */
14974
14975		    #ifdef HAVE_ARPA_NAMESER_H
14976		    # include <arpa/nameser.h>
14977		    #endif
14978		    #include <resolv.h>
14979
14980int
14981main ()
14982{
14983
14984		    size_t cb = sizeof(int32);
14985
14986
14987  ;
14988  return 0;
14989}
14990_ACEOF
14991if ac_fn_c_try_compile "$LINENO"; then :
14992  ntp_cv_type_int32_with_dns=yes
14993else
14994  ntp_cv_type_int32_with_dns=no
14995
14996fi
14997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14998
14999fi
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15001$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15002    case "$ntp_cv_type_int32_with_dns" in
15003     yes)
15004
15005$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15006
15007    esac
15008esac
15009
15010case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15011 no::yes)
15012    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15013$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15014if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15015  $as_echo_n "(cached) " >&6
15016else
15017  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15018/* end confdefs.h.  */
15019
15020		    #ifdef HAVE_ARPA_NAMESER_H
15021		    # include <arpa/nameser.h>
15022		    #endif
15023		    #include <resolv.h>
15024
15025int
15026main ()
15027{
15028
15029		    size_t cb = sizeof(u_int32);
15030
15031
15032  ;
15033  return 0;
15034}
15035_ACEOF
15036if ac_fn_c_try_compile "$LINENO"; then :
15037  ntp_cv_type_u_int32_with_dns=yes
15038else
15039  ntp_cv_type_u_int32_with_dns=no
15040
15041fi
15042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15043
15044fi
15045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15046$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15047    case "$ntp_cv_type_u_int32_with_dns" in
15048     yes)
15049
15050$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15051
15052    esac
15053esac
15054
15055for ac_header in sys/timepps.h
15056do :
15057  ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15058	#ifdef HAVE_SYS_TIME_H
15059	# include <sys/time.h>
15060	#endif
15061	#ifdef HAVE_ERRNO_H
15062	# include <errno.h>
15063	#endif
15064
15065
15066"
15067if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15068  cat >>confdefs.h <<_ACEOF
15069#define HAVE_SYS_TIMEPPS_H 1
15070_ACEOF
15071
15072fi
15073
15074done
15075
15076
15077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
15078$as_echo_n "checking for struct timespec... " >&6; }
15079if ${ntp_cv_struct_timespec+:} false; then :
15080  $as_echo_n "(cached) " >&6
15081else
15082  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15083/* end confdefs.h.  */
15084
15085		#include <sys/time.h>
15086		/* Under SunOS, timespec is in sys/timepps.h,
15087		   which needs errno.h and FRAC */
15088		#ifdef HAVE_ERRNO_H
15089		# include <errno.h>
15090		#endif
15091		#ifdef HAVE_SYS_TIMEPPS_H
15092		# define FRAC 4294967296
15093		# include <sys/timepps.h>
15094		#endif
15095
15096int
15097main ()
15098{
15099
15100		struct timespec n;
15101
15102
15103  ;
15104  return 0;
15105}
15106_ACEOF
15107if ac_fn_c_try_compile "$LINENO"; then :
15108  ntp_cv_struct_timespec=yes
15109else
15110  ntp_cv_struct_timespec=no
15111
15112fi
15113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15114
15115fi
15116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
15117$as_echo "$ntp_cv_struct_timespec" >&6; }
15118case "$ntp_cv_struct_timespec" in
15119 yes)
15120
15121$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
15122
15123esac
15124
15125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
15126$as_echo_n "checking for struct ntptimeval... " >&6; }
15127if ${ntp_cv_struct_ntptimeval+:} false; then :
15128  $as_echo_n "(cached) " >&6
15129else
15130  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131/* end confdefs.h.  */
15132
15133		#include <sys/time.h>
15134		#include <sys/timex.h>
15135
15136int
15137main ()
15138{
15139
15140		struct ntptimeval n;
15141
15142
15143  ;
15144  return 0;
15145}
15146_ACEOF
15147if ac_fn_c_try_compile "$LINENO"; then :
15148  ntp_cv_struct_ntptimeval=yes
15149else
15150  ntp_cv_struct_ntptimeval=no
15151
15152fi
15153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15154
15155fi
15156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
15157$as_echo "$ntp_cv_struct_ntptimeval" >&6; }
15158case "$ntp_cv_struct_ntptimeval" in
15159 yes)
15160
15161$as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
15162
15163esac
15164
15165for ac_header in md5.h
15166do :
15167  ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
15168	#ifdef HAVE_SYS_TYPES_H
15169	# include <sys/types.h>
15170	#endif
15171
15172
15173"
15174if test "x$ac_cv_header_md5_h" = xyes; then :
15175  cat >>confdefs.h <<_ACEOF
15176#define HAVE_MD5_H 1
15177_ACEOF
15178
15179fi
15180
15181done
15182
15183
15184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
15185$as_echo_n "checking for library containing MD5Init... " >&6; }
15186if ${ac_cv_search_MD5Init+:} false; then :
15187  $as_echo_n "(cached) " >&6
15188else
15189  ac_func_search_save_LIBS=$LIBS
15190cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15191/* end confdefs.h.  */
15192
15193/* Override any GCC internal prototype to avoid an error.
15194   Use char because int might match the return type of a GCC
15195   builtin and then its argument prototype would still apply.  */
15196#ifdef __cplusplus
15197extern "C"
15198#endif
15199char MD5Init ();
15200int
15201main ()
15202{
15203return MD5Init ();
15204  ;
15205  return 0;
15206}
15207_ACEOF
15208for ac_lib in '' md5 md; do
15209  if test -z "$ac_lib"; then
15210    ac_res="none required"
15211  else
15212    ac_res=-l$ac_lib
15213    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15214  fi
15215  if ac_fn_c_try_link "$LINENO"; then :
15216  ac_cv_search_MD5Init=$ac_res
15217fi
15218rm -f core conftest.err conftest.$ac_objext \
15219    conftest$ac_exeext
15220  if ${ac_cv_search_MD5Init+:} false; then :
15221  break
15222fi
15223done
15224if ${ac_cv_search_MD5Init+:} false; then :
15225
15226else
15227  ac_cv_search_MD5Init=no
15228fi
15229rm conftest.$ac_ext
15230LIBS=$ac_func_search_save_LIBS
15231fi
15232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
15233$as_echo "$ac_cv_search_MD5Init" >&6; }
15234ac_res=$ac_cv_search_MD5Init
15235if test "$ac_res" != no; then :
15236  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15237
15238fi
15239
15240for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
15241do :
15242  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15243ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15244if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15245  cat >>confdefs.h <<_ACEOF
15246#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15247_ACEOF
15248
15249fi
15250done
15251
15252
15253# HMS: does this need to be a cached variable?
15254# Check whether --enable-signalled-io was given.
15255if test "${enable_signalled_io+set}" = set; then :
15256  enableval=$enable_signalled_io; use_signalled_io=$enableval
15257else
15258  use_signalled_io=yes
15259
15260fi
15261
15262
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
15264$as_echo_n "checking for SIGIO... " >&6; }
15265if ${ntp_cv_hdr_def_sigio+:} false; then :
15266  $as_echo_n "(cached) " >&6
15267else
15268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15269/* end confdefs.h.  */
15270
15271	    #include <signal.h>
15272
15273	    #ifndef SIGIO
15274	    # error
15275	    #endif
15276
15277_ACEOF
15278if ac_fn_c_try_cpp "$LINENO"; then :
15279  ntp_cv_hdr_def_sigio=yes
15280else
15281  ntp_cv_hdr_def_sigio=no
15282
15283fi
15284rm -f conftest.err conftest.i conftest.$ac_ext
15285
15286fi
15287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
15288$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
15289
15290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
15291$as_echo_n "checking if we want to use SIGIO... " >&6; }
15292ans=no
15293case "$ntp_cv_hdr_def_sigio" in
15294 yes)
15295    ans=yes
15296    case "$host" in
15297     alpha*-dec-osf4*|alpha*-dec-osf5*)
15298	ans=no
15299	;;
15300     *-convex-*)
15301	ans=no
15302	;;
15303     *-dec-*)
15304	ans=no
15305	;;
15306     *-pc-cygwin*)
15307	ans=no
15308	;;
15309     *-sni-sysv*)
15310	ans=no
15311	;;
15312     *-stratus-vos)
15313	ans=no
15314	;;
15315     *-univel-sysv*)
15316	ans=no
15317	;;
15318     *-*-irix6*)
15319	ans=no
15320	;;
15321     *-*-freebsd*)
15322	ans=no
15323	;;
15324     *-*-*linux*)
15325	ans=no
15326	;;
15327     *-*-unicosmp*)
15328	ans=no
15329	;;
15330     *-*-kfreebsd*)
15331	ans=no
15332	;;
15333     m68k-*-mint*)
15334	ans=no
15335	;;
15336    esac
15337    case "$ans" in
15338     no)
15339	ans="Possible for $host but disabled because of reported problems"
15340	;;
15341    esac
15342    ;;
15343esac
15344case "$ans" in
15345 yes)
15346    case "$use_signalled_io" in
15347     yes)
15348
15349$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
15350
15351	;;
15352     *) ans="Allowed for $host but --disable-signalled-io was given"
15353	;;
15354    esac
15355esac
15356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15357$as_echo "$ans" >&6; }
15358
15359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
15360$as_echo_n "checking for SIGPOLL... " >&6; }
15361if ${ntp_cv_hdr_def_sigpoll+:} false; then :
15362  $as_echo_n "(cached) " >&6
15363else
15364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15365/* end confdefs.h.  */
15366
15367	    #include <signal.h>
15368
15369	    #ifndef SIGPOLL
15370	    # error
15371	    #endif
15372
15373_ACEOF
15374if ac_fn_c_try_cpp "$LINENO"; then :
15375  ntp_cv_hdr_def_sigpoll=yes
15376else
15377  ntp_cv_hdr_def_sigpoll=no
15378
15379fi
15380rm -f conftest.err conftest.i conftest.$ac_ext
15381
15382fi
15383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
15384$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
15385
15386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
15387$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
15388ans=no
15389case "$ntp_cv_hdr_def_sigpoll" in
15390 yes)
15391    case "$host" in
15392     mips-sgi-irix*)
15393	ans=no
15394	;;
15395     vax-dec-bsd)
15396	ans=no
15397	;;
15398     *-pc-cygwin*)
15399	ans=no
15400	;;
15401     *-sni-sysv*)
15402	ans=no
15403	;;
15404     *-stratus-vos)
15405	ans=no
15406	;;
15407     *-*-aix[4-9]*)
15408	# XXX Only verified thru AIX6
15409	ans=no
15410	;;
15411     *-*-hpux*)
15412	ans=no
15413	;;
15414     *-*-*linux*)
15415	ans=no
15416	;;
15417     *-*-osf*)
15418	ans=no
15419	;;
15420     *-*-qnx*)
15421	ans=no
15422	;;
15423     *-*-sunos*)
15424	ans=no
15425	;;
15426     *-*-solaris*)
15427	ans=no
15428	;;
15429     *-*-ultrix*)
15430	ans=no
15431	;;
15432     *-*-unicosmp*)
15433	ans=no
15434	;;
15435     *-*-kfreebsd*)
15436	ans=no
15437	;;
15438     *) ans=yes
15439	;;
15440    esac
15441    ;;
15442esac
15443case "$ans" in
15444 yes)
15445
15446$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
15447
15448esac
15449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15450$as_echo "$ans" >&6; }
15451
15452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
15453$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
15454ans=no
15455case "$ntp_cv_hdr_def_sigpoll" in
15456 yes)
15457    case "$host" in
15458     mips-sgi-irix*)
15459	ans=no
15460	;;
15461     vax-dec-bsd)
15462	ans=no
15463	;;
15464     *-pc-cygwin*)
15465	ans=no
15466	;;
15467     *-sni-sysv*)
15468	ans=no
15469	;;
15470     *-stratus-vos)
15471	ans=no
15472	;;
15473     *-*-aix[4-9]*)
15474	# XXX Only verified thru AIX6
15475	ans=no
15476	;;
15477     *-*-hpux*)
15478	ans=no
15479	;;
15480     *-*-*linux*)
15481	ans=no
15482	;;
15483     *-*-osf*)
15484	ans=no
15485	;;
15486     *-*-sunos*)
15487	ans=no
15488	;;
15489     *-*-ultrix*)
15490	ans=no
15491	;;
15492     *-*-qnx*)
15493	ans=no
15494	;;
15495     *-*-unicosmp*)
15496	ans=no
15497	;;
15498     *-*-kfreebsd*)
15499	ans=no
15500	;;
15501     *) ans=yes
15502	;;
15503    esac
15504    ;;
15505esac
15506case "$ans" in
15507 yes)
15508
15509$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
15510
15511esac
15512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15513$as_echo "$ans" >&6; }
15514
15515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
15516$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
15517if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
15518  $as_echo_n "(cached) " >&6
15519else
15520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15521/* end confdefs.h.  */
15522
15523		#include <sys/time.h>
15524
15525int
15526main ()
15527{
15528
15529		gettimeofday(0, 0);
15530		settimeofday(0, 0);
15531
15532
15533  ;
15534  return 0;
15535}
15536_ACEOF
15537if ac_fn_c_try_compile "$LINENO"; then :
15538  ntp_cv_func_Xettimeofday_nargs=2
15539else
15540  ntp_cv_func_Xettimeofday_nargs=1
15541
15542fi
15543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15544
15545fi
15546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
15547$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
15548case "$ntp_cv_func_Xettimeofday_nargs" in
15549 1)
15550
15551$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
15552
15553esac
15554
15555for ac_func in settimeofday
15556do :
15557  ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
15558if test "x$ac_cv_func_settimeofday" = xyes; then :
15559  cat >>confdefs.h <<_ACEOF
15560#define HAVE_SETTIMEOFDAY 1
15561_ACEOF
15562
15563else
15564
15565    case "$host" in
15566     *-*-mpeix*) ac_cv_func_settimeofday=yes
15567    esac
15568
15569fi
15570done
15571
15572
15573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
15574$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
15575ntp_warning='GRONK'
15576ans=none
15577case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
15578 yes*)
15579    ntp_warning=''
15580    ans='clock_settime()'
15581    ;;
15582 noyes*)
15583    ntp_warning='But clock_settime() would be better (if we had it)'
15584    ans='settimeofday()'
15585    ;;
15586 nonoyes)
15587    ntp_warning='Which is the worst of the three'
15588    ans='stime()'
15589    ;;
15590 *)
15591    case "$build" in
15592     $host)
15593	ntp_warning='Which leaves us with nothing to use!'
15594    esac
15595esac
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15597$as_echo "$ans" >&6; }
15598case "$ntp_warning" in
15599 '')
15600    ;;
15601 *)
15602    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
15603$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
15604    ;;
15605esac
15606
15607
15608LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
15609LIBS=$__LIBS
15610{ __LIBS=; unset __LIBS;}
15611
15612
15613
15614# Check whether --enable-shared was given.
15615if test "${enable_shared+set}" = set; then :
15616  enableval=$enable_shared; p=${PACKAGE-default}
15617    case $enableval in
15618    yes) enable_shared=yes ;;
15619    no) enable_shared=no ;;
15620    *)
15621      enable_shared=no
15622      # Look at the argument we got.  We use all the common list separators.
15623      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15624      for pkg in $enableval; do
15625	IFS=$lt_save_ifs
15626	if test "X$pkg" = "X$p"; then
15627	  enable_shared=yes
15628	fi
15629      done
15630      IFS=$lt_save_ifs
15631      ;;
15632    esac
15633else
15634  enable_shared=no
15635fi
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645case `pwd` in
15646  *\ * | *\	*)
15647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
15648$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
15649esac
15650
15651
15652
15653macro_version='2.4.6'
15654macro_revision='2.4.6'
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668ltmain=$ac_aux_dir/ltmain.sh
15669
15670# Backslashify metacharacters that are still active within
15671# double-quoted strings.
15672sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
15673
15674# Same as above, but do not quote variable references.
15675double_quote_subst='s/\(["`\\]\)/\\\1/g'
15676
15677# Sed substitution to delay expansion of an escaped shell variable in a
15678# double_quote_subst'ed string.
15679delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
15680
15681# Sed substitution to delay expansion of an escaped single quote.
15682delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
15683
15684# Sed substitution to avoid accidental globbing in evaled expressions
15685no_glob_subst='s/\*/\\\*/g'
15686
15687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
15688$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
15689if ${lt_cv_path_NM+:} false; then :
15690  $as_echo_n "(cached) " >&6
15691else
15692  if test -n "$NM"; then
15693  # Let the user override the test.
15694  lt_cv_path_NM=$NM
15695else
15696  lt_nm_to_check=${ac_tool_prefix}nm
15697  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
15698    lt_nm_to_check="$lt_nm_to_check nm"
15699  fi
15700  for lt_tmp_nm in $lt_nm_to_check; do
15701    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
15702    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
15703      IFS=$lt_save_ifs
15704      test -z "$ac_dir" && ac_dir=.
15705      tmp_nm=$ac_dir/$lt_tmp_nm
15706      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
15707	# Check to see if the nm accepts a BSD-compat flag.
15708	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
15709	#   nm: unknown option "B" ignored
15710	# Tru64's nm complains that /dev/null is an invalid object file
15711	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
15712	case $build_os in
15713	mingw*) lt_bad_file=conftest.nm/nofile ;;
15714	*) lt_bad_file=/dev/null ;;
15715	esac
15716	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
15717	*$lt_bad_file* | *'Invalid file or object type'*)
15718	  lt_cv_path_NM="$tmp_nm -B"
15719	  break 2
15720	  ;;
15721	*)
15722	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
15723	  */dev/null*)
15724	    lt_cv_path_NM="$tmp_nm -p"
15725	    break 2
15726	    ;;
15727	  *)
15728	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
15729	    continue # so that we can try to find one that supports BSD flags
15730	    ;;
15731	  esac
15732	  ;;
15733	esac
15734      fi
15735    done
15736    IFS=$lt_save_ifs
15737  done
15738  : ${lt_cv_path_NM=no}
15739fi
15740fi
15741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
15742$as_echo "$lt_cv_path_NM" >&6; }
15743if test no != "$lt_cv_path_NM"; then
15744  NM=$lt_cv_path_NM
15745else
15746  # Didn't find any BSD compatible name lister, look for dumpbin.
15747  if test -n "$DUMPBIN"; then :
15748    # Let the user override the test.
15749  else
15750    if test -n "$ac_tool_prefix"; then
15751  for ac_prog in dumpbin "link -dump"
15752  do
15753    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15754set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15756$as_echo_n "checking for $ac_word... " >&6; }
15757if ${ac_cv_prog_DUMPBIN+:} false; then :
15758  $as_echo_n "(cached) " >&6
15759else
15760  if test -n "$DUMPBIN"; then
15761  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
15762else
15763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15764for as_dir in $PATH
15765do
15766  IFS=$as_save_IFS
15767  test -z "$as_dir" && as_dir=.
15768    for ac_exec_ext in '' $ac_executable_extensions; do
15769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15770    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
15771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15772    break 2
15773  fi
15774done
15775  done
15776IFS=$as_save_IFS
15777
15778fi
15779fi
15780DUMPBIN=$ac_cv_prog_DUMPBIN
15781if test -n "$DUMPBIN"; then
15782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
15783$as_echo "$DUMPBIN" >&6; }
15784else
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15786$as_echo "no" >&6; }
15787fi
15788
15789
15790    test -n "$DUMPBIN" && break
15791  done
15792fi
15793if test -z "$DUMPBIN"; then
15794  ac_ct_DUMPBIN=$DUMPBIN
15795  for ac_prog in dumpbin "link -dump"
15796do
15797  # Extract the first word of "$ac_prog", so it can be a program name with args.
15798set dummy $ac_prog; ac_word=$2
15799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15800$as_echo_n "checking for $ac_word... " >&6; }
15801if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
15802  $as_echo_n "(cached) " >&6
15803else
15804  if test -n "$ac_ct_DUMPBIN"; then
15805  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
15806else
15807as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15808for as_dir in $PATH
15809do
15810  IFS=$as_save_IFS
15811  test -z "$as_dir" && as_dir=.
15812    for ac_exec_ext in '' $ac_executable_extensions; do
15813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15814    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
15815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15816    break 2
15817  fi
15818done
15819  done
15820IFS=$as_save_IFS
15821
15822fi
15823fi
15824ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
15825if test -n "$ac_ct_DUMPBIN"; then
15826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
15827$as_echo "$ac_ct_DUMPBIN" >&6; }
15828else
15829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15830$as_echo "no" >&6; }
15831fi
15832
15833
15834  test -n "$ac_ct_DUMPBIN" && break
15835done
15836
15837  if test "x$ac_ct_DUMPBIN" = x; then
15838    DUMPBIN=":"
15839  else
15840    case $cross_compiling:$ac_tool_warned in
15841yes:)
15842{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15843$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15844ac_tool_warned=yes ;;
15845esac
15846    DUMPBIN=$ac_ct_DUMPBIN
15847  fi
15848fi
15849
15850    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
15851    *COFF*)
15852      DUMPBIN="$DUMPBIN -symbols -headers"
15853      ;;
15854    *)
15855      DUMPBIN=:
15856      ;;
15857    esac
15858  fi
15859
15860  if test : != "$DUMPBIN"; then
15861    NM=$DUMPBIN
15862  fi
15863fi
15864test -z "$NM" && NM=nm
15865
15866
15867
15868
15869
15870
15871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
15872$as_echo_n "checking the name lister ($NM) interface... " >&6; }
15873if ${lt_cv_nm_interface+:} false; then :
15874  $as_echo_n "(cached) " >&6
15875else
15876  lt_cv_nm_interface="BSD nm"
15877  echo "int some_variable = 0;" > conftest.$ac_ext
15878  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
15879  (eval "$ac_compile" 2>conftest.err)
15880  cat conftest.err >&5
15881  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
15882  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
15883  cat conftest.err >&5
15884  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
15885  cat conftest.out >&5
15886  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
15887    lt_cv_nm_interface="MS dumpbin"
15888  fi
15889  rm -f conftest*
15890fi
15891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
15892$as_echo "$lt_cv_nm_interface" >&6; }
15893
15894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
15895$as_echo_n "checking whether ln -s works... " >&6; }
15896LN_S=$as_ln_s
15897if test "$LN_S" = "ln -s"; then
15898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15899$as_echo "yes" >&6; }
15900else
15901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
15902$as_echo "no, using $LN_S" >&6; }
15903fi
15904
15905# find the maximum length of command line arguments
15906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
15907$as_echo_n "checking the maximum length of command line arguments... " >&6; }
15908if ${lt_cv_sys_max_cmd_len+:} false; then :
15909  $as_echo_n "(cached) " >&6
15910else
15911    i=0
15912  teststring=ABCD
15913
15914  case $build_os in
15915  msdosdjgpp*)
15916    # On DJGPP, this test can blow up pretty badly due to problems in libc
15917    # (any single argument exceeding 2000 bytes causes a buffer overrun
15918    # during glob expansion).  Even if it were fixed, the result of this
15919    # check would be larger than it should be.
15920    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15921    ;;
15922
15923  gnu*)
15924    # Under GNU Hurd, this test is not required because there is
15925    # no limit to the length of command line arguments.
15926    # Libtool will interpret -1 as no limit whatsoever
15927    lt_cv_sys_max_cmd_len=-1;
15928    ;;
15929
15930  cygwin* | mingw* | cegcc*)
15931    # On Win9x/ME, this test blows up -- it succeeds, but takes
15932    # about 5 minutes as the teststring grows exponentially.
15933    # Worse, since 9x/ME are not pre-emptively multitasking,
15934    # you end up with a "frozen" computer, even though with patience
15935    # the test eventually succeeds (with a max line length of 256k).
15936    # Instead, let's just punt: use the minimum linelength reported by
15937    # all of the supported platforms: 8192 (on NT/2K/XP).
15938    lt_cv_sys_max_cmd_len=8192;
15939    ;;
15940
15941  mint*)
15942    # On MiNT this can take a long time and run out of memory.
15943    lt_cv_sys_max_cmd_len=8192;
15944    ;;
15945
15946  amigaos*)
15947    # On AmigaOS with pdksh, this test takes hours, literally.
15948    # So we just punt and use a minimum line length of 8192.
15949    lt_cv_sys_max_cmd_len=8192;
15950    ;;
15951
15952  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
15953    # This has been around since 386BSD, at least.  Likely further.
15954    if test -x /sbin/sysctl; then
15955      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
15956    elif test -x /usr/sbin/sysctl; then
15957      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15958    else
15959      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
15960    fi
15961    # And add a safety zone
15962    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15963    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15964    ;;
15965
15966  interix*)
15967    # We know the value 262144 and hardcode it with a safety zone (like BSD)
15968    lt_cv_sys_max_cmd_len=196608
15969    ;;
15970
15971  os2*)
15972    # The test takes a long time on OS/2.
15973    lt_cv_sys_max_cmd_len=8192
15974    ;;
15975
15976  osf*)
15977    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
15978    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
15979    # nice to cause kernel panics so lets avoid the loop below.
15980    # First set a reasonable default.
15981    lt_cv_sys_max_cmd_len=16384
15982    #
15983    if test -x /sbin/sysconfig; then
15984      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15985        *1*) lt_cv_sys_max_cmd_len=-1 ;;
15986      esac
15987    fi
15988    ;;
15989  sco3.2v5*)
15990    lt_cv_sys_max_cmd_len=102400
15991    ;;
15992  sysv5* | sco5v6* | sysv4.2uw2*)
15993    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15994    if test -n "$kargmax"; then
15995      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
15996    else
15997      lt_cv_sys_max_cmd_len=32768
15998    fi
15999    ;;
16000  *)
16001    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16002    if test -n "$lt_cv_sys_max_cmd_len" && \
16003       test undefined != "$lt_cv_sys_max_cmd_len"; then
16004      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16005      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16006    else
16007      # Make teststring a little bigger before we do anything with it.
16008      # a 1K string should be a reasonable start.
16009      for i in 1 2 3 4 5 6 7 8; do
16010        teststring=$teststring$teststring
16011      done
16012      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16013      # If test is not a shell built-in, we'll probably end up computing a
16014      # maximum length that is only half of the actual maximum length, but
16015      # we can't tell.
16016      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
16017	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16018	      test 17 != "$i" # 1/2 MB should be enough
16019      do
16020        i=`expr $i + 1`
16021        teststring=$teststring$teststring
16022      done
16023      # Only check the string length outside the loop.
16024      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16025      teststring=
16026      # Add a significant safety factor because C++ compilers can tack on
16027      # massive amounts of additional arguments before passing them to the
16028      # linker.  It appears as though 1/2 is a usable value.
16029      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16030    fi
16031    ;;
16032  esac
16033
16034fi
16035
16036if test -n "$lt_cv_sys_max_cmd_len"; then
16037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16038$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16039else
16040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16041$as_echo "none" >&6; }
16042fi
16043max_cmd_len=$lt_cv_sys_max_cmd_len
16044
16045
16046
16047
16048
16049
16050: ${CP="cp -f"}
16051: ${MV="mv -f"}
16052: ${RM="rm -f"}
16053
16054if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16055  lt_unset=unset
16056else
16057  lt_unset=false
16058fi
16059
16060
16061
16062
16063
16064# test EBCDIC or ASCII
16065case `echo X|tr X '\101'` in
16066 A) # ASCII based system
16067    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16068  lt_SP2NL='tr \040 \012'
16069  lt_NL2SP='tr \015\012 \040\040'
16070  ;;
16071 *) # EBCDIC based system
16072  lt_SP2NL='tr \100 \n'
16073  lt_NL2SP='tr \r\n \100\100'
16074  ;;
16075esac
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
16086$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
16087if ${lt_cv_to_host_file_cmd+:} false; then :
16088  $as_echo_n "(cached) " >&6
16089else
16090  case $host in
16091  *-*-mingw* )
16092    case $build in
16093      *-*-mingw* ) # actually msys
16094        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
16095        ;;
16096      *-*-cygwin* )
16097        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
16098        ;;
16099      * ) # otherwise, assume *nix
16100        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
16101        ;;
16102    esac
16103    ;;
16104  *-*-cygwin* )
16105    case $build in
16106      *-*-mingw* ) # actually msys
16107        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
16108        ;;
16109      *-*-cygwin* )
16110        lt_cv_to_host_file_cmd=func_convert_file_noop
16111        ;;
16112      * ) # otherwise, assume *nix
16113        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
16114        ;;
16115    esac
16116    ;;
16117  * ) # unhandled hosts (and "normal" native builds)
16118    lt_cv_to_host_file_cmd=func_convert_file_noop
16119    ;;
16120esac
16121
16122fi
16123
16124to_host_file_cmd=$lt_cv_to_host_file_cmd
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
16126$as_echo "$lt_cv_to_host_file_cmd" >&6; }
16127
16128
16129
16130
16131
16132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
16133$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
16134if ${lt_cv_to_tool_file_cmd+:} false; then :
16135  $as_echo_n "(cached) " >&6
16136else
16137  #assume ordinary cross tools, or native build.
16138lt_cv_to_tool_file_cmd=func_convert_file_noop
16139case $host in
16140  *-*-mingw* )
16141    case $build in
16142      *-*-mingw* ) # actually msys
16143        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
16144        ;;
16145    esac
16146    ;;
16147esac
16148
16149fi
16150
16151to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
16153$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
16154
16155
16156
16157
16158
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
16160$as_echo_n "checking for $LD option to reload object files... " >&6; }
16161if ${lt_cv_ld_reload_flag+:} false; then :
16162  $as_echo_n "(cached) " >&6
16163else
16164  lt_cv_ld_reload_flag='-r'
16165fi
16166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
16167$as_echo "$lt_cv_ld_reload_flag" >&6; }
16168reload_flag=$lt_cv_ld_reload_flag
16169case $reload_flag in
16170"" | " "*) ;;
16171*) reload_flag=" $reload_flag" ;;
16172esac
16173reload_cmds='$LD$reload_flag -o $output$reload_objs'
16174case $host_os in
16175  cygwin* | mingw* | pw32* | cegcc*)
16176    if test yes != "$GCC"; then
16177      reload_cmds=false
16178    fi
16179    ;;
16180  darwin*)
16181    if test yes = "$GCC"; then
16182      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
16183    else
16184      reload_cmds='$LD$reload_flag -o $output$reload_objs'
16185    fi
16186    ;;
16187esac
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197if test -n "$ac_tool_prefix"; then
16198  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
16199set dummy ${ac_tool_prefix}objdump; ac_word=$2
16200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16201$as_echo_n "checking for $ac_word... " >&6; }
16202if ${ac_cv_prog_OBJDUMP+:} false; then :
16203  $as_echo_n "(cached) " >&6
16204else
16205  if test -n "$OBJDUMP"; then
16206  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
16207else
16208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16209for as_dir in $PATH
16210do
16211  IFS=$as_save_IFS
16212  test -z "$as_dir" && as_dir=.
16213    for ac_exec_ext in '' $ac_executable_extensions; do
16214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16215    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
16216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16217    break 2
16218  fi
16219done
16220  done
16221IFS=$as_save_IFS
16222
16223fi
16224fi
16225OBJDUMP=$ac_cv_prog_OBJDUMP
16226if test -n "$OBJDUMP"; then
16227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
16228$as_echo "$OBJDUMP" >&6; }
16229else
16230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16231$as_echo "no" >&6; }
16232fi
16233
16234
16235fi
16236if test -z "$ac_cv_prog_OBJDUMP"; then
16237  ac_ct_OBJDUMP=$OBJDUMP
16238  # Extract the first word of "objdump", so it can be a program name with args.
16239set dummy objdump; ac_word=$2
16240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16241$as_echo_n "checking for $ac_word... " >&6; }
16242if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
16243  $as_echo_n "(cached) " >&6
16244else
16245  if test -n "$ac_ct_OBJDUMP"; then
16246  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
16247else
16248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16249for as_dir in $PATH
16250do
16251  IFS=$as_save_IFS
16252  test -z "$as_dir" && as_dir=.
16253    for ac_exec_ext in '' $ac_executable_extensions; do
16254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16255    ac_cv_prog_ac_ct_OBJDUMP="objdump"
16256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16257    break 2
16258  fi
16259done
16260  done
16261IFS=$as_save_IFS
16262
16263fi
16264fi
16265ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
16266if test -n "$ac_ct_OBJDUMP"; then
16267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
16268$as_echo "$ac_ct_OBJDUMP" >&6; }
16269else
16270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16271$as_echo "no" >&6; }
16272fi
16273
16274  if test "x$ac_ct_OBJDUMP" = x; then
16275    OBJDUMP="false"
16276  else
16277    case $cross_compiling:$ac_tool_warned in
16278yes:)
16279{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16280$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16281ac_tool_warned=yes ;;
16282esac
16283    OBJDUMP=$ac_ct_OBJDUMP
16284  fi
16285else
16286  OBJDUMP="$ac_cv_prog_OBJDUMP"
16287fi
16288
16289test -z "$OBJDUMP" && OBJDUMP=objdump
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
16300$as_echo_n "checking how to recognize dependent libraries... " >&6; }
16301if ${lt_cv_deplibs_check_method+:} false; then :
16302  $as_echo_n "(cached) " >&6
16303else
16304  lt_cv_file_magic_cmd='$MAGIC_CMD'
16305lt_cv_file_magic_test_file=
16306lt_cv_deplibs_check_method='unknown'
16307# Need to set the preceding variable on all platforms that support
16308# interlibrary dependencies.
16309# 'none' -- dependencies not supported.
16310# 'unknown' -- same as none, but documents that we really don't know.
16311# 'pass_all' -- all dependencies passed with no checks.
16312# 'test_compile' -- check by making test program.
16313# 'file_magic [[regex]]' -- check by looking for files in library path
16314# that responds to the $file_magic_cmd with a given extended regex.
16315# If you have 'file' or equivalent on your system and you're not sure
16316# whether 'pass_all' will *always* work, you probably want this one.
16317
16318case $host_os in
16319aix[4-9]*)
16320  lt_cv_deplibs_check_method=pass_all
16321  ;;
16322
16323beos*)
16324  lt_cv_deplibs_check_method=pass_all
16325  ;;
16326
16327bsdi[45]*)
16328  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
16329  lt_cv_file_magic_cmd='/usr/bin/file -L'
16330  lt_cv_file_magic_test_file=/shlib/libc.so
16331  ;;
16332
16333cygwin*)
16334  # func_win32_libid is a shell function defined in ltmain.sh
16335  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16336  lt_cv_file_magic_cmd='func_win32_libid'
16337  ;;
16338
16339mingw* | pw32*)
16340  # Base MSYS/MinGW do not provide the 'file' command needed by
16341  # func_win32_libid shell function, so use a weaker test based on 'objdump',
16342  # unless we find 'file', for example because we are cross-compiling.
16343  if ( file / ) >/dev/null 2>&1; then
16344    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16345    lt_cv_file_magic_cmd='func_win32_libid'
16346  else
16347    # Keep this pattern in sync with the one in func_win32_libid.
16348    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
16349    lt_cv_file_magic_cmd='$OBJDUMP -f'
16350  fi
16351  ;;
16352
16353cegcc*)
16354  # use the weaker test based on 'objdump'. See mingw*.
16355  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
16356  lt_cv_file_magic_cmd='$OBJDUMP -f'
16357  ;;
16358
16359darwin* | rhapsody*)
16360  lt_cv_deplibs_check_method=pass_all
16361  ;;
16362
16363freebsd* | dragonfly*)
16364  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16365    case $host_cpu in
16366    i*86 )
16367      # Not sure whether the presence of OpenBSD here was a mistake.
16368      # Let's accept both of them until this is cleared up.
16369      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
16370      lt_cv_file_magic_cmd=/usr/bin/file
16371      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
16372      ;;
16373    esac
16374  else
16375    lt_cv_deplibs_check_method=pass_all
16376  fi
16377  ;;
16378
16379haiku*)
16380  lt_cv_deplibs_check_method=pass_all
16381  ;;
16382
16383hpux10.20* | hpux11*)
16384  lt_cv_file_magic_cmd=/usr/bin/file
16385  case $host_cpu in
16386  ia64*)
16387    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
16388    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
16389    ;;
16390  hppa*64*)
16391    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
16392    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
16393    ;;
16394  *)
16395    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
16396    lt_cv_file_magic_test_file=/usr/lib/libc.sl
16397    ;;
16398  esac
16399  ;;
16400
16401interix[3-9]*)
16402  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
16403  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
16404  ;;
16405
16406irix5* | irix6* | nonstopux*)
16407  case $LD in
16408  *-32|*"-32 ") libmagic=32-bit;;
16409  *-n32|*"-n32 ") libmagic=N32;;
16410  *-64|*"-64 ") libmagic=64-bit;;
16411  *) libmagic=never-match;;
16412  esac
16413  lt_cv_deplibs_check_method=pass_all
16414  ;;
16415
16416# This must be glibc/ELF.
16417linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16418  lt_cv_deplibs_check_method=pass_all
16419  ;;
16420
16421netbsd*)
16422  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16423    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16424  else
16425    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
16426  fi
16427  ;;
16428
16429newos6*)
16430  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
16431  lt_cv_file_magic_cmd=/usr/bin/file
16432  lt_cv_file_magic_test_file=/usr/lib/libnls.so
16433  ;;
16434
16435*nto* | *qnx*)
16436  lt_cv_deplibs_check_method=pass_all
16437  ;;
16438
16439openbsd* | bitrig*)
16440  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16441    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
16442  else
16443    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16444  fi
16445  ;;
16446
16447osf3* | osf4* | osf5*)
16448  lt_cv_deplibs_check_method=pass_all
16449  ;;
16450
16451rdos*)
16452  lt_cv_deplibs_check_method=pass_all
16453  ;;
16454
16455solaris*)
16456  lt_cv_deplibs_check_method=pass_all
16457  ;;
16458
16459sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16460  lt_cv_deplibs_check_method=pass_all
16461  ;;
16462
16463sysv4 | sysv4.3*)
16464  case $host_vendor in
16465  motorola)
16466    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]'
16467    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
16468    ;;
16469  ncr)
16470    lt_cv_deplibs_check_method=pass_all
16471    ;;
16472  sequent)
16473    lt_cv_file_magic_cmd='/bin/file'
16474    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
16475    ;;
16476  sni)
16477    lt_cv_file_magic_cmd='/bin/file'
16478    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
16479    lt_cv_file_magic_test_file=/lib/libc.so
16480    ;;
16481  siemens)
16482    lt_cv_deplibs_check_method=pass_all
16483    ;;
16484  pc)
16485    lt_cv_deplibs_check_method=pass_all
16486    ;;
16487  esac
16488  ;;
16489
16490tpf*)
16491  lt_cv_deplibs_check_method=pass_all
16492  ;;
16493os2*)
16494  lt_cv_deplibs_check_method=pass_all
16495  ;;
16496esac
16497
16498fi
16499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
16500$as_echo "$lt_cv_deplibs_check_method" >&6; }
16501
16502file_magic_glob=
16503want_nocaseglob=no
16504if test "$build" = "$host"; then
16505  case $host_os in
16506  mingw* | pw32*)
16507    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
16508      want_nocaseglob=yes
16509    else
16510      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
16511    fi
16512    ;;
16513  esac
16514fi
16515
16516file_magic_cmd=$lt_cv_file_magic_cmd
16517deplibs_check_method=$lt_cv_deplibs_check_method
16518test -z "$deplibs_check_method" && deplibs_check_method=unknown
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541if test -n "$ac_tool_prefix"; then
16542  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
16543set dummy ${ac_tool_prefix}dlltool; ac_word=$2
16544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16545$as_echo_n "checking for $ac_word... " >&6; }
16546if ${ac_cv_prog_DLLTOOL+:} false; then :
16547  $as_echo_n "(cached) " >&6
16548else
16549  if test -n "$DLLTOOL"; then
16550  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
16551else
16552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16553for as_dir in $PATH
16554do
16555  IFS=$as_save_IFS
16556  test -z "$as_dir" && as_dir=.
16557    for ac_exec_ext in '' $ac_executable_extensions; do
16558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16559    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
16560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16561    break 2
16562  fi
16563done
16564  done
16565IFS=$as_save_IFS
16566
16567fi
16568fi
16569DLLTOOL=$ac_cv_prog_DLLTOOL
16570if test -n "$DLLTOOL"; then
16571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
16572$as_echo "$DLLTOOL" >&6; }
16573else
16574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16575$as_echo "no" >&6; }
16576fi
16577
16578
16579fi
16580if test -z "$ac_cv_prog_DLLTOOL"; then
16581  ac_ct_DLLTOOL=$DLLTOOL
16582  # Extract the first word of "dlltool", so it can be a program name with args.
16583set dummy dlltool; ac_word=$2
16584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16585$as_echo_n "checking for $ac_word... " >&6; }
16586if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
16587  $as_echo_n "(cached) " >&6
16588else
16589  if test -n "$ac_ct_DLLTOOL"; then
16590  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
16591else
16592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16593for as_dir in $PATH
16594do
16595  IFS=$as_save_IFS
16596  test -z "$as_dir" && as_dir=.
16597    for ac_exec_ext in '' $ac_executable_extensions; do
16598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16599    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
16600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16601    break 2
16602  fi
16603done
16604  done
16605IFS=$as_save_IFS
16606
16607fi
16608fi
16609ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
16610if test -n "$ac_ct_DLLTOOL"; then
16611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
16612$as_echo "$ac_ct_DLLTOOL" >&6; }
16613else
16614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16615$as_echo "no" >&6; }
16616fi
16617
16618  if test "x$ac_ct_DLLTOOL" = x; then
16619    DLLTOOL="false"
16620  else
16621    case $cross_compiling:$ac_tool_warned in
16622yes:)
16623{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16624$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16625ac_tool_warned=yes ;;
16626esac
16627    DLLTOOL=$ac_ct_DLLTOOL
16628  fi
16629else
16630  DLLTOOL="$ac_cv_prog_DLLTOOL"
16631fi
16632
16633test -z "$DLLTOOL" && DLLTOOL=dlltool
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
16645$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
16646if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
16647  $as_echo_n "(cached) " >&6
16648else
16649  lt_cv_sharedlib_from_linklib_cmd='unknown'
16650
16651case $host_os in
16652cygwin* | mingw* | pw32* | cegcc*)
16653  # two different shell functions defined in ltmain.sh;
16654  # decide which one to use based on capabilities of $DLLTOOL
16655  case `$DLLTOOL --help 2>&1` in
16656  *--identify-strict*)
16657    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
16658    ;;
16659  *)
16660    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
16661    ;;
16662  esac
16663  ;;
16664*)
16665  # fallback: assume linklib IS sharedlib
16666  lt_cv_sharedlib_from_linklib_cmd=$ECHO
16667  ;;
16668esac
16669
16670fi
16671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
16672$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
16673sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
16674test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
16675
16676
16677
16678
16679
16680
16681
16682if test -n "$ac_tool_prefix"; then
16683  for ac_prog in ar
16684  do
16685    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16686set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16688$as_echo_n "checking for $ac_word... " >&6; }
16689if ${ac_cv_prog_AR+:} false; then :
16690  $as_echo_n "(cached) " >&6
16691else
16692  if test -n "$AR"; then
16693  ac_cv_prog_AR="$AR" # Let the user override the test.
16694else
16695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16696for as_dir in $PATH
16697do
16698  IFS=$as_save_IFS
16699  test -z "$as_dir" && as_dir=.
16700    for ac_exec_ext in '' $ac_executable_extensions; do
16701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16702    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
16703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16704    break 2
16705  fi
16706done
16707  done
16708IFS=$as_save_IFS
16709
16710fi
16711fi
16712AR=$ac_cv_prog_AR
16713if test -n "$AR"; then
16714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
16715$as_echo "$AR" >&6; }
16716else
16717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16718$as_echo "no" >&6; }
16719fi
16720
16721
16722    test -n "$AR" && break
16723  done
16724fi
16725if test -z "$AR"; then
16726  ac_ct_AR=$AR
16727  for ac_prog in ar
16728do
16729  # Extract the first word of "$ac_prog", so it can be a program name with args.
16730set dummy $ac_prog; ac_word=$2
16731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16732$as_echo_n "checking for $ac_word... " >&6; }
16733if ${ac_cv_prog_ac_ct_AR+:} false; then :
16734  $as_echo_n "(cached) " >&6
16735else
16736  if test -n "$ac_ct_AR"; then
16737  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
16738else
16739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16740for as_dir in $PATH
16741do
16742  IFS=$as_save_IFS
16743  test -z "$as_dir" && as_dir=.
16744    for ac_exec_ext in '' $ac_executable_extensions; do
16745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16746    ac_cv_prog_ac_ct_AR="$ac_prog"
16747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16748    break 2
16749  fi
16750done
16751  done
16752IFS=$as_save_IFS
16753
16754fi
16755fi
16756ac_ct_AR=$ac_cv_prog_ac_ct_AR
16757if test -n "$ac_ct_AR"; then
16758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
16759$as_echo "$ac_ct_AR" >&6; }
16760else
16761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16762$as_echo "no" >&6; }
16763fi
16764
16765
16766  test -n "$ac_ct_AR" && break
16767done
16768
16769  if test "x$ac_ct_AR" = x; then
16770    AR="false"
16771  else
16772    case $cross_compiling:$ac_tool_warned in
16773yes:)
16774{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16775$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16776ac_tool_warned=yes ;;
16777esac
16778    AR=$ac_ct_AR
16779  fi
16780fi
16781
16782: ${AR=ar}
16783: ${AR_FLAGS=cru}
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
16796$as_echo_n "checking for archiver @FILE support... " >&6; }
16797if ${lt_cv_ar_at_file+:} false; then :
16798  $as_echo_n "(cached) " >&6
16799else
16800  lt_cv_ar_at_file=no
16801   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802/* end confdefs.h.  */
16803
16804int
16805main ()
16806{
16807
16808  ;
16809  return 0;
16810}
16811_ACEOF
16812if ac_fn_c_try_compile "$LINENO"; then :
16813  echo conftest.$ac_objext > conftest.lst
16814      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
16815      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16816  (eval $lt_ar_try) 2>&5
16817  ac_status=$?
16818  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16819  test $ac_status = 0; }
16820      if test 0 -eq "$ac_status"; then
16821	# Ensure the archiver fails upon bogus file names.
16822	rm -f conftest.$ac_objext libconftest.a
16823	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16824  (eval $lt_ar_try) 2>&5
16825  ac_status=$?
16826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16827  test $ac_status = 0; }
16828	if test 0 -ne "$ac_status"; then
16829          lt_cv_ar_at_file=@
16830        fi
16831      fi
16832      rm -f conftest.* libconftest.a
16833
16834fi
16835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16836
16837fi
16838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
16839$as_echo "$lt_cv_ar_at_file" >&6; }
16840
16841if test no = "$lt_cv_ar_at_file"; then
16842  archiver_list_spec=
16843else
16844  archiver_list_spec=$lt_cv_ar_at_file
16845fi
16846
16847
16848
16849
16850
16851
16852
16853if test -n "$ac_tool_prefix"; then
16854  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
16855set dummy ${ac_tool_prefix}strip; ac_word=$2
16856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16857$as_echo_n "checking for $ac_word... " >&6; }
16858if ${ac_cv_prog_STRIP+:} false; then :
16859  $as_echo_n "(cached) " >&6
16860else
16861  if test -n "$STRIP"; then
16862  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
16863else
16864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16865for as_dir in $PATH
16866do
16867  IFS=$as_save_IFS
16868  test -z "$as_dir" && as_dir=.
16869    for ac_exec_ext in '' $ac_executable_extensions; do
16870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16871    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
16872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16873    break 2
16874  fi
16875done
16876  done
16877IFS=$as_save_IFS
16878
16879fi
16880fi
16881STRIP=$ac_cv_prog_STRIP
16882if test -n "$STRIP"; then
16883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
16884$as_echo "$STRIP" >&6; }
16885else
16886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16887$as_echo "no" >&6; }
16888fi
16889
16890
16891fi
16892if test -z "$ac_cv_prog_STRIP"; then
16893  ac_ct_STRIP=$STRIP
16894  # Extract the first word of "strip", so it can be a program name with args.
16895set dummy strip; ac_word=$2
16896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16897$as_echo_n "checking for $ac_word... " >&6; }
16898if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
16899  $as_echo_n "(cached) " >&6
16900else
16901  if test -n "$ac_ct_STRIP"; then
16902  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
16903else
16904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16905for as_dir in $PATH
16906do
16907  IFS=$as_save_IFS
16908  test -z "$as_dir" && as_dir=.
16909    for ac_exec_ext in '' $ac_executable_extensions; do
16910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16911    ac_cv_prog_ac_ct_STRIP="strip"
16912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16913    break 2
16914  fi
16915done
16916  done
16917IFS=$as_save_IFS
16918
16919fi
16920fi
16921ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
16922if test -n "$ac_ct_STRIP"; then
16923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
16924$as_echo "$ac_ct_STRIP" >&6; }
16925else
16926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16927$as_echo "no" >&6; }
16928fi
16929
16930  if test "x$ac_ct_STRIP" = x; then
16931    STRIP=":"
16932  else
16933    case $cross_compiling:$ac_tool_warned in
16934yes:)
16935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16937ac_tool_warned=yes ;;
16938esac
16939    STRIP=$ac_ct_STRIP
16940  fi
16941else
16942  STRIP="$ac_cv_prog_STRIP"
16943fi
16944
16945test -z "$STRIP" && STRIP=:
16946
16947
16948
16949
16950
16951
16952if test -n "$ac_tool_prefix"; then
16953  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
16954set dummy ${ac_tool_prefix}ranlib; ac_word=$2
16955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16956$as_echo_n "checking for $ac_word... " >&6; }
16957if ${ac_cv_prog_RANLIB+:} false; then :
16958  $as_echo_n "(cached) " >&6
16959else
16960  if test -n "$RANLIB"; then
16961  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
16962else
16963as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16964for as_dir in $PATH
16965do
16966  IFS=$as_save_IFS
16967  test -z "$as_dir" && as_dir=.
16968    for ac_exec_ext in '' $ac_executable_extensions; do
16969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16970    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
16971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16972    break 2
16973  fi
16974done
16975  done
16976IFS=$as_save_IFS
16977
16978fi
16979fi
16980RANLIB=$ac_cv_prog_RANLIB
16981if test -n "$RANLIB"; then
16982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
16983$as_echo "$RANLIB" >&6; }
16984else
16985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16986$as_echo "no" >&6; }
16987fi
16988
16989
16990fi
16991if test -z "$ac_cv_prog_RANLIB"; then
16992  ac_ct_RANLIB=$RANLIB
16993  # Extract the first word of "ranlib", so it can be a program name with args.
16994set dummy ranlib; ac_word=$2
16995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16996$as_echo_n "checking for $ac_word... " >&6; }
16997if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
16998  $as_echo_n "(cached) " >&6
16999else
17000  if test -n "$ac_ct_RANLIB"; then
17001  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17002else
17003as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17004for as_dir in $PATH
17005do
17006  IFS=$as_save_IFS
17007  test -z "$as_dir" && as_dir=.
17008    for ac_exec_ext in '' $ac_executable_extensions; do
17009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17010    ac_cv_prog_ac_ct_RANLIB="ranlib"
17011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17012    break 2
17013  fi
17014done
17015  done
17016IFS=$as_save_IFS
17017
17018fi
17019fi
17020ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17021if test -n "$ac_ct_RANLIB"; then
17022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17023$as_echo "$ac_ct_RANLIB" >&6; }
17024else
17025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17026$as_echo "no" >&6; }
17027fi
17028
17029  if test "x$ac_ct_RANLIB" = x; then
17030    RANLIB=":"
17031  else
17032    case $cross_compiling:$ac_tool_warned in
17033yes:)
17034{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17035$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17036ac_tool_warned=yes ;;
17037esac
17038    RANLIB=$ac_ct_RANLIB
17039  fi
17040else
17041  RANLIB="$ac_cv_prog_RANLIB"
17042fi
17043
17044test -z "$RANLIB" && RANLIB=:
17045
17046
17047
17048
17049
17050
17051# Determine commands to create old-style static archives.
17052old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17053old_postinstall_cmds='chmod 644 $oldlib'
17054old_postuninstall_cmds=
17055
17056if test -n "$RANLIB"; then
17057  case $host_os in
17058  bitrig* | openbsd*)
17059    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
17060    ;;
17061  *)
17062    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
17063    ;;
17064  esac
17065  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
17066fi
17067
17068case $host_os in
17069  darwin*)
17070    lock_old_archive_extraction=yes ;;
17071  *)
17072    lock_old_archive_extraction=no ;;
17073esac
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113# If no C compiler was specified, use CC.
17114LTCC=${LTCC-"$CC"}
17115
17116# If no C compiler flags were specified, use CFLAGS.
17117LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17118
17119# Allow CC to be a program name with arguments.
17120compiler=$CC
17121
17122
17123# Check for command to grab the raw symbol name followed by C symbol from nm.
17124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
17125$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
17126if ${lt_cv_sys_global_symbol_pipe+:} false; then :
17127  $as_echo_n "(cached) " >&6
17128else
17129
17130# These are sane defaults that work on at least a few old systems.
17131# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
17132
17133# Character class describing NM global symbol codes.
17134symcode='[BCDEGRST]'
17135
17136# Regexp to match symbols that can be accessed directly from C.
17137sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
17138
17139# Define system-specific variables.
17140case $host_os in
17141aix*)
17142  symcode='[BCDT]'
17143  ;;
17144cygwin* | mingw* | pw32* | cegcc*)
17145  symcode='[ABCDGISTW]'
17146  ;;
17147hpux*)
17148  if test ia64 = "$host_cpu"; then
17149    symcode='[ABCDEGRST]'
17150  fi
17151  ;;
17152irix* | nonstopux*)
17153  symcode='[BCDEGRST]'
17154  ;;
17155osf*)
17156  symcode='[BCDEGQRST]'
17157  ;;
17158solaris*)
17159  symcode='[BDRT]'
17160  ;;
17161sco3.2v5*)
17162  symcode='[DT]'
17163  ;;
17164sysv4.2uw2*)
17165  symcode='[DT]'
17166  ;;
17167sysv5* | sco5v6* | unixware* | OpenUNIX*)
17168  symcode='[ABDT]'
17169  ;;
17170sysv4)
17171  symcode='[DFNSTU]'
17172  ;;
17173esac
17174
17175# If we're using GNU nm, then use its standard symbol codes.
17176case `$NM -V 2>&1` in
17177*GNU* | *'with BFD'*)
17178  symcode='[ABCDGIRSTW]' ;;
17179esac
17180
17181if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17182  # Gets list of data symbols to import.
17183  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
17184  # Adjust the below global symbol transforms to fixup imported variables.
17185  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
17186  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
17187  lt_c_name_lib_hook="\
17188  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
17189  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
17190else
17191  # Disable hooks by default.
17192  lt_cv_sys_global_symbol_to_import=
17193  lt_cdecl_hook=
17194  lt_c_name_hook=
17195  lt_c_name_lib_hook=
17196fi
17197
17198# Transform an extracted symbol line into a proper C declaration.
17199# Some systems (esp. on ia64) link data and code symbols differently,
17200# so use this general approach.
17201lt_cv_sys_global_symbol_to_cdecl="sed -n"\
17202$lt_cdecl_hook\
17203" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
17204" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
17205
17206# Transform an extracted symbol line into symbol name and symbol address
17207lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
17208$lt_c_name_hook\
17209" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17210" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
17211
17212# Transform an extracted symbol line into symbol name with lib prefix and
17213# symbol address.
17214lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
17215$lt_c_name_lib_hook\
17216" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17217" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
17218" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
17219
17220# Handle CRLF in mingw tool chain
17221opt_cr=
17222case $build_os in
17223mingw*)
17224  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
17225  ;;
17226esac
17227
17228# Try without a prefix underscore, then with it.
17229for ac_symprfx in "" "_"; do
17230
17231  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
17232  symxfrm="\\1 $ac_symprfx\\2 \\2"
17233
17234  # Write the raw and C identifiers.
17235  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17236    # Fake it for dumpbin and say T for any non-static function,
17237    # D for any global variable and I for any imported variable.
17238    # Also find C++ and __fastcall symbols from MSVC++,
17239    # which start with @ or ?.
17240    lt_cv_sys_global_symbol_pipe="$AWK '"\
17241"     {last_section=section; section=\$ 3};"\
17242"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
17243"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
17244"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
17245"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
17246"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
17247"     \$ 0!~/External *\|/{next};"\
17248"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
17249"     {if(hide[section]) next};"\
17250"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
17251"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
17252"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
17253"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
17254"     ' prfx=^$ac_symprfx"
17255  else
17256    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
17257  fi
17258  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
17259
17260  # Check to see that the pipe works correctly.
17261  pipe_works=no
17262
17263  rm -f conftest*
17264  cat > conftest.$ac_ext <<_LT_EOF
17265#ifdef __cplusplus
17266extern "C" {
17267#endif
17268char nm_test_var;
17269void nm_test_func(void);
17270void nm_test_func(void){}
17271#ifdef __cplusplus
17272}
17273#endif
17274int main(){nm_test_var='a';nm_test_func();return(0);}
17275_LT_EOF
17276
17277  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17278  (eval $ac_compile) 2>&5
17279  ac_status=$?
17280  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17281  test $ac_status = 0; }; then
17282    # Now try to grab the symbols.
17283    nlist=conftest.nm
17284    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
17285  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
17286  ac_status=$?
17287  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17288  test $ac_status = 0; } && test -s "$nlist"; then
17289      # Try sorting and uniquifying the output.
17290      if sort "$nlist" | uniq > "$nlist"T; then
17291	mv -f "$nlist"T "$nlist"
17292      else
17293	rm -f "$nlist"T
17294      fi
17295
17296      # Make sure that we snagged all the symbols we need.
17297      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
17298	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
17299	  cat <<_LT_EOF > conftest.$ac_ext
17300/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
17301#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
17302/* DATA imports from DLLs on WIN32 can't be const, because runtime
17303   relocations are performed -- see ld's documentation on pseudo-relocs.  */
17304# define LT_DLSYM_CONST
17305#elif defined __osf__
17306/* This system does not cope well with relocations in const data.  */
17307# define LT_DLSYM_CONST
17308#else
17309# define LT_DLSYM_CONST const
17310#endif
17311
17312#ifdef __cplusplus
17313extern "C" {
17314#endif
17315
17316_LT_EOF
17317	  # Now generate the symbol file.
17318	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
17319
17320	  cat <<_LT_EOF >> conftest.$ac_ext
17321
17322/* The mapping between symbol names and symbols.  */
17323LT_DLSYM_CONST struct {
17324  const char *name;
17325  void       *address;
17326}
17327lt__PROGRAM__LTX_preloaded_symbols[] =
17328{
17329  { "@PROGRAM@", (void *) 0 },
17330_LT_EOF
17331	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
17332	  cat <<\_LT_EOF >> conftest.$ac_ext
17333  {0, (void *) 0}
17334};
17335
17336/* This works around a problem in FreeBSD linker */
17337#ifdef FREEBSD_WORKAROUND
17338static const void *lt_preloaded_setup() {
17339  return lt__PROGRAM__LTX_preloaded_symbols;
17340}
17341#endif
17342
17343#ifdef __cplusplus
17344}
17345#endif
17346_LT_EOF
17347	  # Now try linking the two files.
17348	  mv conftest.$ac_objext conftstm.$ac_objext
17349	  lt_globsym_save_LIBS=$LIBS
17350	  lt_globsym_save_CFLAGS=$CFLAGS
17351	  LIBS=conftstm.$ac_objext
17352	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
17353	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17354  (eval $ac_link) 2>&5
17355  ac_status=$?
17356  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17357  test $ac_status = 0; } && test -s conftest$ac_exeext; then
17358	    pipe_works=yes
17359	  fi
17360	  LIBS=$lt_globsym_save_LIBS
17361	  CFLAGS=$lt_globsym_save_CFLAGS
17362	else
17363	  echo "cannot find nm_test_func in $nlist" >&5
17364	fi
17365      else
17366	echo "cannot find nm_test_var in $nlist" >&5
17367      fi
17368    else
17369      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
17370    fi
17371  else
17372    echo "$progname: failed program was:" >&5
17373    cat conftest.$ac_ext >&5
17374  fi
17375  rm -rf conftest* conftst*
17376
17377  # Do not use the global_symbol_pipe unless it works.
17378  if test yes = "$pipe_works"; then
17379    break
17380  else
17381    lt_cv_sys_global_symbol_pipe=
17382  fi
17383done
17384
17385fi
17386
17387if test -z "$lt_cv_sys_global_symbol_pipe"; then
17388  lt_cv_sys_global_symbol_to_cdecl=
17389fi
17390if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
17391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17392$as_echo "failed" >&6; }
17393else
17394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17395$as_echo "ok" >&6; }
17396fi
17397
17398# Response file support.
17399if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17400  nm_file_list_spec='@'
17401elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
17402  nm_file_list_spec='@'
17403fi
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17442$as_echo_n "checking for sysroot... " >&6; }
17443
17444# Check whether --with-sysroot was given.
17445if test "${with_sysroot+set}" = set; then :
17446  withval=$with_sysroot;
17447else
17448  with_sysroot=no
17449fi
17450
17451
17452lt_sysroot=
17453case $with_sysroot in #(
17454 yes)
17455   if test yes = "$GCC"; then
17456     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
17457   fi
17458   ;; #(
17459 /*)
17460   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
17461   ;; #(
17462 no|'')
17463   ;; #(
17464 *)
17465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
17466$as_echo "$with_sysroot" >&6; }
17467   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
17468   ;;
17469esac
17470
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
17472$as_echo "${lt_sysroot:-no}" >&6; }
17473
17474
17475
17476
17477
17478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
17479$as_echo_n "checking for a working dd... " >&6; }
17480if ${ac_cv_path_lt_DD+:} false; then :
17481  $as_echo_n "(cached) " >&6
17482else
17483  printf 0123456789abcdef0123456789abcdef >conftest.i
17484cat conftest.i conftest.i >conftest2.i
17485: ${lt_DD:=$DD}
17486if test -z "$lt_DD"; then
17487  ac_path_lt_DD_found=false
17488  # Loop through the user's path and test for each of PROGNAME-LIST
17489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17490for as_dir in $PATH
17491do
17492  IFS=$as_save_IFS
17493  test -z "$as_dir" && as_dir=.
17494    for ac_prog in dd; do
17495    for ac_exec_ext in '' $ac_executable_extensions; do
17496      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
17497      as_fn_executable_p "$ac_path_lt_DD" || continue
17498if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17499  cmp -s conftest.i conftest.out \
17500  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
17501fi
17502      $ac_path_lt_DD_found && break 3
17503    done
17504  done
17505  done
17506IFS=$as_save_IFS
17507  if test -z "$ac_cv_path_lt_DD"; then
17508    :
17509  fi
17510else
17511  ac_cv_path_lt_DD=$lt_DD
17512fi
17513
17514rm -f conftest.i conftest2.i conftest.out
17515fi
17516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
17517$as_echo "$ac_cv_path_lt_DD" >&6; }
17518
17519
17520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
17521$as_echo_n "checking how to truncate binary pipes... " >&6; }
17522if ${lt_cv_truncate_bin+:} false; then :
17523  $as_echo_n "(cached) " >&6
17524else
17525  printf 0123456789abcdef0123456789abcdef >conftest.i
17526cat conftest.i conftest.i >conftest2.i
17527lt_cv_truncate_bin=
17528if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17529  cmp -s conftest.i conftest.out \
17530  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
17531fi
17532rm -f conftest.i conftest2.i conftest.out
17533test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
17534fi
17535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
17536$as_echo "$lt_cv_truncate_bin" >&6; }
17537
17538
17539
17540
17541
17542
17543
17544# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
17545func_cc_basename ()
17546{
17547    for cc_temp in $*""; do
17548      case $cc_temp in
17549        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17550        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17551        \-*) ;;
17552        *) break;;
17553      esac
17554    done
17555    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
17556}
17557
17558# Check whether --enable-libtool-lock was given.
17559if test "${enable_libtool_lock+set}" = set; then :
17560  enableval=$enable_libtool_lock;
17561fi
17562
17563test no = "$enable_libtool_lock" || enable_libtool_lock=yes
17564
17565# Some flags need to be propagated to the compiler or linker for good
17566# libtool support.
17567case $host in
17568ia64-*-hpux*)
17569  # Find out what ABI is being produced by ac_compile, and set mode
17570  # options accordingly.
17571  echo 'int i;' > conftest.$ac_ext
17572  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17573  (eval $ac_compile) 2>&5
17574  ac_status=$?
17575  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17576  test $ac_status = 0; }; then
17577    case `/usr/bin/file conftest.$ac_objext` in
17578      *ELF-32*)
17579	HPUX_IA64_MODE=32
17580	;;
17581      *ELF-64*)
17582	HPUX_IA64_MODE=64
17583	;;
17584    esac
17585  fi
17586  rm -rf conftest*
17587  ;;
17588*-*-irix6*)
17589  # Find out what ABI is being produced by ac_compile, and set linker
17590  # options accordingly.
17591  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17592  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17593  (eval $ac_compile) 2>&5
17594  ac_status=$?
17595  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17596  test $ac_status = 0; }; then
17597    if test yes = "$lt_cv_prog_gnu_ld"; then
17598      case `/usr/bin/file conftest.$ac_objext` in
17599	*32-bit*)
17600	  LD="${LD-ld} -melf32bsmip"
17601	  ;;
17602	*N32*)
17603	  LD="${LD-ld} -melf32bmipn32"
17604	  ;;
17605	*64-bit*)
17606	  LD="${LD-ld} -melf64bmip"
17607	;;
17608      esac
17609    else
17610      case `/usr/bin/file conftest.$ac_objext` in
17611	*32-bit*)
17612	  LD="${LD-ld} -32"
17613	  ;;
17614	*N32*)
17615	  LD="${LD-ld} -n32"
17616	  ;;
17617	*64-bit*)
17618	  LD="${LD-ld} -64"
17619	  ;;
17620      esac
17621    fi
17622  fi
17623  rm -rf conftest*
17624  ;;
17625
17626mips64*-*linux*)
17627  # Find out what ABI is being produced by ac_compile, and set linker
17628  # options accordingly.
17629  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17630  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17631  (eval $ac_compile) 2>&5
17632  ac_status=$?
17633  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17634  test $ac_status = 0; }; then
17635    emul=elf
17636    case `/usr/bin/file conftest.$ac_objext` in
17637      *32-bit*)
17638	emul="${emul}32"
17639	;;
17640      *64-bit*)
17641	emul="${emul}64"
17642	;;
17643    esac
17644    case `/usr/bin/file conftest.$ac_objext` in
17645      *MSB*)
17646	emul="${emul}btsmip"
17647	;;
17648      *LSB*)
17649	emul="${emul}ltsmip"
17650	;;
17651    esac
17652    case `/usr/bin/file conftest.$ac_objext` in
17653      *N32*)
17654	emul="${emul}n32"
17655	;;
17656    esac
17657    LD="${LD-ld} -m $emul"
17658  fi
17659  rm -rf conftest*
17660  ;;
17661
17662x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
17663s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
17664  # Find out what ABI is being produced by ac_compile, and set linker
17665  # options accordingly.  Note that the listed cases only cover the
17666  # situations where additional linker options are needed (such as when
17667  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
17668  # vice versa); the common cases where no linker options are needed do
17669  # not appear in the list.
17670  echo 'int i;' > conftest.$ac_ext
17671  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17672  (eval $ac_compile) 2>&5
17673  ac_status=$?
17674  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17675  test $ac_status = 0; }; then
17676    case `/usr/bin/file conftest.o` in
17677      *32-bit*)
17678	case $host in
17679	  x86_64-*kfreebsd*-gnu)
17680	    LD="${LD-ld} -m elf_i386_fbsd"
17681	    ;;
17682	  x86_64-*linux*)
17683	    case `/usr/bin/file conftest.o` in
17684	      *x86-64*)
17685		LD="${LD-ld} -m elf32_x86_64"
17686		;;
17687	      *)
17688		LD="${LD-ld} -m elf_i386"
17689		;;
17690	    esac
17691	    ;;
17692	  powerpc64le-*linux*)
17693	    LD="${LD-ld} -m elf32lppclinux"
17694	    ;;
17695	  powerpc64-*linux*)
17696	    LD="${LD-ld} -m elf32ppclinux"
17697	    ;;
17698	  s390x-*linux*)
17699	    LD="${LD-ld} -m elf_s390"
17700	    ;;
17701	  sparc64-*linux*)
17702	    LD="${LD-ld} -m elf32_sparc"
17703	    ;;
17704	esac
17705	;;
17706      *64-bit*)
17707	case $host in
17708	  x86_64-*kfreebsd*-gnu)
17709	    LD="${LD-ld} -m elf_x86_64_fbsd"
17710	    ;;
17711	  x86_64-*linux*)
17712	    LD="${LD-ld} -m elf_x86_64"
17713	    ;;
17714	  powerpcle-*linux*)
17715	    LD="${LD-ld} -m elf64lppc"
17716	    ;;
17717	  powerpc-*linux*)
17718	    LD="${LD-ld} -m elf64ppc"
17719	    ;;
17720	  s390*-*linux*|s390*-*tpf*)
17721	    LD="${LD-ld} -m elf64_s390"
17722	    ;;
17723	  sparc*-*linux*)
17724	    LD="${LD-ld} -m elf64_sparc"
17725	    ;;
17726	esac
17727	;;
17728    esac
17729  fi
17730  rm -rf conftest*
17731  ;;
17732
17733*-*-sco3.2v5*)
17734  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
17735  SAVE_CFLAGS=$CFLAGS
17736  CFLAGS="$CFLAGS -belf"
17737  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
17738$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
17739if ${lt_cv_cc_needs_belf+:} false; then :
17740  $as_echo_n "(cached) " >&6
17741else
17742  ac_ext=c
17743ac_cpp='$CPP $CPPFLAGS'
17744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17746ac_compiler_gnu=$ac_cv_c_compiler_gnu
17747
17748     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17749/* end confdefs.h.  */
17750
17751int
17752main ()
17753{
17754
17755  ;
17756  return 0;
17757}
17758_ACEOF
17759if ac_fn_c_try_link "$LINENO"; then :
17760  lt_cv_cc_needs_belf=yes
17761else
17762  lt_cv_cc_needs_belf=no
17763fi
17764rm -f core conftest.err conftest.$ac_objext \
17765    conftest$ac_exeext conftest.$ac_ext
17766     ac_ext=c
17767ac_cpp='$CPP $CPPFLAGS'
17768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17770ac_compiler_gnu=$ac_cv_c_compiler_gnu
17771
17772fi
17773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
17774$as_echo "$lt_cv_cc_needs_belf" >&6; }
17775  if test yes != "$lt_cv_cc_needs_belf"; then
17776    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
17777    CFLAGS=$SAVE_CFLAGS
17778  fi
17779  ;;
17780*-*solaris*)
17781  # Find out what ABI is being produced by ac_compile, and set linker
17782  # options accordingly.
17783  echo 'int i;' > conftest.$ac_ext
17784  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17785  (eval $ac_compile) 2>&5
17786  ac_status=$?
17787  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17788  test $ac_status = 0; }; then
17789    case `/usr/bin/file conftest.o` in
17790    *64-bit*)
17791      case $lt_cv_prog_gnu_ld in
17792      yes*)
17793        case $host in
17794        i?86-*-solaris*|x86_64-*-solaris*)
17795          LD="${LD-ld} -m elf_x86_64"
17796          ;;
17797        sparc*-*-solaris*)
17798          LD="${LD-ld} -m elf64_sparc"
17799          ;;
17800        esac
17801        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
17802        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
17803          LD=${LD-ld}_sol2
17804        fi
17805        ;;
17806      *)
17807	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
17808	  LD="${LD-ld} -64"
17809	fi
17810	;;
17811      esac
17812      ;;
17813    esac
17814  fi
17815  rm -rf conftest*
17816  ;;
17817esac
17818
17819need_locks=$enable_libtool_lock
17820
17821if test -n "$ac_tool_prefix"; then
17822  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
17823set dummy ${ac_tool_prefix}mt; ac_word=$2
17824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17825$as_echo_n "checking for $ac_word... " >&6; }
17826if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
17827  $as_echo_n "(cached) " >&6
17828else
17829  if test -n "$MANIFEST_TOOL"; then
17830  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
17831else
17832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17833for as_dir in $PATH
17834do
17835  IFS=$as_save_IFS
17836  test -z "$as_dir" && as_dir=.
17837    for ac_exec_ext in '' $ac_executable_extensions; do
17838  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17839    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
17840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17841    break 2
17842  fi
17843done
17844  done
17845IFS=$as_save_IFS
17846
17847fi
17848fi
17849MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
17850if test -n "$MANIFEST_TOOL"; then
17851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
17852$as_echo "$MANIFEST_TOOL" >&6; }
17853else
17854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17855$as_echo "no" >&6; }
17856fi
17857
17858
17859fi
17860if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
17861  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
17862  # Extract the first word of "mt", so it can be a program name with args.
17863set dummy mt; ac_word=$2
17864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17865$as_echo_n "checking for $ac_word... " >&6; }
17866if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
17867  $as_echo_n "(cached) " >&6
17868else
17869  if test -n "$ac_ct_MANIFEST_TOOL"; then
17870  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
17871else
17872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17873for as_dir in $PATH
17874do
17875  IFS=$as_save_IFS
17876  test -z "$as_dir" && as_dir=.
17877    for ac_exec_ext in '' $ac_executable_extensions; do
17878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17879    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
17880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17881    break 2
17882  fi
17883done
17884  done
17885IFS=$as_save_IFS
17886
17887fi
17888fi
17889ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
17890if test -n "$ac_ct_MANIFEST_TOOL"; then
17891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
17892$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
17893else
17894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17895$as_echo "no" >&6; }
17896fi
17897
17898  if test "x$ac_ct_MANIFEST_TOOL" = x; then
17899    MANIFEST_TOOL=":"
17900  else
17901    case $cross_compiling:$ac_tool_warned in
17902yes:)
17903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17905ac_tool_warned=yes ;;
17906esac
17907    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
17908  fi
17909else
17910  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
17911fi
17912
17913test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
17914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
17915$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
17916if ${lt_cv_path_mainfest_tool+:} false; then :
17917  $as_echo_n "(cached) " >&6
17918else
17919  lt_cv_path_mainfest_tool=no
17920  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
17921  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
17922  cat conftest.err >&5
17923  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
17924    lt_cv_path_mainfest_tool=yes
17925  fi
17926  rm -f conftest*
17927fi
17928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
17929$as_echo "$lt_cv_path_mainfest_tool" >&6; }
17930if test yes != "$lt_cv_path_mainfest_tool"; then
17931  MANIFEST_TOOL=:
17932fi
17933
17934
17935
17936
17937
17938
17939  case $host_os in
17940    rhapsody* | darwin*)
17941    if test -n "$ac_tool_prefix"; then
17942  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
17943set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
17944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17945$as_echo_n "checking for $ac_word... " >&6; }
17946if ${ac_cv_prog_DSYMUTIL+:} false; then :
17947  $as_echo_n "(cached) " >&6
17948else
17949  if test -n "$DSYMUTIL"; then
17950  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
17951else
17952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17953for as_dir in $PATH
17954do
17955  IFS=$as_save_IFS
17956  test -z "$as_dir" && as_dir=.
17957    for ac_exec_ext in '' $ac_executable_extensions; do
17958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17959    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
17960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17961    break 2
17962  fi
17963done
17964  done
17965IFS=$as_save_IFS
17966
17967fi
17968fi
17969DSYMUTIL=$ac_cv_prog_DSYMUTIL
17970if test -n "$DSYMUTIL"; then
17971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
17972$as_echo "$DSYMUTIL" >&6; }
17973else
17974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17975$as_echo "no" >&6; }
17976fi
17977
17978
17979fi
17980if test -z "$ac_cv_prog_DSYMUTIL"; then
17981  ac_ct_DSYMUTIL=$DSYMUTIL
17982  # Extract the first word of "dsymutil", so it can be a program name with args.
17983set dummy dsymutil; ac_word=$2
17984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17985$as_echo_n "checking for $ac_word... " >&6; }
17986if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
17987  $as_echo_n "(cached) " >&6
17988else
17989  if test -n "$ac_ct_DSYMUTIL"; then
17990  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
17991else
17992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17993for as_dir in $PATH
17994do
17995  IFS=$as_save_IFS
17996  test -z "$as_dir" && as_dir=.
17997    for ac_exec_ext in '' $ac_executable_extensions; do
17998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17999    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
18000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18001    break 2
18002  fi
18003done
18004  done
18005IFS=$as_save_IFS
18006
18007fi
18008fi
18009ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18010if test -n "$ac_ct_DSYMUTIL"; then
18011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18012$as_echo "$ac_ct_DSYMUTIL" >&6; }
18013else
18014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18015$as_echo "no" >&6; }
18016fi
18017
18018  if test "x$ac_ct_DSYMUTIL" = x; then
18019    DSYMUTIL=":"
18020  else
18021    case $cross_compiling:$ac_tool_warned in
18022yes:)
18023{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18024$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18025ac_tool_warned=yes ;;
18026esac
18027    DSYMUTIL=$ac_ct_DSYMUTIL
18028  fi
18029else
18030  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18031fi
18032
18033    if test -n "$ac_tool_prefix"; then
18034  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18035set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18037$as_echo_n "checking for $ac_word... " >&6; }
18038if ${ac_cv_prog_NMEDIT+:} false; then :
18039  $as_echo_n "(cached) " >&6
18040else
18041  if test -n "$NMEDIT"; then
18042  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18043else
18044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18045for as_dir in $PATH
18046do
18047  IFS=$as_save_IFS
18048  test -z "$as_dir" && as_dir=.
18049    for ac_exec_ext in '' $ac_executable_extensions; do
18050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18051    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18053    break 2
18054  fi
18055done
18056  done
18057IFS=$as_save_IFS
18058
18059fi
18060fi
18061NMEDIT=$ac_cv_prog_NMEDIT
18062if test -n "$NMEDIT"; then
18063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18064$as_echo "$NMEDIT" >&6; }
18065else
18066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18067$as_echo "no" >&6; }
18068fi
18069
18070
18071fi
18072if test -z "$ac_cv_prog_NMEDIT"; then
18073  ac_ct_NMEDIT=$NMEDIT
18074  # Extract the first word of "nmedit", so it can be a program name with args.
18075set dummy nmedit; ac_word=$2
18076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18077$as_echo_n "checking for $ac_word... " >&6; }
18078if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18079  $as_echo_n "(cached) " >&6
18080else
18081  if test -n "$ac_ct_NMEDIT"; then
18082  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18083else
18084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18085for as_dir in $PATH
18086do
18087  IFS=$as_save_IFS
18088  test -z "$as_dir" && as_dir=.
18089    for ac_exec_ext in '' $ac_executable_extensions; do
18090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18091    ac_cv_prog_ac_ct_NMEDIT="nmedit"
18092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18093    break 2
18094  fi
18095done
18096  done
18097IFS=$as_save_IFS
18098
18099fi
18100fi
18101ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18102if test -n "$ac_ct_NMEDIT"; then
18103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18104$as_echo "$ac_ct_NMEDIT" >&6; }
18105else
18106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18107$as_echo "no" >&6; }
18108fi
18109
18110  if test "x$ac_ct_NMEDIT" = x; then
18111    NMEDIT=":"
18112  else
18113    case $cross_compiling:$ac_tool_warned in
18114yes:)
18115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18117ac_tool_warned=yes ;;
18118esac
18119    NMEDIT=$ac_ct_NMEDIT
18120  fi
18121else
18122  NMEDIT="$ac_cv_prog_NMEDIT"
18123fi
18124
18125    if test -n "$ac_tool_prefix"; then
18126  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18127set dummy ${ac_tool_prefix}lipo; ac_word=$2
18128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18129$as_echo_n "checking for $ac_word... " >&6; }
18130if ${ac_cv_prog_LIPO+:} false; then :
18131  $as_echo_n "(cached) " >&6
18132else
18133  if test -n "$LIPO"; then
18134  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18135else
18136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18137for as_dir in $PATH
18138do
18139  IFS=$as_save_IFS
18140  test -z "$as_dir" && as_dir=.
18141    for ac_exec_ext in '' $ac_executable_extensions; do
18142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18143    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18145    break 2
18146  fi
18147done
18148  done
18149IFS=$as_save_IFS
18150
18151fi
18152fi
18153LIPO=$ac_cv_prog_LIPO
18154if test -n "$LIPO"; then
18155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18156$as_echo "$LIPO" >&6; }
18157else
18158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18159$as_echo "no" >&6; }
18160fi
18161
18162
18163fi
18164if test -z "$ac_cv_prog_LIPO"; then
18165  ac_ct_LIPO=$LIPO
18166  # Extract the first word of "lipo", so it can be a program name with args.
18167set dummy lipo; ac_word=$2
18168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18169$as_echo_n "checking for $ac_word... " >&6; }
18170if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18171  $as_echo_n "(cached) " >&6
18172else
18173  if test -n "$ac_ct_LIPO"; then
18174  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18175else
18176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18177for as_dir in $PATH
18178do
18179  IFS=$as_save_IFS
18180  test -z "$as_dir" && as_dir=.
18181    for ac_exec_ext in '' $ac_executable_extensions; do
18182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18183    ac_cv_prog_ac_ct_LIPO="lipo"
18184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18185    break 2
18186  fi
18187done
18188  done
18189IFS=$as_save_IFS
18190
18191fi
18192fi
18193ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18194if test -n "$ac_ct_LIPO"; then
18195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18196$as_echo "$ac_ct_LIPO" >&6; }
18197else
18198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18199$as_echo "no" >&6; }
18200fi
18201
18202  if test "x$ac_ct_LIPO" = x; then
18203    LIPO=":"
18204  else
18205    case $cross_compiling:$ac_tool_warned in
18206yes:)
18207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18209ac_tool_warned=yes ;;
18210esac
18211    LIPO=$ac_ct_LIPO
18212  fi
18213else
18214  LIPO="$ac_cv_prog_LIPO"
18215fi
18216
18217    if test -n "$ac_tool_prefix"; then
18218  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18219set dummy ${ac_tool_prefix}otool; ac_word=$2
18220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18221$as_echo_n "checking for $ac_word... " >&6; }
18222if ${ac_cv_prog_OTOOL+:} false; then :
18223  $as_echo_n "(cached) " >&6
18224else
18225  if test -n "$OTOOL"; then
18226  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18227else
18228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18229for as_dir in $PATH
18230do
18231  IFS=$as_save_IFS
18232  test -z "$as_dir" && as_dir=.
18233    for ac_exec_ext in '' $ac_executable_extensions; do
18234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18235    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18237    break 2
18238  fi
18239done
18240  done
18241IFS=$as_save_IFS
18242
18243fi
18244fi
18245OTOOL=$ac_cv_prog_OTOOL
18246if test -n "$OTOOL"; then
18247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18248$as_echo "$OTOOL" >&6; }
18249else
18250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18251$as_echo "no" >&6; }
18252fi
18253
18254
18255fi
18256if test -z "$ac_cv_prog_OTOOL"; then
18257  ac_ct_OTOOL=$OTOOL
18258  # Extract the first word of "otool", so it can be a program name with args.
18259set dummy otool; ac_word=$2
18260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18261$as_echo_n "checking for $ac_word... " >&6; }
18262if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18263  $as_echo_n "(cached) " >&6
18264else
18265  if test -n "$ac_ct_OTOOL"; then
18266  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18267else
18268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18269for as_dir in $PATH
18270do
18271  IFS=$as_save_IFS
18272  test -z "$as_dir" && as_dir=.
18273    for ac_exec_ext in '' $ac_executable_extensions; do
18274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18275    ac_cv_prog_ac_ct_OTOOL="otool"
18276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18277    break 2
18278  fi
18279done
18280  done
18281IFS=$as_save_IFS
18282
18283fi
18284fi
18285ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
18286if test -n "$ac_ct_OTOOL"; then
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
18288$as_echo "$ac_ct_OTOOL" >&6; }
18289else
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18291$as_echo "no" >&6; }
18292fi
18293
18294  if test "x$ac_ct_OTOOL" = x; then
18295    OTOOL=":"
18296  else
18297    case $cross_compiling:$ac_tool_warned in
18298yes:)
18299{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18300$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18301ac_tool_warned=yes ;;
18302esac
18303    OTOOL=$ac_ct_OTOOL
18304  fi
18305else
18306  OTOOL="$ac_cv_prog_OTOOL"
18307fi
18308
18309    if test -n "$ac_tool_prefix"; then
18310  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
18311set dummy ${ac_tool_prefix}otool64; ac_word=$2
18312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18313$as_echo_n "checking for $ac_word... " >&6; }
18314if ${ac_cv_prog_OTOOL64+:} false; then :
18315  $as_echo_n "(cached) " >&6
18316else
18317  if test -n "$OTOOL64"; then
18318  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
18319else
18320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18321for as_dir in $PATH
18322do
18323  IFS=$as_save_IFS
18324  test -z "$as_dir" && as_dir=.
18325    for ac_exec_ext in '' $ac_executable_extensions; do
18326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18327    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
18328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18329    break 2
18330  fi
18331done
18332  done
18333IFS=$as_save_IFS
18334
18335fi
18336fi
18337OTOOL64=$ac_cv_prog_OTOOL64
18338if test -n "$OTOOL64"; then
18339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
18340$as_echo "$OTOOL64" >&6; }
18341else
18342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18343$as_echo "no" >&6; }
18344fi
18345
18346
18347fi
18348if test -z "$ac_cv_prog_OTOOL64"; then
18349  ac_ct_OTOOL64=$OTOOL64
18350  # Extract the first word of "otool64", so it can be a program name with args.
18351set dummy otool64; ac_word=$2
18352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18353$as_echo_n "checking for $ac_word... " >&6; }
18354if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
18355  $as_echo_n "(cached) " >&6
18356else
18357  if test -n "$ac_ct_OTOOL64"; then
18358  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
18359else
18360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18361for as_dir in $PATH
18362do
18363  IFS=$as_save_IFS
18364  test -z "$as_dir" && as_dir=.
18365    for ac_exec_ext in '' $ac_executable_extensions; do
18366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18367    ac_cv_prog_ac_ct_OTOOL64="otool64"
18368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18369    break 2
18370  fi
18371done
18372  done
18373IFS=$as_save_IFS
18374
18375fi
18376fi
18377ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
18378if test -n "$ac_ct_OTOOL64"; then
18379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
18380$as_echo "$ac_ct_OTOOL64" >&6; }
18381else
18382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18383$as_echo "no" >&6; }
18384fi
18385
18386  if test "x$ac_ct_OTOOL64" = x; then
18387    OTOOL64=":"
18388  else
18389    case $cross_compiling:$ac_tool_warned in
18390yes:)
18391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18393ac_tool_warned=yes ;;
18394esac
18395    OTOOL64=$ac_ct_OTOOL64
18396  fi
18397else
18398  OTOOL64="$ac_cv_prog_OTOOL64"
18399fi
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
18428$as_echo_n "checking for -single_module linker flag... " >&6; }
18429if ${lt_cv_apple_cc_single_mod+:} false; then :
18430  $as_echo_n "(cached) " >&6
18431else
18432  lt_cv_apple_cc_single_mod=no
18433      if test -z "$LT_MULTI_MODULE"; then
18434	# By default we will add the -single_module flag. You can override
18435	# by either setting the environment variable LT_MULTI_MODULE
18436	# non-empty at configure time, or by adding -multi_module to the
18437	# link flags.
18438	rm -rf libconftest.dylib*
18439	echo "int foo(void){return 1;}" > conftest.c
18440	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18441-dynamiclib -Wl,-single_module conftest.c" >&5
18442	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18443	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
18444        _lt_result=$?
18445	# If there is a non-empty error log, and "single_module"
18446	# appears in it, assume the flag caused a linker warning
18447        if test -s conftest.err && $GREP single_module conftest.err; then
18448	  cat conftest.err >&5
18449	# Otherwise, if the output was created with a 0 exit code from
18450	# the compiler, it worked.
18451	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
18452	  lt_cv_apple_cc_single_mod=yes
18453	else
18454	  cat conftest.err >&5
18455	fi
18456	rm -rf libconftest.dylib*
18457	rm -f conftest.*
18458      fi
18459fi
18460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
18461$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
18462
18463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
18464$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
18465if ${lt_cv_ld_exported_symbols_list+:} false; then :
18466  $as_echo_n "(cached) " >&6
18467else
18468  lt_cv_ld_exported_symbols_list=no
18469      save_LDFLAGS=$LDFLAGS
18470      echo "_main" > conftest.sym
18471      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
18472      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18473/* end confdefs.h.  */
18474
18475int
18476main ()
18477{
18478
18479  ;
18480  return 0;
18481}
18482_ACEOF
18483if ac_fn_c_try_link "$LINENO"; then :
18484  lt_cv_ld_exported_symbols_list=yes
18485else
18486  lt_cv_ld_exported_symbols_list=no
18487fi
18488rm -f core conftest.err conftest.$ac_objext \
18489    conftest$ac_exeext conftest.$ac_ext
18490	LDFLAGS=$save_LDFLAGS
18491
18492fi
18493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
18494$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
18495
18496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
18497$as_echo_n "checking for -force_load linker flag... " >&6; }
18498if ${lt_cv_ld_force_load+:} false; then :
18499  $as_echo_n "(cached) " >&6
18500else
18501  lt_cv_ld_force_load=no
18502      cat > conftest.c << _LT_EOF
18503int forced_loaded() { return 2;}
18504_LT_EOF
18505      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
18506      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
18507      echo "$AR cru libconftest.a conftest.o" >&5
18508      $AR cru libconftest.a conftest.o 2>&5
18509      echo "$RANLIB libconftest.a" >&5
18510      $RANLIB libconftest.a 2>&5
18511      cat > conftest.c << _LT_EOF
18512int main() { return 0;}
18513_LT_EOF
18514      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
18515      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
18516      _lt_result=$?
18517      if test -s conftest.err && $GREP force_load conftest.err; then
18518	cat conftest.err >&5
18519      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
18520	lt_cv_ld_force_load=yes
18521      else
18522	cat conftest.err >&5
18523      fi
18524        rm -f conftest.err libconftest.a conftest conftest.c
18525        rm -rf conftest.dSYM
18526
18527fi
18528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
18529$as_echo "$lt_cv_ld_force_load" >&6; }
18530    case $host_os in
18531    rhapsody* | darwin1.[012])
18532      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
18533    darwin1.*)
18534      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18535    darwin*) # darwin 5.x on
18536      # if running on 10.5 or later, the deployment target defaults
18537      # to the OS version, if on x86, and 10.4, the deployment
18538      # target defaults to 10.4. Don't you love it?
18539      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
18540	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
18541	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18542	10.[012][,.]*)
18543	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18544	10.*)
18545	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18546      esac
18547    ;;
18548  esac
18549    if test yes = "$lt_cv_apple_cc_single_mod"; then
18550      _lt_dar_single_mod='$single_module'
18551    fi
18552    if test yes = "$lt_cv_ld_exported_symbols_list"; then
18553      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
18554    else
18555      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
18556    fi
18557    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
18558      _lt_dsymutil='~$DSYMUTIL $lib || :'
18559    else
18560      _lt_dsymutil=
18561    fi
18562    ;;
18563  esac
18564
18565# func_munge_path_list VARIABLE PATH
18566# -----------------------------------
18567# VARIABLE is name of variable containing _space_ separated list of
18568# directories to be munged by the contents of PATH, which is string
18569# having a format:
18570# "DIR[:DIR]:"
18571#       string "DIR[ DIR]" will be prepended to VARIABLE
18572# ":DIR[:DIR]"
18573#       string "DIR[ DIR]" will be appended to VARIABLE
18574# "DIRP[:DIRP]::[DIRA:]DIRA"
18575#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
18576#       "DIRA[ DIRA]" will be appended to VARIABLE
18577# "DIR[:DIR]"
18578#       VARIABLE will be replaced by "DIR[ DIR]"
18579func_munge_path_list ()
18580{
18581    case x$2 in
18582    x)
18583        ;;
18584    *:)
18585        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
18586        ;;
18587    x:*)
18588        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
18589        ;;
18590    *::*)
18591        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
18592        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
18593        ;;
18594    *)
18595        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
18596        ;;
18597    esac
18598}
18599
18600for ac_header in dlfcn.h
18601do :
18602  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
18603"
18604if test "x$ac_cv_header_dlfcn_h" = xyes; then :
18605  cat >>confdefs.h <<_ACEOF
18606#define HAVE_DLFCN_H 1
18607_ACEOF
18608
18609fi
18610
18611done
18612
18613
18614
18615
18616
18617# Set options
18618
18619
18620
18621        enable_dlopen=no
18622
18623
18624  enable_win32_dll=no
18625
18626
18627
18628  # Check whether --enable-static was given.
18629if test "${enable_static+set}" = set; then :
18630  enableval=$enable_static; p=${PACKAGE-default}
18631    case $enableval in
18632    yes) enable_static=yes ;;
18633    no) enable_static=no ;;
18634    *)
18635     enable_static=no
18636      # Look at the argument we got.  We use all the common list separators.
18637      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18638      for pkg in $enableval; do
18639	IFS=$lt_save_ifs
18640	if test "X$pkg" = "X$p"; then
18641	  enable_static=yes
18642	fi
18643      done
18644      IFS=$lt_save_ifs
18645      ;;
18646    esac
18647else
18648  enable_static=yes
18649fi
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660# Check whether --with-pic was given.
18661if test "${with_pic+set}" = set; then :
18662  withval=$with_pic; lt_p=${PACKAGE-default}
18663    case $withval in
18664    yes|no) pic_mode=$withval ;;
18665    *)
18666      pic_mode=default
18667      # Look at the argument we got.  We use all the common list separators.
18668      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18669      for lt_pkg in $withval; do
18670	IFS=$lt_save_ifs
18671	if test "X$lt_pkg" = "X$lt_p"; then
18672	  pic_mode=yes
18673	fi
18674      done
18675      IFS=$lt_save_ifs
18676      ;;
18677    esac
18678else
18679  pic_mode=default
18680fi
18681
18682
18683
18684
18685
18686
18687
18688
18689  # Check whether --enable-fast-install was given.
18690if test "${enable_fast_install+set}" = set; then :
18691  enableval=$enable_fast_install; p=${PACKAGE-default}
18692    case $enableval in
18693    yes) enable_fast_install=yes ;;
18694    no) enable_fast_install=no ;;
18695    *)
18696      enable_fast_install=no
18697      # Look at the argument we got.  We use all the common list separators.
18698      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18699      for pkg in $enableval; do
18700	IFS=$lt_save_ifs
18701	if test "X$pkg" = "X$p"; then
18702	  enable_fast_install=yes
18703	fi
18704      done
18705      IFS=$lt_save_ifs
18706      ;;
18707    esac
18708else
18709  enable_fast_install=yes
18710fi
18711
18712
18713
18714
18715
18716
18717
18718
18719  shared_archive_member_spec=
18720case $host,$enable_shared in
18721power*-*-aix[5-9]*,yes)
18722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
18723$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
18724
18725# Check whether --with-aix-soname was given.
18726if test "${with_aix_soname+set}" = set; then :
18727  withval=$with_aix_soname; case $withval in
18728    aix|svr4|both)
18729      ;;
18730    *)
18731      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
18732      ;;
18733    esac
18734    lt_cv_with_aix_soname=$with_aix_soname
18735else
18736  if ${lt_cv_with_aix_soname+:} false; then :
18737  $as_echo_n "(cached) " >&6
18738else
18739  lt_cv_with_aix_soname=aix
18740fi
18741
18742    with_aix_soname=$lt_cv_with_aix_soname
18743fi
18744
18745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
18746$as_echo "$with_aix_soname" >&6; }
18747  if test aix != "$with_aix_soname"; then
18748    # For the AIX way of multilib, we name the shared archive member
18749    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
18750    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
18751    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
18752    # the AIX toolchain works better with OBJECT_MODE set (default 32).
18753    if test 64 = "${OBJECT_MODE-32}"; then
18754      shared_archive_member_spec=shr_64
18755    else
18756      shared_archive_member_spec=shr
18757    fi
18758  fi
18759  ;;
18760*)
18761  with_aix_soname=aix
18762  ;;
18763esac
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774# This can be used to rebuild libtool when needed
18775LIBTOOL_DEPS=$ltmain
18776
18777# Always use our own libtool.
18778LIBTOOL='$(SHELL) $(top_builddir)/libtool'
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809test -z "$LN_S" && LN_S="ln -s"
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824if test -n "${ZSH_VERSION+set}"; then
18825   setopt NO_GLOB_SUBST
18826fi
18827
18828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
18829$as_echo_n "checking for objdir... " >&6; }
18830if ${lt_cv_objdir+:} false; then :
18831  $as_echo_n "(cached) " >&6
18832else
18833  rm -f .libs 2>/dev/null
18834mkdir .libs 2>/dev/null
18835if test -d .libs; then
18836  lt_cv_objdir=.libs
18837else
18838  # MS-DOS does not allow filenames that begin with a dot.
18839  lt_cv_objdir=_libs
18840fi
18841rmdir .libs 2>/dev/null
18842fi
18843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
18844$as_echo "$lt_cv_objdir" >&6; }
18845objdir=$lt_cv_objdir
18846
18847
18848
18849
18850
18851cat >>confdefs.h <<_ACEOF
18852#define LT_OBJDIR "$lt_cv_objdir/"
18853_ACEOF
18854
18855
18856
18857
18858case $host_os in
18859aix3*)
18860  # AIX sometimes has problems with the GCC collect2 program.  For some
18861  # reason, if we set the COLLECT_NAMES environment variable, the problems
18862  # vanish in a puff of smoke.
18863  if test set != "${COLLECT_NAMES+set}"; then
18864    COLLECT_NAMES=
18865    export COLLECT_NAMES
18866  fi
18867  ;;
18868esac
18869
18870# Global variables:
18871ofile=libtool
18872can_build_shared=yes
18873
18874# All known linkers require a '.a' archive for static linking (except MSVC,
18875# which needs '.lib').
18876libext=a
18877
18878with_gnu_ld=$lt_cv_prog_gnu_ld
18879
18880old_CC=$CC
18881old_CFLAGS=$CFLAGS
18882
18883# Set sane defaults for various variables
18884test -z "$CC" && CC=cc
18885test -z "$LTCC" && LTCC=$CC
18886test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
18887test -z "$LD" && LD=ld
18888test -z "$ac_objext" && ac_objext=o
18889
18890func_cc_basename $compiler
18891cc_basename=$func_cc_basename_result
18892
18893
18894# Only perform the check for file, if the check method requires it
18895test -z "$MAGIC_CMD" && MAGIC_CMD=file
18896case $deplibs_check_method in
18897file_magic*)
18898  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
18899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
18900$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
18901if ${lt_cv_path_MAGIC_CMD+:} false; then :
18902  $as_echo_n "(cached) " >&6
18903else
18904  case $MAGIC_CMD in
18905[\\/*] |  ?:[\\/]*)
18906  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18907  ;;
18908*)
18909  lt_save_MAGIC_CMD=$MAGIC_CMD
18910  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18911  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18912  for ac_dir in $ac_dummy; do
18913    IFS=$lt_save_ifs
18914    test -z "$ac_dir" && ac_dir=.
18915    if test -f "$ac_dir/${ac_tool_prefix}file"; then
18916      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
18917      if test -n "$file_magic_test_file"; then
18918	case $deplibs_check_method in
18919	"file_magic "*)
18920	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18921	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18922	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18923	    $EGREP "$file_magic_regex" > /dev/null; then
18924	    :
18925	  else
18926	    cat <<_LT_EOF 1>&2
18927
18928*** Warning: the command libtool uses to detect shared libraries,
18929*** $file_magic_cmd, produces output that libtool cannot recognize.
18930*** The result is that libtool may fail to recognize shared libraries
18931*** as such.  This will affect the creation of libtool libraries that
18932*** depend on shared libraries, but programs linked with such libtool
18933*** libraries will work regardless of this problem.  Nevertheless, you
18934*** may want to report the problem to your system manager and/or to
18935*** bug-libtool@gnu.org
18936
18937_LT_EOF
18938	  fi ;;
18939	esac
18940      fi
18941      break
18942    fi
18943  done
18944  IFS=$lt_save_ifs
18945  MAGIC_CMD=$lt_save_MAGIC_CMD
18946  ;;
18947esac
18948fi
18949
18950MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18951if test -n "$MAGIC_CMD"; then
18952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
18953$as_echo "$MAGIC_CMD" >&6; }
18954else
18955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18956$as_echo "no" >&6; }
18957fi
18958
18959
18960
18961
18962
18963if test -z "$lt_cv_path_MAGIC_CMD"; then
18964  if test -n "$ac_tool_prefix"; then
18965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
18966$as_echo_n "checking for file... " >&6; }
18967if ${lt_cv_path_MAGIC_CMD+:} false; then :
18968  $as_echo_n "(cached) " >&6
18969else
18970  case $MAGIC_CMD in
18971[\\/*] |  ?:[\\/]*)
18972  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18973  ;;
18974*)
18975  lt_save_MAGIC_CMD=$MAGIC_CMD
18976  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18977  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18978  for ac_dir in $ac_dummy; do
18979    IFS=$lt_save_ifs
18980    test -z "$ac_dir" && ac_dir=.
18981    if test -f "$ac_dir/file"; then
18982      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
18983      if test -n "$file_magic_test_file"; then
18984	case $deplibs_check_method in
18985	"file_magic "*)
18986	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18987	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18988	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18989	    $EGREP "$file_magic_regex" > /dev/null; then
18990	    :
18991	  else
18992	    cat <<_LT_EOF 1>&2
18993
18994*** Warning: the command libtool uses to detect shared libraries,
18995*** $file_magic_cmd, produces output that libtool cannot recognize.
18996*** The result is that libtool may fail to recognize shared libraries
18997*** as such.  This will affect the creation of libtool libraries that
18998*** depend on shared libraries, but programs linked with such libtool
18999*** libraries will work regardless of this problem.  Nevertheless, you
19000*** may want to report the problem to your system manager and/or to
19001*** bug-libtool@gnu.org
19002
19003_LT_EOF
19004	  fi ;;
19005	esac
19006      fi
19007      break
19008    fi
19009  done
19010  IFS=$lt_save_ifs
19011  MAGIC_CMD=$lt_save_MAGIC_CMD
19012  ;;
19013esac
19014fi
19015
19016MAGIC_CMD=$lt_cv_path_MAGIC_CMD
19017if test -n "$MAGIC_CMD"; then
19018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19019$as_echo "$MAGIC_CMD" >&6; }
19020else
19021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19022$as_echo "no" >&6; }
19023fi
19024
19025
19026  else
19027    MAGIC_CMD=:
19028  fi
19029fi
19030
19031  fi
19032  ;;
19033esac
19034
19035# Use C for the default configuration in the libtool script
19036
19037lt_save_CC=$CC
19038ac_ext=c
19039ac_cpp='$CPP $CPPFLAGS'
19040ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19041ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19042ac_compiler_gnu=$ac_cv_c_compiler_gnu
19043
19044
19045# Source file extension for C test sources.
19046ac_ext=c
19047
19048# Object file extension for compiled C test sources.
19049objext=o
19050objext=$objext
19051
19052# Code to be used in simple compile tests
19053lt_simple_compile_test_code="int some_variable = 0;"
19054
19055# Code to be used in simple link tests
19056lt_simple_link_test_code='int main(){return(0);}'
19057
19058
19059
19060
19061
19062
19063
19064# If no C compiler was specified, use CC.
19065LTCC=${LTCC-"$CC"}
19066
19067# If no C compiler flags were specified, use CFLAGS.
19068LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19069
19070# Allow CC to be a program name with arguments.
19071compiler=$CC
19072
19073# Save the default compiler, since it gets overwritten when the other
19074# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19075compiler_DEFAULT=$CC
19076
19077# save warnings/boilerplate of simple test code
19078ac_outfile=conftest.$ac_objext
19079echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19080eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19081_lt_compiler_boilerplate=`cat conftest.err`
19082$RM conftest*
19083
19084ac_outfile=conftest.$ac_objext
19085echo "$lt_simple_link_test_code" >conftest.$ac_ext
19086eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19087_lt_linker_boilerplate=`cat conftest.err`
19088$RM -r conftest*
19089
19090
19091## CAVEAT EMPTOR:
19092## There is no encapsulation within the following macros, do not change
19093## the running order or otherwise move them around unless you know exactly
19094## what you are doing...
19095if test -n "$compiler"; then
19096
19097lt_prog_compiler_no_builtin_flag=
19098
19099if test yes = "$GCC"; then
19100  case $cc_basename in
19101  nvcc*)
19102    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19103  *)
19104    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19105  esac
19106
19107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19108$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19109if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19110  $as_echo_n "(cached) " >&6
19111else
19112  lt_cv_prog_compiler_rtti_exceptions=no
19113   ac_outfile=conftest.$ac_objext
19114   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19115   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
19116   # Insert the option either (1) after the last *FLAGS variable, or
19117   # (2) before a word containing "conftest.", or (3) at the end.
19118   # Note that $ac_compile itself does not contain backslashes and begins
19119   # with a dollar sign (not a hyphen), so the echo should work correctly.
19120   # The option is referenced via a variable to avoid confusing sed.
19121   lt_compile=`echo "$ac_compile" | $SED \
19122   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19123   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19124   -e 's:$: $lt_compiler_flag:'`
19125   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19126   (eval "$lt_compile" 2>conftest.err)
19127   ac_status=$?
19128   cat conftest.err >&5
19129   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19130   if (exit $ac_status) && test -s "$ac_outfile"; then
19131     # The compiler can only warn and ignore the option if not recognized
19132     # So say no if there are warnings other than the usual output.
19133     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19134     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19135     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19136       lt_cv_prog_compiler_rtti_exceptions=yes
19137     fi
19138   fi
19139   $RM conftest*
19140
19141fi
19142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19143$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19144
19145if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
19146    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19147else
19148    :
19149fi
19150
19151fi
19152
19153
19154
19155
19156
19157
19158  lt_prog_compiler_wl=
19159lt_prog_compiler_pic=
19160lt_prog_compiler_static=
19161
19162
19163  if test yes = "$GCC"; then
19164    lt_prog_compiler_wl='-Wl,'
19165    lt_prog_compiler_static='-static'
19166
19167    case $host_os in
19168      aix*)
19169      # All AIX code is PIC.
19170      if test ia64 = "$host_cpu"; then
19171	# AIX 5 now supports IA64 processor
19172	lt_prog_compiler_static='-Bstatic'
19173      fi
19174      lt_prog_compiler_pic='-fPIC'
19175      ;;
19176
19177    amigaos*)
19178      case $host_cpu in
19179      powerpc)
19180            # see comment about AmigaOS4 .so support
19181            lt_prog_compiler_pic='-fPIC'
19182        ;;
19183      m68k)
19184            # FIXME: we need at least 68020 code to build shared libraries, but
19185            # adding the '-m68020' flag to GCC prevents building anything better,
19186            # like '-m68040'.
19187            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19188        ;;
19189      esac
19190      ;;
19191
19192    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19193      # PIC is the default for these OSes.
19194      ;;
19195
19196    mingw* | cygwin* | pw32* | os2* | cegcc*)
19197      # This hack is so that the source file can tell whether it is being
19198      # built for inclusion in a dll (and should export symbols for example).
19199      # Although the cygwin gcc ignores -fPIC, still need this for old-style
19200      # (--disable-auto-import) libraries
19201      lt_prog_compiler_pic='-DDLL_EXPORT'
19202      case $host_os in
19203      os2*)
19204	lt_prog_compiler_static='$wl-static'
19205	;;
19206      esac
19207      ;;
19208
19209    darwin* | rhapsody*)
19210      # PIC is the default on this platform
19211      # Common symbols not allowed in MH_DYLIB files
19212      lt_prog_compiler_pic='-fno-common'
19213      ;;
19214
19215    haiku*)
19216      # PIC is the default for Haiku.
19217      # The "-static" flag exists, but is broken.
19218      lt_prog_compiler_static=
19219      ;;
19220
19221    hpux*)
19222      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19223      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19224      # sets the default TLS model and affects inlining.
19225      case $host_cpu in
19226      hppa*64*)
19227	# +Z the default
19228	;;
19229      *)
19230	lt_prog_compiler_pic='-fPIC'
19231	;;
19232      esac
19233      ;;
19234
19235    interix[3-9]*)
19236      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19237      # Instead, we relocate shared libraries at runtime.
19238      ;;
19239
19240    msdosdjgpp*)
19241      # Just because we use GCC doesn't mean we suddenly get shared libraries
19242      # on systems that don't support them.
19243      lt_prog_compiler_can_build_shared=no
19244      enable_shared=no
19245      ;;
19246
19247    *nto* | *qnx*)
19248      # QNX uses GNU C++, but need to define -shared option too, otherwise
19249      # it will coredump.
19250      lt_prog_compiler_pic='-fPIC -shared'
19251      ;;
19252
19253    sysv4*MP*)
19254      if test -d /usr/nec; then
19255	lt_prog_compiler_pic=-Kconform_pic
19256      fi
19257      ;;
19258
19259    *)
19260      lt_prog_compiler_pic='-fPIC'
19261      ;;
19262    esac
19263
19264    case $cc_basename in
19265    nvcc*) # Cuda Compiler Driver 2.2
19266      lt_prog_compiler_wl='-Xlinker '
19267      if test -n "$lt_prog_compiler_pic"; then
19268        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
19269      fi
19270      ;;
19271    esac
19272  else
19273    # PORTME Check for flag to pass linker flags through the system compiler.
19274    case $host_os in
19275    aix*)
19276      lt_prog_compiler_wl='-Wl,'
19277      if test ia64 = "$host_cpu"; then
19278	# AIX 5 now supports IA64 processor
19279	lt_prog_compiler_static='-Bstatic'
19280      else
19281	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19282      fi
19283      ;;
19284
19285    darwin* | rhapsody*)
19286      # PIC is the default on this platform
19287      # Common symbols not allowed in MH_DYLIB files
19288      lt_prog_compiler_pic='-fno-common'
19289      case $cc_basename in
19290      nagfor*)
19291        # NAG Fortran compiler
19292        lt_prog_compiler_wl='-Wl,-Wl,,'
19293        lt_prog_compiler_pic='-PIC'
19294        lt_prog_compiler_static='-Bstatic'
19295        ;;
19296      esac
19297      ;;
19298
19299    mingw* | cygwin* | pw32* | os2* | cegcc*)
19300      # This hack is so that the source file can tell whether it is being
19301      # built for inclusion in a dll (and should export symbols for example).
19302      lt_prog_compiler_pic='-DDLL_EXPORT'
19303      case $host_os in
19304      os2*)
19305	lt_prog_compiler_static='$wl-static'
19306	;;
19307      esac
19308      ;;
19309
19310    hpux9* | hpux10* | hpux11*)
19311      lt_prog_compiler_wl='-Wl,'
19312      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19313      # not for PA HP-UX.
19314      case $host_cpu in
19315      hppa*64*|ia64*)
19316	# +Z the default
19317	;;
19318      *)
19319	lt_prog_compiler_pic='+Z'
19320	;;
19321      esac
19322      # Is there a better lt_prog_compiler_static that works with the bundled CC?
19323      lt_prog_compiler_static='$wl-a ${wl}archive'
19324      ;;
19325
19326    irix5* | irix6* | nonstopux*)
19327      lt_prog_compiler_wl='-Wl,'
19328      # PIC (with -KPIC) is the default.
19329      lt_prog_compiler_static='-non_shared'
19330      ;;
19331
19332    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
19333      case $cc_basename in
19334      # old Intel for x86_64, which still supported -KPIC.
19335      ecc*)
19336	lt_prog_compiler_wl='-Wl,'
19337	lt_prog_compiler_pic='-KPIC'
19338	lt_prog_compiler_static='-static'
19339        ;;
19340      # icc used to be incompatible with GCC.
19341      # ICC 10 doesn't accept -KPIC any more.
19342      icc* | ifort*)
19343	lt_prog_compiler_wl='-Wl,'
19344	lt_prog_compiler_pic='-fPIC'
19345	lt_prog_compiler_static='-static'
19346        ;;
19347      # Lahey Fortran 8.1.
19348      lf95*)
19349	lt_prog_compiler_wl='-Wl,'
19350	lt_prog_compiler_pic='--shared'
19351	lt_prog_compiler_static='--static'
19352	;;
19353      nagfor*)
19354	# NAG Fortran compiler
19355	lt_prog_compiler_wl='-Wl,-Wl,,'
19356	lt_prog_compiler_pic='-PIC'
19357	lt_prog_compiler_static='-Bstatic'
19358	;;
19359      tcc*)
19360	# Fabrice Bellard et al's Tiny C Compiler
19361	lt_prog_compiler_wl='-Wl,'
19362	lt_prog_compiler_pic='-fPIC'
19363	lt_prog_compiler_static='-static'
19364	;;
19365      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19366        # Portland Group compilers (*not* the Pentium gcc compiler,
19367	# which looks to be a dead project)
19368	lt_prog_compiler_wl='-Wl,'
19369	lt_prog_compiler_pic='-fpic'
19370	lt_prog_compiler_static='-Bstatic'
19371        ;;
19372      ccc*)
19373        lt_prog_compiler_wl='-Wl,'
19374        # All Alpha code is PIC.
19375        lt_prog_compiler_static='-non_shared'
19376        ;;
19377      xl* | bgxl* | bgf* | mpixl*)
19378	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19379	lt_prog_compiler_wl='-Wl,'
19380	lt_prog_compiler_pic='-qpic'
19381	lt_prog_compiler_static='-qstaticlink'
19382	;;
19383      *)
19384	case `$CC -V 2>&1 | sed 5q` in
19385	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
19386	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
19387	  lt_prog_compiler_pic='-KPIC'
19388	  lt_prog_compiler_static='-Bstatic'
19389	  lt_prog_compiler_wl=''
19390	  ;;
19391	*Sun\ F* | *Sun*Fortran*)
19392	  lt_prog_compiler_pic='-KPIC'
19393	  lt_prog_compiler_static='-Bstatic'
19394	  lt_prog_compiler_wl='-Qoption ld '
19395	  ;;
19396	*Sun\ C*)
19397	  # Sun C 5.9
19398	  lt_prog_compiler_pic='-KPIC'
19399	  lt_prog_compiler_static='-Bstatic'
19400	  lt_prog_compiler_wl='-Wl,'
19401	  ;;
19402        *Intel*\ [CF]*Compiler*)
19403	  lt_prog_compiler_wl='-Wl,'
19404	  lt_prog_compiler_pic='-fPIC'
19405	  lt_prog_compiler_static='-static'
19406	  ;;
19407	*Portland\ Group*)
19408	  lt_prog_compiler_wl='-Wl,'
19409	  lt_prog_compiler_pic='-fpic'
19410	  lt_prog_compiler_static='-Bstatic'
19411	  ;;
19412	esac
19413	;;
19414      esac
19415      ;;
19416
19417    newsos6)
19418      lt_prog_compiler_pic='-KPIC'
19419      lt_prog_compiler_static='-Bstatic'
19420      ;;
19421
19422    *nto* | *qnx*)
19423      # QNX uses GNU C++, but need to define -shared option too, otherwise
19424      # it will coredump.
19425      lt_prog_compiler_pic='-fPIC -shared'
19426      ;;
19427
19428    osf3* | osf4* | osf5*)
19429      lt_prog_compiler_wl='-Wl,'
19430      # All OSF/1 code is PIC.
19431      lt_prog_compiler_static='-non_shared'
19432      ;;
19433
19434    rdos*)
19435      lt_prog_compiler_static='-non_shared'
19436      ;;
19437
19438    solaris*)
19439      lt_prog_compiler_pic='-KPIC'
19440      lt_prog_compiler_static='-Bstatic'
19441      case $cc_basename in
19442      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
19443	lt_prog_compiler_wl='-Qoption ld ';;
19444      *)
19445	lt_prog_compiler_wl='-Wl,';;
19446      esac
19447      ;;
19448
19449    sunos4*)
19450      lt_prog_compiler_wl='-Qoption ld '
19451      lt_prog_compiler_pic='-PIC'
19452      lt_prog_compiler_static='-Bstatic'
19453      ;;
19454
19455    sysv4 | sysv4.2uw2* | sysv4.3*)
19456      lt_prog_compiler_wl='-Wl,'
19457      lt_prog_compiler_pic='-KPIC'
19458      lt_prog_compiler_static='-Bstatic'
19459      ;;
19460
19461    sysv4*MP*)
19462      if test -d /usr/nec; then
19463	lt_prog_compiler_pic='-Kconform_pic'
19464	lt_prog_compiler_static='-Bstatic'
19465      fi
19466      ;;
19467
19468    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19469      lt_prog_compiler_wl='-Wl,'
19470      lt_prog_compiler_pic='-KPIC'
19471      lt_prog_compiler_static='-Bstatic'
19472      ;;
19473
19474    unicos*)
19475      lt_prog_compiler_wl='-Wl,'
19476      lt_prog_compiler_can_build_shared=no
19477      ;;
19478
19479    uts4*)
19480      lt_prog_compiler_pic='-pic'
19481      lt_prog_compiler_static='-Bstatic'
19482      ;;
19483
19484    *)
19485      lt_prog_compiler_can_build_shared=no
19486      ;;
19487    esac
19488  fi
19489
19490case $host_os in
19491  # For platforms that do not support PIC, -DPIC is meaningless:
19492  *djgpp*)
19493    lt_prog_compiler_pic=
19494    ;;
19495  *)
19496    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
19497    ;;
19498esac
19499
19500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19501$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
19502if ${lt_cv_prog_compiler_pic+:} false; then :
19503  $as_echo_n "(cached) " >&6
19504else
19505  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
19506fi
19507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
19508$as_echo "$lt_cv_prog_compiler_pic" >&6; }
19509lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
19510
19511#
19512# Check to make sure the PIC flag actually works.
19513#
19514if test -n "$lt_prog_compiler_pic"; then
19515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
19516$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
19517if ${lt_cv_prog_compiler_pic_works+:} false; then :
19518  $as_echo_n "(cached) " >&6
19519else
19520  lt_cv_prog_compiler_pic_works=no
19521   ac_outfile=conftest.$ac_objext
19522   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19523   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
19524   # Insert the option either (1) after the last *FLAGS variable, or
19525   # (2) before a word containing "conftest.", or (3) at the end.
19526   # Note that $ac_compile itself does not contain backslashes and begins
19527   # with a dollar sign (not a hyphen), so the echo should work correctly.
19528   # The option is referenced via a variable to avoid confusing sed.
19529   lt_compile=`echo "$ac_compile" | $SED \
19530   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19531   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19532   -e 's:$: $lt_compiler_flag:'`
19533   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19534   (eval "$lt_compile" 2>conftest.err)
19535   ac_status=$?
19536   cat conftest.err >&5
19537   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19538   if (exit $ac_status) && test -s "$ac_outfile"; then
19539     # The compiler can only warn and ignore the option if not recognized
19540     # So say no if there are warnings other than the usual output.
19541     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19542     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19543     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19544       lt_cv_prog_compiler_pic_works=yes
19545     fi
19546   fi
19547   $RM conftest*
19548
19549fi
19550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
19551$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
19552
19553if test yes = "$lt_cv_prog_compiler_pic_works"; then
19554    case $lt_prog_compiler_pic in
19555     "" | " "*) ;;
19556     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
19557     esac
19558else
19559    lt_prog_compiler_pic=
19560     lt_prog_compiler_can_build_shared=no
19561fi
19562
19563fi
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575#
19576# Check to make sure the static flag actually works.
19577#
19578wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
19579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19580$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19581if ${lt_cv_prog_compiler_static_works+:} false; then :
19582  $as_echo_n "(cached) " >&6
19583else
19584  lt_cv_prog_compiler_static_works=no
19585   save_LDFLAGS=$LDFLAGS
19586   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19587   echo "$lt_simple_link_test_code" > conftest.$ac_ext
19588   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19589     # The linker can only warn and ignore the option if not recognized
19590     # So say no if there are warnings
19591     if test -s conftest.err; then
19592       # Append any errors to the config.log.
19593       cat conftest.err 1>&5
19594       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
19595       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19596       if diff conftest.exp conftest.er2 >/dev/null; then
19597         lt_cv_prog_compiler_static_works=yes
19598       fi
19599     else
19600       lt_cv_prog_compiler_static_works=yes
19601     fi
19602   fi
19603   $RM -r conftest*
19604   LDFLAGS=$save_LDFLAGS
19605
19606fi
19607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
19608$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
19609
19610if test yes = "$lt_cv_prog_compiler_static_works"; then
19611    :
19612else
19613    lt_prog_compiler_static=
19614fi
19615
19616
19617
19618
19619
19620
19621
19622  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19623$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19624if ${lt_cv_prog_compiler_c_o+:} false; then :
19625  $as_echo_n "(cached) " >&6
19626else
19627  lt_cv_prog_compiler_c_o=no
19628   $RM -r conftest 2>/dev/null
19629   mkdir conftest
19630   cd conftest
19631   mkdir out
19632   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19633
19634   lt_compiler_flag="-o out/conftest2.$ac_objext"
19635   # Insert the option either (1) after the last *FLAGS variable, or
19636   # (2) before a word containing "conftest.", or (3) at the end.
19637   # Note that $ac_compile itself does not contain backslashes and begins
19638   # with a dollar sign (not a hyphen), so the echo should work correctly.
19639   lt_compile=`echo "$ac_compile" | $SED \
19640   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19641   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19642   -e 's:$: $lt_compiler_flag:'`
19643   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19644   (eval "$lt_compile" 2>out/conftest.err)
19645   ac_status=$?
19646   cat out/conftest.err >&5
19647   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19648   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19649   then
19650     # The compiler can only warn and ignore the option if not recognized
19651     # So say no if there are warnings
19652     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19653     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19654     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19655       lt_cv_prog_compiler_c_o=yes
19656     fi
19657   fi
19658   chmod u+w . 2>&5
19659   $RM conftest*
19660   # SGI C++ compiler will create directory out/ii_files/ for
19661   # template instantiation
19662   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19663   $RM out/* && rmdir out
19664   cd ..
19665   $RM -r conftest
19666   $RM conftest*
19667
19668fi
19669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19670$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19671
19672
19673
19674
19675
19676
19677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19678$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19679if ${lt_cv_prog_compiler_c_o+:} false; then :
19680  $as_echo_n "(cached) " >&6
19681else
19682  lt_cv_prog_compiler_c_o=no
19683   $RM -r conftest 2>/dev/null
19684   mkdir conftest
19685   cd conftest
19686   mkdir out
19687   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19688
19689   lt_compiler_flag="-o out/conftest2.$ac_objext"
19690   # Insert the option either (1) after the last *FLAGS variable, or
19691   # (2) before a word containing "conftest.", or (3) at the end.
19692   # Note that $ac_compile itself does not contain backslashes and begins
19693   # with a dollar sign (not a hyphen), so the echo should work correctly.
19694   lt_compile=`echo "$ac_compile" | $SED \
19695   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19696   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19697   -e 's:$: $lt_compiler_flag:'`
19698   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19699   (eval "$lt_compile" 2>out/conftest.err)
19700   ac_status=$?
19701   cat out/conftest.err >&5
19702   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19703   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19704   then
19705     # The compiler can only warn and ignore the option if not recognized
19706     # So say no if there are warnings
19707     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19708     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19709     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19710       lt_cv_prog_compiler_c_o=yes
19711     fi
19712   fi
19713   chmod u+w . 2>&5
19714   $RM conftest*
19715   # SGI C++ compiler will create directory out/ii_files/ for
19716   # template instantiation
19717   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19718   $RM out/* && rmdir out
19719   cd ..
19720   $RM -r conftest
19721   $RM conftest*
19722
19723fi
19724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19725$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19726
19727
19728
19729
19730hard_links=nottested
19731if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
19732  # do not overwrite the value of need_locks provided by the user
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19734$as_echo_n "checking if we can lock with hard links... " >&6; }
19735  hard_links=yes
19736  $RM conftest*
19737  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19738  touch conftest.a
19739  ln conftest.a conftest.b 2>&5 || hard_links=no
19740  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19742$as_echo "$hard_links" >&6; }
19743  if test no = "$hard_links"; then
19744    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
19745$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
19746    need_locks=warn
19747  fi
19748else
19749  need_locks=no
19750fi
19751
19752
19753
19754
19755
19756
19757  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19758$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
19759
19760  runpath_var=
19761  allow_undefined_flag=
19762  always_export_symbols=no
19763  archive_cmds=
19764  archive_expsym_cmds=
19765  compiler_needs_object=no
19766  enable_shared_with_static_runtimes=no
19767  export_dynamic_flag_spec=
19768  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19769  hardcode_automatic=no
19770  hardcode_direct=no
19771  hardcode_direct_absolute=no
19772  hardcode_libdir_flag_spec=
19773  hardcode_libdir_separator=
19774  hardcode_minus_L=no
19775  hardcode_shlibpath_var=unsupported
19776  inherit_rpath=no
19777  link_all_deplibs=unknown
19778  module_cmds=
19779  module_expsym_cmds=
19780  old_archive_from_new_cmds=
19781  old_archive_from_expsyms_cmds=
19782  thread_safe_flag_spec=
19783  whole_archive_flag_spec=
19784  # include_expsyms should be a list of space-separated symbols to be *always*
19785  # included in the symbol list
19786  include_expsyms=
19787  # exclude_expsyms can be an extended regexp of symbols to exclude
19788  # it will be wrapped by ' (' and ')$', so one must not match beginning or
19789  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
19790  # as well as any symbol that contains 'd'.
19791  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19792  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
19793  # platforms (ab)use it in PIC code, but their linkers get confused if
19794  # the symbol is explicitly referenced.  Since portable code cannot
19795  # rely on this symbol name, it's probably fine to never include it in
19796  # preloaded symbol tables.
19797  # Exclude shared library initialization/finalization symbols.
19798  extract_expsyms_cmds=
19799
19800  case $host_os in
19801  cygwin* | mingw* | pw32* | cegcc*)
19802    # FIXME: the MSVC++ port hasn't been tested in a loooong time
19803    # When not using gcc, we currently assume that we are using
19804    # Microsoft Visual C++.
19805    if test yes != "$GCC"; then
19806      with_gnu_ld=no
19807    fi
19808    ;;
19809  interix*)
19810    # we just hope/assume this is gcc and not c89 (= MSVC++)
19811    with_gnu_ld=yes
19812    ;;
19813  openbsd* | bitrig*)
19814    with_gnu_ld=no
19815    ;;
19816  esac
19817
19818  ld_shlibs=yes
19819
19820  # On some targets, GNU ld is compatible enough with the native linker
19821  # that we're better off using the native interface for both.
19822  lt_use_gnu_ld_interface=no
19823  if test yes = "$with_gnu_ld"; then
19824    case $host_os in
19825      aix*)
19826	# The AIX port of GNU ld has always aspired to compatibility
19827	# with the native linker.  However, as the warning in the GNU ld
19828	# block says, versions before 2.19.5* couldn't really create working
19829	# shared libraries, regardless of the interface used.
19830	case `$LD -v 2>&1` in
19831	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
19832	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
19833	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
19834	  *)
19835	    lt_use_gnu_ld_interface=yes
19836	    ;;
19837	esac
19838	;;
19839      *)
19840	lt_use_gnu_ld_interface=yes
19841	;;
19842    esac
19843  fi
19844
19845  if test yes = "$lt_use_gnu_ld_interface"; then
19846    # If archive_cmds runs LD, not CC, wlarc should be empty
19847    wlarc='$wl'
19848
19849    # Set some defaults for GNU ld with shared library support. These
19850    # are reset later if shared libraries are not supported. Putting them
19851    # here allows them to be overridden if necessary.
19852    runpath_var=LD_RUN_PATH
19853    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
19854    export_dynamic_flag_spec='$wl--export-dynamic'
19855    # ancient GNU ld didn't support --whole-archive et. al.
19856    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
19857      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
19858    else
19859      whole_archive_flag_spec=
19860    fi
19861    supports_anon_versioning=no
19862    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
19863      *GNU\ gold*) supports_anon_versioning=yes ;;
19864      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
19865      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
19866      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
19867      *\ 2.11.*) ;; # other 2.11 versions
19868      *) supports_anon_versioning=yes ;;
19869    esac
19870
19871    # See if GNU ld supports shared libraries.
19872    case $host_os in
19873    aix[3-9]*)
19874      # On AIX/PPC, the GNU linker is very broken
19875      if test ia64 != "$host_cpu"; then
19876	ld_shlibs=no
19877	cat <<_LT_EOF 1>&2
19878
19879*** Warning: the GNU linker, at least up to release 2.19, is reported
19880*** to be unable to reliably create shared libraries on AIX.
19881*** Therefore, libtool is disabling shared libraries support.  If you
19882*** really care for shared libraries, you may want to install binutils
19883*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
19884*** You will then need to restart the configuration process.
19885
19886_LT_EOF
19887      fi
19888      ;;
19889
19890    amigaos*)
19891      case $host_cpu in
19892      powerpc)
19893            # see comment about AmigaOS4 .so support
19894            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19895            archive_expsym_cmds=''
19896        ;;
19897      m68k)
19898            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)'
19899            hardcode_libdir_flag_spec='-L$libdir'
19900            hardcode_minus_L=yes
19901        ;;
19902      esac
19903      ;;
19904
19905    beos*)
19906      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
19907	allow_undefined_flag=unsupported
19908	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
19909	# support --undefined.  This deserves some investigation.  FIXME
19910	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19911      else
19912	ld_shlibs=no
19913      fi
19914      ;;
19915
19916    cygwin* | mingw* | pw32* | cegcc*)
19917      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
19918      # as there is no search path for DLLs.
19919      hardcode_libdir_flag_spec='-L$libdir'
19920      export_dynamic_flag_spec='$wl--export-all-symbols'
19921      allow_undefined_flag=unsupported
19922      always_export_symbols=no
19923      enable_shared_with_static_runtimes=yes
19924      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
19925      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
19926
19927      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
19928        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19929	# If the export-symbols file already is a .def file, use it as
19930	# is; otherwise, prepend EXPORTS...
19931	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
19932          cp $export_symbols $output_objdir/$soname.def;
19933        else
19934          echo EXPORTS > $output_objdir/$soname.def;
19935          cat $export_symbols >> $output_objdir/$soname.def;
19936        fi~
19937        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19938      else
19939	ld_shlibs=no
19940      fi
19941      ;;
19942
19943    haiku*)
19944      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19945      link_all_deplibs=yes
19946      ;;
19947
19948    os2*)
19949      hardcode_libdir_flag_spec='-L$libdir'
19950      hardcode_minus_L=yes
19951      allow_undefined_flag=unsupported
19952      shrext_cmds=.dll
19953      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19954	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19955	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19956	$ECHO EXPORTS >> $output_objdir/$libname.def~
19957	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
19958	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19959	emximp -o $lib $output_objdir/$libname.def'
19960      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19961	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19962	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19963	$ECHO EXPORTS >> $output_objdir/$libname.def~
19964	prefix_cmds="$SED"~
19965	if test EXPORTS = "`$SED 1q $export_symbols`"; then
19966	  prefix_cmds="$prefix_cmds -e 1d";
19967	fi~
19968	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
19969	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
19970	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19971	emximp -o $lib $output_objdir/$libname.def'
19972      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
19973      enable_shared_with_static_runtimes=yes
19974      ;;
19975
19976    interix[3-9]*)
19977      hardcode_direct=no
19978      hardcode_shlibpath_var=no
19979      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
19980      export_dynamic_flag_spec='$wl-E'
19981      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
19982      # Instead, shared libraries are loaded at an image base (0x10000000 by
19983      # default) and relocated if they conflict, which is a slow very memory
19984      # consuming and fragmenting process.  To avoid this, we pick a random,
19985      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
19986      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
19987      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
19988      archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
19989      ;;
19990
19991    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
19992      tmp_diet=no
19993      if test linux-dietlibc = "$host_os"; then
19994	case $cc_basename in
19995	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
19996	esac
19997      fi
19998      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
19999	 && test no = "$tmp_diet"
20000      then
20001	tmp_addflag=' $pic_flag'
20002	tmp_sharedflag='-shared'
20003	case $cc_basename,$host_cpu in
20004        pgcc*)				# Portland Group C compiler
20005	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20006	  tmp_addflag=' $pic_flag'
20007	  ;;
20008	pgf77* | pgf90* | pgf95* | pgfortran*)
20009					# Portland Group f77 and f90 compilers
20010	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20011	  tmp_addflag=' $pic_flag -Mnomain' ;;
20012	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
20013	  tmp_addflag=' -i_dynamic' ;;
20014	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
20015	  tmp_addflag=' -i_dynamic -nofor_main' ;;
20016	ifc* | ifort*)			# Intel Fortran compiler
20017	  tmp_addflag=' -nofor_main' ;;
20018	lf95*)				# Lahey Fortran 8.1
20019	  whole_archive_flag_spec=
20020	  tmp_sharedflag='--shared' ;;
20021        nagfor*)                        # NAGFOR 5.3
20022          tmp_sharedflag='-Wl,-shared' ;;
20023	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20024	  tmp_sharedflag='-qmkshrobj'
20025	  tmp_addflag= ;;
20026	nvcc*)	# Cuda Compiler Driver 2.2
20027	  whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20028	  compiler_needs_object=yes
20029	  ;;
20030	esac
20031	case `$CC -V 2>&1 | sed 5q` in
20032	*Sun\ C*)			# Sun C 5.9
20033	  whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
20034	  compiler_needs_object=yes
20035	  tmp_sharedflag='-G' ;;
20036	*Sun\ F*)			# Sun Fortran 8.3
20037	  tmp_sharedflag='-G' ;;
20038	esac
20039	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20040
20041        if test yes = "$supports_anon_versioning"; then
20042          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20043            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20044            echo "local: *; };" >> $output_objdir/$libname.ver~
20045            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
20046        fi
20047
20048	case $cc_basename in
20049	tcc*)
20050	  export_dynamic_flag_spec='-rdynamic'
20051	  ;;
20052	xlf* | bgf* | bgxlf* | mpixlf*)
20053	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20054	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20055	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20056	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20057	  if test yes = "$supports_anon_versioning"; then
20058	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20059              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20060              echo "local: *; };" >> $output_objdir/$libname.ver~
20061              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20062	  fi
20063	  ;;
20064	esac
20065      else
20066        ld_shlibs=no
20067      fi
20068      ;;
20069
20070    netbsd*)
20071      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20072	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20073	wlarc=
20074      else
20075	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20076	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20077      fi
20078      ;;
20079
20080    solaris*)
20081      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20082	ld_shlibs=no
20083	cat <<_LT_EOF 1>&2
20084
20085*** Warning: The releases 2.8.* of the GNU linker cannot reliably
20086*** create shared libraries on Solaris systems.  Therefore, libtool
20087*** is disabling shared libraries support.  We urge you to upgrade GNU
20088*** binutils to release 2.9.1 or newer.  Another option is to modify
20089*** your PATH or compiler configuration so that the native linker is
20090*** used, and then restart.
20091
20092_LT_EOF
20093      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20094	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20095	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20096      else
20097	ld_shlibs=no
20098      fi
20099      ;;
20100
20101    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20102      case `$LD -v 2>&1` in
20103        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20104	ld_shlibs=no
20105	cat <<_LT_EOF 1>&2
20106
20107*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
20108*** reliably create shared libraries on SCO systems.  Therefore, libtool
20109*** is disabling shared libraries support.  We urge you to upgrade GNU
20110*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20111*** your PATH or compiler configuration so that the native linker is
20112*** used, and then restart.
20113
20114_LT_EOF
20115	;;
20116	*)
20117	  # For security reasons, it is highly recommended that you always
20118	  # use absolute paths for naming shared libraries, and exclude the
20119	  # DT_RUNPATH tag from executables and libraries.  But doing so
20120	  # requires that you compile everything twice, which is a pain.
20121	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20122	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20123	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20124	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20125	  else
20126	    ld_shlibs=no
20127	  fi
20128	;;
20129      esac
20130      ;;
20131
20132    sunos4*)
20133      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20134      wlarc=
20135      hardcode_direct=yes
20136      hardcode_shlibpath_var=no
20137      ;;
20138
20139    *)
20140      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20141	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20142	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20143      else
20144	ld_shlibs=no
20145      fi
20146      ;;
20147    esac
20148
20149    if test no = "$ld_shlibs"; then
20150      runpath_var=
20151      hardcode_libdir_flag_spec=
20152      export_dynamic_flag_spec=
20153      whole_archive_flag_spec=
20154    fi
20155  else
20156    # PORTME fill in a description of your system's linker (not GNU ld)
20157    case $host_os in
20158    aix3*)
20159      allow_undefined_flag=unsupported
20160      always_export_symbols=yes
20161      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'
20162      # Note: this linker hardcodes the directories in LIBPATH if there
20163      # are no directories specified by -L.
20164      hardcode_minus_L=yes
20165      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
20166	# Neither direct hardcoding nor static linking is supported with a
20167	# broken collect2.
20168	hardcode_direct=unsupported
20169      fi
20170      ;;
20171
20172    aix[4-9]*)
20173      if test ia64 = "$host_cpu"; then
20174	# On IA64, the linker does run time linking by default, so we don't
20175	# have to do anything special.
20176	aix_use_runtimelinking=no
20177	exp_sym_flag='-Bexport'
20178	no_entry_flag=
20179      else
20180	# If we're using GNU nm, then we don't want the "-C" option.
20181	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
20182	# Without the "-l" option, or with the "-B" option, AIX nm treats
20183	# weak defined symbols like other global defined symbols, whereas
20184	# GNU nm marks them as "W".
20185	# While the 'weak' keyword is ignored in the Export File, we need
20186	# it in the Import File for the 'aix-soname' feature, so we have
20187	# to replace the "-B" option with "-P" for AIX nm.
20188	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20189	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
20190	else
20191	  export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
20192	fi
20193	aix_use_runtimelinking=no
20194
20195	# Test if we are trying to use run time linking or normal
20196	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
20197	# have runtime linking enabled, and use it for executables.
20198	# For shared libraries, we enable/disable runtime linking
20199	# depending on the kind of the shared library created -
20200	# when "with_aix_soname,aix_use_runtimelinking" is:
20201	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
20202	# "aix,yes"  lib.so          shared, rtl:yes, for executables
20203	#            lib.a           static archive
20204	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
20205	#            lib.a(lib.so.V) shared, rtl:no,  for executables
20206	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
20207	#            lib.a(lib.so.V) shared, rtl:no
20208	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
20209	#            lib.a           static archive
20210	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20211	  for ld_flag in $LDFLAGS; do
20212	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
20213	    aix_use_runtimelinking=yes
20214	    break
20215	  fi
20216	  done
20217	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
20218	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
20219	    # so we don't have lib.a shared libs to link our executables.
20220	    # We have to force runtime linking in this case.
20221	    aix_use_runtimelinking=yes
20222	    LDFLAGS="$LDFLAGS -Wl,-brtl"
20223	  fi
20224	  ;;
20225	esac
20226
20227	exp_sym_flag='-bexport'
20228	no_entry_flag='-bnoentry'
20229      fi
20230
20231      # When large executables or shared objects are built, AIX ld can
20232      # have problems creating the table of contents.  If linking a library
20233      # or program results in "error TOC overflow" add -mminimal-toc to
20234      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20235      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20236
20237      archive_cmds=''
20238      hardcode_direct=yes
20239      hardcode_direct_absolute=yes
20240      hardcode_libdir_separator=':'
20241      link_all_deplibs=yes
20242      file_list_spec='$wl-f,'
20243      case $with_aix_soname,$aix_use_runtimelinking in
20244      aix,*) ;; # traditional, no import file
20245      svr4,* | *,yes) # use import file
20246	# The Import File defines what to hardcode.
20247	hardcode_direct=no
20248	hardcode_direct_absolute=no
20249	;;
20250      esac
20251
20252      if test yes = "$GCC"; then
20253	case $host_os in aix4.[012]|aix4.[012].*)
20254	# We only want to do this on AIX 4.2 and lower, the check
20255	# below for broken collect2 doesn't work under 4.3+
20256	  collect2name=`$CC -print-prog-name=collect2`
20257	  if test -f "$collect2name" &&
20258	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20259	  then
20260	  # We have reworked collect2
20261	  :
20262	  else
20263	  # We have old collect2
20264	  hardcode_direct=unsupported
20265	  # It fails to find uninstalled libraries when the uninstalled
20266	  # path is not listed in the libpath.  Setting hardcode_minus_L
20267	  # to unsupported forces relinking
20268	  hardcode_minus_L=yes
20269	  hardcode_libdir_flag_spec='-L$libdir'
20270	  hardcode_libdir_separator=
20271	  fi
20272	  ;;
20273	esac
20274	shared_flag='-shared'
20275	if test yes = "$aix_use_runtimelinking"; then
20276	  shared_flag="$shared_flag "'$wl-G'
20277	fi
20278	# Need to ensure runtime linking is disabled for the traditional
20279	# shared library, or the linker may eventually find shared libraries
20280	# /with/ Import File - we do not want to mix them.
20281	shared_flag_aix='-shared'
20282	shared_flag_svr4='-shared $wl-G'
20283      else
20284	# not using gcc
20285	if test ia64 = "$host_cpu"; then
20286	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20287	# chokes on -Wl,-G. The following line is correct:
20288	  shared_flag='-G'
20289	else
20290	  if test yes = "$aix_use_runtimelinking"; then
20291	    shared_flag='$wl-G'
20292	  else
20293	    shared_flag='$wl-bM:SRE'
20294	  fi
20295	  shared_flag_aix='$wl-bM:SRE'
20296	  shared_flag_svr4='$wl-G'
20297	fi
20298      fi
20299
20300      export_dynamic_flag_spec='$wl-bexpall'
20301      # It seems that -bexpall does not export symbols beginning with
20302      # underscore (_), so it is better to generate a list of symbols to export.
20303      always_export_symbols=yes
20304      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
20305	# Warning - without using the other runtime loading flags (-brtl),
20306	# -berok will link without error, but may produce a broken library.
20307	allow_undefined_flag='-berok'
20308        # Determine the default libpath from the value encoded in an
20309        # empty executable.
20310        if test set = "${lt_cv_aix_libpath+set}"; then
20311  aix_libpath=$lt_cv_aix_libpath
20312else
20313  if ${lt_cv_aix_libpath_+:} false; then :
20314  $as_echo_n "(cached) " >&6
20315else
20316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20317/* end confdefs.h.  */
20318
20319int
20320main ()
20321{
20322
20323  ;
20324  return 0;
20325}
20326_ACEOF
20327if ac_fn_c_try_link "$LINENO"; then :
20328
20329  lt_aix_libpath_sed='
20330      /Import File Strings/,/^$/ {
20331	  /^0/ {
20332	      s/^0  *\([^ ]*\) *$/\1/
20333	      p
20334	  }
20335      }'
20336  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20337  # Check for a 64-bit object if we didn't find anything.
20338  if test -z "$lt_cv_aix_libpath_"; then
20339    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20340  fi
20341fi
20342rm -f core conftest.err conftest.$ac_objext \
20343    conftest$ac_exeext conftest.$ac_ext
20344  if test -z "$lt_cv_aix_libpath_"; then
20345    lt_cv_aix_libpath_=/usr/lib:/lib
20346  fi
20347
20348fi
20349
20350  aix_libpath=$lt_cv_aix_libpath_
20351fi
20352
20353        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20354        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
20355      else
20356	if test ia64 = "$host_cpu"; then
20357	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
20358	  allow_undefined_flag="-z nodefs"
20359	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
20360	else
20361	 # Determine the default libpath from the value encoded in an
20362	 # empty executable.
20363	 if test set = "${lt_cv_aix_libpath+set}"; then
20364  aix_libpath=$lt_cv_aix_libpath
20365else
20366  if ${lt_cv_aix_libpath_+:} false; then :
20367  $as_echo_n "(cached) " >&6
20368else
20369  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20370/* end confdefs.h.  */
20371
20372int
20373main ()
20374{
20375
20376  ;
20377  return 0;
20378}
20379_ACEOF
20380if ac_fn_c_try_link "$LINENO"; then :
20381
20382  lt_aix_libpath_sed='
20383      /Import File Strings/,/^$/ {
20384	  /^0/ {
20385	      s/^0  *\([^ ]*\) *$/\1/
20386	      p
20387	  }
20388      }'
20389  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20390  # Check for a 64-bit object if we didn't find anything.
20391  if test -z "$lt_cv_aix_libpath_"; then
20392    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20393  fi
20394fi
20395rm -f core conftest.err conftest.$ac_objext \
20396    conftest$ac_exeext conftest.$ac_ext
20397  if test -z "$lt_cv_aix_libpath_"; then
20398    lt_cv_aix_libpath_=/usr/lib:/lib
20399  fi
20400
20401fi
20402
20403  aix_libpath=$lt_cv_aix_libpath_
20404fi
20405
20406	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20407	  # Warning - without using the other run time loading flags,
20408	  # -berok will link without error, but may produce a broken library.
20409	  no_undefined_flag=' $wl-bernotok'
20410	  allow_undefined_flag=' $wl-berok'
20411	  if test yes = "$with_gnu_ld"; then
20412	    # We only use this code for GNU lds that support --whole-archive.
20413	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
20414	  else
20415	    # Exported symbols can be pulled into shared objects from archives
20416	    whole_archive_flag_spec='$convenience'
20417	  fi
20418	  archive_cmds_need_lc=yes
20419	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
20420	  # -brtl affects multiple linker settings, -berok does not and is overridden later
20421	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
20422	  if test svr4 != "$with_aix_soname"; then
20423	    # This is similar to how AIX traditionally builds its shared libraries.
20424	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
20425	  fi
20426	  if test aix != "$with_aix_soname"; then
20427	    archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
20428	  else
20429	    # used by -dlpreopen to get the symbols
20430	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
20431	  fi
20432	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
20433	fi
20434      fi
20435      ;;
20436
20437    amigaos*)
20438      case $host_cpu in
20439      powerpc)
20440            # see comment about AmigaOS4 .so support
20441            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20442            archive_expsym_cmds=''
20443        ;;
20444      m68k)
20445            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)'
20446            hardcode_libdir_flag_spec='-L$libdir'
20447            hardcode_minus_L=yes
20448        ;;
20449      esac
20450      ;;
20451
20452    bsdi[45]*)
20453      export_dynamic_flag_spec=-rdynamic
20454      ;;
20455
20456    cygwin* | mingw* | pw32* | cegcc*)
20457      # When not using gcc, we currently assume that we are using
20458      # Microsoft Visual C++.
20459      # hardcode_libdir_flag_spec is actually meaningless, as there is
20460      # no search path for DLLs.
20461      case $cc_basename in
20462      cl*)
20463	# Native MSVC
20464	hardcode_libdir_flag_spec=' '
20465	allow_undefined_flag=unsupported
20466	always_export_symbols=yes
20467	file_list_spec='@'
20468	# Tell ltmain to make .lib files, not .a files.
20469	libext=lib
20470	# Tell ltmain to make .dll files, not .so files.
20471	shrext_cmds=.dll
20472	# FIXME: Setting linknames here is a bad hack.
20473	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
20474	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
20475            cp "$export_symbols" "$output_objdir/$soname.def";
20476            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
20477          else
20478            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
20479          fi~
20480          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20481          linknames='
20482	# The linker will not automatically build a static lib if we build a DLL.
20483	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20484	enable_shared_with_static_runtimes=yes
20485	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
20486	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20487	# Don't use ranlib
20488	old_postinstall_cmds='chmod 644 $oldlib'
20489	postlink_cmds='lt_outputfile="@OUTPUT@"~
20490          lt_tool_outputfile="@TOOL_OUTPUT@"~
20491          case $lt_outputfile in
20492            *.exe|*.EXE) ;;
20493            *)
20494              lt_outputfile=$lt_outputfile.exe
20495              lt_tool_outputfile=$lt_tool_outputfile.exe
20496              ;;
20497          esac~
20498          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
20499            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20500            $RM "$lt_outputfile.manifest";
20501          fi'
20502	;;
20503      *)
20504	# Assume MSVC wrapper
20505	hardcode_libdir_flag_spec=' '
20506	allow_undefined_flag=unsupported
20507	# Tell ltmain to make .lib files, not .a files.
20508	libext=lib
20509	# Tell ltmain to make .dll files, not .so files.
20510	shrext_cmds=.dll
20511	# FIXME: Setting linknames here is a bad hack.
20512	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
20513	# The linker will automatically build a .lib file if we build a DLL.
20514	old_archive_from_new_cmds='true'
20515	# FIXME: Should let the user specify the lib program.
20516	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
20517	enable_shared_with_static_runtimes=yes
20518	;;
20519      esac
20520      ;;
20521
20522    darwin* | rhapsody*)
20523
20524
20525  archive_cmds_need_lc=no
20526  hardcode_direct=no
20527  hardcode_automatic=yes
20528  hardcode_shlibpath_var=unsupported
20529  if test yes = "$lt_cv_ld_force_load"; then
20530    whole_archive_flag_spec='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
20531
20532  else
20533    whole_archive_flag_spec=''
20534  fi
20535  link_all_deplibs=yes
20536  allow_undefined_flag=$_lt_dar_allow_undefined
20537  case $cc_basename in
20538     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
20539     *) _lt_dar_can_shared=$GCC ;;
20540  esac
20541  if test yes = "$_lt_dar_can_shared"; then
20542    output_verbose_link_cmd=func_echo_all
20543    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
20544    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
20545    archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
20546    module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
20547
20548  else
20549  ld_shlibs=no
20550  fi
20551
20552      ;;
20553
20554    dgux*)
20555      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20556      hardcode_libdir_flag_spec='-L$libdir'
20557      hardcode_shlibpath_var=no
20558      ;;
20559
20560    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
20561    # support.  Future versions do this automatically, but an explicit c++rt0.o
20562    # does not break anything, and helps significantly (at the cost of a little
20563    # extra space).
20564    freebsd2.2*)
20565      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
20566      hardcode_libdir_flag_spec='-R$libdir'
20567      hardcode_direct=yes
20568      hardcode_shlibpath_var=no
20569      ;;
20570
20571    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
20572    freebsd2.*)
20573      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20574      hardcode_direct=yes
20575      hardcode_minus_L=yes
20576      hardcode_shlibpath_var=no
20577      ;;
20578
20579    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
20580    freebsd* | dragonfly*)
20581      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20582      hardcode_libdir_flag_spec='-R$libdir'
20583      hardcode_direct=yes
20584      hardcode_shlibpath_var=no
20585      ;;
20586
20587    hpux9*)
20588      if test yes = "$GCC"; then
20589	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
20590      else
20591	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
20592      fi
20593      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20594      hardcode_libdir_separator=:
20595      hardcode_direct=yes
20596
20597      # hardcode_minus_L: Not really in the search PATH,
20598      # but as the default location of the library.
20599      hardcode_minus_L=yes
20600      export_dynamic_flag_spec='$wl-E'
20601      ;;
20602
20603    hpux10*)
20604      if test yes,no = "$GCC,$with_gnu_ld"; then
20605	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20606      else
20607	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20608      fi
20609      if test no = "$with_gnu_ld"; then
20610	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20611	hardcode_libdir_separator=:
20612	hardcode_direct=yes
20613	hardcode_direct_absolute=yes
20614	export_dynamic_flag_spec='$wl-E'
20615	# hardcode_minus_L: Not really in the search PATH,
20616	# but as the default location of the library.
20617	hardcode_minus_L=yes
20618      fi
20619      ;;
20620
20621    hpux11*)
20622      if test yes,no = "$GCC,$with_gnu_ld"; then
20623	case $host_cpu in
20624	hppa*64*)
20625	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20626	  ;;
20627	ia64*)
20628	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20629	  ;;
20630	*)
20631	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20632	  ;;
20633	esac
20634      else
20635	case $host_cpu in
20636	hppa*64*)
20637	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20638	  ;;
20639	ia64*)
20640	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20641	  ;;
20642	*)
20643
20644	  # Older versions of the 11.00 compiler do not understand -b yet
20645	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
20646	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
20647$as_echo_n "checking if $CC understands -b... " >&6; }
20648if ${lt_cv_prog_compiler__b+:} false; then :
20649  $as_echo_n "(cached) " >&6
20650else
20651  lt_cv_prog_compiler__b=no
20652   save_LDFLAGS=$LDFLAGS
20653   LDFLAGS="$LDFLAGS -b"
20654   echo "$lt_simple_link_test_code" > conftest.$ac_ext
20655   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20656     # The linker can only warn and ignore the option if not recognized
20657     # So say no if there are warnings
20658     if test -s conftest.err; then
20659       # Append any errors to the config.log.
20660       cat conftest.err 1>&5
20661       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20662       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20663       if diff conftest.exp conftest.er2 >/dev/null; then
20664         lt_cv_prog_compiler__b=yes
20665       fi
20666     else
20667       lt_cv_prog_compiler__b=yes
20668     fi
20669   fi
20670   $RM -r conftest*
20671   LDFLAGS=$save_LDFLAGS
20672
20673fi
20674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
20675$as_echo "$lt_cv_prog_compiler__b" >&6; }
20676
20677if test yes = "$lt_cv_prog_compiler__b"; then
20678    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20679else
20680    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20681fi
20682
20683	  ;;
20684	esac
20685      fi
20686      if test no = "$with_gnu_ld"; then
20687	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20688	hardcode_libdir_separator=:
20689
20690	case $host_cpu in
20691	hppa*64*|ia64*)
20692	  hardcode_direct=no
20693	  hardcode_shlibpath_var=no
20694	  ;;
20695	*)
20696	  hardcode_direct=yes
20697	  hardcode_direct_absolute=yes
20698	  export_dynamic_flag_spec='$wl-E'
20699
20700	  # hardcode_minus_L: Not really in the search PATH,
20701	  # but as the default location of the library.
20702	  hardcode_minus_L=yes
20703	  ;;
20704	esac
20705      fi
20706      ;;
20707
20708    irix5* | irix6* | nonstopux*)
20709      if test yes = "$GCC"; then
20710	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20711	# Try to use the -exported_symbol ld option, if it does not
20712	# work, assume that -exports_file does not work either and
20713	# implicitly export all symbols.
20714	# This should be the same for all languages, so no per-tag cache variable.
20715	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
20716$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
20717if ${lt_cv_irix_exported_symbol+:} false; then :
20718  $as_echo_n "(cached) " >&6
20719else
20720  save_LDFLAGS=$LDFLAGS
20721	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
20722	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20723/* end confdefs.h.  */
20724int foo (void) { return 0; }
20725_ACEOF
20726if ac_fn_c_try_link "$LINENO"; then :
20727  lt_cv_irix_exported_symbol=yes
20728else
20729  lt_cv_irix_exported_symbol=no
20730fi
20731rm -f core conftest.err conftest.$ac_objext \
20732    conftest$ac_exeext conftest.$ac_ext
20733           LDFLAGS=$save_LDFLAGS
20734fi
20735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
20736$as_echo "$lt_cv_irix_exported_symbol" >&6; }
20737	if test yes = "$lt_cv_irix_exported_symbol"; then
20738          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
20739	fi
20740      else
20741	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20742	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
20743      fi
20744      archive_cmds_need_lc='no'
20745      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20746      hardcode_libdir_separator=:
20747      inherit_rpath=yes
20748      link_all_deplibs=yes
20749      ;;
20750
20751    linux*)
20752      case $cc_basename in
20753      tcc*)
20754	# Fabrice Bellard et al's Tiny C Compiler
20755	ld_shlibs=yes
20756	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20757	;;
20758      esac
20759      ;;
20760
20761    netbsd*)
20762      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20763	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
20764      else
20765	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
20766      fi
20767      hardcode_libdir_flag_spec='-R$libdir'
20768      hardcode_direct=yes
20769      hardcode_shlibpath_var=no
20770      ;;
20771
20772    newsos6)
20773      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20774      hardcode_direct=yes
20775      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20776      hardcode_libdir_separator=:
20777      hardcode_shlibpath_var=no
20778      ;;
20779
20780    *nto* | *qnx*)
20781      ;;
20782
20783    openbsd* | bitrig*)
20784      if test -f /usr/libexec/ld.so; then
20785	hardcode_direct=yes
20786	hardcode_shlibpath_var=no
20787	hardcode_direct_absolute=yes
20788	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
20789	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20790	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
20791	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20792	  export_dynamic_flag_spec='$wl-E'
20793	else
20794	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20795	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20796	fi
20797      else
20798	ld_shlibs=no
20799      fi
20800      ;;
20801
20802    os2*)
20803      hardcode_libdir_flag_spec='-L$libdir'
20804      hardcode_minus_L=yes
20805      allow_undefined_flag=unsupported
20806      shrext_cmds=.dll
20807      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20808	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20809	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20810	$ECHO EXPORTS >> $output_objdir/$libname.def~
20811	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
20812	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20813	emximp -o $lib $output_objdir/$libname.def'
20814      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20815	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20816	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20817	$ECHO EXPORTS >> $output_objdir/$libname.def~
20818	prefix_cmds="$SED"~
20819	if test EXPORTS = "`$SED 1q $export_symbols`"; then
20820	  prefix_cmds="$prefix_cmds -e 1d";
20821	fi~
20822	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
20823	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
20824	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20825	emximp -o $lib $output_objdir/$libname.def'
20826      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
20827      enable_shared_with_static_runtimes=yes
20828      ;;
20829
20830    osf3*)
20831      if test yes = "$GCC"; then
20832	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20833	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20834      else
20835	allow_undefined_flag=' -expect_unresolved \*'
20836	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20837      fi
20838      archive_cmds_need_lc='no'
20839      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20840      hardcode_libdir_separator=:
20841      ;;
20842
20843    osf4* | osf5*)	# as osf3* with the addition of -msym flag
20844      if test yes = "$GCC"; then
20845	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20846	archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
20847	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20848      else
20849	allow_undefined_flag=' -expect_unresolved \*'
20850	archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
20851	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
20852          $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
20853
20854	# Both c and cxx compiler support -rpath directly
20855	hardcode_libdir_flag_spec='-rpath $libdir'
20856      fi
20857      archive_cmds_need_lc='no'
20858      hardcode_libdir_separator=:
20859      ;;
20860
20861    solaris*)
20862      no_undefined_flag=' -z defs'
20863      if test yes = "$GCC"; then
20864	wlarc='$wl'
20865	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20866	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20867          $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
20868      else
20869	case `$CC -V 2>&1` in
20870	*"Compilers 5.0"*)
20871	  wlarc=''
20872	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
20873	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20874            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
20875	  ;;
20876	*)
20877	  wlarc='$wl'
20878	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
20879	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20880            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
20881	  ;;
20882	esac
20883      fi
20884      hardcode_libdir_flag_spec='-R$libdir'
20885      hardcode_shlibpath_var=no
20886      case $host_os in
20887      solaris2.[0-5] | solaris2.[0-5].*) ;;
20888      *)
20889	# The compiler driver will combine and reorder linker options,
20890	# but understands '-z linker_flag'.  GCC discards it without '$wl',
20891	# but is careful enough not to reorder.
20892	# Supported since Solaris 2.6 (maybe 2.5.1?)
20893	if test yes = "$GCC"; then
20894	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
20895	else
20896	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
20897	fi
20898	;;
20899      esac
20900      link_all_deplibs=yes
20901      ;;
20902
20903    sunos4*)
20904      if test sequent = "$host_vendor"; then
20905	# Use $CC to link under sequent, because it throws in some extra .o
20906	# files that make .init and .fini sections work.
20907	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
20908      else
20909	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
20910      fi
20911      hardcode_libdir_flag_spec='-L$libdir'
20912      hardcode_direct=yes
20913      hardcode_minus_L=yes
20914      hardcode_shlibpath_var=no
20915      ;;
20916
20917    sysv4)
20918      case $host_vendor in
20919	sni)
20920	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20921	  hardcode_direct=yes # is this really true???
20922	;;
20923	siemens)
20924	  ## LD is ld it makes a PLAMLIB
20925	  ## CC just makes a GrossModule.
20926	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
20927	  reload_cmds='$CC -r -o $output$reload_objs'
20928	  hardcode_direct=no
20929        ;;
20930	motorola)
20931	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20932	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
20933	;;
20934      esac
20935      runpath_var='LD_RUN_PATH'
20936      hardcode_shlibpath_var=no
20937      ;;
20938
20939    sysv4.3*)
20940      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20941      hardcode_shlibpath_var=no
20942      export_dynamic_flag_spec='-Bexport'
20943      ;;
20944
20945    sysv4*MP*)
20946      if test -d /usr/nec; then
20947	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20948	hardcode_shlibpath_var=no
20949	runpath_var=LD_RUN_PATH
20950	hardcode_runpath_var=yes
20951	ld_shlibs=yes
20952      fi
20953      ;;
20954
20955    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
20956      no_undefined_flag='$wl-z,text'
20957      archive_cmds_need_lc=no
20958      hardcode_shlibpath_var=no
20959      runpath_var='LD_RUN_PATH'
20960
20961      if test yes = "$GCC"; then
20962	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20963	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20964      else
20965	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20966	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20967      fi
20968      ;;
20969
20970    sysv5* | sco3.2v5* | sco5v6*)
20971      # Note: We CANNOT use -z defs as we might desire, because we do not
20972      # link with -lc, and that would cause any symbols used from libc to
20973      # always be unresolved, which means just about no library would
20974      # ever link correctly.  If we're not using GNU ld we use -z text
20975      # though, which does catch some bad symbols but isn't as heavy-handed
20976      # as -z defs.
20977      no_undefined_flag='$wl-z,text'
20978      allow_undefined_flag='$wl-z,nodefs'
20979      archive_cmds_need_lc=no
20980      hardcode_shlibpath_var=no
20981      hardcode_libdir_flag_spec='$wl-R,$libdir'
20982      hardcode_libdir_separator=':'
20983      link_all_deplibs=yes
20984      export_dynamic_flag_spec='$wl-Bexport'
20985      runpath_var='LD_RUN_PATH'
20986
20987      if test yes = "$GCC"; then
20988	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20989	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20990      else
20991	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20992	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20993      fi
20994      ;;
20995
20996    uts4*)
20997      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20998      hardcode_libdir_flag_spec='-L$libdir'
20999      hardcode_shlibpath_var=no
21000      ;;
21001
21002    *)
21003      ld_shlibs=no
21004      ;;
21005    esac
21006
21007    if test sni = "$host_vendor"; then
21008      case $host in
21009      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21010	export_dynamic_flag_spec='$wl-Blargedynsym'
21011	;;
21012      esac
21013    fi
21014  fi
21015
21016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21017$as_echo "$ld_shlibs" >&6; }
21018test no = "$ld_shlibs" && can_build_shared=no
21019
21020with_gnu_ld=$with_gnu_ld
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036#
21037# Do we need to explicitly link libc?
21038#
21039case "x$archive_cmds_need_lc" in
21040x|xyes)
21041  # Assume -lc should be added
21042  archive_cmds_need_lc=yes
21043
21044  if test yes,yes = "$GCC,$enable_shared"; then
21045    case $archive_cmds in
21046    *'~'*)
21047      # FIXME: we may have to deal with multi-command sequences.
21048      ;;
21049    '$CC '*)
21050      # Test whether the compiler implicitly links with -lc since on some
21051      # systems, -lgcc has to come before -lc. If gcc already passes -lc
21052      # to ld, don't add -lc before -lgcc.
21053      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21054$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21055if ${lt_cv_archive_cmds_need_lc+:} false; then :
21056  $as_echo_n "(cached) " >&6
21057else
21058  $RM conftest*
21059	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21060
21061	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21062  (eval $ac_compile) 2>&5
21063  ac_status=$?
21064  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21065  test $ac_status = 0; } 2>conftest.err; then
21066	  soname=conftest
21067	  lib=conftest
21068	  libobjs=conftest.$ac_objext
21069	  deplibs=
21070	  wl=$lt_prog_compiler_wl
21071	  pic_flag=$lt_prog_compiler_pic
21072	  compiler_flags=-v
21073	  linker_flags=-v
21074	  verstring=
21075	  output_objdir=.
21076	  libname=conftest
21077	  lt_save_allow_undefined_flag=$allow_undefined_flag
21078	  allow_undefined_flag=
21079	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21080  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21081  ac_status=$?
21082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21083  test $ac_status = 0; }
21084	  then
21085	    lt_cv_archive_cmds_need_lc=no
21086	  else
21087	    lt_cv_archive_cmds_need_lc=yes
21088	  fi
21089	  allow_undefined_flag=$lt_save_allow_undefined_flag
21090	else
21091	  cat conftest.err 1>&5
21092	fi
21093	$RM conftest*
21094
21095fi
21096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21097$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21098      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21099      ;;
21100    esac
21101  fi
21102  ;;
21103esac
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21257$as_echo_n "checking dynamic linker characteristics... " >&6; }
21258
21259if test yes = "$GCC"; then
21260  case $host_os in
21261    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
21262    *) lt_awk_arg='/^libraries:/' ;;
21263  esac
21264  case $host_os in
21265    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
21266    *) lt_sed_strip_eq='s|=/|/|g' ;;
21267  esac
21268  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21269  case $lt_search_path_spec in
21270  *\;*)
21271    # if the path contains ";" then we assume it to be the separator
21272    # otherwise default to the standard path separator (i.e. ":") - it is
21273    # assumed that no part of a normal pathname contains ";" but that should
21274    # okay in the real world where ";" in dirpaths is itself problematic.
21275    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21276    ;;
21277  *)
21278    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21279    ;;
21280  esac
21281  # Ok, now we have the path, separated by spaces, we can step through it
21282  # and add multilib dir if necessary...
21283  lt_tmp_lt_search_path_spec=
21284  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21285  # ...but if some path component already ends with the multilib dir we assume
21286  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
21287  case "$lt_multi_os_dir; $lt_search_path_spec " in
21288  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
21289    lt_multi_os_dir=
21290    ;;
21291  esac
21292  for lt_sys_path in $lt_search_path_spec; do
21293    if test -d "$lt_sys_path$lt_multi_os_dir"; then
21294      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
21295    elif test -n "$lt_multi_os_dir"; then
21296      test -d "$lt_sys_path" && \
21297	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21298    fi
21299  done
21300  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21301BEGIN {RS = " "; FS = "/|\n";} {
21302  lt_foo = "";
21303  lt_count = 0;
21304  for (lt_i = NF; lt_i > 0; lt_i--) {
21305    if ($lt_i != "" && $lt_i != ".") {
21306      if ($lt_i == "..") {
21307        lt_count++;
21308      } else {
21309        if (lt_count == 0) {
21310          lt_foo = "/" $lt_i lt_foo;
21311        } else {
21312          lt_count--;
21313        }
21314      }
21315    }
21316  }
21317  if (lt_foo != "") { lt_freq[lt_foo]++; }
21318  if (lt_freq[lt_foo] == 1) { print lt_foo; }
21319}'`
21320  # AWK program above erroneously prepends '/' to C:/dos/paths
21321  # for these hosts.
21322  case $host_os in
21323    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21324      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
21325  esac
21326  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21327else
21328  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21329fi
21330library_names_spec=
21331libname_spec='lib$name'
21332soname_spec=
21333shrext_cmds=.so
21334postinstall_cmds=
21335postuninstall_cmds=
21336finish_cmds=
21337finish_eval=
21338shlibpath_var=
21339shlibpath_overrides_runpath=unknown
21340version_type=none
21341dynamic_linker="$host_os ld.so"
21342sys_lib_dlsearch_path_spec="/lib /usr/lib"
21343need_lib_prefix=unknown
21344hardcode_into_libs=no
21345
21346# when you set need_version to no, make sure it does not cause -set_version
21347# flags to be left without arguments
21348need_version=unknown
21349
21350
21351
21352case $host_os in
21353aix3*)
21354  version_type=linux # correct to gnu/linux during the next big refactor
21355  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
21356  shlibpath_var=LIBPATH
21357
21358  # AIX 3 has no versioning support, so we append a major version to the name.
21359  soname_spec='$libname$release$shared_ext$major'
21360  ;;
21361
21362aix[4-9]*)
21363  version_type=linux # correct to gnu/linux during the next big refactor
21364  need_lib_prefix=no
21365  need_version=no
21366  hardcode_into_libs=yes
21367  if test ia64 = "$host_cpu"; then
21368    # AIX 5 supports IA64
21369    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
21370    shlibpath_var=LD_LIBRARY_PATH
21371  else
21372    # With GCC up to 2.95.x, collect2 would create an import file
21373    # for dependence libraries.  The import file would start with
21374    # the line '#! .'.  This would cause the generated library to
21375    # depend on '.', always an invalid library.  This was fixed in
21376    # development snapshots of GCC prior to 3.0.
21377    case $host_os in
21378      aix4 | aix4.[01] | aix4.[01].*)
21379      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21380	   echo ' yes '
21381	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
21382	:
21383      else
21384	can_build_shared=no
21385      fi
21386      ;;
21387    esac
21388    # Using Import Files as archive members, it is possible to support
21389    # filename-based versioning of shared library archives on AIX. While
21390    # this would work for both with and without runtime linking, it will
21391    # prevent static linking of such archives. So we do filename-based
21392    # shared library versioning with .so extension only, which is used
21393    # when both runtime linking and shared linking is enabled.
21394    # Unfortunately, runtime linking may impact performance, so we do
21395    # not want this to be the default eventually. Also, we use the
21396    # versioned .so libs for executables only if there is the -brtl
21397    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
21398    # To allow for filename-based versioning support, we need to create
21399    # libNAME.so.V as an archive file, containing:
21400    # *) an Import File, referring to the versioned filename of the
21401    #    archive as well as the shared archive member, telling the
21402    #    bitwidth (32 or 64) of that shared object, and providing the
21403    #    list of exported symbols of that shared object, eventually
21404    #    decorated with the 'weak' keyword
21405    # *) the shared object with the F_LOADONLY flag set, to really avoid
21406    #    it being seen by the linker.
21407    # At run time we better use the real file rather than another symlink,
21408    # but for link time we create the symlink libNAME.so -> libNAME.so.V
21409
21410    case $with_aix_soname,$aix_use_runtimelinking in
21411    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
21412    # soname into executable. Probably we can add versioning support to
21413    # collect2, so additional links can be useful in future.
21414    aix,yes) # traditional libtool
21415      dynamic_linker='AIX unversionable lib.so'
21416      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21417      # instead of lib<name>.a to let people know that these are not
21418      # typical AIX shared libraries.
21419      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21420      ;;
21421    aix,no) # traditional AIX only
21422      dynamic_linker='AIX lib.a(lib.so.V)'
21423      # We preserve .a as extension for shared libraries through AIX4.2
21424      # and later when we are not doing run time linking.
21425      library_names_spec='$libname$release.a $libname.a'
21426      soname_spec='$libname$release$shared_ext$major'
21427      ;;
21428    svr4,*) # full svr4 only
21429      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
21430      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21431      # We do not specify a path in Import Files, so LIBPATH fires.
21432      shlibpath_overrides_runpath=yes
21433      ;;
21434    *,yes) # both, prefer svr4
21435      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
21436      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21437      # unpreferred sharedlib libNAME.a needs extra handling
21438      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
21439      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
21440      # We do not specify a path in Import Files, so LIBPATH fires.
21441      shlibpath_overrides_runpath=yes
21442      ;;
21443    *,no) # both, prefer aix
21444      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
21445      library_names_spec='$libname$release.a $libname.a'
21446      soname_spec='$libname$release$shared_ext$major'
21447      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
21448      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
21449      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
21450      ;;
21451    esac
21452    shlibpath_var=LIBPATH
21453  fi
21454  ;;
21455
21456amigaos*)
21457  case $host_cpu in
21458  powerpc)
21459    # Since July 2007 AmigaOS4 officially supports .so libraries.
21460    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21461    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21462    ;;
21463  m68k)
21464    library_names_spec='$libname.ixlibrary $libname.a'
21465    # Create ${libname}_ixlibrary.a entries in /sys/libs.
21466    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $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'
21467    ;;
21468  esac
21469  ;;
21470
21471beos*)
21472  library_names_spec='$libname$shared_ext'
21473  dynamic_linker="$host_os ld.so"
21474  shlibpath_var=LIBRARY_PATH
21475  ;;
21476
21477bsdi[45]*)
21478  version_type=linux # correct to gnu/linux during the next big refactor
21479  need_version=no
21480  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21481  soname_spec='$libname$release$shared_ext$major'
21482  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21483  shlibpath_var=LD_LIBRARY_PATH
21484  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21485  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21486  # the default ld.so.conf also contains /usr/contrib/lib and
21487  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21488  # libtool to hard-code these into programs
21489  ;;
21490
21491cygwin* | mingw* | pw32* | cegcc*)
21492  version_type=windows
21493  shrext_cmds=.dll
21494  need_version=no
21495  need_lib_prefix=no
21496
21497  case $GCC,$cc_basename in
21498  yes,*)
21499    # gcc
21500    library_names_spec='$libname.dll.a'
21501    # DLL is installed to $(libdir)/../bin by postinstall_cmds
21502    postinstall_cmds='base_file=`basename \$file`~
21503      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21504      dldir=$destdir/`dirname \$dlpath`~
21505      test -d \$dldir || mkdir -p \$dldir~
21506      $install_prog $dir/$dlname \$dldir/$dlname~
21507      chmod a+x \$dldir/$dlname~
21508      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21509        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21510      fi'
21511    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21512      dlpath=$dir/\$dldll~
21513       $RM \$dlpath'
21514    shlibpath_overrides_runpath=yes
21515
21516    case $host_os in
21517    cygwin*)
21518      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21519      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21520
21521      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21522      ;;
21523    mingw* | cegcc*)
21524      # MinGW DLLs use traditional 'lib' prefix
21525      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21526      ;;
21527    pw32*)
21528      # pw32 DLLs use 'pw' prefix rather than 'lib'
21529      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21530      ;;
21531    esac
21532    dynamic_linker='Win32 ld.exe'
21533    ;;
21534
21535  *,cl*)
21536    # Native MSVC
21537    libname_spec='$name'
21538    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21539    library_names_spec='$libname.dll.lib'
21540
21541    case $build_os in
21542    mingw*)
21543      sys_lib_search_path_spec=
21544      lt_save_ifs=$IFS
21545      IFS=';'
21546      for lt_path in $LIB
21547      do
21548        IFS=$lt_save_ifs
21549        # Let DOS variable expansion print the short 8.3 style file name.
21550        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21551        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21552      done
21553      IFS=$lt_save_ifs
21554      # Convert to MSYS style.
21555      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21556      ;;
21557    cygwin*)
21558      # Convert to unix form, then to dos form, then back to unix form
21559      # but this time dos style (no spaces!) so that the unix form looks
21560      # like /cygdrive/c/PROGRA~1:/cygdr...
21561      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21562      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21563      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21564      ;;
21565    *)
21566      sys_lib_search_path_spec=$LIB
21567      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21568        # It is most probably a Windows format PATH.
21569        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21570      else
21571        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21572      fi
21573      # FIXME: find the short name or the path components, as spaces are
21574      # common. (e.g. "Program Files" -> "PROGRA~1")
21575      ;;
21576    esac
21577
21578    # DLL is installed to $(libdir)/../bin by postinstall_cmds
21579    postinstall_cmds='base_file=`basename \$file`~
21580      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21581      dldir=$destdir/`dirname \$dlpath`~
21582      test -d \$dldir || mkdir -p \$dldir~
21583      $install_prog $dir/$dlname \$dldir/$dlname'
21584    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21585      dlpath=$dir/\$dldll~
21586       $RM \$dlpath'
21587    shlibpath_overrides_runpath=yes
21588    dynamic_linker='Win32 link.exe'
21589    ;;
21590
21591  *)
21592    # Assume MSVC wrapper
21593    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
21594    dynamic_linker='Win32 ld.exe'
21595    ;;
21596  esac
21597  # FIXME: first we should search . and the directory the executable is in
21598  shlibpath_var=PATH
21599  ;;
21600
21601darwin* | rhapsody*)
21602  dynamic_linker="$host_os dyld"
21603  version_type=darwin
21604  need_lib_prefix=no
21605  need_version=no
21606  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
21607  soname_spec='$libname$release$major$shared_ext'
21608  shlibpath_overrides_runpath=yes
21609  shlibpath_var=DYLD_LIBRARY_PATH
21610  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
21611
21612  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
21613  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
21614  ;;
21615
21616dgux*)
21617  version_type=linux # correct to gnu/linux during the next big refactor
21618  need_lib_prefix=no
21619  need_version=no
21620  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21621  soname_spec='$libname$release$shared_ext$major'
21622  shlibpath_var=LD_LIBRARY_PATH
21623  ;;
21624
21625freebsd* | dragonfly*)
21626  # DragonFly does not have aout.  When/if they implement a new
21627  # versioning mechanism, adjust this.
21628  if test -x /usr/bin/objformat; then
21629    objformat=`/usr/bin/objformat`
21630  else
21631    case $host_os in
21632    freebsd[23].*) objformat=aout ;;
21633    *) objformat=elf ;;
21634    esac
21635  fi
21636  version_type=freebsd-$objformat
21637  case $version_type in
21638    freebsd-elf*)
21639      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21640      soname_spec='$libname$release$shared_ext$major'
21641      need_version=no
21642      need_lib_prefix=no
21643      ;;
21644    freebsd-*)
21645      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21646      need_version=yes
21647      ;;
21648  esac
21649  shlibpath_var=LD_LIBRARY_PATH
21650  case $host_os in
21651  freebsd2.*)
21652    shlibpath_overrides_runpath=yes
21653    ;;
21654  freebsd3.[01]* | freebsdelf3.[01]*)
21655    shlibpath_overrides_runpath=yes
21656    hardcode_into_libs=yes
21657    ;;
21658  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
21659  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
21660    shlibpath_overrides_runpath=no
21661    hardcode_into_libs=yes
21662    ;;
21663  *) # from 4.6 on, and DragonFly
21664    shlibpath_overrides_runpath=yes
21665    hardcode_into_libs=yes
21666    ;;
21667  esac
21668  ;;
21669
21670haiku*)
21671  version_type=linux # correct to gnu/linux during the next big refactor
21672  need_lib_prefix=no
21673  need_version=no
21674  dynamic_linker="$host_os runtime_loader"
21675  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21676  soname_spec='$libname$release$shared_ext$major'
21677  shlibpath_var=LIBRARY_PATH
21678  shlibpath_overrides_runpath=no
21679  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
21680  hardcode_into_libs=yes
21681  ;;
21682
21683hpux9* | hpux10* | hpux11*)
21684  # Give a soname corresponding to the major version so that dld.sl refuses to
21685  # link against other versions.
21686  version_type=sunos
21687  need_lib_prefix=no
21688  need_version=no
21689  case $host_cpu in
21690  ia64*)
21691    shrext_cmds='.so'
21692    hardcode_into_libs=yes
21693    dynamic_linker="$host_os dld.so"
21694    shlibpath_var=LD_LIBRARY_PATH
21695    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21696    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21697    soname_spec='$libname$release$shared_ext$major'
21698    if test 32 = "$HPUX_IA64_MODE"; then
21699      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
21700      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
21701    else
21702      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
21703      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
21704    fi
21705    ;;
21706  hppa*64*)
21707    shrext_cmds='.sl'
21708    hardcode_into_libs=yes
21709    dynamic_linker="$host_os dld.sl"
21710    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
21711    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21712    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21713    soname_spec='$libname$release$shared_ext$major'
21714    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
21715    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21716    ;;
21717  *)
21718    shrext_cmds='.sl'
21719    dynamic_linker="$host_os dld.sl"
21720    shlibpath_var=SHLIB_PATH
21721    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
21722    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21723    soname_spec='$libname$release$shared_ext$major'
21724    ;;
21725  esac
21726  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
21727  postinstall_cmds='chmod 555 $lib'
21728  # or fails outright, so override atomically:
21729  install_override_mode=555
21730  ;;
21731
21732interix[3-9]*)
21733  version_type=linux # correct to gnu/linux during the next big refactor
21734  need_lib_prefix=no
21735  need_version=no
21736  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21737  soname_spec='$libname$release$shared_ext$major'
21738  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
21739  shlibpath_var=LD_LIBRARY_PATH
21740  shlibpath_overrides_runpath=no
21741  hardcode_into_libs=yes
21742  ;;
21743
21744irix5* | irix6* | nonstopux*)
21745  case $host_os in
21746    nonstopux*) version_type=nonstopux ;;
21747    *)
21748	if test yes = "$lt_cv_prog_gnu_ld"; then
21749		version_type=linux # correct to gnu/linux during the next big refactor
21750	else
21751		version_type=irix
21752	fi ;;
21753  esac
21754  need_lib_prefix=no
21755  need_version=no
21756  soname_spec='$libname$release$shared_ext$major'
21757  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
21758  case $host_os in
21759  irix5* | nonstopux*)
21760    libsuff= shlibsuff=
21761    ;;
21762  *)
21763    case $LD in # libtool.m4 will add one of these switches to LD
21764    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
21765      libsuff= shlibsuff= libmagic=32-bit;;
21766    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
21767      libsuff=32 shlibsuff=N32 libmagic=N32;;
21768    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
21769      libsuff=64 shlibsuff=64 libmagic=64-bit;;
21770    *) libsuff= shlibsuff= libmagic=never-match;;
21771    esac
21772    ;;
21773  esac
21774  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
21775  shlibpath_overrides_runpath=no
21776  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
21777  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
21778  hardcode_into_libs=yes
21779  ;;
21780
21781# No shared lib support for Linux oldld, aout, or coff.
21782linux*oldld* | linux*aout* | linux*coff*)
21783  dynamic_linker=no
21784  ;;
21785
21786linux*android*)
21787  version_type=none # Android doesn't support versioned libraries.
21788  need_lib_prefix=no
21789  need_version=no
21790  library_names_spec='$libname$release$shared_ext'
21791  soname_spec='$libname$release$shared_ext'
21792  finish_cmds=
21793  shlibpath_var=LD_LIBRARY_PATH
21794  shlibpath_overrides_runpath=yes
21795
21796  # This implies no fast_install, which is unacceptable.
21797  # Some rework will be needed to allow for fast_install
21798  # before this can be enabled.
21799  hardcode_into_libs=yes
21800
21801  dynamic_linker='Android linker'
21802  # Don't embed -rpath directories since the linker doesn't support them.
21803  hardcode_libdir_flag_spec='-L$libdir'
21804  ;;
21805
21806# This must be glibc/ELF.
21807linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
21808  version_type=linux # correct to gnu/linux during the next big refactor
21809  need_lib_prefix=no
21810  need_version=no
21811  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21812  soname_spec='$libname$release$shared_ext$major'
21813  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
21814  shlibpath_var=LD_LIBRARY_PATH
21815  shlibpath_overrides_runpath=no
21816
21817  # Some binutils ld are patched to set DT_RUNPATH
21818  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  lt_cv_shlibpath_overrides_runpath=no
21822    save_LDFLAGS=$LDFLAGS
21823    save_libdir=$libdir
21824    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
21825	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
21826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21827/* end confdefs.h.  */
21828
21829int
21830main ()
21831{
21832
21833  ;
21834  return 0;
21835}
21836_ACEOF
21837if ac_fn_c_try_link "$LINENO"; then :
21838  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
21839  lt_cv_shlibpath_overrides_runpath=yes
21840fi
21841fi
21842rm -f core conftest.err conftest.$ac_objext \
21843    conftest$ac_exeext conftest.$ac_ext
21844    LDFLAGS=$save_LDFLAGS
21845    libdir=$save_libdir
21846
21847fi
21848
21849  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
21850
21851  # This implies no fast_install, which is unacceptable.
21852  # Some rework will be needed to allow for fast_install
21853  # before this can be enabled.
21854  hardcode_into_libs=yes
21855
21856  # Ideally, we could use ldconfig to report *all* directores which are
21857  # searched for libraries, however this is still not possible.  Aside from not
21858  # being certain /sbin/ldconfig is available, command
21859  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
21860  # even though it is searched at run-time.  Try to do the best guess by
21861  # appending ld.so.conf contents (and includes) to the search path.
21862  if test -f /etc/ld.so.conf; then
21863    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
21864    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
21865  fi
21866
21867  # We used to test for /lib/ld.so.1 and disable shared libraries on
21868  # powerpc, because MkLinux only supported shared libraries with the
21869  # GNU dynamic linker.  Since this was broken with cross compilers,
21870  # most powerpc-linux boxes support dynamic linking these days and
21871  # people can always --disable-shared, the test was removed, and we
21872  # assume the GNU/Linux dynamic linker is in use.
21873  dynamic_linker='GNU/Linux ld.so'
21874  ;;
21875
21876netbsd*)
21877  version_type=sunos
21878  need_lib_prefix=no
21879  need_version=no
21880  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21881    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21882    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21883    dynamic_linker='NetBSD (a.out) ld.so'
21884  else
21885    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21886    soname_spec='$libname$release$shared_ext$major'
21887    dynamic_linker='NetBSD ld.elf_so'
21888  fi
21889  shlibpath_var=LD_LIBRARY_PATH
21890  shlibpath_overrides_runpath=yes
21891  hardcode_into_libs=yes
21892  ;;
21893
21894newsos6)
21895  version_type=linux # correct to gnu/linux during the next big refactor
21896  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21897  shlibpath_var=LD_LIBRARY_PATH
21898  shlibpath_overrides_runpath=yes
21899  ;;
21900
21901*nto* | *qnx*)
21902  version_type=qnx
21903  need_lib_prefix=no
21904  need_version=no
21905  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21906  soname_spec='$libname$release$shared_ext$major'
21907  shlibpath_var=LD_LIBRARY_PATH
21908  shlibpath_overrides_runpath=no
21909  hardcode_into_libs=yes
21910  dynamic_linker='ldqnx.so'
21911  ;;
21912
21913openbsd* | bitrig*)
21914  version_type=sunos
21915  sys_lib_dlsearch_path_spec=/usr/lib
21916  need_lib_prefix=no
21917  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
21918    need_version=no
21919  else
21920    need_version=yes
21921  fi
21922  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21923  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21924  shlibpath_var=LD_LIBRARY_PATH
21925  shlibpath_overrides_runpath=yes
21926  ;;
21927
21928os2*)
21929  libname_spec='$name'
21930  version_type=windows
21931  shrext_cmds=.dll
21932  need_version=no
21933  need_lib_prefix=no
21934  # OS/2 can only load a DLL with a base name of 8 characters or less.
21935  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
21936    v=$($ECHO $release$versuffix | tr -d .-);
21937    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
21938    $ECHO $n$v`$shared_ext'
21939  library_names_spec='${libname}_dll.$libext'
21940  dynamic_linker='OS/2 ld.exe'
21941  shlibpath_var=BEGINLIBPATH
21942  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21943  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21944  postinstall_cmds='base_file=`basename \$file`~
21945    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
21946    dldir=$destdir/`dirname \$dlpath`~
21947    test -d \$dldir || mkdir -p \$dldir~
21948    $install_prog $dir/$dlname \$dldir/$dlname~
21949    chmod a+x \$dldir/$dlname~
21950    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21951      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21952    fi'
21953  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
21954    dlpath=$dir/\$dldll~
21955    $RM \$dlpath'
21956  ;;
21957
21958osf3* | osf4* | osf5*)
21959  version_type=osf
21960  need_lib_prefix=no
21961  need_version=no
21962  soname_spec='$libname$release$shared_ext$major'
21963  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21964  shlibpath_var=LD_LIBRARY_PATH
21965  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
21966  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21967  ;;
21968
21969rdos*)
21970  dynamic_linker=no
21971  ;;
21972
21973solaris*)
21974  version_type=linux # correct to gnu/linux during the next big refactor
21975  need_lib_prefix=no
21976  need_version=no
21977  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21978  soname_spec='$libname$release$shared_ext$major'
21979  shlibpath_var=LD_LIBRARY_PATH
21980  shlibpath_overrides_runpath=yes
21981  hardcode_into_libs=yes
21982  # ldd complains unless libraries are executable
21983  postinstall_cmds='chmod +x $lib'
21984  ;;
21985
21986sunos4*)
21987  version_type=sunos
21988  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21989  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
21990  shlibpath_var=LD_LIBRARY_PATH
21991  shlibpath_overrides_runpath=yes
21992  if test yes = "$with_gnu_ld"; then
21993    need_lib_prefix=no
21994  fi
21995  need_version=yes
21996  ;;
21997
21998sysv4 | sysv4.3*)
21999  version_type=linux # correct to gnu/linux during the next big refactor
22000  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22001  soname_spec='$libname$release$shared_ext$major'
22002  shlibpath_var=LD_LIBRARY_PATH
22003  case $host_vendor in
22004    sni)
22005      shlibpath_overrides_runpath=no
22006      need_lib_prefix=no
22007      runpath_var=LD_RUN_PATH
22008      ;;
22009    siemens)
22010      need_lib_prefix=no
22011      ;;
22012    motorola)
22013      need_lib_prefix=no
22014      need_version=no
22015      shlibpath_overrides_runpath=no
22016      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22017      ;;
22018  esac
22019  ;;
22020
22021sysv4*MP*)
22022  if test -d /usr/nec; then
22023    version_type=linux # correct to gnu/linux during the next big refactor
22024    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
22025    soname_spec='$libname$shared_ext.$major'
22026    shlibpath_var=LD_LIBRARY_PATH
22027  fi
22028  ;;
22029
22030sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22031  version_type=sco
22032  need_lib_prefix=no
22033  need_version=no
22034  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
22035  soname_spec='$libname$release$shared_ext$major'
22036  shlibpath_var=LD_LIBRARY_PATH
22037  shlibpath_overrides_runpath=yes
22038  hardcode_into_libs=yes
22039  if test yes = "$with_gnu_ld"; then
22040    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22041  else
22042    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22043    case $host_os in
22044      sco3.2v5*)
22045        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22046	;;
22047    esac
22048  fi
22049  sys_lib_dlsearch_path_spec='/usr/lib'
22050  ;;
22051
22052tpf*)
22053  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22054  version_type=linux # correct to gnu/linux during the next big refactor
22055  need_lib_prefix=no
22056  need_version=no
22057  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22058  shlibpath_var=LD_LIBRARY_PATH
22059  shlibpath_overrides_runpath=no
22060  hardcode_into_libs=yes
22061  ;;
22062
22063uts4*)
22064  version_type=linux # correct to gnu/linux during the next big refactor
22065  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22066  soname_spec='$libname$release$shared_ext$major'
22067  shlibpath_var=LD_LIBRARY_PATH
22068  ;;
22069
22070*)
22071  dynamic_linker=no
22072  ;;
22073esac
22074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22075$as_echo "$dynamic_linker" >&6; }
22076test no = "$dynamic_linker" && can_build_shared=no
22077
22078variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22079if test yes = "$GCC"; then
22080  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22081fi
22082
22083if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
22084  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
22085fi
22086
22087if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
22088  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
22089fi
22090
22091# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
22092configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
22093
22094# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
22095func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
22096
22097# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
22098configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22197$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22198hardcode_action=
22199if test -n "$hardcode_libdir_flag_spec" ||
22200   test -n "$runpath_var" ||
22201   test yes = "$hardcode_automatic"; then
22202
22203  # We can hardcode non-existent directories.
22204  if test no != "$hardcode_direct" &&
22205     # If the only mechanism to avoid hardcoding is shlibpath_var, we
22206     # have to relink, otherwise we might link with an installed library
22207     # when we should be linking with a yet-to-be-installed one
22208     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
22209     test no != "$hardcode_minus_L"; then
22210    # Linking always hardcodes the temporary library directory.
22211    hardcode_action=relink
22212  else
22213    # We can link without hardcoding, and we can hardcode nonexisting dirs.
22214    hardcode_action=immediate
22215  fi
22216else
22217  # We cannot hardcode anything, or else we can only hardcode existing
22218  # directories.
22219  hardcode_action=unsupported
22220fi
22221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22222$as_echo "$hardcode_action" >&6; }
22223
22224if test relink = "$hardcode_action" ||
22225   test yes = "$inherit_rpath"; then
22226  # Fast installation is not supported
22227  enable_fast_install=no
22228elif test yes = "$shlibpath_overrides_runpath" ||
22229     test no = "$enable_shared"; then
22230  # Fast installation is not necessary
22231  enable_fast_install=needless
22232fi
22233
22234
22235
22236
22237
22238
22239  if test yes != "$enable_dlopen"; then
22240  enable_dlopen=unknown
22241  enable_dlopen_self=unknown
22242  enable_dlopen_self_static=unknown
22243else
22244  lt_cv_dlopen=no
22245  lt_cv_dlopen_libs=
22246
22247  case $host_os in
22248  beos*)
22249    lt_cv_dlopen=load_add_on
22250    lt_cv_dlopen_libs=
22251    lt_cv_dlopen_self=yes
22252    ;;
22253
22254  mingw* | pw32* | cegcc*)
22255    lt_cv_dlopen=LoadLibrary
22256    lt_cv_dlopen_libs=
22257    ;;
22258
22259  cygwin*)
22260    lt_cv_dlopen=dlopen
22261    lt_cv_dlopen_libs=
22262    ;;
22263
22264  darwin*)
22265    # if libdl is installed we need to link against it
22266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22267$as_echo_n "checking for dlopen in -ldl... " >&6; }
22268if ${ac_cv_lib_dl_dlopen+:} false; then :
22269  $as_echo_n "(cached) " >&6
22270else
22271  ac_check_lib_save_LIBS=$LIBS
22272LIBS="-ldl  $LIBS"
22273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22274/* end confdefs.h.  */
22275
22276/* Override any GCC internal prototype to avoid an error.
22277   Use char because int might match the return type of a GCC
22278   builtin and then its argument prototype would still apply.  */
22279#ifdef __cplusplus
22280extern "C"
22281#endif
22282char dlopen ();
22283int
22284main ()
22285{
22286return dlopen ();
22287  ;
22288  return 0;
22289}
22290_ACEOF
22291if ac_fn_c_try_link "$LINENO"; then :
22292  ac_cv_lib_dl_dlopen=yes
22293else
22294  ac_cv_lib_dl_dlopen=no
22295fi
22296rm -f core conftest.err conftest.$ac_objext \
22297    conftest$ac_exeext conftest.$ac_ext
22298LIBS=$ac_check_lib_save_LIBS
22299fi
22300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22301$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22302if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22303  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22304else
22305
22306    lt_cv_dlopen=dyld
22307    lt_cv_dlopen_libs=
22308    lt_cv_dlopen_self=yes
22309
22310fi
22311
22312    ;;
22313
22314  tpf*)
22315    # Don't try to run any link tests for TPF.  We know it's impossible
22316    # because TPF is a cross-compiler, and we know how we open DSOs.
22317    lt_cv_dlopen=dlopen
22318    lt_cv_dlopen_libs=
22319    lt_cv_dlopen_self=no
22320    ;;
22321
22322  *)
22323    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22324if test "x$ac_cv_func_shl_load" = xyes; then :
22325  lt_cv_dlopen=shl_load
22326else
22327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22328$as_echo_n "checking for shl_load in -ldld... " >&6; }
22329if ${ac_cv_lib_dld_shl_load+:} false; then :
22330  $as_echo_n "(cached) " >&6
22331else
22332  ac_check_lib_save_LIBS=$LIBS
22333LIBS="-ldld  $LIBS"
22334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22335/* end confdefs.h.  */
22336
22337/* Override any GCC internal prototype to avoid an error.
22338   Use char because int might match the return type of a GCC
22339   builtin and then its argument prototype would still apply.  */
22340#ifdef __cplusplus
22341extern "C"
22342#endif
22343char shl_load ();
22344int
22345main ()
22346{
22347return shl_load ();
22348  ;
22349  return 0;
22350}
22351_ACEOF
22352if ac_fn_c_try_link "$LINENO"; then :
22353  ac_cv_lib_dld_shl_load=yes
22354else
22355  ac_cv_lib_dld_shl_load=no
22356fi
22357rm -f core conftest.err conftest.$ac_objext \
22358    conftest$ac_exeext conftest.$ac_ext
22359LIBS=$ac_check_lib_save_LIBS
22360fi
22361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22362$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22363if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22364  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
22365else
22366  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22367if test "x$ac_cv_func_dlopen" = xyes; then :
22368  lt_cv_dlopen=dlopen
22369else
22370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22371$as_echo_n "checking for dlopen in -ldl... " >&6; }
22372if ${ac_cv_lib_dl_dlopen+:} false; then :
22373  $as_echo_n "(cached) " >&6
22374else
22375  ac_check_lib_save_LIBS=$LIBS
22376LIBS="-ldl  $LIBS"
22377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22378/* end confdefs.h.  */
22379
22380/* Override any GCC internal prototype to avoid an error.
22381   Use char because int might match the return type of a GCC
22382   builtin and then its argument prototype would still apply.  */
22383#ifdef __cplusplus
22384extern "C"
22385#endif
22386char dlopen ();
22387int
22388main ()
22389{
22390return dlopen ();
22391  ;
22392  return 0;
22393}
22394_ACEOF
22395if ac_fn_c_try_link "$LINENO"; then :
22396  ac_cv_lib_dl_dlopen=yes
22397else
22398  ac_cv_lib_dl_dlopen=no
22399fi
22400rm -f core conftest.err conftest.$ac_objext \
22401    conftest$ac_exeext conftest.$ac_ext
22402LIBS=$ac_check_lib_save_LIBS
22403fi
22404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22405$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22406if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22407  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22408else
22409  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22410$as_echo_n "checking for dlopen in -lsvld... " >&6; }
22411if ${ac_cv_lib_svld_dlopen+:} false; then :
22412  $as_echo_n "(cached) " >&6
22413else
22414  ac_check_lib_save_LIBS=$LIBS
22415LIBS="-lsvld  $LIBS"
22416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22417/* end confdefs.h.  */
22418
22419/* Override any GCC internal prototype to avoid an error.
22420   Use char because int might match the return type of a GCC
22421   builtin and then its argument prototype would still apply.  */
22422#ifdef __cplusplus
22423extern "C"
22424#endif
22425char dlopen ();
22426int
22427main ()
22428{
22429return dlopen ();
22430  ;
22431  return 0;
22432}
22433_ACEOF
22434if ac_fn_c_try_link "$LINENO"; then :
22435  ac_cv_lib_svld_dlopen=yes
22436else
22437  ac_cv_lib_svld_dlopen=no
22438fi
22439rm -f core conftest.err conftest.$ac_objext \
22440    conftest$ac_exeext conftest.$ac_ext
22441LIBS=$ac_check_lib_save_LIBS
22442fi
22443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22444$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22445if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22446  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
22447else
22448  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22449$as_echo_n "checking for dld_link in -ldld... " >&6; }
22450if ${ac_cv_lib_dld_dld_link+:} false; then :
22451  $as_echo_n "(cached) " >&6
22452else
22453  ac_check_lib_save_LIBS=$LIBS
22454LIBS="-ldld  $LIBS"
22455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22456/* end confdefs.h.  */
22457
22458/* Override any GCC internal prototype to avoid an error.
22459   Use char because int might match the return type of a GCC
22460   builtin and then its argument prototype would still apply.  */
22461#ifdef __cplusplus
22462extern "C"
22463#endif
22464char dld_link ();
22465int
22466main ()
22467{
22468return dld_link ();
22469  ;
22470  return 0;
22471}
22472_ACEOF
22473if ac_fn_c_try_link "$LINENO"; then :
22474  ac_cv_lib_dld_dld_link=yes
22475else
22476  ac_cv_lib_dld_dld_link=no
22477fi
22478rm -f core conftest.err conftest.$ac_objext \
22479    conftest$ac_exeext conftest.$ac_ext
22480LIBS=$ac_check_lib_save_LIBS
22481fi
22482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22483$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22484if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22485  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
22486fi
22487
22488
22489fi
22490
22491
22492fi
22493
22494
22495fi
22496
22497
22498fi
22499
22500
22501fi
22502
22503    ;;
22504  esac
22505
22506  if test no = "$lt_cv_dlopen"; then
22507    enable_dlopen=no
22508  else
22509    enable_dlopen=yes
22510  fi
22511
22512  case $lt_cv_dlopen in
22513  dlopen)
22514    save_CPPFLAGS=$CPPFLAGS
22515    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22516
22517    save_LDFLAGS=$LDFLAGS
22518    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22519
22520    save_LIBS=$LIBS
22521    LIBS="$lt_cv_dlopen_libs $LIBS"
22522
22523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22524$as_echo_n "checking whether a program can dlopen itself... " >&6; }
22525if ${lt_cv_dlopen_self+:} false; then :
22526  $as_echo_n "(cached) " >&6
22527else
22528  	  if test yes = "$cross_compiling"; then :
22529  lt_cv_dlopen_self=cross
22530else
22531  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22532  lt_status=$lt_dlunknown
22533  cat > conftest.$ac_ext <<_LT_EOF
22534#line $LINENO "configure"
22535#include "confdefs.h"
22536
22537#if HAVE_DLFCN_H
22538#include <dlfcn.h>
22539#endif
22540
22541#include <stdio.h>
22542
22543#ifdef RTLD_GLOBAL
22544#  define LT_DLGLOBAL		RTLD_GLOBAL
22545#else
22546#  ifdef DL_GLOBAL
22547#    define LT_DLGLOBAL		DL_GLOBAL
22548#  else
22549#    define LT_DLGLOBAL		0
22550#  endif
22551#endif
22552
22553/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22554   find out it does not work in some platform. */
22555#ifndef LT_DLLAZY_OR_NOW
22556#  ifdef RTLD_LAZY
22557#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
22558#  else
22559#    ifdef DL_LAZY
22560#      define LT_DLLAZY_OR_NOW		DL_LAZY
22561#    else
22562#      ifdef RTLD_NOW
22563#        define LT_DLLAZY_OR_NOW	RTLD_NOW
22564#      else
22565#        ifdef DL_NOW
22566#          define LT_DLLAZY_OR_NOW	DL_NOW
22567#        else
22568#          define LT_DLLAZY_OR_NOW	0
22569#        endif
22570#      endif
22571#    endif
22572#  endif
22573#endif
22574
22575/* When -fvisibility=hidden is used, assume the code has been annotated
22576   correspondingly for the symbols needed.  */
22577#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22578int fnord () __attribute__((visibility("default")));
22579#endif
22580
22581int fnord () { return 42; }
22582int main ()
22583{
22584  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22585  int status = $lt_dlunknown;
22586
22587  if (self)
22588    {
22589      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22590      else
22591        {
22592	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22593          else puts (dlerror ());
22594	}
22595      /* dlclose (self); */
22596    }
22597  else
22598    puts (dlerror ());
22599
22600  return status;
22601}
22602_LT_EOF
22603  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22604  (eval $ac_link) 2>&5
22605  ac_status=$?
22606  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22607  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22608    (./conftest; exit; ) >&5 2>/dev/null
22609    lt_status=$?
22610    case x$lt_status in
22611      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22612      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22613      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22614    esac
22615  else :
22616    # compilation failed
22617    lt_cv_dlopen_self=no
22618  fi
22619fi
22620rm -fr conftest*
22621
22622
22623fi
22624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22625$as_echo "$lt_cv_dlopen_self" >&6; }
22626
22627    if test yes = "$lt_cv_dlopen_self"; then
22628      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
22629      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
22630$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
22631if ${lt_cv_dlopen_self_static+:} false; then :
22632  $as_echo_n "(cached) " >&6
22633else
22634  	  if test yes = "$cross_compiling"; then :
22635  lt_cv_dlopen_self_static=cross
22636else
22637  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22638  lt_status=$lt_dlunknown
22639  cat > conftest.$ac_ext <<_LT_EOF
22640#line $LINENO "configure"
22641#include "confdefs.h"
22642
22643#if HAVE_DLFCN_H
22644#include <dlfcn.h>
22645#endif
22646
22647#include <stdio.h>
22648
22649#ifdef RTLD_GLOBAL
22650#  define LT_DLGLOBAL		RTLD_GLOBAL
22651#else
22652#  ifdef DL_GLOBAL
22653#    define LT_DLGLOBAL		DL_GLOBAL
22654#  else
22655#    define LT_DLGLOBAL		0
22656#  endif
22657#endif
22658
22659/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22660   find out it does not work in some platform. */
22661#ifndef LT_DLLAZY_OR_NOW
22662#  ifdef RTLD_LAZY
22663#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
22664#  else
22665#    ifdef DL_LAZY
22666#      define LT_DLLAZY_OR_NOW		DL_LAZY
22667#    else
22668#      ifdef RTLD_NOW
22669#        define LT_DLLAZY_OR_NOW	RTLD_NOW
22670#      else
22671#        ifdef DL_NOW
22672#          define LT_DLLAZY_OR_NOW	DL_NOW
22673#        else
22674#          define LT_DLLAZY_OR_NOW	0
22675#        endif
22676#      endif
22677#    endif
22678#  endif
22679#endif
22680
22681/* When -fvisibility=hidden is used, assume the code has been annotated
22682   correspondingly for the symbols needed.  */
22683#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22684int fnord () __attribute__((visibility("default")));
22685#endif
22686
22687int fnord () { return 42; }
22688int main ()
22689{
22690  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22691  int status = $lt_dlunknown;
22692
22693  if (self)
22694    {
22695      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22696      else
22697        {
22698	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22699          else puts (dlerror ());
22700	}
22701      /* dlclose (self); */
22702    }
22703  else
22704    puts (dlerror ());
22705
22706  return status;
22707}
22708_LT_EOF
22709  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22710  (eval $ac_link) 2>&5
22711  ac_status=$?
22712  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22713  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22714    (./conftest; exit; ) >&5 2>/dev/null
22715    lt_status=$?
22716    case x$lt_status in
22717      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
22718      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
22719      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
22720    esac
22721  else :
22722    # compilation failed
22723    lt_cv_dlopen_self_static=no
22724  fi
22725fi
22726rm -fr conftest*
22727
22728
22729fi
22730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
22731$as_echo "$lt_cv_dlopen_self_static" >&6; }
22732    fi
22733
22734    CPPFLAGS=$save_CPPFLAGS
22735    LDFLAGS=$save_LDFLAGS
22736    LIBS=$save_LIBS
22737    ;;
22738  esac
22739
22740  case $lt_cv_dlopen_self in
22741  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
22742  *) enable_dlopen_self=unknown ;;
22743  esac
22744
22745  case $lt_cv_dlopen_self_static in
22746  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
22747  *) enable_dlopen_self_static=unknown ;;
22748  esac
22749fi
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767striplib=
22768old_striplib=
22769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
22770$as_echo_n "checking whether stripping libraries is possible... " >&6; }
22771if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22772  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
22773  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
22774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22775$as_echo "yes" >&6; }
22776else
22777# FIXME - insert some real tests, host_os isn't really good enough
22778  case $host_os in
22779  darwin*)
22780    if test -n "$STRIP"; then
22781      striplib="$STRIP -x"
22782      old_striplib="$STRIP -S"
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22784$as_echo "yes" >&6; }
22785    else
22786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22787$as_echo "no" >&6; }
22788    fi
22789    ;;
22790  *)
22791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22792$as_echo "no" >&6; }
22793    ;;
22794  esac
22795fi
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808  # Report what library types will actually be built
22809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
22810$as_echo_n "checking if libtool supports shared libraries... " >&6; }
22811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
22812$as_echo "$can_build_shared" >&6; }
22813
22814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
22815$as_echo_n "checking whether to build shared libraries... " >&6; }
22816  test no = "$can_build_shared" && enable_shared=no
22817
22818  # On AIX, shared libraries and static libraries use the same namespace, and
22819  # are all built from PIC.
22820  case $host_os in
22821  aix3*)
22822    test yes = "$enable_shared" && enable_static=no
22823    if test -n "$RANLIB"; then
22824      archive_cmds="$archive_cmds~\$RANLIB \$lib"
22825      postinstall_cmds='$RANLIB $lib'
22826    fi
22827    ;;
22828
22829  aix[4-9]*)
22830    if test ia64 != "$host_cpu"; then
22831      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
22832      yes,aix,yes) ;;			# shared object as lib.so file only
22833      yes,svr4,*) ;;			# shared object as lib.so archive member only
22834      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
22835      esac
22836    fi
22837    ;;
22838  esac
22839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
22840$as_echo "$enable_shared" >&6; }
22841
22842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
22843$as_echo_n "checking whether to build static libraries... " >&6; }
22844  # Make sure either enable_shared or enable_static is yes.
22845  test yes = "$enable_shared" || enable_static=yes
22846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
22847$as_echo "$enable_static" >&6; }
22848
22849
22850
22851
22852fi
22853ac_ext=c
22854ac_cpp='$CPP $CPPFLAGS'
22855ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22856ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22857ac_compiler_gnu=$ac_cv_c_compiler_gnu
22858
22859CC=$lt_save_CC
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875        ac_config_commands="$ac_config_commands libtool"
22876
22877
22878
22879
22880# Only expand once:
22881
22882
22883
22884
22885
22886
22887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
22888$as_echo_n "checking if sntp will be built... " >&6; }
22889
22890# Check whether --with-sntp was given.
22891if test "${with_sntp+set}" = set; then :
22892  withval=$with_sntp;
22893else
22894  with_sntp="${withsntp=yes}"
22895
22896fi
22897
22898case "$with_sntp" in
22899 no)
22900    SNTP=
22901    ;;
22902 *)
22903    SNTP=sntp
22904    ;;
22905esac
22906
22907 if test -n "$SNTP"; then
22908  BUILD_SNTP_TRUE=
22909  BUILD_SNTP_FALSE='#'
22910else
22911  BUILD_SNTP_TRUE='#'
22912  BUILD_SNTP_FALSE=
22913fi
22914
22915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
22916$as_echo "$with_sntp" >&6; }
22917
22918
22919
22920case "$SNTP" in
22921 '')
22922    SNTP_DB=
22923    SNTP_DL=
22924    SNTP_DS=
22925    ;;
22926esac
22927
22928###
22929
22930# NTP has (so far) been relying on leading-edge autogen.
22931# Therefore, by default:
22932# - use the version we ship with
22933# - do not install it
22934# - build a static copy (AC_DISABLE_SHARED - done earlier)
22935case "${enable_local_libopts+set}" in
22936 set) ;;
22937 *) enable_local_libopts=yes ;;
22938esac
22939case "${enable_libopts_install+set}" in
22940 set) ;;
22941 *) enable_libopts_install=no ;;
22942esac
22943enable_nls=no
22944
22945
22946  ac_header_dirent=no
22947for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22948  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
22950$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
22951if eval \${$as_ac_Header+:} false; then :
22952  $as_echo_n "(cached) " >&6
22953else
22954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22955/* end confdefs.h.  */
22956#include <sys/types.h>
22957#include <$ac_hdr>
22958
22959int
22960main ()
22961{
22962if ((DIR *) 0)
22963return 0;
22964  ;
22965  return 0;
22966}
22967_ACEOF
22968if ac_fn_c_try_compile "$LINENO"; then :
22969  eval "$as_ac_Header=yes"
22970else
22971  eval "$as_ac_Header=no"
22972fi
22973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22974fi
22975eval ac_res=\$$as_ac_Header
22976	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22977$as_echo "$ac_res" >&6; }
22978if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22979  cat >>confdefs.h <<_ACEOF
22980#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22981_ACEOF
22982
22983ac_header_dirent=$ac_hdr; break
22984fi
22985
22986done
22987# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22988if test $ac_header_dirent = dirent.h; then
22989  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
22990$as_echo_n "checking for library containing opendir... " >&6; }
22991if ${ac_cv_search_opendir+:} false; then :
22992  $as_echo_n "(cached) " >&6
22993else
22994  ac_func_search_save_LIBS=$LIBS
22995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22996/* end confdefs.h.  */
22997
22998/* Override any GCC internal prototype to avoid an error.
22999   Use char because int might match the return type of a GCC
23000   builtin and then its argument prototype would still apply.  */
23001#ifdef __cplusplus
23002extern "C"
23003#endif
23004char opendir ();
23005int
23006main ()
23007{
23008return opendir ();
23009  ;
23010  return 0;
23011}
23012_ACEOF
23013for ac_lib in '' dir; do
23014  if test -z "$ac_lib"; then
23015    ac_res="none required"
23016  else
23017    ac_res=-l$ac_lib
23018    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23019  fi
23020  if ac_fn_c_try_link "$LINENO"; then :
23021  ac_cv_search_opendir=$ac_res
23022fi
23023rm -f core conftest.err conftest.$ac_objext \
23024    conftest$ac_exeext
23025  if ${ac_cv_search_opendir+:} false; then :
23026  break
23027fi
23028done
23029if ${ac_cv_search_opendir+:} false; then :
23030
23031else
23032  ac_cv_search_opendir=no
23033fi
23034rm conftest.$ac_ext
23035LIBS=$ac_func_search_save_LIBS
23036fi
23037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23038$as_echo "$ac_cv_search_opendir" >&6; }
23039ac_res=$ac_cv_search_opendir
23040if test "$ac_res" != no; then :
23041  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23042
23043fi
23044
23045else
23046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23047$as_echo_n "checking for library containing opendir... " >&6; }
23048if ${ac_cv_search_opendir+:} false; then :
23049  $as_echo_n "(cached) " >&6
23050else
23051  ac_func_search_save_LIBS=$LIBS
23052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23053/* end confdefs.h.  */
23054
23055/* Override any GCC internal prototype to avoid an error.
23056   Use char because int might match the return type of a GCC
23057   builtin and then its argument prototype would still apply.  */
23058#ifdef __cplusplus
23059extern "C"
23060#endif
23061char opendir ();
23062int
23063main ()
23064{
23065return opendir ();
23066  ;
23067  return 0;
23068}
23069_ACEOF
23070for ac_lib in '' x; do
23071  if test -z "$ac_lib"; then
23072    ac_res="none required"
23073  else
23074    ac_res=-l$ac_lib
23075    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23076  fi
23077  if ac_fn_c_try_link "$LINENO"; then :
23078  ac_cv_search_opendir=$ac_res
23079fi
23080rm -f core conftest.err conftest.$ac_objext \
23081    conftest$ac_exeext
23082  if ${ac_cv_search_opendir+:} false; then :
23083  break
23084fi
23085done
23086if ${ac_cv_search_opendir+:} false; then :
23087
23088else
23089  ac_cv_search_opendir=no
23090fi
23091rm conftest.$ac_ext
23092LIBS=$ac_func_search_save_LIBS
23093fi
23094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23095$as_echo "$ac_cv_search_opendir" >&6; }
23096ac_res=$ac_cv_search_opendir
23097if test "$ac_res" != no; then :
23098  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23099
23100fi
23101
23102fi
23103
23104
23105  # =================
23106  # AC_CHECK_HEADERS
23107  # =================
23108  for ac_header in  \
23109      sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23110      sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23111      sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23112      fcntl.h       libgen.h      libintl.h     memory.h \
23113      netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23114      unistd.h      utime.h
23115do :
23116  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23117ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23118if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23119  cat >>confdefs.h <<_ACEOF
23120#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23121_ACEOF
23122
23123fi
23124
23125done
23126
23127
23128  for ac_header in stdarg.h     varargs.h
23129do :
23130  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23131ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23132if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23133  cat >>confdefs.h <<_ACEOF
23134#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23135_ACEOF
23136 lo_have_arg_hdr=true;break
23137else
23138  lo_have_arg_hdr=false
23139fi
23140
23141done
23142
23143
23144  for ac_header in string.h     strings.h
23145do :
23146  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23147ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23148if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23149  cat >>confdefs.h <<_ACEOF
23150#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23151_ACEOF
23152 lo_have_str_hdr=true;break
23153else
23154  lo_have_str_hdr=false
23155fi
23156
23157done
23158
23159
23160  for ac_header in limits.h     sys/limits.h  values.h
23161do :
23162  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23163ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23164if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23165  cat >>confdefs.h <<_ACEOF
23166#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23167_ACEOF
23168 lo_have_lim_hdr=true;break
23169else
23170  lo_have_lim_hdr=false
23171fi
23172
23173done
23174
23175
23176  for ac_header in inttypes.h   stdint.h
23177do :
23178  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23179ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23180if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23181  cat >>confdefs.h <<_ACEOF
23182#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23183_ACEOF
23184 lo_have_typ_hdr=true;break
23185else
23186  lo_have_typ_hdr=false
23187fi
23188
23189done
23190
23191
23192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23193$as_echo_n "checking for working stdnoreturn.h... " >&6; }
23194if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23198/* end confdefs.h.  */
23199#include <stdlib.h>
23200            #include <stdnoreturn.h>
23201            /* Do not check for 'noreturn' after the return type.
23202               C11 allows it, but it's rarely done that way
23203               and circa-2012 bleeding-edge GCC rejects it when given
23204               -Werror=old-style-declaration.  */
23205            noreturn void foo1 (void) { exit (0); }
23206            _Noreturn void foo2 (void) { exit (0); }
23207            int testit (int argc, char **argv) {
23208              if (argc & 1)
23209                return 0;
23210              (argv[0][0] ? foo1 : foo2) ();
23211            }
23212
23213int
23214main ()
23215{
23216
23217  ;
23218  return 0;
23219}
23220_ACEOF
23221if ac_fn_c_try_compile "$LINENO"; then :
23222  gl_cv_header_working_stdnoreturn_h=yes
23223else
23224  gl_cv_header_working_stdnoreturn_h=no
23225fi
23226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23227fi
23228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23229$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23230
23231  if test $gl_cv_header_working_stdnoreturn_h = yes; then
23232    STDNORETURN_H=''
23233  else
23234    STDNORETURN_H='stdnoreturn.h'
23235  fi
23236
23237
23238   if test -n "$STDNORETURN_H"; then
23239  GL_GENERATE_STDNORETURN_H_TRUE=
23240  GL_GENERATE_STDNORETURN_H_FALSE='#'
23241else
23242  GL_GENERATE_STDNORETURN_H_TRUE='#'
23243  GL_GENERATE_STDNORETURN_H_FALSE=
23244fi
23245
23246
23247
23248  # ----------------------------------------------------------------------
23249  # check for various programs used during the build.
23250  # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23251  # ----------------------------------------------------------------------
23252  for ac_header in runetype.h wchar.h
23253do :
23254  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23255ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23256  $ac_includes_default
23257  #if HAVE_RUNETYPE_H
23258  # include <runetype.h>
23259  #endif
23260
23261"
23262if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23263  cat >>confdefs.h <<_ACEOF
23264#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23265_ACEOF
23266
23267fi
23268
23269done
23270
23271
23272  # Check whether --enable-nls was given.
23273if test "${enable_nls+set}" = set; then :
23274  enableval=$enable_nls;
23275fi
23276
23277  if test "x$enable_nls" != "xno" && \
23278  test "X${ac_cv_header_libintl_h}" = Xyes; then :
23279
23280
23281$as_echo "#define ENABLE_NLS 1" >>confdefs.h
23282
23283fi
23284
23285  # --------------------------------------------
23286  # Verify certain entries from AC_CHECK_HEADERS
23287  # --------------------------------------------
23288  ${lo_have_arg_hdr} || \
23289    as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23290
23291  ${lo_have_str_hdr} || \
23292    as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23293
23294  ${lo_have_lim_hdr} || \
23295    as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23296
23297  ${lo_have_typ_hdr} || \
23298    as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23299
23300  for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23301  do eval as_ac_var=\${ac_cv_header_${f}_h}
23302     test "X${as_ac_var}" = Xyes || {
23303       as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23304     }
23305  done
23306  test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23307    echo '#include <stdint.h>' > inttypes.h
23308
23309  # ----------------------------------------------------------------------
23310  # Checks for typedefs
23311  # ----------------------------------------------------------------------
23312  ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23313if test "x$ac_cv_type_wchar_t" = xyes; then :
23314
23315cat >>confdefs.h <<_ACEOF
23316#define HAVE_WCHAR_T 1
23317_ACEOF
23318
23319
23320fi
23321
23322  ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23323    $ac_includes_default
23324    #if HAVE_RUNETYPE_H
23325    # include <runetype.h>
23326    #endif
23327    #if HAVE_WCHAR_H
23328    # include <wchar.h>
23329    #endif
23330
23331"
23332if test "x$ac_cv_type_wint_t" = xyes; then :
23333
23334cat >>confdefs.h <<_ACEOF
23335#define HAVE_WINT_T 1
23336_ACEOF
23337
23338
23339fi
23340
23341  ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23342if test "x$ac_cv_type_int8_t" = xyes; then :
23343
23344cat >>confdefs.h <<_ACEOF
23345#define HAVE_INT8_T 1
23346_ACEOF
23347
23348
23349fi
23350ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23351if test "x$ac_cv_type_uint8_t" = xyes; then :
23352
23353cat >>confdefs.h <<_ACEOF
23354#define HAVE_UINT8_T 1
23355_ACEOF
23356
23357
23358fi
23359ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23360if test "x$ac_cv_type_int16_t" = xyes; then :
23361
23362cat >>confdefs.h <<_ACEOF
23363#define HAVE_INT16_T 1
23364_ACEOF
23365
23366
23367fi
23368ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23369if test "x$ac_cv_type_uint16_t" = xyes; then :
23370
23371cat >>confdefs.h <<_ACEOF
23372#define HAVE_UINT16_T 1
23373_ACEOF
23374
23375
23376fi
23377ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23378if test "x$ac_cv_type_int32_t" = xyes; then :
23379
23380cat >>confdefs.h <<_ACEOF
23381#define HAVE_INT32_T 1
23382_ACEOF
23383
23384
23385fi
23386ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23387if test "x$ac_cv_type_uint32_t" = xyes; then :
23388
23389cat >>confdefs.h <<_ACEOF
23390#define HAVE_UINT32_T 1
23391_ACEOF
23392
23393
23394fi
23395ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23396if test "x$ac_cv_type_intptr_t" = xyes; then :
23397
23398cat >>confdefs.h <<_ACEOF
23399#define HAVE_INTPTR_T 1
23400_ACEOF
23401
23402
23403fi
23404ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23405if test "x$ac_cv_type_uintptr_t" = xyes; then :
23406
23407cat >>confdefs.h <<_ACEOF
23408#define HAVE_UINTPTR_T 1
23409_ACEOF
23410
23411
23412fi
23413ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23414if test "x$ac_cv_type_uint_t" = xyes; then :
23415
23416cat >>confdefs.h <<_ACEOF
23417#define HAVE_UINT_T 1
23418_ACEOF
23419
23420
23421fi
23422ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23423if test "x$ac_cv_type_pid_t" = xyes; then :
23424
23425cat >>confdefs.h <<_ACEOF
23426#define HAVE_PID_T 1
23427_ACEOF
23428
23429
23430fi
23431ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23432if test "x$ac_cv_type_size_t" = xyes; then :
23433
23434cat >>confdefs.h <<_ACEOF
23435#define HAVE_SIZE_T 1
23436_ACEOF
23437
23438
23439fi
23440ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23441if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23442
23443cat >>confdefs.h <<_ACEOF
23444#define HAVE_PTRDIFF_T 1
23445_ACEOF
23446
23447
23448fi
23449
23450  # The cast to long int works around a bug in the HP C Compiler
23451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23453# This bug is HP SR number 8606223364.
23454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23455$as_echo_n "checking size of char *... " >&6; }
23456if ${ac_cv_sizeof_char_p+:} false; then :
23457  $as_echo_n "(cached) " >&6
23458else
23459  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23460
23461else
23462  if test "$ac_cv_type_char_p" = yes; then
23463     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23465as_fn_error 77 "cannot compute sizeof (char *)
23466See \`config.log' for more details" "$LINENO" 5; }
23467   else
23468     ac_cv_sizeof_char_p=0
23469   fi
23470fi
23471
23472fi
23473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23474$as_echo "$ac_cv_sizeof_char_p" >&6; }
23475
23476
23477
23478cat >>confdefs.h <<_ACEOF
23479#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23480_ACEOF
23481
23482
23483  # The cast to long int works around a bug in the HP C Compiler
23484# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23485# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23486# This bug is HP SR number 8606223364.
23487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23488$as_echo_n "checking size of int... " >&6; }
23489if ${ac_cv_sizeof_int+:} false; then :
23490  $as_echo_n "(cached) " >&6
23491else
23492  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23493
23494else
23495  if test "$ac_cv_type_int" = yes; then
23496     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23497$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23498as_fn_error 77 "cannot compute sizeof (int)
23499See \`config.log' for more details" "$LINENO" 5; }
23500   else
23501     ac_cv_sizeof_int=0
23502   fi
23503fi
23504
23505fi
23506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23507$as_echo "$ac_cv_sizeof_int" >&6; }
23508
23509
23510
23511cat >>confdefs.h <<_ACEOF
23512#define SIZEOF_INT $ac_cv_sizeof_int
23513_ACEOF
23514
23515
23516  # The cast to long int works around a bug in the HP C Compiler
23517# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23518# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23519# This bug is HP SR number 8606223364.
23520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23521$as_echo_n "checking size of long... " >&6; }
23522if ${ac_cv_sizeof_long+:} false; then :
23523  $as_echo_n "(cached) " >&6
23524else
23525  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23526
23527else
23528  if test "$ac_cv_type_long" = yes; then
23529     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23530$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23531as_fn_error 77 "cannot compute sizeof (long)
23532See \`config.log' for more details" "$LINENO" 5; }
23533   else
23534     ac_cv_sizeof_long=0
23535   fi
23536fi
23537
23538fi
23539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23540$as_echo "$ac_cv_sizeof_long" >&6; }
23541
23542
23543
23544cat >>confdefs.h <<_ACEOF
23545#define SIZEOF_LONG $ac_cv_sizeof_long
23546_ACEOF
23547
23548
23549  # The cast to long int works around a bug in the HP C Compiler
23550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23552# This bug is HP SR number 8606223364.
23553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23554$as_echo_n "checking size of short... " >&6; }
23555if ${ac_cv_sizeof_short+:} false; then :
23556  $as_echo_n "(cached) " >&6
23557else
23558  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23559
23560else
23561  if test "$ac_cv_type_short" = yes; then
23562     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23564as_fn_error 77 "cannot compute sizeof (short)
23565See \`config.log' for more details" "$LINENO" 5; }
23566   else
23567     ac_cv_sizeof_short=0
23568   fi
23569fi
23570
23571fi
23572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23573$as_echo "$ac_cv_sizeof_short" >&6; }
23574
23575
23576
23577cat >>confdefs.h <<_ACEOF
23578#define SIZEOF_SHORT $ac_cv_sizeof_short
23579_ACEOF
23580
23581
23582
23583  # ------------
23584  # AC_CHECK_LIB
23585  # ------------
23586  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23587$as_echo_n "checking for pathfind in -lgen... " >&6; }
23588if ${ac_cv_lib_gen_pathfind+:} false; then :
23589  $as_echo_n "(cached) " >&6
23590else
23591  ac_check_lib_save_LIBS=$LIBS
23592LIBS="-lgen  $LIBS"
23593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23594/* end confdefs.h.  */
23595
23596/* Override any GCC internal prototype to avoid an error.
23597   Use char because int might match the return type of a GCC
23598   builtin and then its argument prototype would still apply.  */
23599#ifdef __cplusplus
23600extern "C"
23601#endif
23602char pathfind ();
23603int
23604main ()
23605{
23606return pathfind ();
23607  ;
23608  return 0;
23609}
23610_ACEOF
23611if ac_fn_c_try_link "$LINENO"; then :
23612  ac_cv_lib_gen_pathfind=yes
23613else
23614  ac_cv_lib_gen_pathfind=no
23615fi
23616rm -f core conftest.err conftest.$ac_objext \
23617    conftest$ac_exeext conftest.$ac_ext
23618LIBS=$ac_check_lib_save_LIBS
23619fi
23620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23621$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23622if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23623  cat >>confdefs.h <<_ACEOF
23624#define HAVE_LIBGEN 1
23625_ACEOF
23626
23627  LIBS="-lgen $LIBS"
23628
23629fi
23630
23631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23632$as_echo_n "checking for gettext in -lintl... " >&6; }
23633if ${ac_cv_lib_intl_gettext+:} false; then :
23634  $as_echo_n "(cached) " >&6
23635else
23636  ac_check_lib_save_LIBS=$LIBS
23637LIBS="-lintl  $LIBS"
23638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23639/* end confdefs.h.  */
23640
23641/* Override any GCC internal prototype to avoid an error.
23642   Use char because int might match the return type of a GCC
23643   builtin and then its argument prototype would still apply.  */
23644#ifdef __cplusplus
23645extern "C"
23646#endif
23647char gettext ();
23648int
23649main ()
23650{
23651return gettext ();
23652  ;
23653  return 0;
23654}
23655_ACEOF
23656if ac_fn_c_try_link "$LINENO"; then :
23657  ac_cv_lib_intl_gettext=yes
23658else
23659  ac_cv_lib_intl_gettext=no
23660fi
23661rm -f core conftest.err conftest.$ac_objext \
23662    conftest$ac_exeext conftest.$ac_ext
23663LIBS=$ac_check_lib_save_LIBS
23664fi
23665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
23666$as_echo "$ac_cv_lib_intl_gettext" >&6; }
23667if test "x$ac_cv_lib_intl_gettext" = xyes; then :
23668  cat >>confdefs.h <<_ACEOF
23669#define HAVE_LIBINTL 1
23670_ACEOF
23671
23672  LIBS="-lintl $LIBS"
23673
23674fi
23675
23676  for ac_func in vprintf
23677do :
23678  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23679if test "x$ac_cv_func_vprintf" = xyes; then :
23680  cat >>confdefs.h <<_ACEOF
23681#define HAVE_VPRINTF 1
23682_ACEOF
23683
23684ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23685if test "x$ac_cv_func__doprnt" = xyes; then :
23686
23687$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23688
23689fi
23690
23691fi
23692done
23693
23694
23695  for ac_header in vfork.h
23696do :
23697  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
23698if test "x$ac_cv_header_vfork_h" = xyes; then :
23699  cat >>confdefs.h <<_ACEOF
23700#define HAVE_VFORK_H 1
23701_ACEOF
23702
23703fi
23704
23705done
23706
23707for ac_func in fork vfork
23708do :
23709  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23710ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23711if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23712  cat >>confdefs.h <<_ACEOF
23713#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23714_ACEOF
23715
23716fi
23717done
23718
23719if test "x$ac_cv_func_fork" = xyes; then
23720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
23721$as_echo_n "checking for working fork... " >&6; }
23722if ${ac_cv_func_fork_works+:} false; then :
23723  $as_echo_n "(cached) " >&6
23724else
23725  if test "$cross_compiling" = yes; then :
23726  ac_cv_func_fork_works=cross
23727else
23728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23729/* end confdefs.h.  */
23730$ac_includes_default
23731int
23732main ()
23733{
23734
23735	  /* By Ruediger Kuhlmann. */
23736	  return fork () < 0;
23737
23738  ;
23739  return 0;
23740}
23741_ACEOF
23742if ac_fn_c_try_run "$LINENO"; then :
23743  ac_cv_func_fork_works=yes
23744else
23745  ac_cv_func_fork_works=no
23746fi
23747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23748  conftest.$ac_objext conftest.beam conftest.$ac_ext
23749fi
23750
23751fi
23752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
23753$as_echo "$ac_cv_func_fork_works" >&6; }
23754
23755else
23756  ac_cv_func_fork_works=$ac_cv_func_fork
23757fi
23758if test "x$ac_cv_func_fork_works" = xcross; then
23759  case $host in
23760    *-*-amigaos* | *-*-msdosdjgpp*)
23761      # Override, as these systems have only a dummy fork() stub
23762      ac_cv_func_fork_works=no
23763      ;;
23764    *)
23765      ac_cv_func_fork_works=yes
23766      ;;
23767  esac
23768  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23769$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
23770fi
23771ac_cv_func_vfork_works=$ac_cv_func_vfork
23772if test "x$ac_cv_func_vfork" = xyes; then
23773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
23774$as_echo_n "checking for working vfork... " >&6; }
23775if ${ac_cv_func_vfork_works+:} false; then :
23776  $as_echo_n "(cached) " >&6
23777else
23778  if test "$cross_compiling" = yes; then :
23779  ac_cv_func_vfork_works=cross
23780else
23781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23782/* end confdefs.h.  */
23783/* Thanks to Paul Eggert for this test.  */
23784$ac_includes_default
23785#include <sys/wait.h>
23786#ifdef HAVE_VFORK_H
23787# include <vfork.h>
23788#endif
23789/* On some sparc systems, changes by the child to local and incoming
23790   argument registers are propagated back to the parent.  The compiler
23791   is told about this with #include <vfork.h>, but some compilers
23792   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23793   static variable whose address is put into a register that is
23794   clobbered by the vfork.  */
23795static void
23796#ifdef __cplusplus
23797sparc_address_test (int arg)
23798# else
23799sparc_address_test (arg) int arg;
23800#endif
23801{
23802  static pid_t child;
23803  if (!child) {
23804    child = vfork ();
23805    if (child < 0) {
23806      perror ("vfork");
23807      _exit(2);
23808    }
23809    if (!child) {
23810      arg = getpid();
23811      write(-1, "", 0);
23812      _exit (arg);
23813    }
23814  }
23815}
23816
23817int
23818main ()
23819{
23820  pid_t parent = getpid ();
23821  pid_t child;
23822
23823  sparc_address_test (0);
23824
23825  child = vfork ();
23826
23827  if (child == 0) {
23828    /* Here is another test for sparc vfork register problems.  This
23829       test uses lots of local variables, at least as many local
23830       variables as main has allocated so far including compiler
23831       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23832       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23833       reuse the register of parent for one of the local variables,
23834       since it will think that parent can't possibly be used any more
23835       in this routine.  Assigning to the local variable will thus
23836       munge parent in the parent process.  */
23837    pid_t
23838      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23839      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23840    /* Convince the compiler that p..p7 are live; otherwise, it might
23841       use the same hardware register for all 8 local variables.  */
23842    if (p != p1 || p != p2 || p != p3 || p != p4
23843	|| p != p5 || p != p6 || p != p7)
23844      _exit(1);
23845
23846    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23847       from child file descriptors.  If the child closes a descriptor
23848       before it execs or exits, this munges the parent's descriptor
23849       as well.  Test for this by closing stdout in the child.  */
23850    _exit(close(fileno(stdout)) != 0);
23851  } else {
23852    int status;
23853    struct stat st;
23854
23855    while (wait(&status) != child)
23856      ;
23857    return (
23858	 /* Was there some problem with vforking?  */
23859	 child < 0
23860
23861	 /* Did the child fail?  (This shouldn't happen.)  */
23862	 || status
23863
23864	 /* Did the vfork/compiler bug occur?  */
23865	 || parent != getpid()
23866
23867	 /* Did the file descriptor bug occur?  */
23868	 || fstat(fileno(stdout), &st) != 0
23869	 );
23870  }
23871}
23872_ACEOF
23873if ac_fn_c_try_run "$LINENO"; then :
23874  ac_cv_func_vfork_works=yes
23875else
23876  ac_cv_func_vfork_works=no
23877fi
23878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23879  conftest.$ac_objext conftest.beam conftest.$ac_ext
23880fi
23881
23882fi
23883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
23884$as_echo "$ac_cv_func_vfork_works" >&6; }
23885
23886fi;
23887if test "x$ac_cv_func_fork_works" = xcross; then
23888  ac_cv_func_vfork_works=$ac_cv_func_vfork
23889  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23890$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
23891fi
23892
23893if test "x$ac_cv_func_vfork_works" = xyes; then
23894
23895$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
23896
23897else
23898
23899$as_echo "#define vfork fork" >>confdefs.h
23900
23901fi
23902if test "x$ac_cv_func_fork_works" = xyes; then
23903
23904$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
23905
23906fi
23907
23908  for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
23909                 strrchr strsignal fchmod fstat chmod
23910do :
23911  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23912ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23913if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23914  cat >>confdefs.h <<_ACEOF
23915#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23916_ACEOF
23917
23918fi
23919done
23920
23921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
23922$as_echo_n "checking for a sed that does not truncate output... " >&6; }
23923if ${ac_cv_path_SED+:} false; then :
23924  $as_echo_n "(cached) " >&6
23925else
23926            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
23927     for ac_i in 1 2 3 4 5 6 7; do
23928       ac_script="$ac_script$as_nl$ac_script"
23929     done
23930     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
23931     { ac_script=; unset ac_script;}
23932     if test -z "$SED"; then
23933  ac_path_SED_found=false
23934  # Loop through the user's path and test for each of PROGNAME-LIST
23935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23936for as_dir in $PATH
23937do
23938  IFS=$as_save_IFS
23939  test -z "$as_dir" && as_dir=.
23940    for ac_prog in sed gsed; do
23941    for ac_exec_ext in '' $ac_executable_extensions; do
23942      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
23943      as_fn_executable_p "$ac_path_SED" || continue
23944# Check for GNU ac_path_SED and select it if it is found.
23945  # Check for GNU $ac_path_SED
23946case `"$ac_path_SED" --version 2>&1` in
23947*GNU*)
23948  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
23949*)
23950  ac_count=0
23951  $as_echo_n 0123456789 >"conftest.in"
23952  while :
23953  do
23954    cat "conftest.in" "conftest.in" >"conftest.tmp"
23955    mv "conftest.tmp" "conftest.in"
23956    cp "conftest.in" "conftest.nl"
23957    $as_echo '' >> "conftest.nl"
23958    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
23959    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
23960    as_fn_arith $ac_count + 1 && ac_count=$as_val
23961    if test $ac_count -gt ${ac_path_SED_max-0}; then
23962      # Best one so far, save it but keep looking for a better one
23963      ac_cv_path_SED="$ac_path_SED"
23964      ac_path_SED_max=$ac_count
23965    fi
23966    # 10*(2^10) chars as input seems more than enough
23967    test $ac_count -gt 10 && break
23968  done
23969  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
23970esac
23971
23972      $ac_path_SED_found && break 3
23973    done
23974  done
23975  done
23976IFS=$as_save_IFS
23977  if test -z "$ac_cv_path_SED"; then
23978    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
23979  fi
23980else
23981  ac_cv_path_SED=$SED
23982fi
23983
23984fi
23985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
23986$as_echo "$ac_cv_path_SED" >&6; }
23987 SED="$ac_cv_path_SED"
23988  rm -f conftest.sed
23989
23990  while :
23991  do
23992      POSIX_SHELL=`which bash`
23993      test -x "$POSIX_SHELL" && break
23994      POSIX_SHELL=`which dash`
23995      test -x "$POSIX_SHELL" && break
23996      POSIX_SHELL=/usr/xpg4/bin/sh
23997      test -x "$POSIX_SHELL" && break
23998      POSIX_SHELL=`/bin/sh -c '
23999          exec 2>/dev/null
24000          if ! true ; then exit 1 ; fi
24001          echo /bin/sh'`
24002      test -x "$POSIX_SHELL" && break
24003      as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24004  done
24005
24006cat >>confdefs.h <<_ACEOF
24007#define POSIX_SHELL "${POSIX_SHELL}"
24008_ACEOF
24009
24010
24011
24012
24013
24014  LIBOPTS_BUILD_BLOCKED=''
24015
24016
24017  NEED_LIBOPTS_DIR=''
24018
24019  # Check whether --enable-local-libopts was given.
24020if test "${enable_local_libopts+set}" = set; then :
24021  enableval=$enable_local_libopts;
24022    if test x$enableval = xyes ; then
24023       { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24024$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24025       LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24026       NEED_LIBOPTS_DIR=true
24027       LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24028    fi
24029fi
24030
24031
24032  # Check whether --enable-libopts-install was given.
24033if test "${enable_libopts_install+set}" = set; then :
24034  enableval=$enable_libopts_install;
24035fi
24036
24037   if test "X${enable_libopts_install}" = Xyes; then
24038  INSTALL_LIBOPTS_TRUE=
24039  INSTALL_LIBOPTS_FALSE='#'
24040else
24041  INSTALL_LIBOPTS_TRUE='#'
24042  INSTALL_LIBOPTS_FALSE=
24043fi
24044
24045
24046  if test -z "${NEED_LIBOPTS_DIR}" ; then
24047     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24048$as_echo_n "checking whether autoopts-config can be found... " >&6; }
24049
24050# Check whether --with-autoopts-config was given.
24051if test "${with_autoopts_config+set}" = set; then :
24052  withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24053else
24054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24055$as_echo_n "checking whether autoopts-config is specified... " >&6; }
24056if ${lo_cv_with_autoopts_config+:} false; then :
24057  $as_echo_n "(cached) " >&6
24058else
24059  if autoopts-config --help 2>/dev/null 1>&2
24060        then lo_cv_with_autoopts_config=autoopts-config
24061        elif libopts-config --help 2>/dev/null 1>&2
24062        then lo_cv_with_autoopts_config=libopts-config
24063        else lo_cv_with_autoopts_config=no ; fi
24064fi
24065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24066$as_echo "$lo_cv_with_autoopts_config" >&6; }
24067
24068fi
24069 # end of AC_ARG_WITH
24070
24071     if ${lo_cv_test_autoopts+:} false; then :
24072  $as_echo_n "(cached) " >&6
24073else
24074
24075        if test -z "${lo_cv_with_autoopts_config}" \
24076                -o X"${lo_cv_with_autoopts_config}" = Xno
24077        then
24078           if autoopts-config --help 2>/dev/null 1>&2
24079           then lo_cv_with_autoopts_config=autoopts-config
24080           elif libopts-config --help 2>/dev/null 1>&2
24081           then lo_cv_with_autoopts_config=libopts-config
24082           else lo_cv_with_autoopts_config=false ; fi
24083        fi
24084        lo_cv_test_autoopts=`
24085            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24086        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24087        then lo_cv_test_autoopts=no ; fi
24088
24089fi
24090 # end of CACHE_VAL
24091     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24092$as_echo "${lo_cv_test_autoopts}" >&6; }
24093
24094     if test "X${lo_cv_test_autoopts}" != Xno
24095     then
24096        LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24097        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24098     else
24099        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24100        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24101        NEED_LIBOPTS_DIR=true
24102     fi
24103  fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24104  if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24105    NEED_LIBOPTS_DIR=''
24106  fi
24107   if test -n "${NEED_LIBOPTS_DIR}"; then
24108  NEED_LIBOPTS_TRUE=
24109  NEED_LIBOPTS_FALSE='#'
24110else
24111  NEED_LIBOPTS_TRUE='#'
24112  NEED_LIBOPTS_FALSE=
24113fi
24114
24115
24116
24117  LIBOPTS_DIR=libopts
24118
24119
24120# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24121
24122
24123    if test -z "$NEED_LIBOPTS_TRUE"; then :
24124
24125
24126
24127  # Check to see if a reg expr header is specified.
24128
24129
24130# Check whether --with-regex-header was given.
24131if test "${with_regex_header+set}" = set; then :
24132  withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24133else
24134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24135$as_echo_n "checking whether a reg expr header is specified... " >&6; }
24136if ${libopts_cv_with_regex_header+:} false; then :
24137  $as_echo_n "(cached) " >&6
24138else
24139  libopts_cv_with_regex_header=no
24140fi
24141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24142$as_echo "$libopts_cv_with_regex_header" >&6; }
24143
24144fi
24145 # end of AC_ARG_WITH
24146  if test "X${libopts_cv_with_regex_header}" != Xno
24147  then
24148    cat >>confdefs.h <<_ACEOF
24149#define REGEX_HEADER <${libopts_cv_with_regex_header}>
24150_ACEOF
24151
24152  else
24153
24154$as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24155
24156  fi
24157
24158
24159
24160  # Check to see if a working libregex can be found.
24161
24162
24163# Check whether --with-libregex was given.
24164if test "${with_libregex+set}" = set; then :
24165  withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24166else
24167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24168$as_echo_n "checking whether with-libregex was specified... " >&6; }
24169if ${libopts_cv_with_libregex_root+:} false; then :
24170  $as_echo_n "(cached) " >&6
24171else
24172  libopts_cv_with_libregex_root=no
24173fi
24174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24175$as_echo "$libopts_cv_with_libregex_root" >&6; }
24176
24177fi
24178 # end of AC_ARG_WITH libregex
24179
24180  if test "${with_libregex+set}" = set && \
24181     test "X${withval}" = Xno
24182  then ## disabled by request
24183    libopts_cv_with_libregex_root=no
24184    libopts_cv_with_libregex_cflags=no
24185    libopts_cv_with_libregex_libs=no
24186  else
24187
24188
24189# Check whether --with-libregex-cflags was given.
24190if test "${with_libregex_cflags+set}" = set; then :
24191  withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24192else
24193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24194$as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24195if ${libopts_cv_with_libregex_cflags+:} false; then :
24196  $as_echo_n "(cached) " >&6
24197else
24198  libopts_cv_with_libregex_cflags=no
24199fi
24200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24201$as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24202
24203fi
24204 # end of AC_ARG_WITH libregex-cflags
24205
24206
24207# Check whether --with-libregex-libs was given.
24208if test "${with_libregex_libs+set}" = set; then :
24209  withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24210else
24211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24212$as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24213if ${libopts_cv_with_libregex_libs+:} false; then :
24214  $as_echo_n "(cached) " >&6
24215else
24216  libopts_cv_with_libregex_libs=no
24217fi
24218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24219$as_echo "$libopts_cv_with_libregex_libs" >&6; }
24220
24221fi
24222 # end of AC_ARG_WITH libregex-libs
24223
24224  case "X${libopts_cv_with_libregex_cflags}" in
24225  Xyes|Xno|X )
24226    case "X${libopts_cv_with_libregex_root}" in
24227    Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24228    * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24229    esac
24230  esac
24231  case "X${libopts_cv_with_libregex_libs}" in
24232  Xyes|Xno|X )
24233    case "X${libopts_cv_with_libregex_root}" in
24234    Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24235    * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24236    esac
24237  esac
24238  libopts_save_CPPFLAGS="${CPPFLAGS}"
24239  libopts_save_LIBS="${LIBS}"
24240  case "X${libopts_cv_with_libregex_cflags}" in
24241  Xyes|Xno|X )
24242    libopts_cv_with_libregex_cflags="" ;;
24243  * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24244  esac
24245  case "X${libopts_cv_with_libregex_libs}" in
24246  Xyes|Xno|X )
24247    libopts_cv_with_libregex_libs="" ;;
24248  * )
24249    LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24250  esac
24251  LIBREGEX_CFLAGS=""
24252  LIBREGEX_LIBS=""
24253  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24254$as_echo_n "checking whether libregex functions properly... " >&6; }
24255  if ${libopts_cv_with_libregex+:} false; then :
24256  $as_echo_n "(cached) " >&6
24257else
24258
24259  if test "$cross_compiling" = yes; then :
24260  libopts_cv_with_libregex=no
24261else
24262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24263/* end confdefs.h.  */
24264#include <stdio.h>
24265#include <stdlib.h>
24266#include <sys/types.h>
24267#include REGEX_HEADER
24268static regex_t re;
24269void comp_re(char const * pzPat) {
24270  int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24271  if (res == 0) return;
24272  exit( res ); }
24273int main() {
24274  regmatch_t m[2];
24275  comp_re( "^.*\$"   );
24276  comp_re( "()|no.*" );
24277  comp_re( "."       );
24278  if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24279  if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24280    fputs( "error: regex -->.<-- did not match\n", stderr );
24281    return 1;
24282  }
24283  return 0; }
24284_ACEOF
24285if ac_fn_c_try_run "$LINENO"; then :
24286  libopts_cv_with_libregex=yes
24287else
24288  libopts_cv_with_libregex=no
24289fi
24290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24291  conftest.$ac_objext conftest.beam conftest.$ac_ext
24292fi
24293 # end of AC_RUN_IFELSE
24294
24295fi
24296 # end of AC_CACHE_VAL for libopts_cv_with_libregex
24297  fi ## disabled by request
24298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24299$as_echo "${libopts_cv_with_libregex}" >&6; }
24300  if test "X${libopts_cv_with_libregex}" != Xno
24301  then
24302
24303$as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24304
24305  else
24306    CPPFLAGS="${libopts_save_CPPFLAGS}"
24307    LIBS="${libopts_save_LIBS}"
24308    libopts_cv_with_libregex_root=no
24309libopts_cv_with_libregex_cflags=no
24310libopts_cv_with_libregex_libs=no
24311libopts_cv_with_libregex=no
24312  fi
24313
24314
24315
24316  # Check to see if pathfind(3) works.
24317
24318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24319$as_echo_n "checking whether pathfind(3) works... " >&6; }
24320  if ${libopts_cv_run_pathfind+:} false; then :
24321  $as_echo_n "(cached) " >&6
24322else
24323
24324  if test "$cross_compiling" = yes; then :
24325  libopts_cv_run_pathfind=no
24326
24327else
24328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24329/* end confdefs.h.  */
24330#include <string.h>
24331#include <stdlib.h>
24332int main (int argc, char ** argv) {
24333   char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24334   return (pz == 0) ? 1 : 0;
24335}
24336_ACEOF
24337if ac_fn_c_try_run "$LINENO"; then :
24338  libopts_cv_run_pathfind=yes
24339else
24340  libopts_cv_run_pathfind=no
24341fi
24342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24343  conftest.$ac_objext conftest.beam conftest.$ac_ext
24344fi
24345 # end of RUN_IFELSE
24346
24347fi
24348 # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24350$as_echo "${libopts_cv_run_pathfind}" >&6; }
24351  if test "X${libopts_cv_run_pathfind}" != Xno
24352  then
24353
24354$as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24355
24356  fi
24357
24358
24359
24360  # Check to see if /dev/zero is readable device.
24361
24362  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24363$as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24364  if ${libopts_cv_test_dev_zero+:} false; then :
24365  $as_echo_n "(cached) " >&6
24366else
24367
24368    libopts_cv_test_dev_zero=`exec 2> /dev/null
24369dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24370test -z "${dzero}" && exit 1
24371echo ${dzero}`
24372    if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24373    then libopts_cv_test_dev_zero=no
24374    fi
24375
24376fi
24377 # end of CACHE_VAL of libopts_cv_test_dev_zero
24378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24379$as_echo "${libopts_cv_test_dev_zero}" >&6; }
24380  if test "X${libopts_cv_test_dev_zero}" != Xno
24381  then
24382
24383$as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24384
24385  fi
24386
24387
24388
24389  # Check to see if we have a functional realpath(3C).
24390
24391  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24392$as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24393  if ${libopts_cv_run_realpath+:} false; then :
24394  $as_echo_n "(cached) " >&6
24395else
24396
24397  if test "$cross_compiling" = yes; then :
24398  libopts_cv_run_realpath=no
24399
24400else
24401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24402/* end confdefs.h.  */
24403#include <limits.h>
24404#include <stdlib.h>
24405int main (int argc, char ** argv) {
24406#ifndef PATH_MAX
24407choke me!!
24408#else
24409   char zPath[PATH_MAX+1];
24410#endif
24411   char *pz = realpath(argv[0], zPath);
24412   return (pz == zPath) ? 0 : 1;
24413}
24414_ACEOF
24415if ac_fn_c_try_run "$LINENO"; then :
24416  libopts_cv_run_realpath=yes
24417else
24418  libopts_cv_run_realpath=no
24419fi
24420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24421  conftest.$ac_objext conftest.beam conftest.$ac_ext
24422fi
24423 # end of RUN_IFELSE
24424
24425fi
24426 # end of AC_CACHE_VAL for libopts_cv_run_realpath
24427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24428$as_echo "${libopts_cv_run_realpath}" >&6; }
24429  if test "X${libopts_cv_run_realpath}" != Xno
24430  then
24431
24432$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24433
24434  fi
24435
24436
24437
24438  # Check to see if strftime() works.
24439
24440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24441$as_echo_n "checking whether strftime() works... " >&6; }
24442  if ${libopts_cv_run_strftime+:} false; then :
24443  $as_echo_n "(cached) " >&6
24444else
24445
24446  if test "$cross_compiling" = yes; then :
24447  libopts_cv_run_strftime=no
24448
24449else
24450  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24451/* end confdefs.h.  */
24452#include <time.h>
24453#include <string.h>
24454char t_buf[ 64 ];
24455int main() {
24456  static char const z[] = "Thursday Aug 28 240";
24457  struct tm tm;
24458  tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24459  tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24460  tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24461  tm.tm_mday  = 28;  /* day of the month [1, 31] */
24462  tm.tm_mon   =  7;  /* months since January [0, 11] */
24463  tm.tm_year  = 86;  /* years since 1900 */
24464  tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24465  tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24466  tm.tm_isdst =  1;  /* flag for daylight savings time */
24467  strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24468  return (strcmp( t_buf, z ) != 0); }
24469_ACEOF
24470if ac_fn_c_try_run "$LINENO"; then :
24471  libopts_cv_run_strftime=yes
24472else
24473  libopts_cv_run_strftime=no
24474fi
24475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24476  conftest.$ac_objext conftest.beam conftest.$ac_ext
24477fi
24478 # end of RUN_IFELSE
24479
24480fi
24481 # end of AC_CACHE_VAL for libopts_cv_run_strftime
24482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24483$as_echo "${libopts_cv_run_strftime}" >&6; }
24484  if test "X${libopts_cv_run_strftime}" != Xno
24485  then
24486
24487$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24488
24489  fi
24490
24491
24492
24493  # Check to see if fopen accepts "b" mode.
24494
24495  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24496$as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24497  if ${libopts_cv_run_fopen_binary+:} false; then :
24498  $as_echo_n "(cached) " >&6
24499else
24500
24501  if test "$cross_compiling" = yes; then :
24502  libopts_cv_run_fopen_binary=no
24503
24504else
24505  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24506/* end confdefs.h.  */
24507#include <stdio.h>
24508int main (int argc, char ** argv) {
24509FILE * fp = fopen("conftest.$ac_ext", "rb");
24510return (fp == NULL) ? 1 : fclose(fp); }
24511_ACEOF
24512if ac_fn_c_try_run "$LINENO"; then :
24513  libopts_cv_run_fopen_binary=yes
24514else
24515  libopts_cv_run_fopen_binary=no
24516fi
24517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24518  conftest.$ac_objext conftest.beam conftest.$ac_ext
24519fi
24520 # end of RUN_IFELSE
24521
24522fi
24523 # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24525$as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24526  if test "X${libopts_cv_run_fopen_binary}" != Xno
24527  then
24528
24529$as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24530
24531  else
24532
24533$as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24534
24535  fi
24536
24537
24538
24539  # Check to see if fopen accepts "t" mode.
24540
24541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24542$as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24543  if ${libopts_cv_run_fopen_text+:} false; then :
24544  $as_echo_n "(cached) " >&6
24545else
24546
24547  if test "$cross_compiling" = yes; then :
24548  libopts_cv_run_fopen_text=no
24549
24550else
24551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24552/* end confdefs.h.  */
24553#include <stdio.h>
24554int main (int argc, char ** argv) {
24555FILE * fp = fopen("conftest.$ac_ext", "rt");
24556return (fp == NULL) ? 1 : fclose(fp); }
24557_ACEOF
24558if ac_fn_c_try_run "$LINENO"; then :
24559  libopts_cv_run_fopen_text=yes
24560else
24561  libopts_cv_run_fopen_text=no
24562fi
24563rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24564  conftest.$ac_objext conftest.beam conftest.$ac_ext
24565fi
24566 # end of RUN_IFELSE
24567
24568fi
24569 # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24571$as_echo "${libopts_cv_run_fopen_text}" >&6; }
24572  if test "X${libopts_cv_run_fopen_text}" != Xno
24573  then
24574
24575$as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24576
24577  else
24578
24579$as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24580
24581  fi
24582
24583
24584
24585  # Check to see if not wanting optional option args.
24586
24587  # Check whether --enable-optional-args was given.
24588if test "${enable_optional_args+set}" = set; then :
24589  enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24590else
24591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24592$as_echo_n "checking whether not wanting optional option args... " >&6; }
24593if ${libopts_cv_enable_optional_args+:} false; then :
24594  $as_echo_n "(cached) " >&6
24595else
24596  libopts_cv_enable_optional_args=yes
24597fi
24598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24599$as_echo "$libopts_cv_enable_optional_args" >&6; }
24600
24601fi
24602 # end of AC_ARG_ENABLE
24603  if test "X${libopts_cv_enable_optional_args}" = Xno
24604  then
24605
24606$as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24607
24608  fi
24609
24610
24611
24612
24613
24614          fi
24615  ac_config_files="$ac_config_files libopts/Makefile"
24616
24617  # end of AC_DEFUN of LIBOPTS_CHECK
24618
24619
24620# From when we only used libevent for sntp:
24621#AM_COND_IF(
24622#    [BUILD_SNTP],
24623#    [NTP_LIBEVENT_CHECK],
24624#    [NTP_LIBEVENT_CHECK_NOBUILD]
24625#)
24626
24627
24628
24629ntp_pkgconfig_min_version='0.15.0'
24630if test -n "$ac_tool_prefix"; then
24631  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24632set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24634$as_echo_n "checking for $ac_word... " >&6; }
24635if ${ac_cv_path_PKG_CONFIG+:} false; then :
24636  $as_echo_n "(cached) " >&6
24637else
24638  case $PKG_CONFIG in
24639  [\\/]* | ?:[\\/]*)
24640  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24641  ;;
24642  *)
24643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24644for as_dir in $PATH
24645do
24646  IFS=$as_save_IFS
24647  test -z "$as_dir" && as_dir=.
24648    for ac_exec_ext in '' $ac_executable_extensions; do
24649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24650    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24652    break 2
24653  fi
24654done
24655  done
24656IFS=$as_save_IFS
24657
24658  ;;
24659esac
24660fi
24661PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24662if test -n "$PKG_CONFIG"; then
24663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24664$as_echo "$PKG_CONFIG" >&6; }
24665else
24666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24667$as_echo "no" >&6; }
24668fi
24669
24670
24671fi
24672if test -z "$ac_cv_path_PKG_CONFIG"; then
24673  ac_pt_PKG_CONFIG=$PKG_CONFIG
24674  # Extract the first word of "pkg-config", so it can be a program name with args.
24675set dummy pkg-config; ac_word=$2
24676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24677$as_echo_n "checking for $ac_word... " >&6; }
24678if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24679  $as_echo_n "(cached) " >&6
24680else
24681  case $ac_pt_PKG_CONFIG in
24682  [\\/]* | ?:[\\/]*)
24683  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24684  ;;
24685  *)
24686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24687for as_dir in $PATH
24688do
24689  IFS=$as_save_IFS
24690  test -z "$as_dir" && as_dir=.
24691    for ac_exec_ext in '' $ac_executable_extensions; do
24692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24693    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24695    break 2
24696  fi
24697done
24698  done
24699IFS=$as_save_IFS
24700
24701  ;;
24702esac
24703fi
24704ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24705if test -n "$ac_pt_PKG_CONFIG"; then
24706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24707$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24708else
24709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24710$as_echo "no" >&6; }
24711fi
24712
24713  if test "x$ac_pt_PKG_CONFIG" = x; then
24714    PKG_CONFIG=""
24715  else
24716    case $cross_compiling:$ac_tool_warned in
24717yes:)
24718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24720ac_tool_warned=yes ;;
24721esac
24722    PKG_CONFIG=$ac_pt_PKG_CONFIG
24723  fi
24724else
24725  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24726fi
24727
24728{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
24729{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
24730
24731case "$PKG_CONFIG" in
24732 /*)
24733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
24734$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
24735    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
24736	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24737$as_echo "yes" >&6; }
24738    else
24739	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24740$as_echo "no" >&6; }
24741	PKG_CONFIG=""
24742    fi
24743    ;;
24744esac
24745
24746
24747
24748
24749# Check whether --enable-local-libevent was given.
24750if test "${enable_local_libevent+set}" = set; then :
24751  enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
24752else
24753  ntp_use_local_libevent=${ntp_use_local_libevent-detect}
24754
24755fi
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766ntp_libevent_min_version=2
24767ntp_libevent_tearoff=libevent
24768
24769
24770
24771
24772
24773case "$ntp_use_local_libevent" in
24774 yes)
24775    ;;
24776 *) # If we have (a good enough) pkg-config, see if it can find libevent
24777    case "$PKG_CONFIG" in
24778     /*)
24779	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
24780$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
24781	if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
24782	then
24783	    ntp_use_local_libevent=no
24784	    ntp_libevent_version="`$PKG_CONFIG --modversion libevent`"
24785	    case "$ntp_libevent_version" in
24786	     *.*) ;;
24787	     *) ntp_libevent_version='(unknown)' ;;
24788	    esac
24789	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
24790$as_echo "yes, version $ntp_libevent_version" >&6; }
24791	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24792	    CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
24793	    # HMS: I hope the following is accurate.
24794	    # We don't need -levent, we only need  -levent_core.
24795	    # While we could grab only the -L stuff, there *might* be
24796	    # other flags there we want.  Originally we just removed -levent
24797	    # but then somebody decided to install -levent-2.0
24798	    # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
24799	    # So now we dance...
24800	    LDADD_LIBEVENT=
24801	    for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
24802	    do
24803		case "$i" in
24804		 -D*) ;;
24805		 -levent*) ;;
24806		 *) case "$LDADD_LIBEVENT" in
24807		     '') LDADD_LIBEVENT="$i" ;;
24808		     *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
24809		    esac
24810		    ;;
24811		esac
24812	    done
24813	    case "$LIBISC_PTHREADS_NOTHREADS" in
24814	     pthreads)
24815		LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
24816	    esac
24817	    LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
24818	else
24819	    ntp_use_local_libevent=yes
24820	    # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
24821	    # is "pthreads"?
24822	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24823	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24824$as_echo "no" >&6; }
24825	fi
24826	;;
24827     *)
24828	ntp_use_local_libevent=yes
24829	;;
24830    esac
24831    ;;
24832esac
24833
24834case "$ntp_use_local_libevent" in
24835 yes)
24836    { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
24837$as_echo "$as_me: Using libevent tearoff" >&6;}
24838    CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
24839    case "$LIBISC_PTHREADS_NOTHREADS" in
24840     pthreads)
24841	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24842	;;
24843     *)
24844	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24845    esac
24846esac
24847
24848
24849 if test "x$ntp_use_local_libevent" = "xyes"; then
24850  BUILD_LIBEVENT_TRUE=
24851  BUILD_LIBEVENT_FALSE='#'
24852else
24853  BUILD_LIBEVENT_TRUE='#'
24854  BUILD_LIBEVENT_FALSE=
24855fi
24856
24857
24858
24859
24860case "$ntp_libevent_tearoff" in
24861 libevent)
24862    ;;
24863 *)
24864    as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
24865    ;;
24866esac
24867
24868case "$ntp_use_local_libevent" in
24869 yes)
24870                        ac_configure_args=" --disable-openssl${ac_configure_args}"
24871    ac_configure_args=" --disable-shared${ac_configure_args}"
24872    ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
24873    ac_configure_args=" --disable-libevent-install${ac_configure_args}"
24874    ac_configure_args=" --enable-silent-rules${ac_configure_args}"
24875    ac_configure_args=" --enable-function-sections${ac_configure_args}"
24876    ac_configure_args=" LEP_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
24877    ac_configure_args=" LEP_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
24878    ac_configure_args=" LEP_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
24879    subdirs="$subdirs libevent"
24880
24881    ;;
24882 *)
24883    NTP_FORCE_LIBEVENT_DIST=libevent
24884    ;;
24885esac
24886
24887
24888
24889# Checks for libraries.
24890
24891
24892LIB_SYSLOG=''
24893
24894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
24895$as_echo_n "checking for library containing openlog... " >&6; }
24896if ${ac_cv_search_openlog+:} false; then :
24897  $as_echo_n "(cached) " >&6
24898else
24899  ac_func_search_save_LIBS=$LIBS
24900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24901/* end confdefs.h.  */
24902
24903/* Override any GCC internal prototype to avoid an error.
24904   Use char because int might match the return type of a GCC
24905   builtin and then its argument prototype would still apply.  */
24906#ifdef __cplusplus
24907extern "C"
24908#endif
24909char openlog ();
24910int
24911main ()
24912{
24913return openlog ();
24914  ;
24915  return 0;
24916}
24917_ACEOF
24918for ac_lib in '' gen syslog; do
24919  if test -z "$ac_lib"; then
24920    ac_res="none required"
24921  else
24922    ac_res=-l$ac_lib
24923    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24924  fi
24925  if ac_fn_c_try_link "$LINENO"; then :
24926  ac_cv_search_openlog=$ac_res
24927fi
24928rm -f core conftest.err conftest.$ac_objext \
24929    conftest$ac_exeext
24930  if ${ac_cv_search_openlog+:} false; then :
24931  break
24932fi
24933done
24934if ${ac_cv_search_openlog+:} false; then :
24935
24936else
24937  ac_cv_search_openlog=no
24938fi
24939rm conftest.$ac_ext
24940LIBS=$ac_func_search_save_LIBS
24941fi
24942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
24943$as_echo "$ac_cv_search_openlog" >&6; }
24944ac_res=$ac_cv_search_openlog
24945if test "$ac_res" != no; then :
24946  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24947  case "$ac_cv_search_openlog" in
24948 'none required') ;;
24949 no) ;;
24950 *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
24951 esac
24952
24953fi
24954
24955
24956# Checks for header files.
24957for ac_header in netdb.h string.h strings.h syslog.h
24958do :
24959  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24960ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24961if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24962  cat >>confdefs.h <<_ACEOF
24963#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24964_ACEOF
24965
24966fi
24967
24968done
24969
24970
24971
24972for ac_header in sysexits.h
24973do :
24974  ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
24975if test "x$ac_cv_header_sysexits_h" = xyes; then :
24976  cat >>confdefs.h <<_ACEOF
24977#define HAVE_SYSEXITS_H 1
24978_ACEOF
24979
24980else
24981
24982
24983$as_echo "#define EX_OK 0" >>confdefs.h
24984
24985
24986$as_echo "#define EX_SOFTWARE 70" >>confdefs.h
24987
24988
24989fi
24990
24991done
24992
24993
24994
24995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
24996$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
24997if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
24998  $as_echo_n "(cached) " >&6
24999else
25000
25001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25002/* end confdefs.h.  */
25003
25004#define SYSLOG_NAMES
25005#include <stdlib.h>
25006#include <syslog.h>
25007
25008int
25009main ()
25010{
25011 void *fnames; fnames = facilitynames;
25012  ;
25013  return 0;
25014}
25015_ACEOF
25016if ac_fn_c_try_compile "$LINENO"; then :
25017  ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25018else
25019  ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25020fi
25021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25022fi
25023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25024$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25025case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25026 yes)
25027
25028$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25029
25030    ;;
25031 no)
25032    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25033$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25034    ;;
25035 cross)
25036    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25037$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25038    ;;
25039esac
25040
25041
25042# Checks for typedefs, structures, and compiler characteristics.
25043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25044$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25045if ${ac_cv_header_stdbool_h+:} false; then :
25046  $as_echo_n "(cached) " >&6
25047else
25048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25049/* end confdefs.h.  */
25050
25051             #include <stdbool.h>
25052             #ifndef bool
25053              "error: bool is not defined"
25054             #endif
25055             #ifndef false
25056              "error: false is not defined"
25057             #endif
25058             #if false
25059              "error: false is not 0"
25060             #endif
25061             #ifndef true
25062              "error: true is not defined"
25063             #endif
25064             #if true != 1
25065              "error: true is not 1"
25066             #endif
25067             #ifndef __bool_true_false_are_defined
25068              "error: __bool_true_false_are_defined is not defined"
25069             #endif
25070
25071             struct s { _Bool s: 1; _Bool t; } s;
25072
25073             char a[true == 1 ? 1 : -1];
25074             char b[false == 0 ? 1 : -1];
25075             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25076             char d[(bool) 0.5 == true ? 1 : -1];
25077             /* See body of main program for 'e'.  */
25078             char f[(_Bool) 0.0 == false ? 1 : -1];
25079             char g[true];
25080             char h[sizeof (_Bool)];
25081             char i[sizeof s.t];
25082             enum { j = false, k = true, l = false * true, m = true * 256 };
25083             /* The following fails for
25084                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25085             _Bool n[m];
25086             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25087             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25088             /* Catch a bug in an HP-UX C compiler.  See
25089                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25090                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25091              */
25092             _Bool q = true;
25093             _Bool *pq = &q;
25094
25095int
25096main ()
25097{
25098
25099             bool e = &s;
25100             *pq |= q;
25101             *pq |= ! q;
25102             /* Refer to every declared value, to avoid compiler optimizations.  */
25103             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25104                     + !m + !n + !o + !p + !q + !pq);
25105
25106  ;
25107  return 0;
25108}
25109_ACEOF
25110if ac_fn_c_try_compile "$LINENO"; then :
25111  ac_cv_header_stdbool_h=yes
25112else
25113  ac_cv_header_stdbool_h=no
25114fi
25115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25116fi
25117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25118$as_echo "$ac_cv_header_stdbool_h" >&6; }
25119   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25120if test "x$ac_cv_type__Bool" = xyes; then :
25121
25122cat >>confdefs.h <<_ACEOF
25123#define HAVE__BOOL 1
25124_ACEOF
25125
25126
25127fi
25128
25129
25130if test $ac_cv_header_stdbool_h = yes; then
25131
25132$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25133
25134fi
25135
25136
25137
25138
25139
25140VER_SUFFIX=
25141
25142
25143
25144
25145# Check whether --with-crypto was given.
25146if test "${with_crypto+set}" = set; then :
25147  withval=$with_crypto;
25148fi
25149
25150
25151# Check whether --with-openssl-libdir was given.
25152if test "${with_openssl_libdir+set}" = set; then :
25153  withval=$with_openssl_libdir;
25154fi
25155
25156
25157# Check whether --with-openssl-incdir was given.
25158if test "${with_openssl_incdir+set}" = set; then :
25159  withval=$with_openssl_incdir;
25160fi
25161
25162
25163# Check whether --with-rpath was given.
25164if test "${with_rpath+set}" = set; then :
25165  withval=$with_rpath;
25166fi
25167
25168
25169ntp_openssl=no
25170ntp_openssl_from_pkg_config=no
25171
25172with_crypto=${with_crypto:-openssl,libcrypto}
25173case "$with_crypto" in
25174 yes)
25175    with_crypto=openssl,libcrypto
25176esac
25177
25178
25179case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25180 no:*) ;;
25181 *:notempty:notgiven:notgiven)
25182    for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25183	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25184$as_echo_n "checking pkg-config for $pkg... " >&6; }
25185	if $PKG_CONFIG --exists $pkg ; then
25186	    CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25187	    CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25188	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25189	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
25190	    LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25191	    VER_SUFFIX=o
25192	    ntp_openssl=yes
25193	    ntp_openssl_from_pkg_config=yes
25194	    ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
25195	    case "$ntp_openssl_version" in
25196	     *.*) ;;
25197	     *) ntp_openssl_version='(unknown)' ;;
25198	    esac
25199	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
25200$as_echo "yes, version $ntp_openssl_version" >&6; }
25201
25202	    break
25203	fi
25204	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25205$as_echo "no" >&6; }
25206    done
25207esac
25208case "$with_crypto:$ntp_openssl" in
25209 no:*) ;;
25210 *:no)
25211    need_dash_r=
25212    need_dash_Wlrpath=
25213    case "${with_rpath-notgiven}" in
25214     yes)
25215	# Lame - what to do if we need -Wl... but not -R?
25216	need_dash_r=1
25217	;;
25218     notgiven)
25219	case "$host" in
25220	 *-*-linux*)
25221	    # This may really only be true for gcc
25222	    need_dash_Wlrpath=1
25223	    ;;
25224	 *-*-netbsd*)
25225	    need_dash_r=1
25226	    ;;
25227	 *-*-solaris*)
25228	    need_dash_r=1
25229	    ;;
25230	esac
25231	;;
25232    esac
25233
25234    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25235$as_echo_n "checking for openssl library directory... " >&6; }
25236    with_openssl_libdir=${with_openssl_libdir-notgiven}
25237    case "$with_openssl_libdir" in
25238     notgiven)
25239	case "$build" in
25240	 $host)
25241	    with_openssl_libdir=default
25242	    ;;
25243	 *)
25244	    with_openssl_libdir=no
25245	    ;;
25246	esac
25247    esac
25248    case "$with_openssl_libdir" in
25249     default)
25250	# Look in:
25251	with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25252	with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25253	with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25254    esac
25255    case "$with_openssl_libdir" in
25256     no)
25257	;;
25258     *) # Look for libcrypto.a and libssl.a:
25259	for i in $with_openssl_libdir no
25260	do
25261	    case "$host" in
25262	     *-*-darwin*)
25263		test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25264		;;
25265	     *)
25266		test -f $i/libcrypto.so -a -f $i/libssl.so && break
25267		test -f $i/libcrypto.a -a -f $i/libssl.a && break
25268		;;
25269	    esac
25270	done
25271	openssl_libdir=$i
25272	;;
25273    esac
25274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25275$as_echo "$openssl_libdir" >&6; }
25276    case "$openssl_libdir" in
25277     no)
25278	openssl_libdir=
25279	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25280$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25281    esac
25282
25283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25284$as_echo_n "checking for openssl include directory... " >&6; }
25285    with_openssl_incdir=${with_openssl_incdir-notgiven}
25286    case "$with_openssl_incdir" in
25287     notgiven)
25288	# Look in:
25289	with_openssl_incdir="/usr/include /usr/sfw/include"
25290	with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25291	with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25292    esac
25293    case "$with_openssl_incdir" in
25294     no)
25295	;;
25296     *) # look for openssl/evp.h:
25297	for i in $with_openssl_incdir no
25298	do
25299	    test -f $i/openssl/evp.h && break
25300	done
25301	openssl_incdir=$i
25302	;;
25303    esac
25304    { i=; unset i;}
25305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25306$as_echo "$openssl_incdir" >&6; }
25307    case "$openssl_incdir" in
25308     no)
25309	openssl_incdir=
25310	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25311$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25312    esac
25313    if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25314    then
25315	ntp_openssl=no
25316    else
25317	ntp_openssl=yes
25318	VER_SUFFIX=o
25319    fi
25320    case "$ntp_openssl" in
25321     yes)
25322	# We have OpenSSL inc/lib dirs - use them.
25323	case "$openssl_incdir" in
25324	 /usr/include)
25325	    ;;
25326	 *)
25327	    CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25328	    ;;
25329	esac
25330	case "$openssl_libdir" in
25331	 /usr/lib)
25332	    ;;
25333	 *)
25334	    LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25335	    case "$need_dash_r" in
25336	     1)
25337		LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25338	    esac
25339	    case "$need_dash_Wlrpath" in
25340	     1)
25341		LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25342	    esac
25343	    ;;
25344	esac
25345	LDADD_NTP="$LDADD_NTP -lcrypto"
25346    esac
25347esac
25348
25349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25350$as_echo_n "checking if we will use crypto... " >&6; }
25351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25352$as_echo "$ntp_openssl" >&6; }
25353
25354case "$ntp_openssl" in
25355 yes)
25356    for ac_header in openssl/cmac.h openssl/hmac.h
25357do :
25358  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25359ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25360if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25361  cat >>confdefs.h <<_ACEOF
25362#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25363_ACEOF
25364
25365fi
25366
25367done
25368
25369
25370$as_echo "#define OPENSSL /**/" >>confdefs.h
25371
25372    case "$VER_SUFFIX" in
25373     *o*) ;;
25374     *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25375    esac
25376    ;;
25377esac
25378
25379NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25380CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25381NTPO_SAVED_LIBS="$LIBS"
25382
25383#
25384# check for linking with -lcrypto failure, and try -lcrypto -lz.
25385# Helps m68k-atari-mint
25386#
25387case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25388 yes:no)
25389    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25390    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25391$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25392if ${ntp_cv_bare_lcrypto+:} false; then :
25393  $as_echo_n "(cached) " >&6
25394else
25395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25396/* end confdefs.h.  */
25397
25398		    #include "openssl/err.h"
25399		    #include "openssl/evp.h"
25400
25401int
25402main ()
25403{
25404
25405		    ERR_load_crypto_strings();
25406		    OpenSSL_add_all_algorithms();
25407
25408
25409  ;
25410  return 0;
25411}
25412_ACEOF
25413if ac_fn_c_try_link "$LINENO"; then :
25414  ntp_cv_bare_lcrypto=yes
25415else
25416  ntp_cv_bare_lcrypto=no
25417
25418fi
25419rm -f core conftest.err conftest.$ac_objext \
25420    conftest$ac_exeext conftest.$ac_ext
25421
25422fi
25423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25424$as_echo "$ntp_cv_bare_lcrypto" >&6; }
25425    case "$ntp_cv_bare_lcrypto" in
25426     no)
25427	LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25428	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25429$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25430if ${ntp_cv_lcrypto_lz+:} false; then :
25431  $as_echo_n "(cached) " >&6
25432else
25433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25434/* end confdefs.h.  */
25435
25436			#include "openssl/err.h"
25437			#include "openssl/evp.h"
25438
25439int
25440main ()
25441{
25442
25443			ERR_load_crypto_strings();
25444			OpenSSL_add_all_algorithms();
25445
25446
25447  ;
25448  return 0;
25449}
25450_ACEOF
25451if ac_fn_c_try_link "$LINENO"; then :
25452  ntp_cv_lcrypto_lz=yes
25453else
25454  ntp_cv_lcrypto_lz=no
25455
25456fi
25457rm -f core conftest.err conftest.$ac_objext \
25458    conftest$ac_exeext conftest.$ac_ext
25459
25460fi
25461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25462$as_echo "$ntp_cv_lcrypto_lz" >&6; }
25463	case "$ntp_cv_lcrypto_lz" in
25464	 yes)
25465	     LDADD_NTP="$LDADD_NTP -lz"
25466	esac
25467    esac
25468esac
25469
25470#
25471# Older OpenSSL headers have a number of callback prototypes inside
25472# other function prototypes which trigger copious warnings with gcc's
25473# -Wstrict-prototypes, which is included in -Wall.
25474#
25475# An example:
25476#
25477# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25478#		  int (*cb)(), int sgckey);
25479#		  ^^^^^^^^^^^
25480#
25481#
25482#
25483openssl_triggers_warnings=unknown
25484NTPO_SAVED_CFLAGS="$CFLAGS"
25485
25486case "$ntp_openssl:$GCC" in
25487 yes:yes)
25488    CFLAGS="$CFLAGS -Werror"
25489    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25490/* end confdefs.h.  */
25491
25492
25493int
25494main ()
25495{
25496
25497		/* see if -Werror breaks gcc */
25498
25499
25500  ;
25501  return 0;
25502}
25503_ACEOF
25504if ac_fn_c_try_compile "$LINENO"; then :
25505  gcc_handles_Werror=yes
25506else
25507  gcc_handles_Werror=no
25508
25509fi
25510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25511    case "$gcc_handles_Werror" in
25512     no)
25513	# if this gcc doesn't do -Werror go ahead and use
25514	# -Wstrict-prototypes.
25515	openssl_triggers_warnings=yes
25516	;;
25517     yes)
25518	CFLAGS="$CFLAGS -Wstrict-prototypes"
25519	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25520/* end confdefs.h.  */
25521
25522		    #include "openssl/asn1_mac.h"
25523		    #include "openssl/bn.h"
25524		    #include "openssl/err.h"
25525		    #include "openssl/evp.h"
25526		    #include "openssl/pem.h"
25527		    #include "openssl/rand.h"
25528		    #include "openssl/x509v3.h"
25529
25530int
25531main ()
25532{
25533
25534		    /* empty body */
25535
25536
25537  ;
25538  return 0;
25539}
25540_ACEOF
25541if ac_fn_c_try_compile "$LINENO"; then :
25542  openssl_triggers_warnings=no
25543else
25544  openssl_triggers_warnings=yes
25545
25546fi
25547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25548    esac
25549    case "$openssl_triggers_warnings" in
25550     yes)
25551	CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25552	;;
25553     *)
25554	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25555    esac
25556    ;;
25557 no:yes)
25558    # gcc without OpenSSL
25559    CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25560esac
25561
25562# Because we don't want -Werror for the EVP_MD_do_all_sorted check
25563CFLAGS="$NTPO_SAVED_CFLAGS"
25564
25565case "$ntp_openssl" in
25566 yes)
25567    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25568    for ac_func in EVP_MD_do_all_sorted
25569do :
25570  ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25571if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25572  cat >>confdefs.h <<_ACEOF
25573#define HAVE_EVP_MD_DO_ALL_SORTED 1
25574_ACEOF
25575
25576fi
25577done
25578
25579    ;;
25580esac
25581
25582
25583CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25584LIBS="$NTPO_SAVED_LIBS"
25585{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25586{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25587{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25588{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25589{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25590
25591
25592
25593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25594$as_echo_n "checking for struct sockaddr_storage... " >&6; }
25595if ${ntp_cv_sockaddr_storage+:} false; then :
25596  $as_echo_n "(cached) " >&6
25597else
25598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25599/* end confdefs.h.  */
25600
25601		#ifdef HAVE_SYS_TYPES_H
25602		# include <sys/types.h>
25603		#endif
25604		#ifdef HAVE_SYS_SOCKET_H
25605		# include <sys/socket.h>
25606		#endif
25607		#ifdef HAVE_NETINET_IN_H
25608		# include <netinet/in.h>
25609		#endif
25610
25611int
25612main ()
25613{
25614
25615		struct sockaddr_storage n;
25616
25617
25618  ;
25619  return 0;
25620}
25621_ACEOF
25622if ac_fn_c_try_compile "$LINENO"; then :
25623  ntp_cv_sockaddr_storage=yes
25624else
25625  ntp_cv_sockaddr_storage=no
25626
25627fi
25628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25629
25630fi
25631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25632$as_echo "$ntp_cv_sockaddr_storage" >&6; }
25633case "$ntp_cv_sockaddr_storage" in
25634 yes)
25635
25636$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25637
25638    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25639$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25640if ${ntp_cv_have___ss_family+:} false; then :
25641  $as_echo_n "(cached) " >&6
25642else
25643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25644/* end confdefs.h.  */
25645
25646		    #ifdef HAVE_SYS_TYPES_H
25647		    # include <sys/types.h>
25648		    #endif
25649		    #ifdef HAVE_SYS_SOCKET_H
25650		    # include <sys/socket.h>
25651		    #endif
25652		    #ifdef HAVE_NETINET_IN_H
25653		    # include <netinet/in.h>
25654		    #endif
25655
25656int
25657main ()
25658{
25659
25660		    struct sockaddr_storage s;
25661		    s.__ss_family = 1;
25662
25663
25664  ;
25665  return 0;
25666}
25667_ACEOF
25668if ac_fn_c_try_compile "$LINENO"; then :
25669  ntp_cv_have___ss_family=yes
25670else
25671  ntp_cv_have___ss_family=no
25672
25673fi
25674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25675
25676fi
25677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
25678$as_echo "$ntp_cv_have___ss_family" >&6; }
25679    case "$ntp_cv_have___ss_family" in
25680     yes)
25681
25682$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
25683
25684    esac
25685
25686esac
25687
25688
25689#
25690# Look for in_port_t.
25691#
25692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
25693$as_echo_n "checking for in_port_t... " >&6; }
25694if ${isc_cv_have_in_port_t+:} false; then :
25695  $as_echo_n "(cached) " >&6
25696else
25697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25698/* end confdefs.h.  */
25699
25700		#include <sys/types.h>
25701		#include <netinet/in.h>
25702
25703int
25704main ()
25705{
25706
25707		in_port_t port = 25;
25708		return (0);
25709
25710
25711  ;
25712  return 0;
25713}
25714_ACEOF
25715if ac_fn_c_try_compile "$LINENO"; then :
25716  isc_cv_have_in_port_t=yes
25717else
25718  isc_cv_have_in_port_t=no
25719
25720fi
25721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25722
25723fi
25724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
25725$as_echo "$isc_cv_have_in_port_t" >&6; }
25726case "$isc_cv_have_in_port_t" in
25727 no)
25728
25729$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
25730
25731esac
25732
25733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
25734$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
25735if ${ntp_cv_getsockname_socklen_type+:} false; then :
25736  $as_echo_n "(cached) " >&6
25737else
25738
25739    getsockname_socklen_type_found=no
25740    for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
25741	for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
25742	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25743/* end confdefs.h.  */
25744
25745			#ifdef HAVE_SYS_TYPES_H
25746			# include <sys/types.h>
25747			#endif
25748			#ifdef HAVE_SYS_SOCKET_H
25749			# include <sys/socket.h>
25750			#endif
25751
25752int
25753main ()
25754{
25755
25756			extern
25757			getsockname(int, $getsockname_arg2,
25758				$ntp_cv_getsockname_socklen_type *);
25759
25760
25761  ;
25762  return 0;
25763}
25764_ACEOF
25765if ac_fn_c_try_compile "$LINENO"; then :
25766  getsockname_socklen_type_found=yes ; break 2
25767fi
25768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25769	done
25770    done
25771    case "$getsockname_socklen_type_found" in
25772     no)
25773	ntp_cv_getsockname_socklen_type='socklen_t'
25774    esac
25775    { getsockname_arg2=; unset getsockname_arg2;}
25776    { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
25777
25778
25779fi
25780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
25781$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
25782
25783cat >>confdefs.h <<_ACEOF
25784#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
25785_ACEOF
25786
25787
25788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
25789$as_echo_n "checking struct sockaddr for sa_len... " >&6; }
25790if ${isc_cv_platform_havesalen+:} false; then :
25791  $as_echo_n "(cached) " >&6
25792else
25793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25794/* end confdefs.h.  */
25795
25796		#include <sys/types.h>
25797		#include <sys/socket.h>
25798
25799int
25800main ()
25801{
25802
25803		extern struct sockaddr *ps;
25804		return ps->sa_len;
25805
25806
25807  ;
25808  return 0;
25809}
25810_ACEOF
25811if ac_fn_c_try_compile "$LINENO"; then :
25812  isc_cv_platform_havesalen=yes
25813else
25814  isc_cv_platform_havesalen=no
25815
25816fi
25817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25818
25819fi
25820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
25821$as_echo "$isc_cv_platform_havesalen" >&6; }
25822case "$isc_cv_platform_havesalen" in
25823 yes)
25824
25825$as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
25826
25827esac
25828
25829# Check whether --enable-ipv6 was given.
25830if test "${enable_ipv6+set}" = set; then :
25831  enableval=$enable_ipv6;
25832fi
25833
25834
25835case "$enable_ipv6" in
25836 yes|''|autodetect)
25837    case "$host" in
25838     powerpc-ibm-aix4*)
25839	;;
25840     *)
25841
25842$as_echo "#define WANT_IPV6 1" >>confdefs.h
25843
25844	;;
25845    esac
25846    ;;
25847 no)
25848    ;;
25849esac
25850
25851
25852case "$host" in
25853 *-*-darwin*)
25854
25855$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
25856
25857esac
25858
25859
25860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
25861$as_echo_n "checking for IPv6 structures... " >&6; }
25862if ${isc_cv_found_ipv6+:} false; then :
25863  $as_echo_n "(cached) " >&6
25864else
25865  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25866/* end confdefs.h.  */
25867
25868		#include <sys/types.h>
25869		#include <sys/socket.h>
25870		#include <netinet/in.h>
25871
25872int
25873main ()
25874{
25875
25876		struct sockaddr_in6 sin6;
25877
25878
25879  ;
25880  return 0;
25881}
25882_ACEOF
25883if ac_fn_c_try_compile "$LINENO"; then :
25884  isc_cv_found_ipv6=yes
25885else
25886  isc_cv_found_ipv6=no
25887
25888fi
25889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25890
25891fi
25892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
25893$as_echo "$isc_cv_found_ipv6" >&6; }
25894
25895#
25896# See whether IPv6 support is provided via a Kame add-on.
25897# This is done before other IPv6 linking tests so LIBS is properly set.
25898#
25899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
25900$as_echo_n "checking for Kame IPv6 support... " >&6; }
25901
25902# Check whether --with-kame was given.
25903if test "${with_kame+set}" = set; then :
25904  withval=$with_kame; use_kame="$withval"
25905else
25906  use_kame="no"
25907
25908fi
25909
25910case "$use_kame" in
25911 no)
25912    ;;
25913 yes)
25914    kame_path=/usr/local/v6
25915    ;;
25916 *)
25917    kame_path="$use_kame"
25918    ;;
25919esac
25920case "$use_kame" in
25921 no)
25922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25923$as_echo "no" >&6; }
25924    ;;
25925 *)
25926    if test -f $kame_path/lib/libinet6.a; then
25927	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
25928$as_echo "$kame_path/lib/libinet6.a" >&6; }
25929	LIBS="-L$kame_path/lib -linet6 $LIBS"
25930    else
25931	as_fn_error $? "$kame_path/lib/libinet6.a not found.
25932
25933Please choose the proper path with the following command:
25934
25935    configure --with-kame=PATH
25936" "$LINENO" 5
25937    fi
25938    ;;
25939esac
25940
25941#
25942# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
25943# Including it on Kame-using platforms is very bad, though, because
25944# Kame uses #error against direct inclusion.   So include it on only
25945# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
25946# This is done before the in6_pktinfo check because that's what
25947# netinet6/in6.h is needed for.
25948#
25949case "$host" in
25950 *-bsdi4.[01]*)
25951
25952$as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
25953
25954    isc_netinet6in6_hack="#include <netinet6/in6.h>"
25955    ;;
25956 *)
25957    isc_netinet6in6_hack=""
25958    ;;
25959esac
25960
25961#
25962# This is similar to the netinet6/in6.h issue.
25963#
25964case "$host" in
25965 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
25966
25967$as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
25968
25969    isc_netinetin6_hack="#include <netinet/in6.h>"
25970    ;;
25971 *)
25972    isc_netinetin6_hack=""
25973    ;;
25974esac
25975
25976
25977case "$isc_cv_found_ipv6" in
25978 yes)
25979
25980$as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
25981
25982    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
25983$as_echo_n "checking for in6_pktinfo... " >&6; }
25984if ${isc_cv_have_in6_pktinfo+:} false; then :
25985  $as_echo_n "(cached) " >&6
25986else
25987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25988/* end confdefs.h.  */
25989
25990		    #include <sys/types.h>
25991		    #include <sys/socket.h>
25992		    #include <netinet/in.h>
25993		    $isc_netinetin6_hack
25994		    $isc_netinet6in6_hack
25995
25996int
25997main ()
25998{
25999
26000		    struct in6_pktinfo xyzzy;
26001
26002
26003  ;
26004  return 0;
26005}
26006_ACEOF
26007if ac_fn_c_try_compile "$LINENO"; then :
26008  isc_cv_have_in6_pktinfo=yes
26009else
26010  isc_cv_have_in6_pktinfo=no
26011
26012fi
26013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26014
26015fi
26016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26017$as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26018    case "$isc_cv_have_in6_pktinfo" in
26019     yes)
26020
26021$as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26022
26023    esac
26024
26025
26026    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26028$as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26029if ${isc_cv_have_sin6_scope_id+:} false; then :
26030  $as_echo_n "(cached) " >&6
26031else
26032  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26033/* end confdefs.h.  */
26034
26035		    #include <sys/types.h>
26036		    #include <sys/socket.h>
26037		    #include <netinet/in.h>
26038		    $isc_netinetin6_hack
26039		    $isc_netinet6in6_hack
26040
26041int
26042main ()
26043{
26044
26045		    struct sockaddr_in6 xyzzy;
26046		    xyzzy.sin6_scope_id = 0;
26047
26048
26049  ;
26050  return 0;
26051}
26052_ACEOF
26053if ac_fn_c_try_compile "$LINENO"; then :
26054  isc_cv_have_sin6_scope_id=yes
26055else
26056  isc_cv_have_sin6_scope_id=no
26057
26058fi
26059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26060
26061fi
26062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26063$as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26064
26065    case "$isc_cv_have_sin6_scope_id" in
26066     yes)
26067
26068$as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26069
26070    esac
26071esac
26072
26073
26074# We need this check run even without isc_cv_found_ipv6=yes
26075
26076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26077$as_echo_n "checking for in6addr_any... " >&6; }
26078if ${isc_cv_in6addr_any_links+:} false; then :
26079  $as_echo_n "(cached) " >&6
26080else
26081
26082	SAVED_LIBS="$LIBS"
26083	LIBS="$LDADD_LIBNTP $LIBS"
26084	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26085/* end confdefs.h.  */
26086$ac_includes_default
26087		    #include <sys/socket.h>
26088		    #include <netinet/in.h>
26089		    $isc_netinetin6_hack
26090		    $isc_netinet6in6_hack
26091
26092int
26093main ()
26094{
26095
26096		    printf("%x", in6addr_any.s6_addr[15]);
26097
26098
26099  ;
26100  return 0;
26101}
26102_ACEOF
26103if ac_fn_c_try_link "$LINENO"; then :
26104  isc_cv_in6addr_any_links=yes
26105else
26106  isc_cv_in6addr_any_links=no
26107
26108fi
26109rm -f core conftest.err conftest.$ac_objext \
26110    conftest$ac_exeext conftest.$ac_ext
26111	LIBS="$SAVED_LIBS"
26112	{ SAVED_LIBS=; unset SAVED_LIBS;}
26113
26114
26115fi
26116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26117$as_echo "$isc_cv_in6addr_any_links" >&6; }
26118
26119case "$isc_cv_in6addr_any_links" in
26120 no)
26121
26122$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26123
26124esac
26125
26126
26127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26128$as_echo_n "checking for struct if_laddrconf... " >&6; }
26129if ${isc_cv_struct_if_laddrconf+:} false; then :
26130  $as_echo_n "(cached) " >&6
26131else
26132  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26133/* end confdefs.h.  */
26134
26135		#include <sys/types.h>
26136		#include <net/if6.h>
26137
26138int
26139main ()
26140{
26141
26142		struct if_laddrconf a;
26143
26144
26145  ;
26146  return 0;
26147}
26148_ACEOF
26149if ac_fn_c_try_compile "$LINENO"; then :
26150  isc_cv_struct_if_laddrconf=yes
26151else
26152  isc_cv_struct_if_laddrconf=no
26153
26154fi
26155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26156
26157fi
26158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26159$as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26160
26161case "$isc_cv_struct_if_laddrconf" in
26162 yes)
26163
26164$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26165
26166esac
26167
26168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26169$as_echo_n "checking for struct if_laddrreq... " >&6; }
26170if ${isc_cv_struct_if_laddrreq+:} false; then :
26171  $as_echo_n "(cached) " >&6
26172else
26173  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26174/* end confdefs.h.  */
26175
26176		#include <sys/types.h>
26177		#include <net/if6.h>
26178
26179int
26180main ()
26181{
26182
26183		struct if_laddrreq a;
26184
26185
26186  ;
26187  return 0;
26188}
26189_ACEOF
26190if ac_fn_c_try_compile "$LINENO"; then :
26191  isc_cv_struct_if_laddrreq=yes
26192else
26193  isc_cv_struct_if_laddrreq=no
26194
26195fi
26196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26197
26198fi
26199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26200$as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26201
26202case "$isc_cv_struct_if_laddrreq" in
26203 yes)
26204
26205$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26206
26207esac
26208
26209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26210$as_echo_n "checking for multicast IP support... " >&6; }
26211if ${ntp_cv_multicast+:} false; then :
26212  $as_echo_n "(cached) " >&6
26213else
26214
26215	ntp_cv_multicast=no
26216	case "$host" in
26217	 i386-sequent-sysv4)
26218	    ;;
26219	 *)
26220	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26221/* end confdefs.h.  */
26222
26223			#ifdef HAVE_NETINET_IN_H
26224			# include <netinet/in.h>
26225			#endif
26226
26227int
26228main ()
26229{
26230
26231			struct ip_mreq ipmr;
26232			ipmr.imr_interface.s_addr = 0;
26233
26234
26235  ;
26236  return 0;
26237}
26238_ACEOF
26239if ac_fn_c_try_compile "$LINENO"; then :
26240  ntp_cv_multicast=yes
26241fi
26242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26243	    ;;
26244	esac
26245
26246
26247fi
26248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26249$as_echo "$ntp_cv_multicast" >&6; }
26250case "$ntp_cv_multicast" in
26251 yes)
26252
26253$as_echo "#define MCAST 1" >>confdefs.h
26254
26255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26256$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26257if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26258  $as_echo_n "(cached) " >&6
26259else
26260
26261	    case "$host" in
26262	     *-*-netbsd*|*-*-*linux*)
26263		ntp_cv_typeof_ip_multicast_loop=u_int
26264		;;
26265	     *)
26266		ntp_cv_typeof_ip_multicast_loop=u_char
26267		;;
26268	    esac
26269
26270
26271fi
26272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26273$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26274
26275cat >>confdefs.h <<_ACEOF
26276#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26277_ACEOF
26278
26279esac
26280
26281# Check whether --enable-getifaddrs was given.
26282if test "${enable_getifaddrs+set}" = set; then :
26283  enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26284else
26285  want_getifaddrs="yes"
26286
26287fi
26288
26289
26290case $want_getifaddrs in
26291 glibc)
26292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26293$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26294esac
26295case $want_getifaddrs in
26296 no)
26297    ;;
26298 *)
26299    SAVED_LIBS="$LIBS"
26300    LIBS="$LDADD_LIBNTP $LIBS"
26301    for ac_func in getifaddrs
26302do :
26303  ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26304if test "x$ac_cv_func_getifaddrs" = xyes; then :
26305  cat >>confdefs.h <<_ACEOF
26306#define HAVE_GETIFADDRS 1
26307_ACEOF
26308
26309fi
26310done
26311
26312    LIBS="$SAVED_LIBS"
26313    { SAVED_LIBS=; unset SAVED_LIBS;}
26314    ;;
26315esac
26316
26317#
26318# Check for if_nametoindex() for IPv6 scoped addresses support
26319#
26320case "$host" in
26321 *-hp-hpux*)
26322    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26323$as_echo_n "checking for library containing if_nametoindex... " >&6; }
26324if ${ac_cv_search_if_nametoindex+:} false; then :
26325  $as_echo_n "(cached) " >&6
26326else
26327  ac_func_search_save_LIBS=$LIBS
26328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26329/* end confdefs.h.  */
26330
26331/* Override any GCC internal prototype to avoid an error.
26332   Use char because int might match the return type of a GCC
26333   builtin and then its argument prototype would still apply.  */
26334#ifdef __cplusplus
26335extern "C"
26336#endif
26337char if_nametoindex ();
26338int
26339main ()
26340{
26341return if_nametoindex ();
26342  ;
26343  return 0;
26344}
26345_ACEOF
26346for ac_lib in '' ipv6; do
26347  if test -z "$ac_lib"; then
26348    ac_res="none required"
26349  else
26350    ac_res=-l$ac_lib
26351    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26352  fi
26353  if ac_fn_c_try_link "$LINENO"; then :
26354  ac_cv_search_if_nametoindex=$ac_res
26355fi
26356rm -f core conftest.err conftest.$ac_objext \
26357    conftest$ac_exeext
26358  if ${ac_cv_search_if_nametoindex+:} false; then :
26359  break
26360fi
26361done
26362if ${ac_cv_search_if_nametoindex+:} false; then :
26363
26364else
26365  ac_cv_search_if_nametoindex=no
26366fi
26367rm conftest.$ac_ext
26368LIBS=$ac_func_search_save_LIBS
26369fi
26370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26371$as_echo "$ac_cv_search_if_nametoindex" >&6; }
26372ac_res=$ac_cv_search_if_nametoindex
26373if test "$ac_res" != no; then :
26374  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26375
26376fi
26377
26378esac
26379SAVED_LIBS="$LIBS"
26380LIBS="$LDADD_LIBNTP $LIBS"
26381for ac_func in if_nametoindex
26382do :
26383  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26384if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26385  cat >>confdefs.h <<_ACEOF
26386#define HAVE_IF_NAMETOINDEX 1
26387_ACEOF
26388
26389fi
26390done
26391
26392LIBS="$SAVED_LIBS"
26393{ SAVED_LIBS=; unset SAVED_LIBS;}
26394case "$ac_cv_func_if_nametoindex" in
26395 yes)
26396
26397$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26398
26399esac
26400
26401
26402
26403###
26404
26405# Hacks
26406# these need work if we're to move libntp under sntp
26407
26408$as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26409
26410
26411$as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26412
26413
26414# Checks for library functions.
26415for ac_func in socket
26416do :
26417  ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26418if test "x$ac_cv_func_socket" = xyes; then :
26419  cat >>confdefs.h <<_ACEOF
26420#define HAVE_SOCKET 1
26421_ACEOF
26422
26423fi
26424done
26425
26426
26427
26428# We may not need have_unity
26429have_unity=false
26430# Extract the first word of "ruby", so it can be a program name with args.
26431set dummy ruby; ac_word=$2
26432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26433$as_echo_n "checking for $ac_word... " >&6; }
26434if ${ac_cv_path_PATH_RUBY+:} false; then :
26435  $as_echo_n "(cached) " >&6
26436else
26437  case $PATH_RUBY in
26438  [\\/]* | ?:[\\/]*)
26439  ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26440  ;;
26441  *)
26442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26443for as_dir in $PATH
26444do
26445  IFS=$as_save_IFS
26446  test -z "$as_dir" && as_dir=.
26447    for ac_exec_ext in '' $ac_executable_extensions; do
26448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26449    ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26451    break 2
26452  fi
26453done
26454  done
26455IFS=$as_save_IFS
26456
26457  ;;
26458esac
26459fi
26460PATH_RUBY=$ac_cv_path_PATH_RUBY
26461if test -n "$PATH_RUBY"; then
26462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26463$as_echo "$PATH_RUBY" >&6; }
26464else
26465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26466$as_echo "no" >&6; }
26467fi
26468
26469
26470case "$PATH_RUBY" in
26471 /*)
26472    have_unity=true
26473    ;;
26474 *) PATH_RUBY="false"
26475    ;;
26476esac
26477# We may not need UNITYBUILD_AVAILABLE
26478 if $have_unity; then
26479  UNITYBUILD_AVAILABLE_TRUE=
26480  UNITYBUILD_AVAILABLE_FALSE='#'
26481else
26482  UNITYBUILD_AVAILABLE_TRUE='#'
26483  UNITYBUILD_AVAILABLE_FALSE=
26484fi
26485
26486
26487
26488## HMS: if we don't find c++ we should not look for gtest.
26489#AC_PROG_CXX
26490#NTP_GOOGLETEST
26491
26492
26493case "$build" in
26494 $host)	cross=0 ;;
26495 *)	cross=1 ;;
26496esac
26497
26498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
26499$as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
26500# Check whether --enable-problem-tests was given.
26501if test "${enable_problem_tests+set}" = set; then :
26502  enableval=$enable_problem_tests; sntp_ept=$enableval
26503else
26504  sntp_ept=yes
26505
26506fi
26507
26508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
26509$as_echo "$sntp_ept" >&6; }
26510
26511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
26512$as_echo_n "checking if we can run test-kodDatabase... " >&6; }
26513sntp_test_kodDatabase="no"
26514case "$sntp_ept:$cross:$host" in
26515 no:0:*-apple-darwin12.6.0) ;;
26516 *) sntp_test_kodDatabase="yes" ;;
26517esac
26518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
26519$as_echo "$sntp_test_kodDatabase" >&6; }
26520 if test x$sntp_test_kodDatabase = xyes; then
26521  BUILD_TEST_KODDATABASE_TRUE=
26522  BUILD_TEST_KODDATABASE_FALSE='#'
26523else
26524  BUILD_TEST_KODDATABASE_TRUE='#'
26525  BUILD_TEST_KODDATABASE_FALSE=
26526fi
26527
26528
26529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
26530$as_echo_n "checking if we can run test-kodFile... " >&6; }
26531sntp_test_kodFile="no"
26532case "$sntp_ept:$cross:$host" in
26533 no:0:*-apple-darwin12.6.0) ;;
26534 *) sntp_test_kodFile="yes" ;;
26535esac
26536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
26537$as_echo "$sntp_test_kodFile" >&6; }
26538 if test x$sntp_test_kodFile = xyes; then
26539  BUILD_TEST_KODFILE_TRUE=
26540  BUILD_TEST_KODFILE_FALSE='#'
26541else
26542  BUILD_TEST_KODFILE_TRUE='#'
26543  BUILD_TEST_KODFILE_FALSE=
26544fi
26545
26546
26547
26548
26549# All libraries should be in various LIB_* variables now.
26550#LIBS=
26551# Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
26552# in -lintl -lgen, outside our "scope".
26553
26554ac_config_files="$ac_config_files Makefile"
26555
26556ac_config_files="$ac_config_files include/Makefile"
26557
26558ac_config_files="$ac_config_files scripts/Makefile"
26559
26560ac_config_files="$ac_config_files tests/Makefile"
26561
26562ac_config_files="$ac_config_files tests/fileHandlingTest.h"
26563
26564ac_config_files="$ac_config_files unity/Makefile"
26565
26566
26567cat >confcache <<\_ACEOF
26568# This file is a shell script that caches the results of configure
26569# tests run on this system so they can be shared between configure
26570# scripts and configure runs, see configure's option --config-cache.
26571# It is not useful on other systems.  If it contains results you don't
26572# want to keep, you may remove or edit it.
26573#
26574# config.status only pays attention to the cache file if you give it
26575# the --recheck option to rerun configure.
26576#
26577# `ac_cv_env_foo' variables (set or unset) will be overridden when
26578# loading this file, other *unset* `ac_cv_foo' will be assigned the
26579# following values.
26580
26581_ACEOF
26582
26583# The following way of writing the cache mishandles newlines in values,
26584# but we know of no workaround that is simple, portable, and efficient.
26585# So, we kill variables containing newlines.
26586# Ultrix sh set writes to stderr and can't be redirected directly,
26587# and sets the high bit in the cache file unless we assign to the vars.
26588(
26589  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26590    eval ac_val=\$$ac_var
26591    case $ac_val in #(
26592    *${as_nl}*)
26593      case $ac_var in #(
26594      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26595$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26596      esac
26597      case $ac_var in #(
26598      _ | IFS | as_nl) ;; #(
26599      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26600      *) { eval $ac_var=; unset $ac_var;} ;;
26601      esac ;;
26602    esac
26603  done
26604
26605  (set) 2>&1 |
26606    case $as_nl`(ac_space=' '; set) 2>&1` in #(
26607    *${as_nl}ac_space=\ *)
26608      # `set' does not quote correctly, so add quotes: double-quote
26609      # substitution turns \\\\ into \\, and sed turns \\ into \.
26610      sed -n \
26611	"s/'/'\\\\''/g;
26612	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26613      ;; #(
26614    *)
26615      # `set' quotes correctly as required by POSIX, so do not add quotes.
26616      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26617      ;;
26618    esac |
26619    sort
26620) |
26621  sed '
26622     /^ac_cv_env_/b end
26623     t clear
26624     :clear
26625     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26626     t end
26627     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26628     :end' >>confcache
26629if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26630  if test -w "$cache_file"; then
26631    if test "x$cache_file" != "x/dev/null"; then
26632      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26633$as_echo "$as_me: updating cache $cache_file" >&6;}
26634      if test ! -f "$cache_file" || test -h "$cache_file"; then
26635	cat confcache >"$cache_file"
26636      else
26637        case $cache_file in #(
26638        */* | ?:*)
26639	  mv -f confcache "$cache_file"$$ &&
26640	  mv -f "$cache_file"$$ "$cache_file" ;; #(
26641        *)
26642	  mv -f confcache "$cache_file" ;;
26643	esac
26644      fi
26645    fi
26646  else
26647    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26648$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26649  fi
26650fi
26651rm -f confcache
26652
26653test "x$prefix" = xNONE && prefix=$ac_default_prefix
26654# Let make expand exec_prefix.
26655test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26656
26657DEFS=-DHAVE_CONFIG_H
26658
26659ac_libobjs=
26660ac_ltlibobjs=
26661U=
26662for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26663  # 1. Remove the extension, and $U if already installed.
26664  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26665  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26666  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26667  #    will be set to the directory where LIBOBJS objects are built.
26668  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26669  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26670done
26671LIBOBJS=$ac_libobjs
26672
26673LTLIBOBJS=$ac_ltlibobjs
26674
26675
26676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
26677$as_echo_n "checking that generated files are newer than configure... " >&6; }
26678   if test -n "$am_sleep_pid"; then
26679     # Hide warnings about reused PIDs.
26680     wait $am_sleep_pid 2>/dev/null
26681   fi
26682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
26683$as_echo "done" >&6; }
26684 if test -n "$EXEEXT"; then
26685  am__EXEEXT_TRUE=
26686  am__EXEEXT_FALSE='#'
26687else
26688  am__EXEEXT_TRUE='#'
26689  am__EXEEXT_FALSE=
26690fi
26691
26692if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
26693  as_fn_error $? "conditional \"AMDEP\" was never defined.
26694Usually this means the macro was only invoked conditionally." "$LINENO" 5
26695fi
26696if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
26697  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
26698Usually this means the macro was only invoked conditionally." "$LINENO" 5
26699fi
26700
26701if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
26702  as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
26703Usually this means the macro was only invoked conditionally." "$LINENO" 5
26704fi
26705if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
26706  as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
26707Usually this means the macro was only invoked conditionally." "$LINENO" 5
26708fi
26709if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
26710  as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
26711Usually this means the macro was only invoked conditionally." "$LINENO" 5
26712fi
26713if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
26714  as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
26715Usually this means the macro was only invoked conditionally." "$LINENO" 5
26716fi
26717if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
26718  as_fn_error $? "conditional \"PTHREADS\" was never defined.
26719Usually this means the macro was only invoked conditionally." "$LINENO" 5
26720fi
26721if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
26722  as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
26723Usually this means the macro was only invoked conditionally." "$LINENO" 5
26724fi
26725if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
26726  as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
26727Usually this means the macro was only invoked conditionally." "$LINENO" 5
26728fi
26729if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
26730  as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
26731Usually this means the macro was only invoked conditionally." "$LINENO" 5
26732fi
26733if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
26734  as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
26735Usually this means the macro was only invoked conditionally." "$LINENO" 5
26736fi
26737if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
26738  as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
26739Usually this means the macro was only invoked conditionally." "$LINENO" 5
26740fi
26741if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
26742  as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
26743Usually this means the macro was only invoked conditionally." "$LINENO" 5
26744fi
26745if test -z "${BUILD_TEST_KODDATABASE_TRUE}" && test -z "${BUILD_TEST_KODDATABASE_FALSE}"; then
26746  as_fn_error $? "conditional \"BUILD_TEST_KODDATABASE\" was never defined.
26747Usually this means the macro was only invoked conditionally." "$LINENO" 5
26748fi
26749if test -z "${BUILD_TEST_KODFILE_TRUE}" && test -z "${BUILD_TEST_KODFILE_FALSE}"; then
26750  as_fn_error $? "conditional \"BUILD_TEST_KODFILE\" was never defined.
26751Usually this means the macro was only invoked conditionally." "$LINENO" 5
26752fi
26753
26754: "${CONFIG_STATUS=./config.status}"
26755ac_write_fail=0
26756ac_clean_files_save=$ac_clean_files
26757ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26758{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26759$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26760as_write_fail=0
26761cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26762#! $SHELL
26763# Generated by $as_me.
26764# Run this file to recreate the current configuration.
26765# Compiler output produced by configure, useful for debugging
26766# configure, is in config.log if it exists.
26767
26768debug=false
26769ac_cs_recheck=false
26770ac_cs_silent=false
26771
26772SHELL=\${CONFIG_SHELL-$SHELL}
26773export SHELL
26774_ASEOF
26775cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26776## -------------------- ##
26777## M4sh Initialization. ##
26778## -------------------- ##
26779
26780# Be more Bourne compatible
26781DUALCASE=1; export DUALCASE # for MKS sh
26782if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26783  emulate sh
26784  NULLCMD=:
26785  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26786  # is contrary to our usage.  Disable this feature.
26787  alias -g '${1+"$@"}'='"$@"'
26788  setopt NO_GLOB_SUBST
26789else
26790  case `(set -o) 2>/dev/null` in #(
26791  *posix*) :
26792    set -o posix ;; #(
26793  *) :
26794     ;;
26795esac
26796fi
26797
26798
26799as_nl='
26800'
26801export as_nl
26802# Printing a long string crashes Solaris 7 /usr/bin/printf.
26803as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26804as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26805as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26806# Prefer a ksh shell builtin over an external printf program on Solaris,
26807# but without wasting forks for bash or zsh.
26808if test -z "$BASH_VERSION$ZSH_VERSION" \
26809    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26810  as_echo='print -r --'
26811  as_echo_n='print -rn --'
26812elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26813  as_echo='printf %s\n'
26814  as_echo_n='printf %s'
26815else
26816  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26817    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26818    as_echo_n='/usr/ucb/echo -n'
26819  else
26820    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26821    as_echo_n_body='eval
26822      arg=$1;
26823      case $arg in #(
26824      *"$as_nl"*)
26825	expr "X$arg" : "X\\(.*\\)$as_nl";
26826	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26827      esac;
26828      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26829    '
26830    export as_echo_n_body
26831    as_echo_n='sh -c $as_echo_n_body as_echo'
26832  fi
26833  export as_echo_body
26834  as_echo='sh -c $as_echo_body as_echo'
26835fi
26836
26837# The user is always right.
26838if test "${PATH_SEPARATOR+set}" != set; then
26839  PATH_SEPARATOR=:
26840  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26841    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26842      PATH_SEPARATOR=';'
26843  }
26844fi
26845
26846
26847# IFS
26848# We need space, tab and new line, in precisely that order.  Quoting is
26849# there to prevent editors from complaining about space-tab.
26850# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26851# splitting by setting IFS to empty value.)
26852IFS=" ""	$as_nl"
26853
26854# Find who we are.  Look in the path if we contain no directory separator.
26855as_myself=
26856case $0 in #((
26857  *[\\/]* ) as_myself=$0 ;;
26858  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26859for as_dir in $PATH
26860do
26861  IFS=$as_save_IFS
26862  test -z "$as_dir" && as_dir=.
26863    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26864  done
26865IFS=$as_save_IFS
26866
26867     ;;
26868esac
26869# We did not find ourselves, most probably we were run as `sh COMMAND'
26870# in which case we are not to be found in the path.
26871if test "x$as_myself" = x; then
26872  as_myself=$0
26873fi
26874if test ! -f "$as_myself"; then
26875  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26876  exit 1
26877fi
26878
26879# Unset variables that we do not need and which cause bugs (e.g. in
26880# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
26881# suppresses any "Segmentation fault" message there.  '((' could
26882# trigger a bug in pdksh 5.2.14.
26883for as_var in BASH_ENV ENV MAIL MAILPATH
26884do eval test x\${$as_var+set} = xset \
26885  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26886done
26887PS1='$ '
26888PS2='> '
26889PS4='+ '
26890
26891# NLS nuisances.
26892LC_ALL=C
26893export LC_ALL
26894LANGUAGE=C
26895export LANGUAGE
26896
26897# CDPATH.
26898(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26899
26900
26901# as_fn_error STATUS ERROR [LINENO LOG_FD]
26902# ----------------------------------------
26903# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26904# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26905# script with STATUS, using 1 if that was 0.
26906as_fn_error ()
26907{
26908  as_status=$1; test $as_status -eq 0 && as_status=1
26909  if test "$4"; then
26910    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26911    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26912  fi
26913  $as_echo "$as_me: error: $2" >&2
26914  as_fn_exit $as_status
26915} # as_fn_error
26916
26917
26918# as_fn_set_status STATUS
26919# -----------------------
26920# Set $? to STATUS, without forking.
26921as_fn_set_status ()
26922{
26923  return $1
26924} # as_fn_set_status
26925
26926# as_fn_exit STATUS
26927# -----------------
26928# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26929as_fn_exit ()
26930{
26931  set +e
26932  as_fn_set_status $1
26933  exit $1
26934} # as_fn_exit
26935
26936# as_fn_unset VAR
26937# ---------------
26938# Portably unset VAR.
26939as_fn_unset ()
26940{
26941  { eval $1=; unset $1;}
26942}
26943as_unset=as_fn_unset
26944# as_fn_append VAR VALUE
26945# ----------------------
26946# Append the text in VALUE to the end of the definition contained in VAR. Take
26947# advantage of any shell optimizations that allow amortized linear growth over
26948# repeated appends, instead of the typical quadratic growth present in naive
26949# implementations.
26950if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26951  eval 'as_fn_append ()
26952  {
26953    eval $1+=\$2
26954  }'
26955else
26956  as_fn_append ()
26957  {
26958    eval $1=\$$1\$2
26959  }
26960fi # as_fn_append
26961
26962# as_fn_arith ARG...
26963# ------------------
26964# Perform arithmetic evaluation on the ARGs, and store the result in the
26965# global $as_val. Take advantage of shells that can avoid forks. The arguments
26966# must be portable across $(()) and expr.
26967if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26968  eval 'as_fn_arith ()
26969  {
26970    as_val=$(( $* ))
26971  }'
26972else
26973  as_fn_arith ()
26974  {
26975    as_val=`expr "$@" || test $? -eq 1`
26976  }
26977fi # as_fn_arith
26978
26979
26980if expr a : '\(a\)' >/dev/null 2>&1 &&
26981   test "X`expr 00001 : '.*\(...\)'`" = X001; then
26982  as_expr=expr
26983else
26984  as_expr=false
26985fi
26986
26987if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26988  as_basename=basename
26989else
26990  as_basename=false
26991fi
26992
26993if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26994  as_dirname=dirname
26995else
26996  as_dirname=false
26997fi
26998
26999as_me=`$as_basename -- "$0" ||
27000$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27001	 X"$0" : 'X\(//\)$' \| \
27002	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27003$as_echo X/"$0" |
27004    sed '/^.*\/\([^/][^/]*\)\/*$/{
27005	    s//\1/
27006	    q
27007	  }
27008	  /^X\/\(\/\/\)$/{
27009	    s//\1/
27010	    q
27011	  }
27012	  /^X\/\(\/\).*/{
27013	    s//\1/
27014	    q
27015	  }
27016	  s/.*/./; q'`
27017
27018# Avoid depending upon Character Ranges.
27019as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27020as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27021as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27022as_cr_digits='0123456789'
27023as_cr_alnum=$as_cr_Letters$as_cr_digits
27024
27025ECHO_C= ECHO_N= ECHO_T=
27026case `echo -n x` in #(((((
27027-n*)
27028  case `echo 'xy\c'` in
27029  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
27030  xy)  ECHO_C='\c';;
27031  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
27032       ECHO_T='	';;
27033  esac;;
27034*)
27035  ECHO_N='-n';;
27036esac
27037
27038rm -f conf$$ conf$$.exe conf$$.file
27039if test -d conf$$.dir; then
27040  rm -f conf$$.dir/conf$$.file
27041else
27042  rm -f conf$$.dir
27043  mkdir conf$$.dir 2>/dev/null
27044fi
27045if (echo >conf$$.file) 2>/dev/null; then
27046  if ln -s conf$$.file conf$$ 2>/dev/null; then
27047    as_ln_s='ln -s'
27048    # ... but there are two gotchas:
27049    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27050    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27051    # In both cases, we have to default to `cp -pR'.
27052    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27053      as_ln_s='cp -pR'
27054  elif ln conf$$.file conf$$ 2>/dev/null; then
27055    as_ln_s=ln
27056  else
27057    as_ln_s='cp -pR'
27058  fi
27059else
27060  as_ln_s='cp -pR'
27061fi
27062rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27063rmdir conf$$.dir 2>/dev/null
27064
27065
27066# as_fn_mkdir_p
27067# -------------
27068# Create "$as_dir" as a directory, including parents if necessary.
27069as_fn_mkdir_p ()
27070{
27071
27072  case $as_dir in #(
27073  -*) as_dir=./$as_dir;;
27074  esac
27075  test -d "$as_dir" || eval $as_mkdir_p || {
27076    as_dirs=
27077    while :; do
27078      case $as_dir in #(
27079      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27080      *) as_qdir=$as_dir;;
27081      esac
27082      as_dirs="'$as_qdir' $as_dirs"
27083      as_dir=`$as_dirname -- "$as_dir" ||
27084$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27085	 X"$as_dir" : 'X\(//\)[^/]' \| \
27086	 X"$as_dir" : 'X\(//\)$' \| \
27087	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27088$as_echo X"$as_dir" |
27089    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27090	    s//\1/
27091	    q
27092	  }
27093	  /^X\(\/\/\)[^/].*/{
27094	    s//\1/
27095	    q
27096	  }
27097	  /^X\(\/\/\)$/{
27098	    s//\1/
27099	    q
27100	  }
27101	  /^X\(\/\).*/{
27102	    s//\1/
27103	    q
27104	  }
27105	  s/.*/./; q'`
27106      test -d "$as_dir" && break
27107    done
27108    test -z "$as_dirs" || eval "mkdir $as_dirs"
27109  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
27110
27111
27112} # as_fn_mkdir_p
27113if mkdir -p . 2>/dev/null; then
27114  as_mkdir_p='mkdir -p "$as_dir"'
27115else
27116  test -d ./-p && rmdir ./-p
27117  as_mkdir_p=false
27118fi
27119
27120
27121# as_fn_executable_p FILE
27122# -----------------------
27123# Test if FILE is an executable regular file.
27124as_fn_executable_p ()
27125{
27126  test -f "$1" && test -x "$1"
27127} # as_fn_executable_p
27128as_test_x='test -x'
27129as_executable_p=as_fn_executable_p
27130
27131# Sed expression to map a string onto a valid CPP name.
27132as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27133
27134# Sed expression to map a string onto a valid variable name.
27135as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27136
27137
27138exec 6>&1
27139## ----------------------------------- ##
27140## Main body of $CONFIG_STATUS script. ##
27141## ----------------------------------- ##
27142_ASEOF
27143test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27144
27145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27146# Save the log message, to keep $0 and so on meaningful, and to
27147# report actual input values of CONFIG_FILES etc. instead of their
27148# values after options handling.
27149ac_log="
27150This file was extended by sntp $as_me 4.2.8p15, which was
27151generated by GNU Autoconf 2.69.  Invocation command line was
27152
27153  CONFIG_FILES    = $CONFIG_FILES
27154  CONFIG_HEADERS  = $CONFIG_HEADERS
27155  CONFIG_LINKS    = $CONFIG_LINKS
27156  CONFIG_COMMANDS = $CONFIG_COMMANDS
27157  $ $0 $@
27158
27159on `(hostname || uname -n) 2>/dev/null | sed 1q`
27160"
27161
27162_ACEOF
27163
27164case $ac_config_files in *"
27165"*) set x $ac_config_files; shift; ac_config_files=$*;;
27166esac
27167
27168case $ac_config_headers in *"
27169"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27170esac
27171
27172
27173cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27174# Files that config.status was made for.
27175config_files="$ac_config_files"
27176config_headers="$ac_config_headers"
27177config_commands="$ac_config_commands"
27178
27179_ACEOF
27180
27181cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27182ac_cs_usage="\
27183\`$as_me' instantiates files and other configuration actions
27184from templates according to the current configuration.  Unless the files
27185and actions are specified as TAGs, all are instantiated by default.
27186
27187Usage: $0 [OPTION]... [TAG]...
27188
27189  -h, --help       print this help, then exit
27190  -V, --version    print version number and configuration settings, then exit
27191      --config     print configuration, then exit
27192  -q, --quiet, --silent
27193                   do not print progress messages
27194  -d, --debug      don't remove temporary files
27195      --recheck    update $as_me by reconfiguring in the same conditions
27196      --file=FILE[:TEMPLATE]
27197                   instantiate the configuration file FILE
27198      --header=FILE[:TEMPLATE]
27199                   instantiate the configuration header FILE
27200
27201Configuration files:
27202$config_files
27203
27204Configuration headers:
27205$config_headers
27206
27207Configuration commands:
27208$config_commands
27209
27210Report bugs to <http://bugs.ntp.org./>.
27211sntp home page: <http://www.ntp.org./>."
27212
27213_ACEOF
27214cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27215ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27216ac_cs_version="\\
27217sntp config.status 4.2.8p15
27218configured by $0, generated by GNU Autoconf 2.69,
27219  with options \\"\$ac_cs_config\\"
27220
27221Copyright (C) 2012 Free Software Foundation, Inc.
27222This config.status script is free software; the Free Software Foundation
27223gives unlimited permission to copy, distribute and modify it."
27224
27225ac_pwd='$ac_pwd'
27226srcdir='$srcdir'
27227INSTALL='$INSTALL'
27228MKDIR_P='$MKDIR_P'
27229AWK='$AWK'
27230test -n "\$AWK" || AWK=awk
27231_ACEOF
27232
27233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27234# The default lists apply if the user does not specify any file.
27235ac_need_defaults=:
27236while test $# != 0
27237do
27238  case $1 in
27239  --*=?*)
27240    ac_option=`expr "X$1" : 'X\([^=]*\)='`
27241    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27242    ac_shift=:
27243    ;;
27244  --*=)
27245    ac_option=`expr "X$1" : 'X\([^=]*\)='`
27246    ac_optarg=
27247    ac_shift=:
27248    ;;
27249  *)
27250    ac_option=$1
27251    ac_optarg=$2
27252    ac_shift=shift
27253    ;;
27254  esac
27255
27256  case $ac_option in
27257  # Handling of the options.
27258  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27259    ac_cs_recheck=: ;;
27260  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27261    $as_echo "$ac_cs_version"; exit ;;
27262  --config | --confi | --conf | --con | --co | --c )
27263    $as_echo "$ac_cs_config"; exit ;;
27264  --debug | --debu | --deb | --de | --d | -d )
27265    debug=: ;;
27266  --file | --fil | --fi | --f )
27267    $ac_shift
27268    case $ac_optarg in
27269    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27270    '') as_fn_error $? "missing file argument" ;;
27271    esac
27272    as_fn_append CONFIG_FILES " '$ac_optarg'"
27273    ac_need_defaults=false;;
27274  --header | --heade | --head | --hea )
27275    $ac_shift
27276    case $ac_optarg in
27277    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27278    esac
27279    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27280    ac_need_defaults=false;;
27281  --he | --h)
27282    # Conflict between --help and --header
27283    as_fn_error $? "ambiguous option: \`$1'
27284Try \`$0 --help' for more information.";;
27285  --help | --hel | -h )
27286    $as_echo "$ac_cs_usage"; exit ;;
27287  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27288  | -silent | --silent | --silen | --sile | --sil | --si | --s)
27289    ac_cs_silent=: ;;
27290
27291  # This is an error.
27292  -*) as_fn_error $? "unrecognized option: \`$1'
27293Try \`$0 --help' for more information." ;;
27294
27295  *) as_fn_append ac_config_targets " $1"
27296     ac_need_defaults=false ;;
27297
27298  esac
27299  shift
27300done
27301
27302ac_configure_extra_args=
27303
27304if $ac_cs_silent; then
27305  exec 6>/dev/null
27306  ac_configure_extra_args="$ac_configure_extra_args --silent"
27307fi
27308
27309_ACEOF
27310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27311if \$ac_cs_recheck; then
27312  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27313  shift
27314  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27315  CONFIG_SHELL='$SHELL'
27316  export CONFIG_SHELL
27317  exec "\$@"
27318fi
27319
27320_ACEOF
27321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27322exec 5>>config.log
27323{
27324  echo
27325  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27326## Running $as_me. ##
27327_ASBOX
27328  $as_echo "$ac_log"
27329} >&5
27330
27331_ACEOF
27332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27333#
27334# INIT-COMMANDS
27335#
27336AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
27337
27338
27339# The HP-UX ksh and POSIX shell print the target directory to stdout
27340# if CDPATH is set.
27341(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27342
27343sed_quote_subst='$sed_quote_subst'
27344double_quote_subst='$double_quote_subst'
27345delay_variable_subst='$delay_variable_subst'
27346SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
27347Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
27348GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
27349EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
27350FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
27351SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
27352ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
27353LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
27354enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
27355macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
27356macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
27357enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
27358pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
27359enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
27360shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
27361PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
27362host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
27363host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
27364host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
27365build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
27366build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
27367build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
27368NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
27369LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
27370max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
27371ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
27372exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
27373lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
27374lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
27375lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
27376lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
27377lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
27378reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
27379reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
27380OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
27381deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
27382file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
27383file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
27384want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
27385DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
27386sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
27387AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
27388AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
27389archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
27390STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
27391RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
27392old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27393old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27394old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
27395lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
27396CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
27397CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
27398compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
27399GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
27400lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
27401lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
27402lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
27403lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
27404lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
27405lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
27406nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
27407lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
27408lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
27409objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
27410MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
27411lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
27412lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
27413lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
27414lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
27415lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
27416need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
27417MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
27418DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
27419NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
27420LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
27421OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
27422OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
27423libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
27424shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
27425extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27426archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
27427enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
27428export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
27429whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
27430compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
27431old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
27432old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27433archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
27434archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27435module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
27436module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27437with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
27438allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
27439no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
27440hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
27441hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
27442hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
27443hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
27444hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
27445hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
27446hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
27447inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
27448link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
27449always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
27450export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
27451exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
27452include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
27453prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
27454postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
27455file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
27456variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
27457need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
27458need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
27459version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
27460runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
27461shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
27462shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
27463libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
27464library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
27465soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
27466install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
27467postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27468postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27469finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
27470finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
27471hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
27472sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
27473configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
27474configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
27475hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
27476enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
27477enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
27478enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
27479old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
27480striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
27481
27482LTCC='$LTCC'
27483LTCFLAGS='$LTCFLAGS'
27484compiler='$compiler_DEFAULT'
27485
27486# A function that is used when there is no print builtin or printf.
27487func_fallback_echo ()
27488{
27489  eval 'cat <<_LTECHO_EOF
27490\$1
27491_LTECHO_EOF'
27492}
27493
27494# Quote evaled strings.
27495for var in SED \
27496GREP \
27497EGREP \
27498FGREP \
27499SHELL \
27500ECHO \
27501LD \
27502PATH_SEPARATOR \
27503NM \
27504LN_S \
27505lt_SP2NL \
27506lt_NL2SP \
27507reload_flag \
27508OBJDUMP \
27509deplibs_check_method \
27510file_magic_cmd \
27511file_magic_glob \
27512want_nocaseglob \
27513DLLTOOL \
27514sharedlib_from_linklib_cmd \
27515AR \
27516AR_FLAGS \
27517archiver_list_spec \
27518STRIP \
27519RANLIB \
27520CC \
27521CFLAGS \
27522compiler \
27523lt_cv_sys_global_symbol_pipe \
27524lt_cv_sys_global_symbol_to_cdecl \
27525lt_cv_sys_global_symbol_to_import \
27526lt_cv_sys_global_symbol_to_c_name_address \
27527lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
27528lt_cv_nm_interface \
27529nm_file_list_spec \
27530lt_cv_truncate_bin \
27531lt_prog_compiler_no_builtin_flag \
27532lt_prog_compiler_pic \
27533lt_prog_compiler_wl \
27534lt_prog_compiler_static \
27535lt_cv_prog_compiler_c_o \
27536need_locks \
27537MANIFEST_TOOL \
27538DSYMUTIL \
27539NMEDIT \
27540LIPO \
27541OTOOL \
27542OTOOL64 \
27543shrext_cmds \
27544export_dynamic_flag_spec \
27545whole_archive_flag_spec \
27546compiler_needs_object \
27547with_gnu_ld \
27548allow_undefined_flag \
27549no_undefined_flag \
27550hardcode_libdir_flag_spec \
27551hardcode_libdir_separator \
27552exclude_expsyms \
27553include_expsyms \
27554file_list_spec \
27555variables_saved_for_relink \
27556libname_spec \
27557library_names_spec \
27558soname_spec \
27559install_override_mode \
27560finish_eval \
27561old_striplib \
27562striplib; do
27563    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27564    *[\\\\\\\`\\"\\\$]*)
27565      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27566      ;;
27567    *)
27568      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27569      ;;
27570    esac
27571done
27572
27573# Double-quote double-evaled strings.
27574for var in reload_cmds \
27575old_postinstall_cmds \
27576old_postuninstall_cmds \
27577old_archive_cmds \
27578extract_expsyms_cmds \
27579old_archive_from_new_cmds \
27580old_archive_from_expsyms_cmds \
27581archive_cmds \
27582archive_expsym_cmds \
27583module_cmds \
27584module_expsym_cmds \
27585export_symbols_cmds \
27586prelink_cmds \
27587postlink_cmds \
27588postinstall_cmds \
27589postuninstall_cmds \
27590finish_cmds \
27591sys_lib_search_path_spec \
27592configure_time_dlsearch_path \
27593configure_time_lt_sys_library_path; do
27594    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27595    *[\\\\\\\`\\"\\\$]*)
27596      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27597      ;;
27598    *)
27599      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27600      ;;
27601    esac
27602done
27603
27604ac_aux_dir='$ac_aux_dir'
27605
27606# See if we are running on zsh, and set the options that allow our
27607# commands through without removal of \ escapes INIT.
27608if test -n "\${ZSH_VERSION+set}"; then
27609   setopt NO_GLOB_SUBST
27610fi
27611
27612
27613    PACKAGE='$PACKAGE'
27614    VERSION='$VERSION'
27615    RM='$RM'
27616    ofile='$ofile'
27617
27618
27619
27620
27621_ACEOF
27622
27623cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27624
27625# Handling of arguments.
27626for ac_config_target in $ac_config_targets
27627do
27628  case $ac_config_target in
27629    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27630    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
27631    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
27632    "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
27633    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27634    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
27635    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
27636    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
27637    "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
27638    "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
27639
27640  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
27641  esac
27642done
27643
27644
27645# If the user did not use the arguments to specify the items to instantiate,
27646# then the envvar interface is used.  Set only those that are not.
27647# We use the long form for the default assignment because of an extremely
27648# bizarre bug on SunOS 4.1.3.
27649if $ac_need_defaults; then
27650  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27651  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27652  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27653fi
27654
27655# Have a temporary directory for convenience.  Make it in the build tree
27656# simply because there is no reason against having it here, and in addition,
27657# creating and moving files from /tmp can sometimes cause problems.
27658# Hook for its removal unless debugging.
27659# Note that there is a small window in which the directory will not be cleaned:
27660# after its creation but before its name has been assigned to `$tmp'.
27661$debug ||
27662{
27663  tmp= ac_tmp=
27664  trap 'exit_status=$?
27665  : "${ac_tmp:=$tmp}"
27666  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
27667' 0
27668  trap 'as_fn_exit 1' 1 2 13 15
27669}
27670# Create a (secure) tmp directory for tmp files.
27671
27672{
27673  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27674  test -d "$tmp"
27675}  ||
27676{
27677  tmp=./conf$$-$RANDOM
27678  (umask 077 && mkdir "$tmp")
27679} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27680ac_tmp=$tmp
27681
27682# Set up the scripts for CONFIG_FILES section.
27683# No need to generate them if there are no CONFIG_FILES.
27684# This happens for instance with `./config.status config.h'.
27685if test -n "$CONFIG_FILES"; then
27686
27687
27688ac_cr=`echo X | tr X '\015'`
27689# On cygwin, bash can eat \r inside `` if the user requested igncr.
27690# But we know of no other shell where ac_cr would be empty at this
27691# point, so we can use a bashism as a fallback.
27692if test "x$ac_cr" = x; then
27693  eval ac_cr=\$\'\\r\'
27694fi
27695ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27696if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27697  ac_cs_awk_cr='\\r'
27698else
27699  ac_cs_awk_cr=$ac_cr
27700fi
27701
27702echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
27703_ACEOF
27704
27705
27706{
27707  echo "cat >conf$$subs.awk <<_ACEOF" &&
27708  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27709  echo "_ACEOF"
27710} >conf$$subs.sh ||
27711  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27712ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
27713ac_delim='%!_!# '
27714for ac_last_try in false false false false false :; do
27715  . ./conf$$subs.sh ||
27716    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27717
27718  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27719  if test $ac_delim_n = $ac_delim_num; then
27720    break
27721  elif $ac_last_try; then
27722    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27723  else
27724    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27725  fi
27726done
27727rm -f conf$$subs.sh
27728
27729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27730cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
27731_ACEOF
27732sed -n '
27733h
27734s/^/S["/; s/!.*/"]=/
27735p
27736g
27737s/^[^!]*!//
27738:repl
27739t repl
27740s/'"$ac_delim"'$//
27741t delim
27742:nl
27743h
27744s/\(.\{148\}\)..*/\1/
27745t more1
27746s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27747p
27748n
27749b repl
27750:more1
27751s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27752p
27753g
27754s/.\{148\}//
27755t nl
27756:delim
27757h
27758s/\(.\{148\}\)..*/\1/
27759t more2
27760s/["\\]/\\&/g; s/^/"/; s/$/"/
27761p
27762b
27763:more2
27764s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27765p
27766g
27767s/.\{148\}//
27768t delim
27769' <conf$$subs.awk | sed '
27770/^[^""]/{
27771  N
27772  s/\n//
27773}
27774' >>$CONFIG_STATUS || ac_write_fail=1
27775rm -f conf$$subs.awk
27776cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27777_ACAWK
27778cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27779  for (key in S) S_is_set[key] = 1
27780  FS = ""
27781
27782}
27783{
27784  line = $ 0
27785  nfields = split(line, field, "@")
27786  substed = 0
27787  len = length(field[1])
27788  for (i = 2; i < nfields; i++) {
27789    key = field[i]
27790    keylen = length(key)
27791    if (S_is_set[key]) {
27792      value = S[key]
27793      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27794      len += length(value) + length(field[++i])
27795      substed = 1
27796    } else
27797      len += 1 + keylen
27798  }
27799
27800  print line
27801}
27802
27803_ACAWK
27804_ACEOF
27805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27806if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27807  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27808else
27809  cat
27810fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27811  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27812_ACEOF
27813
27814# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27815# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27816# trailing colons and then remove the whole line if VPATH becomes empty
27817# (actually we leave an empty line to preserve line numbers).
27818if test "x$srcdir" = x.; then
27819  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
27820h
27821s///
27822s/^/:/
27823s/[	 ]*$/:/
27824s/:\$(srcdir):/:/g
27825s/:\${srcdir}:/:/g
27826s/:@srcdir@:/:/g
27827s/^:*//
27828s/:*$//
27829x
27830s/\(=[	 ]*\).*/\1/
27831G
27832s/\n//
27833s/^[^=]*=[	 ]*$//
27834}'
27835fi
27836
27837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27838fi # test -n "$CONFIG_FILES"
27839
27840# Set up the scripts for CONFIG_HEADERS section.
27841# No need to generate them if there are no CONFIG_HEADERS.
27842# This happens for instance with `./config.status Makefile'.
27843if test -n "$CONFIG_HEADERS"; then
27844cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27845BEGIN {
27846_ACEOF
27847
27848# Transform confdefs.h into an awk script `defines.awk', embedded as
27849# here-document in config.status, that substitutes the proper values into
27850# config.h.in to produce config.h.
27851
27852# Create a delimiter string that does not exist in confdefs.h, to ease
27853# handling of long lines.
27854ac_delim='%!_!# '
27855for ac_last_try in false false :; do
27856  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27857  if test -z "$ac_tt"; then
27858    break
27859  elif $ac_last_try; then
27860    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27861  else
27862    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27863  fi
27864done
27865
27866# For the awk script, D is an array of macro values keyed by name,
27867# likewise P contains macro parameters if any.  Preserve backslash
27868# newline sequences.
27869
27870ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27871sed -n '
27872s/.\{148\}/&'"$ac_delim"'/g
27873t rset
27874:rset
27875s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
27876t def
27877d
27878:def
27879s/\\$//
27880t bsnl
27881s/["\\]/\\&/g
27882s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27883D["\1"]=" \3"/p
27884s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
27885d
27886:bsnl
27887s/["\\]/\\&/g
27888s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27889D["\1"]=" \3\\\\\\n"\\/p
27890t cont
27891s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27892t cont
27893d
27894:cont
27895n
27896s/.\{148\}/&'"$ac_delim"'/g
27897t clear
27898:clear
27899s/\\$//
27900t bsnlc
27901s/["\\]/\\&/g; s/^/"/; s/$/"/p
27902d
27903:bsnlc
27904s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27905b cont
27906' <confdefs.h | sed '
27907s/'"$ac_delim"'/"\\\
27908"/g' >>$CONFIG_STATUS || ac_write_fail=1
27909
27910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27911  for (key in D) D_is_set[key] = 1
27912  FS = ""
27913}
27914/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27915  line = \$ 0
27916  split(line, arg, " ")
27917  if (arg[1] == "#") {
27918    defundef = arg[2]
27919    mac1 = arg[3]
27920  } else {
27921    defundef = substr(arg[1], 2)
27922    mac1 = arg[2]
27923  }
27924  split(mac1, mac2, "(") #)
27925  macro = mac2[1]
27926  prefix = substr(line, 1, index(line, defundef) - 1)
27927  if (D_is_set[macro]) {
27928    # Preserve the white space surrounding the "#".
27929    print prefix "define", macro P[macro] D[macro]
27930    next
27931  } else {
27932    # Replace #undef with comments.  This is necessary, for example,
27933    # in the case of _POSIX_SOURCE, which is predefined and required
27934    # on some systems where configure will not decide to define it.
27935    if (defundef == "undef") {
27936      print "/*", prefix defundef, macro, "*/"
27937      next
27938    }
27939  }
27940}
27941{ print }
27942_ACAWK
27943_ACEOF
27944cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27945  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27946fi # test -n "$CONFIG_HEADERS"
27947
27948
27949eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27950shift
27951for ac_tag
27952do
27953  case $ac_tag in
27954  :[FHLC]) ac_mode=$ac_tag; continue;;
27955  esac
27956  case $ac_mode$ac_tag in
27957  :[FHL]*:*);;
27958  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
27959  :[FH]-) ac_tag=-:-;;
27960  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27961  esac
27962  ac_save_IFS=$IFS
27963  IFS=:
27964  set x $ac_tag
27965  IFS=$ac_save_IFS
27966  shift
27967  ac_file=$1
27968  shift
27969
27970  case $ac_mode in
27971  :L) ac_source=$1;;
27972  :[FH])
27973    ac_file_inputs=
27974    for ac_f
27975    do
27976      case $ac_f in
27977      -) ac_f="$ac_tmp/stdin";;
27978      *) # Look for the file first in the build tree, then in the source tree
27979	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
27980	 # because $ac_f cannot contain `:'.
27981	 test -f "$ac_f" ||
27982	   case $ac_f in
27983	   [\\/$]*) false;;
27984	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27985	   esac ||
27986	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
27987      esac
27988      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27989      as_fn_append ac_file_inputs " '$ac_f'"
27990    done
27991
27992    # Let's still pretend it is `configure' which instantiates (i.e., don't
27993    # use $as_me), people would be surprised to read:
27994    #    /* config.h.  Generated by config.status.  */
27995    configure_input='Generated from '`
27996	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27997	`' by configure.'
27998    if test x"$ac_file" != x-; then
27999      configure_input="$ac_file.  $configure_input"
28000      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28001$as_echo "$as_me: creating $ac_file" >&6;}
28002    fi
28003    # Neutralize special characters interpreted by sed in replacement strings.
28004    case $configure_input in #(
28005    *\&* | *\|* | *\\* )
28006       ac_sed_conf_input=`$as_echo "$configure_input" |
28007       sed 's/[\\\\&|]/\\\\&/g'`;; #(
28008    *) ac_sed_conf_input=$configure_input;;
28009    esac
28010
28011    case $ac_tag in
28012    *:-:* | *:-) cat >"$ac_tmp/stdin" \
28013      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
28014    esac
28015    ;;
28016  esac
28017
28018  ac_dir=`$as_dirname -- "$ac_file" ||
28019$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28020	 X"$ac_file" : 'X\(//\)[^/]' \| \
28021	 X"$ac_file" : 'X\(//\)$' \| \
28022	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28023$as_echo X"$ac_file" |
28024    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28025	    s//\1/
28026	    q
28027	  }
28028	  /^X\(\/\/\)[^/].*/{
28029	    s//\1/
28030	    q
28031	  }
28032	  /^X\(\/\/\)$/{
28033	    s//\1/
28034	    q
28035	  }
28036	  /^X\(\/\).*/{
28037	    s//\1/
28038	    q
28039	  }
28040	  s/.*/./; q'`
28041  as_dir="$ac_dir"; as_fn_mkdir_p
28042  ac_builddir=.
28043
28044case "$ac_dir" in
28045.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28046*)
28047  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28048  # A ".." for each directory in $ac_dir_suffix.
28049  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28050  case $ac_top_builddir_sub in
28051  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28052  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28053  esac ;;
28054esac
28055ac_abs_top_builddir=$ac_pwd
28056ac_abs_builddir=$ac_pwd$ac_dir_suffix
28057# for backward compatibility:
28058ac_top_builddir=$ac_top_build_prefix
28059
28060case $srcdir in
28061  .)  # We are building in place.
28062    ac_srcdir=.
28063    ac_top_srcdir=$ac_top_builddir_sub
28064    ac_abs_top_srcdir=$ac_pwd ;;
28065  [\\/]* | ?:[\\/]* )  # Absolute name.
28066    ac_srcdir=$srcdir$ac_dir_suffix;
28067    ac_top_srcdir=$srcdir
28068    ac_abs_top_srcdir=$srcdir ;;
28069  *) # Relative name.
28070    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28071    ac_top_srcdir=$ac_top_build_prefix$srcdir
28072    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28073esac
28074ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28075
28076
28077  case $ac_mode in
28078  :F)
28079  #
28080  # CONFIG_FILE
28081  #
28082
28083  case $INSTALL in
28084  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28085  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28086  esac
28087  ac_MKDIR_P=$MKDIR_P
28088  case $MKDIR_P in
28089  [\\/$]* | ?:[\\/]* ) ;;
28090  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28091  esac
28092_ACEOF
28093
28094cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28095# If the template does not know about datarootdir, expand it.
28096# FIXME: This hack should be removed a few years after 2.60.
28097ac_datarootdir_hack=; ac_datarootdir_seen=
28098ac_sed_dataroot='
28099/datarootdir/ {
28100  p
28101  q
28102}
28103/@datadir@/p
28104/@docdir@/p
28105/@infodir@/p
28106/@localedir@/p
28107/@mandir@/p'
28108case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28109*datarootdir*) ac_datarootdir_seen=yes;;
28110*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28111  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28112$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28113_ACEOF
28114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28115  ac_datarootdir_hack='
28116  s&@datadir@&$datadir&g
28117  s&@docdir@&$docdir&g
28118  s&@infodir@&$infodir&g
28119  s&@localedir@&$localedir&g
28120  s&@mandir@&$mandir&g
28121  s&\\\${datarootdir}&$datarootdir&g' ;;
28122esac
28123_ACEOF
28124
28125# Neutralize VPATH when `$srcdir' = `.'.
28126# Shell code in configure.ac might set extrasub.
28127# FIXME: do we really want to maintain this feature?
28128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28129ac_sed_extra="$ac_vpsub
28130$extrasub
28131_ACEOF
28132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28133:t
28134/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28135s|@configure_input@|$ac_sed_conf_input|;t t
28136s&@top_builddir@&$ac_top_builddir_sub&;t t
28137s&@top_build_prefix@&$ac_top_build_prefix&;t t
28138s&@srcdir@&$ac_srcdir&;t t
28139s&@abs_srcdir@&$ac_abs_srcdir&;t t
28140s&@top_srcdir@&$ac_top_srcdir&;t t
28141s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28142s&@builddir@&$ac_builddir&;t t
28143s&@abs_builddir@&$ac_abs_builddir&;t t
28144s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28145s&@INSTALL@&$ac_INSTALL&;t t
28146s&@MKDIR_P@&$ac_MKDIR_P&;t t
28147$ac_datarootdir_hack
28148"
28149eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28150  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28151
28152test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28153  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28154  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
28155      "$ac_tmp/out"`; test -z "$ac_out"; } &&
28156  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28157which seems to be undefined.  Please make sure it is defined" >&5
28158$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28159which seems to be undefined.  Please make sure it is defined" >&2;}
28160
28161  rm -f "$ac_tmp/stdin"
28162  case $ac_file in
28163  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28164  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
28165  esac \
28166  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28167 ;;
28168  :H)
28169  #
28170  # CONFIG_HEADER
28171  #
28172  if test x"$ac_file" != x-; then
28173    {
28174      $as_echo "/* $configure_input  */" \
28175      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28176    } >"$ac_tmp/config.h" \
28177      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28178    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
28179      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28180$as_echo "$as_me: $ac_file is unchanged" >&6;}
28181    else
28182      rm -f "$ac_file"
28183      mv "$ac_tmp/config.h" "$ac_file" \
28184	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
28185    fi
28186  else
28187    $as_echo "/* $configure_input  */" \
28188      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28189      || as_fn_error $? "could not create -" "$LINENO" 5
28190  fi
28191# Compute "$ac_file"'s index in $config_headers.
28192_am_arg="$ac_file"
28193_am_stamp_count=1
28194for _am_header in $config_headers :; do
28195  case $_am_header in
28196    $_am_arg | $_am_arg:* )
28197      break ;;
28198    * )
28199      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28200  esac
28201done
28202echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28203$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28204	 X"$_am_arg" : 'X\(//\)[^/]' \| \
28205	 X"$_am_arg" : 'X\(//\)$' \| \
28206	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28207$as_echo X"$_am_arg" |
28208    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28209	    s//\1/
28210	    q
28211	  }
28212	  /^X\(\/\/\)[^/].*/{
28213	    s//\1/
28214	    q
28215	  }
28216	  /^X\(\/\/\)$/{
28217	    s//\1/
28218	    q
28219	  }
28220	  /^X\(\/\).*/{
28221	    s//\1/
28222	    q
28223	  }
28224	  s/.*/./; q'`/stamp-h$_am_stamp_count
28225 ;;
28226
28227  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28228$as_echo "$as_me: executing $ac_file commands" >&6;}
28229 ;;
28230  esac
28231
28232
28233  case $ac_file$ac_mode in
28234    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28235  # Older Autoconf quotes --file arguments for eval, but not when files
28236  # are listed without --file.  Let's play safe and only enable the eval
28237  # if we detect the quoting.
28238  case $CONFIG_FILES in
28239  *\'*) eval set x "$CONFIG_FILES" ;;
28240  *)   set x $CONFIG_FILES ;;
28241  esac
28242  shift
28243  for mf
28244  do
28245    # Strip MF so we end up with the name of the file.
28246    mf=`echo "$mf" | sed -e 's/:.*$//'`
28247    # Check whether this is an Automake generated Makefile or not.
28248    # We used to match only the files named 'Makefile.in', but
28249    # some people rename them; so instead we look at the file content.
28250    # Grep'ing the first line is not enough: some people post-process
28251    # each Makefile.in and add a new line on top of each file to say so.
28252    # Grep'ing the whole file is not good either: AIX grep has a line
28253    # limit of 2048, but all sed's we know have understand at least 4000.
28254    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28255      dirpart=`$as_dirname -- "$mf" ||
28256$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28257	 X"$mf" : 'X\(//\)[^/]' \| \
28258	 X"$mf" : 'X\(//\)$' \| \
28259	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28260$as_echo X"$mf" |
28261    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28262	    s//\1/
28263	    q
28264	  }
28265	  /^X\(\/\/\)[^/].*/{
28266	    s//\1/
28267	    q
28268	  }
28269	  /^X\(\/\/\)$/{
28270	    s//\1/
28271	    q
28272	  }
28273	  /^X\(\/\).*/{
28274	    s//\1/
28275	    q
28276	  }
28277	  s/.*/./; q'`
28278    else
28279      continue
28280    fi
28281    # Extract the definition of DEPDIR, am__include, and am__quote
28282    # from the Makefile without running 'make'.
28283    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28284    test -z "$DEPDIR" && continue
28285    am__include=`sed -n 's/^am__include = //p' < "$mf"`
28286    test -z "$am__include" && continue
28287    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28288    # Find all dependency output files, they are included files with
28289    # $(DEPDIR) in their names.  We invoke sed twice because it is the
28290    # simplest approach to changing $(DEPDIR) to its actual value in the
28291    # expansion.
28292    for file in `sed -n "
28293      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28294	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
28295      # Make sure the directory exists.
28296      test -f "$dirpart/$file" && continue
28297      fdir=`$as_dirname -- "$file" ||
28298$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28299	 X"$file" : 'X\(//\)[^/]' \| \
28300	 X"$file" : 'X\(//\)$' \| \
28301	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28302$as_echo X"$file" |
28303    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28304	    s//\1/
28305	    q
28306	  }
28307	  /^X\(\/\/\)[^/].*/{
28308	    s//\1/
28309	    q
28310	  }
28311	  /^X\(\/\/\)$/{
28312	    s//\1/
28313	    q
28314	  }
28315	  /^X\(\/\).*/{
28316	    s//\1/
28317	    q
28318	  }
28319	  s/.*/./; q'`
28320      as_dir=$dirpart/$fdir; as_fn_mkdir_p
28321      # echo "creating $dirpart/$file"
28322      echo '# dummy' > "$dirpart/$file"
28323    done
28324  done
28325}
28326 ;;
28327    "libtool":C)
28328
28329    # See if we are running on zsh, and set the options that allow our
28330    # commands through without removal of \ escapes.
28331    if test -n "${ZSH_VERSION+set}"; then
28332      setopt NO_GLOB_SUBST
28333    fi
28334
28335    cfgfile=${ofile}T
28336    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
28337    $RM "$cfgfile"
28338
28339    cat <<_LT_EOF >> "$cfgfile"
28340#! $SHELL
28341# Generated automatically by $as_me ($PACKAGE) $VERSION
28342# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
28343# NOTE: Changes made to this file will be lost: look at ltmain.sh.
28344
28345# Provide generalized library-building support services.
28346# Written by Gordon Matzigkeit, 1996
28347
28348# Copyright (C) 2014 Free Software Foundation, Inc.
28349# This is free software; see the source for copying conditions.  There is NO
28350# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28351
28352# GNU Libtool is free software; you can redistribute it and/or modify
28353# it under the terms of the GNU General Public License as published by
28354# the Free Software Foundation; either version 2 of of the License, or
28355# (at your option) any later version.
28356#
28357# As a special exception to the GNU General Public License, if you
28358# distribute this file as part of a program or library that is built
28359# using GNU Libtool, you may include this file under the  same
28360# distribution terms that you use for the rest of that program.
28361#
28362# GNU Libtool is distributed in the hope that it will be useful, but
28363# WITHOUT ANY WARRANTY; without even the implied warranty of
28364# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28365# GNU General Public License for more details.
28366#
28367# You should have received a copy of the GNU General Public License
28368# along with this program.  If not, see <http://www.gnu.org/licenses/>.
28369
28370
28371# The names of the tagged configurations supported by this script.
28372available_tags=''
28373
28374# Configured defaults for sys_lib_dlsearch_path munging.
28375: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
28376
28377# ### BEGIN LIBTOOL CONFIG
28378
28379# A sed program that does not truncate output.
28380SED=$lt_SED
28381
28382# Sed that helps us avoid accidentally triggering echo(1) options like -n.
28383Xsed="\$SED -e 1s/^X//"
28384
28385# A grep program that handles long lines.
28386GREP=$lt_GREP
28387
28388# An ERE matcher.
28389EGREP=$lt_EGREP
28390
28391# A literal string matcher.
28392FGREP=$lt_FGREP
28393
28394# Shell to use when invoking shell scripts.
28395SHELL=$lt_SHELL
28396
28397# An echo program that protects backslashes.
28398ECHO=$lt_ECHO
28399
28400# Whether or not to build shared libraries.
28401build_libtool_libs=$enable_shared
28402
28403# Which release of libtool.m4 was used?
28404macro_version=$macro_version
28405macro_revision=$macro_revision
28406
28407# Whether or not to build static libraries.
28408build_old_libs=$enable_static
28409
28410# What type of objects to build.
28411pic_mode=$pic_mode
28412
28413# Whether or not to optimize for fast installation.
28414fast_install=$enable_fast_install
28415
28416# Shared archive member basename,for filename based shared library versioning on AIX.
28417shared_archive_member_spec=$shared_archive_member_spec
28418
28419# The PATH separator for the build system.
28420PATH_SEPARATOR=$lt_PATH_SEPARATOR
28421
28422# The host system.
28423host_alias=$host_alias
28424host=$host
28425host_os=$host_os
28426
28427# The build system.
28428build_alias=$build_alias
28429build=$build
28430build_os=$build_os
28431
28432# A BSD- or MS-compatible name lister.
28433NM=$lt_NM
28434
28435# Whether we need soft or hard links.
28436LN_S=$lt_LN_S
28437
28438# What is the maximum length of a command?
28439max_cmd_len=$max_cmd_len
28440
28441# Object file suffix (normally "o").
28442objext=$ac_objext
28443
28444# Executable file suffix (normally "").
28445exeext=$exeext
28446
28447# whether the shell understands "unset".
28448lt_unset=$lt_unset
28449
28450# turn spaces into newlines.
28451SP2NL=$lt_lt_SP2NL
28452
28453# turn newlines into spaces.
28454NL2SP=$lt_lt_NL2SP
28455
28456# convert \$build file names to \$host format.
28457to_host_file_cmd=$lt_cv_to_host_file_cmd
28458
28459# convert \$build files to toolchain format.
28460to_tool_file_cmd=$lt_cv_to_tool_file_cmd
28461
28462# An object symbol dumper.
28463OBJDUMP=$lt_OBJDUMP
28464
28465# Method to check whether dependent libraries are shared objects.
28466deplibs_check_method=$lt_deplibs_check_method
28467
28468# Command to use when deplibs_check_method = "file_magic".
28469file_magic_cmd=$lt_file_magic_cmd
28470
28471# How to find potential files when deplibs_check_method = "file_magic".
28472file_magic_glob=$lt_file_magic_glob
28473
28474# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
28475want_nocaseglob=$lt_want_nocaseglob
28476
28477# DLL creation program.
28478DLLTOOL=$lt_DLLTOOL
28479
28480# Command to associate shared and link libraries.
28481sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
28482
28483# The archiver.
28484AR=$lt_AR
28485
28486# Flags to create an archive.
28487AR_FLAGS=$lt_AR_FLAGS
28488
28489# How to feed a file listing to the archiver.
28490archiver_list_spec=$lt_archiver_list_spec
28491
28492# A symbol stripping program.
28493STRIP=$lt_STRIP
28494
28495# Commands used to install an old-style archive.
28496RANLIB=$lt_RANLIB
28497old_postinstall_cmds=$lt_old_postinstall_cmds
28498old_postuninstall_cmds=$lt_old_postuninstall_cmds
28499
28500# Whether to use a lock for old archive extraction.
28501lock_old_archive_extraction=$lock_old_archive_extraction
28502
28503# A C compiler.
28504LTCC=$lt_CC
28505
28506# LTCC compiler flags.
28507LTCFLAGS=$lt_CFLAGS
28508
28509# Take the output of nm and produce a listing of raw symbols and C names.
28510global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
28511
28512# Transform the output of nm in a proper C declaration.
28513global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
28514
28515# Transform the output of nm into a list of symbols to manually relocate.
28516global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
28517
28518# Transform the output of nm in a C name address pair.
28519global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
28520
28521# Transform the output of nm in a C name address pair when lib prefix is needed.
28522global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
28523
28524# The name lister interface.
28525nm_interface=$lt_lt_cv_nm_interface
28526
28527# Specify filename containing input files for \$NM.
28528nm_file_list_spec=$lt_nm_file_list_spec
28529
28530# The root where to search for dependent libraries,and where our libraries should be installed.
28531lt_sysroot=$lt_sysroot
28532
28533# Command to truncate a binary pipe.
28534lt_truncate_bin=$lt_lt_cv_truncate_bin
28535
28536# The name of the directory that contains temporary libtool files.
28537objdir=$objdir
28538
28539# Used to examine libraries when file_magic_cmd begins with "file".
28540MAGIC_CMD=$MAGIC_CMD
28541
28542# Must we lock files when doing compilation?
28543need_locks=$lt_need_locks
28544
28545# Manifest tool.
28546MANIFEST_TOOL=$lt_MANIFEST_TOOL
28547
28548# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
28549DSYMUTIL=$lt_DSYMUTIL
28550
28551# Tool to change global to local symbols on Mac OS X.
28552NMEDIT=$lt_NMEDIT
28553
28554# Tool to manipulate fat objects and archives on Mac OS X.
28555LIPO=$lt_LIPO
28556
28557# ldd/readelf like tool for Mach-O binaries on Mac OS X.
28558OTOOL=$lt_OTOOL
28559
28560# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
28561OTOOL64=$lt_OTOOL64
28562
28563# Old archive suffix (normally "a").
28564libext=$libext
28565
28566# Shared library suffix (normally ".so").
28567shrext_cmds=$lt_shrext_cmds
28568
28569# The commands to extract the exported symbol list from a shared archive.
28570extract_expsyms_cmds=$lt_extract_expsyms_cmds
28571
28572# Variables whose values should be saved in libtool wrapper scripts and
28573# restored at link time.
28574variables_saved_for_relink=$lt_variables_saved_for_relink
28575
28576# Do we need the "lib" prefix for modules?
28577need_lib_prefix=$need_lib_prefix
28578
28579# Do we need a version for libraries?
28580need_version=$need_version
28581
28582# Library versioning type.
28583version_type=$version_type
28584
28585# Shared library runtime path variable.
28586runpath_var=$runpath_var
28587
28588# Shared library path variable.
28589shlibpath_var=$shlibpath_var
28590
28591# Is shlibpath searched before the hard-coded library search path?
28592shlibpath_overrides_runpath=$shlibpath_overrides_runpath
28593
28594# Format of library name prefix.
28595libname_spec=$lt_libname_spec
28596
28597# List of archive names.  First name is the real one, the rest are links.
28598# The last name is the one that the linker finds with -lNAME
28599library_names_spec=$lt_library_names_spec
28600
28601# The coded name of the library, if different from the real name.
28602soname_spec=$lt_soname_spec
28603
28604# Permission mode override for installation of shared libraries.
28605install_override_mode=$lt_install_override_mode
28606
28607# Command to use after installation of a shared archive.
28608postinstall_cmds=$lt_postinstall_cmds
28609
28610# Command to use after uninstallation of a shared archive.
28611postuninstall_cmds=$lt_postuninstall_cmds
28612
28613# Commands used to finish a libtool library installation in a directory.
28614finish_cmds=$lt_finish_cmds
28615
28616# As "finish_cmds", except a single script fragment to be evaled but
28617# not shown.
28618finish_eval=$lt_finish_eval
28619
28620# Whether we should hardcode library paths into libraries.
28621hardcode_into_libs=$hardcode_into_libs
28622
28623# Compile-time system search path for libraries.
28624sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
28625
28626# Detected run-time system search path for libraries.
28627sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
28628
28629# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
28630configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
28631
28632# Whether dlopen is supported.
28633dlopen_support=$enable_dlopen
28634
28635# Whether dlopen of programs is supported.
28636dlopen_self=$enable_dlopen_self
28637
28638# Whether dlopen of statically linked programs is supported.
28639dlopen_self_static=$enable_dlopen_self_static
28640
28641# Commands to strip libraries.
28642old_striplib=$lt_old_striplib
28643striplib=$lt_striplib
28644
28645
28646# The linker used to build libraries.
28647LD=$lt_LD
28648
28649# How to create reloadable object files.
28650reload_flag=$lt_reload_flag
28651reload_cmds=$lt_reload_cmds
28652
28653# Commands used to build an old-style archive.
28654old_archive_cmds=$lt_old_archive_cmds
28655
28656# A language specific compiler.
28657CC=$lt_compiler
28658
28659# Is the compiler the GNU compiler?
28660with_gcc=$GCC
28661
28662# Compiler flag to turn off builtin functions.
28663no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
28664
28665# Additional compiler flags for building library objects.
28666pic_flag=$lt_lt_prog_compiler_pic
28667
28668# How to pass a linker flag through the compiler.
28669wl=$lt_lt_prog_compiler_wl
28670
28671# Compiler flag to prevent dynamic linking.
28672link_static_flag=$lt_lt_prog_compiler_static
28673
28674# Does compiler simultaneously support -c and -o options?
28675compiler_c_o=$lt_lt_cv_prog_compiler_c_o
28676
28677# Whether or not to add -lc for building shared libraries.
28678build_libtool_need_lc=$archive_cmds_need_lc
28679
28680# Whether or not to disallow shared libs when runtime libs are static.
28681allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
28682
28683# Compiler flag to allow reflexive dlopens.
28684export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
28685
28686# Compiler flag to generate shared objects directly from archives.
28687whole_archive_flag_spec=$lt_whole_archive_flag_spec
28688
28689# Whether the compiler copes with passing no objects directly.
28690compiler_needs_object=$lt_compiler_needs_object
28691
28692# Create an old-style archive from a shared archive.
28693old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
28694
28695# Create a temporary old-style archive to link instead of a shared archive.
28696old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
28697
28698# Commands used to build a shared archive.
28699archive_cmds=$lt_archive_cmds
28700archive_expsym_cmds=$lt_archive_expsym_cmds
28701
28702# Commands used to build a loadable module if different from building
28703# a shared archive.
28704module_cmds=$lt_module_cmds
28705module_expsym_cmds=$lt_module_expsym_cmds
28706
28707# Whether we are building with GNU ld or not.
28708with_gnu_ld=$lt_with_gnu_ld
28709
28710# Flag that allows shared libraries with undefined symbols to be built.
28711allow_undefined_flag=$lt_allow_undefined_flag
28712
28713# Flag that enforces no undefined symbols.
28714no_undefined_flag=$lt_no_undefined_flag
28715
28716# Flag to hardcode \$libdir into a binary during linking.
28717# This must work even if \$libdir does not exist
28718hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
28719
28720# Whether we need a single "-rpath" flag with a separated argument.
28721hardcode_libdir_separator=$lt_hardcode_libdir_separator
28722
28723# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28724# DIR into the resulting binary.
28725hardcode_direct=$hardcode_direct
28726
28727# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28728# DIR into the resulting binary and the resulting library dependency is
28729# "absolute",i.e impossible to change by setting \$shlibpath_var if the
28730# library is relocated.
28731hardcode_direct_absolute=$hardcode_direct_absolute
28732
28733# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28734# into the resulting binary.
28735hardcode_minus_L=$hardcode_minus_L
28736
28737# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28738# into the resulting binary.
28739hardcode_shlibpath_var=$hardcode_shlibpath_var
28740
28741# Set to "yes" if building a shared library automatically hardcodes DIR
28742# into the library and all subsequent libraries and executables linked
28743# against it.
28744hardcode_automatic=$hardcode_automatic
28745
28746# Set to yes if linker adds runtime paths of dependent libraries
28747# to runtime path list.
28748inherit_rpath=$inherit_rpath
28749
28750# Whether libtool must link a program against all its dependency libraries.
28751link_all_deplibs=$link_all_deplibs
28752
28753# Set to "yes" if exported symbols are required.
28754always_export_symbols=$always_export_symbols
28755
28756# The commands to list exported symbols.
28757export_symbols_cmds=$lt_export_symbols_cmds
28758
28759# Symbols that should not be listed in the preloaded symbols.
28760exclude_expsyms=$lt_exclude_expsyms
28761
28762# Symbols that must always be exported.
28763include_expsyms=$lt_include_expsyms
28764
28765# Commands necessary for linking programs (against libraries) with templates.
28766prelink_cmds=$lt_prelink_cmds
28767
28768# Commands necessary for finishing linking programs.
28769postlink_cmds=$lt_postlink_cmds
28770
28771# Specify filename containing input files.
28772file_list_spec=$lt_file_list_spec
28773
28774# How to hardcode a shared library path into an executable.
28775hardcode_action=$hardcode_action
28776
28777# ### END LIBTOOL CONFIG
28778
28779_LT_EOF
28780
28781    cat <<'_LT_EOF' >> "$cfgfile"
28782
28783# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
28784
28785# func_munge_path_list VARIABLE PATH
28786# -----------------------------------
28787# VARIABLE is name of variable containing _space_ separated list of
28788# directories to be munged by the contents of PATH, which is string
28789# having a format:
28790# "DIR[:DIR]:"
28791#       string "DIR[ DIR]" will be prepended to VARIABLE
28792# ":DIR[:DIR]"
28793#       string "DIR[ DIR]" will be appended to VARIABLE
28794# "DIRP[:DIRP]::[DIRA:]DIRA"
28795#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
28796#       "DIRA[ DIRA]" will be appended to VARIABLE
28797# "DIR[:DIR]"
28798#       VARIABLE will be replaced by "DIR[ DIR]"
28799func_munge_path_list ()
28800{
28801    case x$2 in
28802    x)
28803        ;;
28804    *:)
28805        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
28806        ;;
28807    x:*)
28808        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
28809        ;;
28810    *::*)
28811        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
28812        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
28813        ;;
28814    *)
28815        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
28816        ;;
28817    esac
28818}
28819
28820
28821# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
28822func_cc_basename ()
28823{
28824    for cc_temp in $*""; do
28825      case $cc_temp in
28826        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
28827        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
28828        \-*) ;;
28829        *) break;;
28830      esac
28831    done
28832    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
28833}
28834
28835
28836# ### END FUNCTIONS SHARED WITH CONFIGURE
28837
28838_LT_EOF
28839
28840  case $host_os in
28841  aix3*)
28842    cat <<\_LT_EOF >> "$cfgfile"
28843# AIX sometimes has problems with the GCC collect2 program.  For some
28844# reason, if we set the COLLECT_NAMES environment variable, the problems
28845# vanish in a puff of smoke.
28846if test set != "${COLLECT_NAMES+set}"; then
28847  COLLECT_NAMES=
28848  export COLLECT_NAMES
28849fi
28850_LT_EOF
28851    ;;
28852  esac
28853
28854
28855ltmain=$ac_aux_dir/ltmain.sh
28856
28857
28858  # We use sed instead of cat because bash on DJGPP gets confused if
28859  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
28860  # text mode, it properly converts lines to CR/LF.  This bash problem
28861  # is reportedly fixed, but why not run on old versions too?
28862  sed '$q' "$ltmain" >> "$cfgfile" \
28863     || (rm -f "$cfgfile"; exit 1)
28864
28865   mv -f "$cfgfile" "$ofile" ||
28866    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
28867  chmod +x "$ofile"
28868
28869 ;;
28870
28871  esac
28872done # for ac_tag
28873
28874
28875as_fn_exit 0
28876_ACEOF
28877ac_clean_files=$ac_clean_files_save
28878
28879test $ac_write_fail = 0 ||
28880  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
28881
28882
28883# configure is writing to config.log, and then calls config.status.
28884# config.status does its own redirection, appending to config.log.
28885# Unfortunately, on DOS this fails, as config.log is still kept open
28886# by configure, so config.status won't be able to write to it; its
28887# output is simply discarded.  So we exec the FD to /dev/null,
28888# effectively closing config.log, so it can be properly (re)opened and
28889# appended to by config.status.  When coming back to configure, we
28890# need to make the FD available again.
28891if test "$no_create" != yes; then
28892  ac_cs_success=:
28893  ac_config_status_args=
28894  test "$silent" = yes &&
28895    ac_config_status_args="$ac_config_status_args --quiet"
28896  exec 5>/dev/null
28897  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28898  exec 5>>config.log
28899  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28900  # would make configure fail if this is the last instruction.
28901  $ac_cs_success || as_fn_exit 1
28902fi
28903
28904#
28905# CONFIG_SUBDIRS section.
28906#
28907if test "$no_recursion" != yes; then
28908
28909  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
28910  # so they do not pile up.
28911  ac_sub_configure_args=
28912  ac_prev=
28913  eval "set x $ac_configure_args"
28914  shift
28915  for ac_arg
28916  do
28917    if test -n "$ac_prev"; then
28918      ac_prev=
28919      continue
28920    fi
28921    case $ac_arg in
28922    -cache-file | --cache-file | --cache-fil | --cache-fi \
28923    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
28924      ac_prev=cache_file ;;
28925    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
28926    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
28927    | --c=*)
28928      ;;
28929    --config-cache | -C)
28930      ;;
28931    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
28932      ac_prev=srcdir ;;
28933    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
28934      ;;
28935    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
28936      ac_prev=prefix ;;
28937    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
28938      ;;
28939    --disable-option-checking)
28940      ;;
28941    *)
28942      case $ac_arg in
28943      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28944      esac
28945      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
28946    esac
28947  done
28948
28949  # Always prepend --prefix to ensure using the same prefix
28950  # in subdir configurations.
28951  ac_arg="--prefix=$prefix"
28952  case $ac_arg in
28953  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28954  esac
28955  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
28956
28957  # Pass --silent
28958  if test "$silent" = yes; then
28959    ac_sub_configure_args="--silent $ac_sub_configure_args"
28960  fi
28961
28962  # Always prepend --disable-option-checking to silence warnings, since
28963  # different subdirs can have different --enable and --with options.
28964  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
28965
28966  ac_popdir=`pwd`
28967  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
28968
28969    # Do not complain, so a configure script can configure whichever
28970    # parts of a large source tree are present.
28971    test -d "$srcdir/$ac_dir" || continue
28972
28973    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
28974    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
28975    $as_echo "$ac_msg" >&6
28976    as_dir="$ac_dir"; as_fn_mkdir_p
28977    ac_builddir=.
28978
28979case "$ac_dir" in
28980.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28981*)
28982  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28983  # A ".." for each directory in $ac_dir_suffix.
28984  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28985  case $ac_top_builddir_sub in
28986  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28987  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28988  esac ;;
28989esac
28990ac_abs_top_builddir=$ac_pwd
28991ac_abs_builddir=$ac_pwd$ac_dir_suffix
28992# for backward compatibility:
28993ac_top_builddir=$ac_top_build_prefix
28994
28995case $srcdir in
28996  .)  # We are building in place.
28997    ac_srcdir=.
28998    ac_top_srcdir=$ac_top_builddir_sub
28999    ac_abs_top_srcdir=$ac_pwd ;;
29000  [\\/]* | ?:[\\/]* )  # Absolute name.
29001    ac_srcdir=$srcdir$ac_dir_suffix;
29002    ac_top_srcdir=$srcdir
29003    ac_abs_top_srcdir=$srcdir ;;
29004  *) # Relative name.
29005    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29006    ac_top_srcdir=$ac_top_build_prefix$srcdir
29007    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29008esac
29009ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29010
29011
29012    cd "$ac_dir"
29013
29014    # Check for guested configure; otherwise get Cygnus style configure.
29015    if test -f "$ac_srcdir/configure.gnu"; then
29016      ac_sub_configure=$ac_srcdir/configure.gnu
29017    elif test -f "$ac_srcdir/configure"; then
29018      ac_sub_configure=$ac_srcdir/configure
29019    elif test -f "$ac_srcdir/configure.in"; then
29020      # This should be Cygnus configure.
29021      ac_sub_configure=$ac_aux_dir/configure
29022    else
29023      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
29024$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
29025      ac_sub_configure=
29026    fi
29027
29028    # The recursion is here.
29029    if test -n "$ac_sub_configure"; then
29030      # Make the cache file name correct relative to the subdirectory.
29031      case $cache_file in
29032      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
29033      *) # Relative name.
29034	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
29035      esac
29036
29037      { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
29038$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
29039      # The eval makes quoting arguments work.
29040      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
29041	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
29042	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
29043    fi
29044
29045    cd "$ac_popdir"
29046  done
29047fi
29048if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
29049  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
29050$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
29051fi
29052
29053