configure revision 344884
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.69 for sntp 4.2.8p13.
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.8p13'
594PACKAGE_STRING='sntp 4.2.8p13'
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.8p13 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.8p13:";;
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.8p13
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.8p13, 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.8p13'
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# Check whether --enable-silent-rules was given.
3510if test "${enable_silent_rules+set}" = set; then :
3511  enableval=$enable_silent_rules;
3512fi
3513
3514case $enable_silent_rules in # (((
3515  yes) AM_DEFAULT_VERBOSITY=0;;
3516   no) AM_DEFAULT_VERBOSITY=1;;
3517    *) AM_DEFAULT_VERBOSITY=0;;
3518esac
3519am_make=${MAKE-make}
3520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3521$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3522if ${am_cv_make_support_nested_variables+:} false; then :
3523  $as_echo_n "(cached) " >&6
3524else
3525  if $as_echo 'TRUE=$(BAR$(V))
3526BAR0=false
3527BAR1=true
3528V=1
3529am__doit:
3530	@$(TRUE)
3531.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3532  am_cv_make_support_nested_variables=yes
3533else
3534  am_cv_make_support_nested_variables=no
3535fi
3536fi
3537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3538$as_echo "$am_cv_make_support_nested_variables" >&6; }
3539if test $am_cv_make_support_nested_variables = yes; then
3540    AM_V='$(V)'
3541  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3542else
3543  AM_V=$AM_DEFAULT_VERBOSITY
3544  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3545fi
3546AM_BACKSLASH='\'
3547
3548
3549# Make sure we can run config.sub.
3550$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3551  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3552
3553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3554$as_echo_n "checking build system type... " >&6; }
3555if ${ac_cv_build+:} false; then :
3556  $as_echo_n "(cached) " >&6
3557else
3558  ac_build_alias=$build_alias
3559test "x$ac_build_alias" = x &&
3560  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3561test "x$ac_build_alias" = x &&
3562  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3563ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3564  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3565
3566fi
3567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3568$as_echo "$ac_cv_build" >&6; }
3569case $ac_cv_build in
3570*-*-*) ;;
3571*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3572esac
3573build=$ac_cv_build
3574ac_save_IFS=$IFS; IFS='-'
3575set x $ac_cv_build
3576shift
3577build_cpu=$1
3578build_vendor=$2
3579shift; shift
3580# Remember, the first character of IFS is used to create $*,
3581# except with old shells:
3582build_os=$*
3583IFS=$ac_save_IFS
3584case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3585
3586
3587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3588$as_echo_n "checking host system type... " >&6; }
3589if ${ac_cv_host+:} false; then :
3590  $as_echo_n "(cached) " >&6
3591else
3592  if test "x$host_alias" = x; then
3593  ac_cv_host=$ac_cv_build
3594else
3595  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3596    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3597fi
3598
3599fi
3600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3601$as_echo "$ac_cv_host" >&6; }
3602case $ac_cv_host in
3603*-*-*) ;;
3604*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3605esac
3606host=$ac_cv_host
3607ac_save_IFS=$IFS; IFS='-'
3608set x $ac_cv_host
3609shift
3610host_cpu=$1
3611host_vendor=$2
3612shift; shift
3613# Remember, the first character of IFS is used to create $*,
3614# except with old shells:
3615host_os=$*
3616IFS=$ac_save_IFS
3617case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3618
3619
3620
3621cat >>confdefs.h <<_ACEOF
3622#define STR_SYSTEM "$host"
3623_ACEOF
3624
3625ac_config_headers="$ac_config_headers config.h"
3626
3627
3628DEPDIR="${am__leading_dot}deps"
3629
3630ac_config_commands="$ac_config_commands depfiles"
3631
3632
3633am_make=${MAKE-make}
3634cat > confinc << 'END'
3635am__doit:
3636	@echo this is the am__doit target
3637.PHONY: am__doit
3638END
3639# If we don't find an include directive, just comment out the code.
3640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
3641$as_echo_n "checking for style of include used by $am_make... " >&6; }
3642am__include="#"
3643am__quote=
3644_am_result=none
3645# First try GNU make style include.
3646echo "include confinc" > confmf
3647# Ignore all kinds of additional output from 'make'.
3648case `$am_make -s -f confmf 2> /dev/null` in #(
3649*the\ am__doit\ target*)
3650  am__include=include
3651  am__quote=
3652  _am_result=GNU
3653  ;;
3654esac
3655# Now try BSD make style include.
3656if test "$am__include" = "#"; then
3657   echo '.include "confinc"' > confmf
3658   case `$am_make -s -f confmf 2> /dev/null` in #(
3659   *the\ am__doit\ target*)
3660     am__include=.include
3661     am__quote="\""
3662     _am_result=BSD
3663     ;;
3664   esac
3665fi
3666
3667
3668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
3669$as_echo "$_am_result" >&6; }
3670rm -f confinc confmf
3671
3672# Check whether --enable-dependency-tracking was given.
3673if test "${enable_dependency_tracking+set}" = set; then :
3674  enableval=$enable_dependency_tracking;
3675fi
3676
3677if test "x$enable_dependency_tracking" != xno; then
3678  am_depcomp="$ac_aux_dir/depcomp"
3679  AMDEPBACKSLASH='\'
3680  am__nodep='_no'
3681fi
3682 if test "x$enable_dependency_tracking" != xno; then
3683  AMDEP_TRUE=
3684  AMDEP_FALSE='#'
3685else
3686  AMDEP_TRUE='#'
3687  AMDEP_FALSE=
3688fi
3689
3690
3691
3692case "$build" in
3693 *-*-freebsd1?.*)
3694    cclist=cc
3695    ;;
3696 *)
3697    cclist="cc gcc"
3698    ;;
3699esac
3700
3701
3702#AC_USE_SYSTEM_EXTENSIONS
3703
3704ac_ext=c
3705ac_cpp='$CPP $CPPFLAGS'
3706ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3707ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3708ac_compiler_gnu=$ac_cv_c_compiler_gnu
3709if test -n "$ac_tool_prefix"; then
3710  for ac_prog in $cclist
3711  do
3712    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
3716if ${ac_cv_prog_CC+:} false; then :
3717  $as_echo_n "(cached) " >&6
3718else
3719  if test -n "$CC"; then
3720  ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
3722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725  IFS=$as_save_IFS
3726  test -z "$as_dir" && as_dir=.
3727    for ac_exec_ext in '' $ac_executable_extensions; do
3728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3729    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3731    break 2
3732  fi
3733done
3734  done
3735IFS=$as_save_IFS
3736
3737fi
3738fi
3739CC=$ac_cv_prog_CC
3740if test -n "$CC"; then
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3742$as_echo "$CC" >&6; }
3743else
3744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749    test -n "$CC" && break
3750  done
3751fi
3752if test -z "$CC"; then
3753  ac_ct_CC=$CC
3754  for ac_prog in $cclist
3755do
3756  # Extract the first word of "$ac_prog", so it can be a program name with args.
3757set dummy $ac_prog; ac_word=$2
3758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3759$as_echo_n "checking for $ac_word... " >&6; }
3760if ${ac_cv_prog_ac_ct_CC+:} false; then :
3761  $as_echo_n "(cached) " >&6
3762else
3763  if test -n "$ac_ct_CC"; then
3764  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3765else
3766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3767for as_dir in $PATH
3768do
3769  IFS=$as_save_IFS
3770  test -z "$as_dir" && as_dir=.
3771    for ac_exec_ext in '' $ac_executable_extensions; do
3772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3773    ac_cv_prog_ac_ct_CC="$ac_prog"
3774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3775    break 2
3776  fi
3777done
3778  done
3779IFS=$as_save_IFS
3780
3781fi
3782fi
3783ac_ct_CC=$ac_cv_prog_ac_ct_CC
3784if test -n "$ac_ct_CC"; then
3785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3786$as_echo "$ac_ct_CC" >&6; }
3787else
3788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3789$as_echo "no" >&6; }
3790fi
3791
3792
3793  test -n "$ac_ct_CC" && break
3794done
3795
3796  if test "x$ac_ct_CC" = x; then
3797    CC=""
3798  else
3799    case $cross_compiling:$ac_tool_warned in
3800yes:)
3801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3803ac_tool_warned=yes ;;
3804esac
3805    CC=$ac_ct_CC
3806  fi
3807fi
3808
3809
3810test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3811$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3812as_fn_error $? "no acceptable C compiler found in \$PATH
3813See \`config.log' for more details" "$LINENO" 5; }
3814
3815# Provide some information about the compiler.
3816$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3817set X $ac_compile
3818ac_compiler=$2
3819for ac_option in --version -v -V -qversion; do
3820  { { ac_try="$ac_compiler $ac_option >&5"
3821case "(($ac_try" in
3822  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823  *) ac_try_echo=$ac_try;;
3824esac
3825eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3826$as_echo "$ac_try_echo"; } >&5
3827  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3828  ac_status=$?
3829  if test -s conftest.err; then
3830    sed '10a\
3831... rest of stderr output deleted ...
3832         10q' conftest.err >conftest.er1
3833    cat conftest.er1 >&5
3834  fi
3835  rm -f conftest.er1 conftest.err
3836  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3837  test $ac_status = 0; }
3838done
3839
3840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3841/* end confdefs.h.  */
3842
3843int
3844main ()
3845{
3846
3847  ;
3848  return 0;
3849}
3850_ACEOF
3851ac_clean_files_save=$ac_clean_files
3852ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3853# Try to create an executable without -o first, disregard a.out.
3854# It will help us diagnose broken compilers, and finding out an intuition
3855# of exeext.
3856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3857$as_echo_n "checking whether the C compiler works... " >&6; }
3858ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3859
3860# The possible output files:
3861ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3862
3863ac_rmfiles=
3864for ac_file in $ac_files
3865do
3866  case $ac_file in
3867    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3868    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3869  esac
3870done
3871rm -f $ac_rmfiles
3872
3873if { { ac_try="$ac_link_default"
3874case "(($ac_try" in
3875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3876  *) ac_try_echo=$ac_try;;
3877esac
3878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3879$as_echo "$ac_try_echo"; } >&5
3880  (eval "$ac_link_default") 2>&5
3881  ac_status=$?
3882  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3883  test $ac_status = 0; }; then :
3884  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3885# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3886# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3887# so that the user can short-circuit this test for compilers unknown to
3888# Autoconf.
3889for ac_file in $ac_files ''
3890do
3891  test -f "$ac_file" || continue
3892  case $ac_file in
3893    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3894	;;
3895    [ab].out )
3896	# We found the default executable, but exeext='' is most
3897	# certainly right.
3898	break;;
3899    *.* )
3900	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3901	then :; else
3902	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3903	fi
3904	# We set ac_cv_exeext here because the later test for it is not
3905	# safe: cross compilers may not add the suffix if given an `-o'
3906	# argument, so we may need to know it at that point already.
3907	# Even if this section looks crufty: it has the advantage of
3908	# actually working.
3909	break;;
3910    * )
3911	break;;
3912  esac
3913done
3914test "$ac_cv_exeext" = no && ac_cv_exeext=
3915
3916else
3917  ac_file=''
3918fi
3919if test -z "$ac_file"; then :
3920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3921$as_echo "no" >&6; }
3922$as_echo "$as_me: failed program was:" >&5
3923sed 's/^/| /' conftest.$ac_ext >&5
3924
3925{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3926$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3927as_fn_error 77 "C compiler cannot create executables
3928See \`config.log' for more details" "$LINENO" 5; }
3929else
3930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3931$as_echo "yes" >&6; }
3932fi
3933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3934$as_echo_n "checking for C compiler default output file name... " >&6; }
3935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3936$as_echo "$ac_file" >&6; }
3937ac_exeext=$ac_cv_exeext
3938
3939rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3940ac_clean_files=$ac_clean_files_save
3941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3942$as_echo_n "checking for suffix of executables... " >&6; }
3943if { { ac_try="$ac_link"
3944case "(($ac_try" in
3945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946  *) ac_try_echo=$ac_try;;
3947esac
3948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3949$as_echo "$ac_try_echo"; } >&5
3950  (eval "$ac_link") 2>&5
3951  ac_status=$?
3952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3953  test $ac_status = 0; }; then :
3954  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3955# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3956# work properly (i.e., refer to `conftest.exe'), while it won't with
3957# `rm'.
3958for ac_file in conftest.exe conftest conftest.*; do
3959  test -f "$ac_file" || continue
3960  case $ac_file in
3961    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3962    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3963	  break;;
3964    * ) break;;
3965  esac
3966done
3967else
3968  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3969$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3970as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3971See \`config.log' for more details" "$LINENO" 5; }
3972fi
3973rm -f conftest conftest$ac_cv_exeext
3974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3975$as_echo "$ac_cv_exeext" >&6; }
3976
3977rm -f conftest.$ac_ext
3978EXEEXT=$ac_cv_exeext
3979ac_exeext=$EXEEXT
3980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3981/* end confdefs.h.  */
3982#include <stdio.h>
3983int
3984main ()
3985{
3986FILE *f = fopen ("conftest.out", "w");
3987 return ferror (f) || fclose (f) != 0;
3988
3989  ;
3990  return 0;
3991}
3992_ACEOF
3993ac_clean_files="$ac_clean_files conftest.out"
3994# Check that the compiler produces executables we can run.  If not, either
3995# the compiler is broken, or we cross compile.
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3997$as_echo_n "checking whether we are cross compiling... " >&6; }
3998if test "$cross_compiling" != yes; then
3999  { { ac_try="$ac_link"
4000case "(($ac_try" in
4001  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4002  *) ac_try_echo=$ac_try;;
4003esac
4004eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4005$as_echo "$ac_try_echo"; } >&5
4006  (eval "$ac_link") 2>&5
4007  ac_status=$?
4008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4009  test $ac_status = 0; }
4010  if { ac_try='./conftest$ac_cv_exeext'
4011  { { case "(($ac_try" in
4012  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013  *) ac_try_echo=$ac_try;;
4014esac
4015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
4017  (eval "$ac_try") 2>&5
4018  ac_status=$?
4019  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020  test $ac_status = 0; }; }; then
4021    cross_compiling=no
4022  else
4023    if test "$cross_compiling" = maybe; then
4024	cross_compiling=yes
4025    else
4026	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4028as_fn_error $? "cannot run C compiled programs.
4029If you meant to cross compile, use \`--host'.
4030See \`config.log' for more details" "$LINENO" 5; }
4031    fi
4032  fi
4033fi
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4035$as_echo "$cross_compiling" >&6; }
4036
4037rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4038ac_clean_files=$ac_clean_files_save
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4040$as_echo_n "checking for suffix of object files... " >&6; }
4041if ${ac_cv_objext+:} false; then :
4042  $as_echo_n "(cached) " >&6
4043else
4044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4045/* end confdefs.h.  */
4046
4047int
4048main ()
4049{
4050
4051  ;
4052  return 0;
4053}
4054_ACEOF
4055rm -f conftest.o conftest.obj
4056if { { ac_try="$ac_compile"
4057case "(($ac_try" in
4058  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4059  *) ac_try_echo=$ac_try;;
4060esac
4061eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4062$as_echo "$ac_try_echo"; } >&5
4063  (eval "$ac_compile") 2>&5
4064  ac_status=$?
4065  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4066  test $ac_status = 0; }; then :
4067  for ac_file in conftest.o conftest.obj conftest.*; do
4068  test -f "$ac_file" || continue;
4069  case $ac_file in
4070    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4071    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4072       break;;
4073  esac
4074done
4075else
4076  $as_echo "$as_me: failed program was:" >&5
4077sed 's/^/| /' conftest.$ac_ext >&5
4078
4079{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4081as_fn_error $? "cannot compute suffix of object files: cannot compile
4082See \`config.log' for more details" "$LINENO" 5; }
4083fi
4084rm -f conftest.$ac_cv_objext conftest.$ac_ext
4085fi
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4087$as_echo "$ac_cv_objext" >&6; }
4088OBJEXT=$ac_cv_objext
4089ac_objext=$OBJEXT
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4091$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4092if ${ac_cv_c_compiler_gnu+:} false; then :
4093  $as_echo_n "(cached) " >&6
4094else
4095  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4096/* end confdefs.h.  */
4097
4098int
4099main ()
4100{
4101#ifndef __GNUC__
4102       choke me
4103#endif
4104
4105  ;
4106  return 0;
4107}
4108_ACEOF
4109if ac_fn_c_try_compile "$LINENO"; then :
4110  ac_compiler_gnu=yes
4111else
4112  ac_compiler_gnu=no
4113fi
4114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4115ac_cv_c_compiler_gnu=$ac_compiler_gnu
4116
4117fi
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4119$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4120if test $ac_compiler_gnu = yes; then
4121  GCC=yes
4122else
4123  GCC=
4124fi
4125ac_test_CFLAGS=${CFLAGS+set}
4126ac_save_CFLAGS=$CFLAGS
4127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4128$as_echo_n "checking whether $CC accepts -g... " >&6; }
4129if ${ac_cv_prog_cc_g+:} false; then :
4130  $as_echo_n "(cached) " >&6
4131else
4132  ac_save_c_werror_flag=$ac_c_werror_flag
4133   ac_c_werror_flag=yes
4134   ac_cv_prog_cc_g=no
4135   CFLAGS="-g"
4136   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4137/* end confdefs.h.  */
4138
4139int
4140main ()
4141{
4142
4143  ;
4144  return 0;
4145}
4146_ACEOF
4147if ac_fn_c_try_compile "$LINENO"; then :
4148  ac_cv_prog_cc_g=yes
4149else
4150  CFLAGS=""
4151      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4152/* end confdefs.h.  */
4153
4154int
4155main ()
4156{
4157
4158  ;
4159  return 0;
4160}
4161_ACEOF
4162if ac_fn_c_try_compile "$LINENO"; then :
4163
4164else
4165  ac_c_werror_flag=$ac_save_c_werror_flag
4166	 CFLAGS="-g"
4167	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168/* end confdefs.h.  */
4169
4170int
4171main ()
4172{
4173
4174  ;
4175  return 0;
4176}
4177_ACEOF
4178if ac_fn_c_try_compile "$LINENO"; then :
4179  ac_cv_prog_cc_g=yes
4180fi
4181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4182fi
4183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4184fi
4185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4186   ac_c_werror_flag=$ac_save_c_werror_flag
4187fi
4188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4189$as_echo "$ac_cv_prog_cc_g" >&6; }
4190if test "$ac_test_CFLAGS" = set; then
4191  CFLAGS=$ac_save_CFLAGS
4192elif test $ac_cv_prog_cc_g = yes; then
4193  if test "$GCC" = yes; then
4194    CFLAGS="-g -O2"
4195  else
4196    CFLAGS="-g"
4197  fi
4198else
4199  if test "$GCC" = yes; then
4200    CFLAGS="-O2"
4201  else
4202    CFLAGS=
4203  fi
4204fi
4205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4206$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4207if ${ac_cv_prog_cc_c89+:} false; then :
4208  $as_echo_n "(cached) " >&6
4209else
4210  ac_cv_prog_cc_c89=no
4211ac_save_CC=$CC
4212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213/* end confdefs.h.  */
4214#include <stdarg.h>
4215#include <stdio.h>
4216struct stat;
4217/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4218struct buf { int x; };
4219FILE * (*rcsopen) (struct buf *, struct stat *, int);
4220static char *e (p, i)
4221     char **p;
4222     int i;
4223{
4224  return p[i];
4225}
4226static char *f (char * (*g) (char **, int), char **p, ...)
4227{
4228  char *s;
4229  va_list v;
4230  va_start (v,p);
4231  s = g (p, va_arg (v,int));
4232  va_end (v);
4233  return s;
4234}
4235
4236/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
4237   function prototypes and stuff, but not '\xHH' hex character constants.
4238   These don't provoke an error unfortunately, instead are silently treated
4239   as 'x'.  The following induces an error, until -std is added to get
4240   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
4241   array size at least.  It's necessary to write '\x00'==0 to get something
4242   that's true only with -std.  */
4243int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4244
4245/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4246   inside strings and character constants.  */
4247#define FOO(x) 'x'
4248int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4249
4250int test (int i, double x);
4251struct s1 {int (*f) (int a);};
4252struct s2 {int (*f) (double a);};
4253int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4254int argc;
4255char **argv;
4256int
4257main ()
4258{
4259return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
4260  ;
4261  return 0;
4262}
4263_ACEOF
4264for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4265	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4266do
4267  CC="$ac_save_CC $ac_arg"
4268  if ac_fn_c_try_compile "$LINENO"; then :
4269  ac_cv_prog_cc_c89=$ac_arg
4270fi
4271rm -f core conftest.err conftest.$ac_objext
4272  test "x$ac_cv_prog_cc_c89" != "xno" && break
4273done
4274rm -f conftest.$ac_ext
4275CC=$ac_save_CC
4276
4277fi
4278# AC_CACHE_VAL
4279case "x$ac_cv_prog_cc_c89" in
4280  x)
4281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4282$as_echo "none needed" >&6; } ;;
4283  xno)
4284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4285$as_echo "unsupported" >&6; } ;;
4286  *)
4287    CC="$CC $ac_cv_prog_cc_c89"
4288    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4289$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4290esac
4291if test "x$ac_cv_prog_cc_c89" != xno; then :
4292
4293fi
4294
4295ac_ext=c
4296ac_cpp='$CPP $CPPFLAGS'
4297ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4298ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4299ac_compiler_gnu=$ac_cv_c_compiler_gnu
4300
4301ac_ext=c
4302ac_cpp='$CPP $CPPFLAGS'
4303ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4304ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4305ac_compiler_gnu=$ac_cv_c_compiler_gnu
4306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
4307$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
4308if ${am_cv_prog_cc_c_o+:} false; then :
4309  $as_echo_n "(cached) " >&6
4310else
4311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4312/* end confdefs.h.  */
4313
4314int
4315main ()
4316{
4317
4318  ;
4319  return 0;
4320}
4321_ACEOF
4322  # Make sure it works both with $CC and with simple cc.
4323  # Following AC_PROG_CC_C_O, we do the test twice because some
4324  # compilers refuse to overwrite an existing .o file with -o,
4325  # though they will create one.
4326  am_cv_prog_cc_c_o=yes
4327  for am_i in 1 2; do
4328    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
4329   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
4330   ac_status=$?
4331   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332   (exit $ac_status); } \
4333         && test -f conftest2.$ac_objext; then
4334      : OK
4335    else
4336      am_cv_prog_cc_c_o=no
4337      break
4338    fi
4339  done
4340  rm -f core conftest*
4341  unset am_i
4342fi
4343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
4344$as_echo "$am_cv_prog_cc_c_o" >&6; }
4345if test "$am_cv_prog_cc_c_o" != yes; then
4346   # Losing compiler, so override with the script.
4347   # FIXME: It is wrong to rewrite CC.
4348   # But if we don't then we get into trouble of one sort or another.
4349   # A longer-term fix would be to have automake use am__CC in this case,
4350   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
4351   CC="$am_aux_dir/compile $CC"
4352fi
4353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358
4359
4360depcc="$CC"   am_compiler_list=
4361
4362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4363$as_echo_n "checking dependency style of $depcc... " >&6; }
4364if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4365  $as_echo_n "(cached) " >&6
4366else
4367  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4368  # We make a subdir and do the tests there.  Otherwise we can end up
4369  # making bogus files that we don't know about and never remove.  For
4370  # instance it was reported that on HP-UX the gcc test will end up
4371  # making a dummy file named 'D' -- because '-MD' means "put the output
4372  # in D".
4373  rm -rf conftest.dir
4374  mkdir conftest.dir
4375  # Copy depcomp to subdir because otherwise we won't find it if we're
4376  # using a relative directory.
4377  cp "$am_depcomp" conftest.dir
4378  cd conftest.dir
4379  # We will build objects and dependencies in a subdirectory because
4380  # it helps to detect inapplicable dependency modes.  For instance
4381  # both Tru64's cc and ICC support -MD to output dependencies as a
4382  # side effect of compilation, but ICC will put the dependencies in
4383  # the current directory while Tru64 will put them in the object
4384  # directory.
4385  mkdir sub
4386
4387  am_cv_CC_dependencies_compiler_type=none
4388  if test "$am_compiler_list" = ""; then
4389     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4390  fi
4391  am__universal=false
4392  case " $depcc " in #(
4393     *\ -arch\ *\ -arch\ *) am__universal=true ;;
4394     esac
4395
4396  for depmode in $am_compiler_list; do
4397    # Setup a source with many dependencies, because some compilers
4398    # like to wrap large dependency lists on column 80 (with \), and
4399    # we should not choose a depcomp mode which is confused by this.
4400    #
4401    # We need to recreate these files for each test, as the compiler may
4402    # overwrite some of them when testing with obscure command lines.
4403    # This happens at least with the AIX C compiler.
4404    : > sub/conftest.c
4405    for i in 1 2 3 4 5 6; do
4406      echo '#include "conftst'$i'.h"' >> sub/conftest.c
4407      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
4408      # Solaris 10 /bin/sh.
4409      echo '/* dummy */' > sub/conftst$i.h
4410    done
4411    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4412
4413    # We check with '-c' and '-o' for the sake of the "dashmstdout"
4414    # mode.  It turns out that the SunPro C++ compiler does not properly
4415    # handle '-M -o', and we need to detect this.  Also, some Intel
4416    # versions had trouble with output in subdirs.
4417    am__obj=sub/conftest.${OBJEXT-o}
4418    am__minus_obj="-o $am__obj"
4419    case $depmode in
4420    gcc)
4421      # This depmode causes a compiler race in universal mode.
4422      test "$am__universal" = false || continue
4423      ;;
4424    nosideeffect)
4425      # After this tag, mechanisms are not by side-effect, so they'll
4426      # only be used when explicitly requested.
4427      if test "x$enable_dependency_tracking" = xyes; then
4428	continue
4429      else
4430	break
4431      fi
4432      ;;
4433    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4434      # This compiler won't grok '-c -o', but also, the minuso test has
4435      # not run yet.  These depmodes are late enough in the game, and
4436      # so weak that their functioning should not be impacted.
4437      am__obj=conftest.${OBJEXT-o}
4438      am__minus_obj=
4439      ;;
4440    none) break ;;
4441    esac
4442    if depmode=$depmode \
4443       source=sub/conftest.c object=$am__obj \
4444       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4445       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4446         >/dev/null 2>conftest.err &&
4447       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4448       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4449       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4450       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4451      # icc doesn't choke on unknown options, it will just issue warnings
4452      # or remarks (even with -Werror).  So we grep stderr for any message
4453      # that says an option was ignored or not supported.
4454      # When given -MP, icc 7.0 and 7.1 complain thusly:
4455      #   icc: Command line warning: ignoring option '-M'; no argument required
4456      # The diagnosis changed in icc 8.0:
4457      #   icc: Command line remark: option '-MP' not supported
4458      if (grep 'ignoring option' conftest.err ||
4459          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4460        am_cv_CC_dependencies_compiler_type=$depmode
4461        break
4462      fi
4463    fi
4464  done
4465
4466  cd ..
4467  rm -rf conftest.dir
4468else
4469  am_cv_CC_dependencies_compiler_type=none
4470fi
4471
4472fi
4473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4474$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4475CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4476
4477 if
4478  test "x$enable_dependency_tracking" != xno \
4479  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4480  am__fastdepCC_TRUE=
4481  am__fastdepCC_FALSE='#'
4482else
4483  am__fastdepCC_TRUE='#'
4484  am__fastdepCC_FALSE=
4485fi
4486
4487
4488
4489
4490
4491ac_ext=c
4492ac_cpp='$CPP $CPPFLAGS'
4493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4495ac_compiler_gnu=$ac_cv_c_compiler_gnu
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4497$as_echo_n "checking how to run the C preprocessor... " >&6; }
4498# On Suns, sometimes $CPP names a directory.
4499if test -n "$CPP" && test -d "$CPP"; then
4500  CPP=
4501fi
4502if test -z "$CPP"; then
4503  if ${ac_cv_prog_CPP+:} false; then :
4504  $as_echo_n "(cached) " >&6
4505else
4506      # Double quotes because CPP needs to be expanded
4507    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4508    do
4509      ac_preproc_ok=false
4510for ac_c_preproc_warn_flag in '' yes
4511do
4512  # Use a header file that comes with gcc, so configuring glibc
4513  # with a fresh cross-compiler works.
4514  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4515  # <limits.h> exists even on freestanding compilers.
4516  # On the NeXT, cc -E runs the code through the compiler's parser,
4517  # not just through cpp. "Syntax error" is here to catch this case.
4518  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4519/* end confdefs.h.  */
4520#ifdef __STDC__
4521# include <limits.h>
4522#else
4523# include <assert.h>
4524#endif
4525		     Syntax error
4526_ACEOF
4527if ac_fn_c_try_cpp "$LINENO"; then :
4528
4529else
4530  # Broken: fails on valid input.
4531continue
4532fi
4533rm -f conftest.err conftest.i conftest.$ac_ext
4534
4535  # OK, works on sane cases.  Now check whether nonexistent headers
4536  # can be detected and how.
4537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4538/* end confdefs.h.  */
4539#include <ac_nonexistent.h>
4540_ACEOF
4541if ac_fn_c_try_cpp "$LINENO"; then :
4542  # Broken: success on invalid input.
4543continue
4544else
4545  # Passes both tests.
4546ac_preproc_ok=:
4547break
4548fi
4549rm -f conftest.err conftest.i conftest.$ac_ext
4550
4551done
4552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4553rm -f conftest.i conftest.err conftest.$ac_ext
4554if $ac_preproc_ok; then :
4555  break
4556fi
4557
4558    done
4559    ac_cv_prog_CPP=$CPP
4560
4561fi
4562  CPP=$ac_cv_prog_CPP
4563else
4564  ac_cv_prog_CPP=$CPP
4565fi
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4567$as_echo "$CPP" >&6; }
4568ac_preproc_ok=false
4569for ac_c_preproc_warn_flag in '' yes
4570do
4571  # Use a header file that comes with gcc, so configuring glibc
4572  # with a fresh cross-compiler works.
4573  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4574  # <limits.h> exists even on freestanding compilers.
4575  # On the NeXT, cc -E runs the code through the compiler's parser,
4576  # not just through cpp. "Syntax error" is here to catch this case.
4577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4578/* end confdefs.h.  */
4579#ifdef __STDC__
4580# include <limits.h>
4581#else
4582# include <assert.h>
4583#endif
4584		     Syntax error
4585_ACEOF
4586if ac_fn_c_try_cpp "$LINENO"; then :
4587
4588else
4589  # Broken: fails on valid input.
4590continue
4591fi
4592rm -f conftest.err conftest.i conftest.$ac_ext
4593
4594  # OK, works on sane cases.  Now check whether nonexistent headers
4595  # can be detected and how.
4596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597/* end confdefs.h.  */
4598#include <ac_nonexistent.h>
4599_ACEOF
4600if ac_fn_c_try_cpp "$LINENO"; then :
4601  # Broken: success on invalid input.
4602continue
4603else
4604  # Passes both tests.
4605ac_preproc_ok=:
4606break
4607fi
4608rm -f conftest.err conftest.i conftest.$ac_ext
4609
4610done
4611# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4612rm -f conftest.i conftest.err conftest.$ac_ext
4613if $ac_preproc_ok; then :
4614
4615else
4616  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4617$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4618as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4619See \`config.log' for more details" "$LINENO" 5; }
4620fi
4621
4622ac_ext=c
4623ac_cpp='$CPP $CPPFLAGS'
4624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4626ac_compiler_gnu=$ac_cv_c_compiler_gnu
4627
4628
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4630$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4631if ${ac_cv_path_GREP+:} false; then :
4632  $as_echo_n "(cached) " >&6
4633else
4634  if test -z "$GREP"; then
4635  ac_path_GREP_found=false
4636  # Loop through the user's path and test for each of PROGNAME-LIST
4637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4639do
4640  IFS=$as_save_IFS
4641  test -z "$as_dir" && as_dir=.
4642    for ac_prog in grep ggrep; do
4643    for ac_exec_ext in '' $ac_executable_extensions; do
4644      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4645      as_fn_executable_p "$ac_path_GREP" || continue
4646# Check for GNU ac_path_GREP and select it if it is found.
4647  # Check for GNU $ac_path_GREP
4648case `"$ac_path_GREP" --version 2>&1` in
4649*GNU*)
4650  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4651*)
4652  ac_count=0
4653  $as_echo_n 0123456789 >"conftest.in"
4654  while :
4655  do
4656    cat "conftest.in" "conftest.in" >"conftest.tmp"
4657    mv "conftest.tmp" "conftest.in"
4658    cp "conftest.in" "conftest.nl"
4659    $as_echo 'GREP' >> "conftest.nl"
4660    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4661    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4662    as_fn_arith $ac_count + 1 && ac_count=$as_val
4663    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4664      # Best one so far, save it but keep looking for a better one
4665      ac_cv_path_GREP="$ac_path_GREP"
4666      ac_path_GREP_max=$ac_count
4667    fi
4668    # 10*(2^10) chars as input seems more than enough
4669    test $ac_count -gt 10 && break
4670  done
4671  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4672esac
4673
4674      $ac_path_GREP_found && break 3
4675    done
4676  done
4677  done
4678IFS=$as_save_IFS
4679  if test -z "$ac_cv_path_GREP"; then
4680    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4681  fi
4682else
4683  ac_cv_path_GREP=$GREP
4684fi
4685
4686fi
4687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4688$as_echo "$ac_cv_path_GREP" >&6; }
4689 GREP="$ac_cv_path_GREP"
4690
4691
4692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4693$as_echo_n "checking for egrep... " >&6; }
4694if ${ac_cv_path_EGREP+:} false; then :
4695  $as_echo_n "(cached) " >&6
4696else
4697  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4698   then ac_cv_path_EGREP="$GREP -E"
4699   else
4700     if test -z "$EGREP"; then
4701  ac_path_EGREP_found=false
4702  # Loop through the user's path and test for each of PROGNAME-LIST
4703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4704for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4705do
4706  IFS=$as_save_IFS
4707  test -z "$as_dir" && as_dir=.
4708    for ac_prog in egrep; do
4709    for ac_exec_ext in '' $ac_executable_extensions; do
4710      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4711      as_fn_executable_p "$ac_path_EGREP" || continue
4712# Check for GNU ac_path_EGREP and select it if it is found.
4713  # Check for GNU $ac_path_EGREP
4714case `"$ac_path_EGREP" --version 2>&1` in
4715*GNU*)
4716  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4717*)
4718  ac_count=0
4719  $as_echo_n 0123456789 >"conftest.in"
4720  while :
4721  do
4722    cat "conftest.in" "conftest.in" >"conftest.tmp"
4723    mv "conftest.tmp" "conftest.in"
4724    cp "conftest.in" "conftest.nl"
4725    $as_echo 'EGREP' >> "conftest.nl"
4726    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4727    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4728    as_fn_arith $ac_count + 1 && ac_count=$as_val
4729    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4730      # Best one so far, save it but keep looking for a better one
4731      ac_cv_path_EGREP="$ac_path_EGREP"
4732      ac_path_EGREP_max=$ac_count
4733    fi
4734    # 10*(2^10) chars as input seems more than enough
4735    test $ac_count -gt 10 && break
4736  done
4737  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4738esac
4739
4740      $ac_path_EGREP_found && break 3
4741    done
4742  done
4743  done
4744IFS=$as_save_IFS
4745  if test -z "$ac_cv_path_EGREP"; then
4746    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4747  fi
4748else
4749  ac_cv_path_EGREP=$EGREP
4750fi
4751
4752   fi
4753fi
4754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4755$as_echo "$ac_cv_path_EGREP" >&6; }
4756 EGREP="$ac_cv_path_EGREP"
4757
4758
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4760$as_echo_n "checking for ANSI C header files... " >&6; }
4761if ${ac_cv_header_stdc+:} false; then :
4762  $as_echo_n "(cached) " >&6
4763else
4764  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4765/* end confdefs.h.  */
4766#include <stdlib.h>
4767#include <stdarg.h>
4768#include <string.h>
4769#include <float.h>
4770
4771int
4772main ()
4773{
4774
4775  ;
4776  return 0;
4777}
4778_ACEOF
4779if ac_fn_c_try_compile "$LINENO"; then :
4780  ac_cv_header_stdc=yes
4781else
4782  ac_cv_header_stdc=no
4783fi
4784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4785
4786if test $ac_cv_header_stdc = yes; then
4787  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4789/* end confdefs.h.  */
4790#include <string.h>
4791
4792_ACEOF
4793if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4794  $EGREP "memchr" >/dev/null 2>&1; then :
4795
4796else
4797  ac_cv_header_stdc=no
4798fi
4799rm -f conftest*
4800
4801fi
4802
4803if test $ac_cv_header_stdc = yes; then
4804  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4806/* end confdefs.h.  */
4807#include <stdlib.h>
4808
4809_ACEOF
4810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4811  $EGREP "free" >/dev/null 2>&1; then :
4812
4813else
4814  ac_cv_header_stdc=no
4815fi
4816rm -f conftest*
4817
4818fi
4819
4820if test $ac_cv_header_stdc = yes; then
4821  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4822  if test "$cross_compiling" = yes; then :
4823  :
4824else
4825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4826/* end confdefs.h.  */
4827#include <ctype.h>
4828#include <stdlib.h>
4829#if ((' ' & 0x0FF) == 0x020)
4830# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4831# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4832#else
4833# define ISLOWER(c) \
4834		   (('a' <= (c) && (c) <= 'i') \
4835		     || ('j' <= (c) && (c) <= 'r') \
4836		     || ('s' <= (c) && (c) <= 'z'))
4837# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4838#endif
4839
4840#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4841int
4842main ()
4843{
4844  int i;
4845  for (i = 0; i < 256; i++)
4846    if (XOR (islower (i), ISLOWER (i))
4847	|| toupper (i) != TOUPPER (i))
4848      return 2;
4849  return 0;
4850}
4851_ACEOF
4852if ac_fn_c_try_run "$LINENO"; then :
4853
4854else
4855  ac_cv_header_stdc=no
4856fi
4857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4858  conftest.$ac_objext conftest.beam conftest.$ac_ext
4859fi
4860
4861fi
4862fi
4863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4864$as_echo "$ac_cv_header_stdc" >&6; }
4865if test $ac_cv_header_stdc = yes; then
4866
4867$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4868
4869fi
4870
4871# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4872for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4873		  inttypes.h stdint.h unistd.h
4874do :
4875  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4876ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4877"
4878if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4879  cat >>confdefs.h <<_ACEOF
4880#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4881_ACEOF
4882
4883fi
4884
4885done
4886
4887
4888
4889  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4890if test "x$ac_cv_header_minix_config_h" = xyes; then :
4891  MINIX=yes
4892else
4893  MINIX=
4894fi
4895
4896
4897  if test "$MINIX" = yes; then
4898
4899$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4900
4901
4902$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4903
4904
4905$as_echo "#define _MINIX 1" >>confdefs.h
4906
4907  fi
4908
4909
4910  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4911$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4912if ${ac_cv_safe_to_define___extensions__+:} false; then :
4913  $as_echo_n "(cached) " >&6
4914else
4915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4916/* end confdefs.h.  */
4917
4918#         define __EXTENSIONS__ 1
4919          $ac_includes_default
4920int
4921main ()
4922{
4923
4924  ;
4925  return 0;
4926}
4927_ACEOF
4928if ac_fn_c_try_compile "$LINENO"; then :
4929  ac_cv_safe_to_define___extensions__=yes
4930else
4931  ac_cv_safe_to_define___extensions__=no
4932fi
4933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4934fi
4935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4936$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4937  test $ac_cv_safe_to_define___extensions__ = yes &&
4938    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4939
4940  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4941
4942  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4943
4944  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4945
4946  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4947
4948
4949
4950   case $ac_cv_prog_cc_stdc in #(
4951  no) :
4952    ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4953  *) :
4954    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4955$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4956if ${ac_cv_prog_cc_c99+:} false; then :
4957  $as_echo_n "(cached) " >&6
4958else
4959  ac_cv_prog_cc_c99=no
4960ac_save_CC=$CC
4961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4962/* end confdefs.h.  */
4963#include <stdarg.h>
4964#include <stdbool.h>
4965#include <stdlib.h>
4966#include <wchar.h>
4967#include <stdio.h>
4968
4969// Check varargs macros.  These examples are taken from C99 6.10.3.5.
4970#define debug(...) fprintf (stderr, __VA_ARGS__)
4971#define showlist(...) puts (#__VA_ARGS__)
4972#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4973static void
4974test_varargs_macros (void)
4975{
4976  int x = 1234;
4977  int y = 5678;
4978  debug ("Flag");
4979  debug ("X = %d\n", x);
4980  showlist (The first, second, and third items.);
4981  report (x>y, "x is %d but y is %d", x, y);
4982}
4983
4984// Check long long types.
4985#define BIG64 18446744073709551615ull
4986#define BIG32 4294967295ul
4987#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4988#if !BIG_OK
4989  your preprocessor is broken;
4990#endif
4991#if BIG_OK
4992#else
4993  your preprocessor is broken;
4994#endif
4995static long long int bignum = -9223372036854775807LL;
4996static unsigned long long int ubignum = BIG64;
4997
4998struct incomplete_array
4999{
5000  int datasize;
5001  double data[];
5002};
5003
5004struct named_init {
5005  int number;
5006  const wchar_t *name;
5007  double average;
5008};
5009
5010typedef const char *ccp;
5011
5012static inline int
5013test_restrict (ccp restrict text)
5014{
5015  // See if C++-style comments work.
5016  // Iterate through items via the restricted pointer.
5017  // Also check for declarations in for loops.
5018  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
5019    continue;
5020  return 0;
5021}
5022
5023// Check varargs and va_copy.
5024static void
5025test_varargs (const char *format, ...)
5026{
5027  va_list args;
5028  va_start (args, format);
5029  va_list args_copy;
5030  va_copy (args_copy, args);
5031
5032  const char *str;
5033  int number;
5034  float fnumber;
5035
5036  while (*format)
5037    {
5038      switch (*format++)
5039	{
5040	case 's': // string
5041	  str = va_arg (args_copy, const char *);
5042	  break;
5043	case 'd': // int
5044	  number = va_arg (args_copy, int);
5045	  break;
5046	case 'f': // float
5047	  fnumber = va_arg (args_copy, double);
5048	  break;
5049	default:
5050	  break;
5051	}
5052    }
5053  va_end (args_copy);
5054  va_end (args);
5055}
5056
5057int
5058main ()
5059{
5060
5061  // Check bool.
5062  _Bool success = false;
5063
5064  // Check restrict.
5065  if (test_restrict ("String literal") == 0)
5066    success = true;
5067  char *restrict newvar = "Another string";
5068
5069  // Check varargs.
5070  test_varargs ("s, d' f .", "string", 65, 34.234);
5071  test_varargs_macros ();
5072
5073  // Check flexible array members.
5074  struct incomplete_array *ia =
5075    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5076  ia->datasize = 10;
5077  for (int i = 0; i < ia->datasize; ++i)
5078    ia->data[i] = i * 1.234;
5079
5080  // Check named initializers.
5081  struct named_init ni = {
5082    .number = 34,
5083    .name = L"Test wide string",
5084    .average = 543.34343,
5085  };
5086
5087  ni.number = 58;
5088
5089  int dynamic_array[ni.number];
5090  dynamic_array[ni.number - 1] = 543;
5091
5092  // work around unused variable warnings
5093  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5094	  || dynamic_array[ni.number - 1] != 543);
5095
5096  ;
5097  return 0;
5098}
5099_ACEOF
5100for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
5101do
5102  CC="$ac_save_CC $ac_arg"
5103  if ac_fn_c_try_compile "$LINENO"; then :
5104  ac_cv_prog_cc_c99=$ac_arg
5105fi
5106rm -f core conftest.err conftest.$ac_objext
5107  test "x$ac_cv_prog_cc_c99" != "xno" && break
5108done
5109rm -f conftest.$ac_ext
5110CC=$ac_save_CC
5111
5112fi
5113# AC_CACHE_VAL
5114case "x$ac_cv_prog_cc_c99" in
5115  x)
5116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5117$as_echo "none needed" >&6; } ;;
5118  xno)
5119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5120$as_echo "unsupported" >&6; } ;;
5121  *)
5122    CC="$CC $ac_cv_prog_cc_c99"
5123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5124$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5125esac
5126if test "x$ac_cv_prog_cc_c99" != xno; then :
5127  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5128else
5129  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
5130$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
5131if ${ac_cv_prog_cc_c89+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  ac_cv_prog_cc_c89=no
5135ac_save_CC=$CC
5136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5137/* end confdefs.h.  */
5138#include <stdarg.h>
5139#include <stdio.h>
5140struct stat;
5141/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
5142struct buf { int x; };
5143FILE * (*rcsopen) (struct buf *, struct stat *, int);
5144static char *e (p, i)
5145     char **p;
5146     int i;
5147{
5148  return p[i];
5149}
5150static char *f (char * (*g) (char **, int), char **p, ...)
5151{
5152  char *s;
5153  va_list v;
5154  va_start (v,p);
5155  s = g (p, va_arg (v,int));
5156  va_end (v);
5157  return s;
5158}
5159
5160/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
5161   function prototypes and stuff, but not '\xHH' hex character constants.
5162   These don't provoke an error unfortunately, instead are silently treated
5163   as 'x'.  The following induces an error, until -std is added to get
5164   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
5165   array size at least.  It's necessary to write '\x00'==0 to get something
5166   that's true only with -std.  */
5167int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5168
5169/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5170   inside strings and character constants.  */
5171#define FOO(x) 'x'
5172int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5173
5174int test (int i, double x);
5175struct s1 {int (*f) (int a);};
5176struct s2 {int (*f) (double a);};
5177int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5178int argc;
5179char **argv;
5180int
5181main ()
5182{
5183return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
5184  ;
5185  return 0;
5186}
5187_ACEOF
5188for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5189	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5190do
5191  CC="$ac_save_CC $ac_arg"
5192  if ac_fn_c_try_compile "$LINENO"; then :
5193  ac_cv_prog_cc_c89=$ac_arg
5194fi
5195rm -f core conftest.err conftest.$ac_objext
5196  test "x$ac_cv_prog_cc_c89" != "xno" && break
5197done
5198rm -f conftest.$ac_ext
5199CC=$ac_save_CC
5200
5201fi
5202# AC_CACHE_VAL
5203case "x$ac_cv_prog_cc_c89" in
5204  x)
5205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5206$as_echo "none needed" >&6; } ;;
5207  xno)
5208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5209$as_echo "unsupported" >&6; } ;;
5210  *)
5211    CC="$CC $ac_cv_prog_cc_c89"
5212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5213$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5214esac
5215if test "x$ac_cv_prog_cc_c89" != xno; then :
5216  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5217else
5218  ac_cv_prog_cc_stdc=no
5219fi
5220
5221fi
5222 ;;
5223esac
5224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5225$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5226  if ${ac_cv_prog_cc_stdc+:} false; then :
5227  $as_echo_n "(cached) " >&6
5228fi
5229
5230  case $ac_cv_prog_cc_stdc in #(
5231  no) :
5232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5233$as_echo "unsupported" >&6; } ;; #(
5234  '') :
5235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5236$as_echo "none needed" >&6; } ;; #(
5237  *) :
5238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5239$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5240esac
5241
5242
5243
5244
5245
5246# Ralf Wildenhues: With per-target flags we need CC_C_O
5247# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
5248
5249if test $ac_cv_c_compiler_gnu = yes; then
5250    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5251$as_echo_n "checking whether $CC needs -traditional... " >&6; }
5252if ${ac_cv_prog_gcc_traditional+:} false; then :
5253  $as_echo_n "(cached) " >&6
5254else
5255    ac_pattern="Autoconf.*'x'"
5256  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5257/* end confdefs.h.  */
5258#include <sgtty.h>
5259Autoconf TIOCGETP
5260_ACEOF
5261if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5262  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5263  ac_cv_prog_gcc_traditional=yes
5264else
5265  ac_cv_prog_gcc_traditional=no
5266fi
5267rm -f conftest*
5268
5269
5270  if test $ac_cv_prog_gcc_traditional = no; then
5271    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5272/* end confdefs.h.  */
5273#include <termio.h>
5274Autoconf TCGETA
5275_ACEOF
5276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5277  $EGREP "$ac_pattern" >/dev/null 2>&1; then :
5278  ac_cv_prog_gcc_traditional=yes
5279fi
5280rm -f conftest*
5281
5282  fi
5283fi
5284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5285$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
5286  if test $ac_cv_prog_gcc_traditional = yes; then
5287    CC="$CC -traditional"
5288  fi
5289fi
5290
5291
5292
5293CFLAGS_NTP=
5294CPPFLAGS_NTP=
5295LDADD_NTP=
5296LDFLAGS_NTP=
5297
5298
5299
5300
5301
5302case "$ac_cv_prog_cc_c89" in
5303 no)
5304    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5305		 version 4.2.5 and higher." >&5
5306$as_echo "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5307		 version 4.2.5 and higher." >&2;}
5308    ;;
5309esac
5310
5311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5312$as_echo_n "checking if $CC can handle #warning... " >&6; }
5313if ${ntp_cv_cpp_warning+:} false; then :
5314  $as_echo_n "(cached) " >&6
5315else
5316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5317/* end confdefs.h.  */
5318
5319int
5320main ()
5321{
5322#warning foo
5323  ;
5324  return 0;
5325}
5326_ACEOF
5327if ac_fn_c_try_compile "$LINENO"; then :
5328  ntp_cv_cpp_warning=yes
5329else
5330  ntp_cv_cpp_warning=no
5331
5332fi
5333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5334
5335fi
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5337$as_echo "$ntp_cv_cpp_warning" >&6; }
5338case "$ntp_cv_cpp_warning" in
5339 no)
5340
5341$as_echo "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5342
5343esac
5344
5345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5346$as_echo_n "checking if $CC supports __attribute__((...))... " >&6; }
5347if ${ntp_cv_cc_attribute+:} false; then :
5348  $as_echo_n "(cached) " >&6
5349else
5350  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5351/* end confdefs.h.  */
5352
5353int
5354main ()
5355{
5356void foo(void) __attribute__((__noreturn__));
5357
5358  ;
5359  return 0;
5360}
5361_ACEOF
5362if ac_fn_c_try_compile "$LINENO"; then :
5363  ntp_cv_cc_attribute=yes
5364else
5365  ntp_cv_cc_attribute=no
5366
5367fi
5368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5369
5370fi
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5372$as_echo "$ntp_cv_cc_attribute" >&6; }
5373case "$ntp_cv_cc_attribute" in
5374 yes)
5375
5376$as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5377
5378esac
5379
5380
5381case "$GCC" in
5382 yes)
5383    SAVED_CFLAGS="$CFLAGS"
5384    CFLAGS="$CFLAGS -Wstrict-overflow"
5385    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5386$as_echo_n "checking if $CC can handle -Wstrict-overflow... " >&6; }
5387if ${ntp_cv_gcc_Wstrict_overflow+:} false; then :
5388  $as_echo_n "(cached) " >&6
5389else
5390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5391/* end confdefs.h.  */
5392
5393int
5394main ()
5395{
5396
5397  ;
5398  return 0;
5399}
5400_ACEOF
5401if ac_fn_c_try_compile "$LINENO"; then :
5402  ntp_cv_gcc_Wstrict_overflow=yes
5403else
5404  ntp_cv_gcc_Wstrict_overflow=no
5405
5406fi
5407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5408
5409fi
5410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5411$as_echo "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5412    #
5413    # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5414    # flag to CFLAGS.
5415    #
5416    CFLAGS="$SAVED_CFLAGS -Winit-self"
5417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5418$as_echo_n "checking if $CC can handle -Winit-self... " >&6; }
5419if ${ntp_cv_gcc_Winit_self+:} false; then :
5420  $as_echo_n "(cached) " >&6
5421else
5422
5423	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5424/* end confdefs.h.  */
5425
5426int
5427main ()
5428{
5429
5430  ;
5431  return 0;
5432}
5433_ACEOF
5434if ac_fn_c_try_compile "$LINENO"; then :
5435  ntp_cv_gcc_Winit_self=yes
5436else
5437  ntp_cv_gcc_Winit_self=no
5438
5439fi
5440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5441
5442
5443fi
5444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5445$as_echo "$ntp_cv_gcc_Winit_self" >&6; }
5446    CFLAGS="$SAVED_CFLAGS"
5447    { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5448    #
5449    # $ntp_cv_gcc_Winit_self is tested later to add the
5450    # flag to CFLAGS_NTP.
5451    #
5452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5453$as_echo_n "checking if linker supports omitting unused code and data... " >&6; }
5454if ${ntp_cv_gc_sections_runs+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457
5458	    	    	    	    	    	    	    	    	    	    	    origCFLAGS="$CFLAGS"
5459	    CFLAGS="$CFLAGS -Wl,--gc-sections"
5460	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h.  */
5462
5463			#include <stdlib.h>
5464			#include <stdio.h>
5465
5466int
5467main ()
5468{
5469
5470			FILE *	fpC;
5471			char	buf[32];
5472			size_t	cch;
5473			int	read_success_once;
5474
5475			fpC = fopen("conftest.c", "r");
5476			if (NULL == fpC)
5477				exit(1);
5478			do {
5479				cch = fread(buf, sizeof(buf), 1, fpC);
5480				read_success_once |= (0 != cch);
5481			} while (0 != cch);
5482			if (!read_success_once)
5483				exit(2);
5484			if (!feof(fpC))
5485				exit(3);
5486			if (0 != fclose(fpC))
5487				exit(4);
5488
5489			exit(EXIT_SUCCESS);
5490
5491
5492  ;
5493  return 0;
5494}
5495_ACEOF
5496if ac_fn_c_try_link "$LINENO"; then :
5497
5498		    if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5499			ntp_cv_gc_sections_runs=no
5500		    else
5501			ntp_cv_gc_sections_runs=no
5502			./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5503		    fi
5504
5505else
5506  ntp_cv_gc_sections_runs=no
5507
5508fi
5509rm -f core conftest.err conftest.$ac_objext \
5510    conftest$ac_exeext conftest.$ac_ext
5511	    CFLAGS="$origCFLAGS"
5512	    { origCFLAGS=; unset origCFLAGS;}
5513
5514
5515fi
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5517$as_echo "$ntp_cv_gc_sections_runs" >&6; }
5518    case "$ntp_cv_gc_sections_runs" in
5519     yes)
5520	LDADD_LIBNTP="-Wl,--gc-sections"
5521	CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5522	;;
5523     no)
5524	LDADD_LIBNTP=
5525	;;
5526    esac
5527    CFLAGS_NTP="$CFLAGS_NTP -Wall"
5528    CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5529    CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5530    # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5531    # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5532    # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5533    # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5534    CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5535    CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5536    CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5537    # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5538    # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5539    case "$ntp_cv_gcc_Winit_self" in
5540     yes)
5541	CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5542    esac
5543    case "$ntp_cv_gcc_Wstrict_overflow" in
5544     yes)
5545	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5546    esac
5547    # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5548esac
5549
5550
5551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5552$as_echo_n "checking additional compiler flags... " >&6; }
5553    # allow ntp_os_cflags to be preset to skip this stuff
5554    case "${ntp_os_cflags+set}" in
5555     set)
5556	;;
5557     *)
5558	ntp_os_cflags=
5559	case "$host_os" in
5560	 aix[1-3]*)
5561	    ;;
5562	 aix4.[0-2]*)
5563	    # turn on additional headers
5564	    ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5565	    ;;
5566	 aix5.3*)
5567	    # avoid circular dependencies in yp headers, and more
5568	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5569	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5570	    ;;
5571	 aix*)
5572	    # XXX Only verified thru AIX6.
5573	    # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5574	    # avoid circular dependencies in yp headers
5575	    # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5576	    # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5577	    # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5578	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5579	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5580	    ;;
5581	 amigaos)
5582	    ntp_os_cflags="-DSYS_AMIGA"
5583	    ;;
5584	 darwin*|macosx*|rhapsody*)
5585	    ntp_os_cflags="-D_P1003_1B_VISIBLE"
5586	    ;;
5587	 hpux10.*)		# at least for hppa2.0-hp-hpux10.20
5588	    case "$GCC" in
5589	     yes)
5590		;;
5591	     *)
5592		# use Ansi compiler on HPUX, and some -Wp magic
5593		ntp_os_cflags="-Ae -Wp,-H18816"
5594		;;
5595	    esac
5596	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5597	    ;;
5598	 hpux*)
5599	    case "$GCC" in
5600	     yes)
5601		;;
5602	     *)
5603		# use Ansi compiler on HPUX
5604		ntp_os_cflags="-Ae"
5605	    esac
5606	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5607	    ;;
5608	 irix6*)
5609	    case "$CC" in
5610	     cc)
5611		# do not use 64-bit compiler
5612		ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5613	    esac
5614	    ;;
5615	 nextstep3)
5616	    ntp_os_cflags="-posix"
5617	    ;;
5618	 solaris1*|solaris2.[0-5]|solaris2.5.*)
5619	    ;;
5620	 sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5621	    ;;
5622	 solaris2*|sunos5*)
5623	    # turn on 64-bit file offset interface
5624	    ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5625	    ;;
5626	 vxworks*)
5627	    case "$build" in
5628	     $host)
5629		;;
5630	     *)
5631		# Quick and dirty sanity check
5632		case "$VX_KERNEL" in
5633		 '')
5634		    as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5635		esac
5636		ntp_os_cflags="-DSYS_VXWORKS"
5637	    esac
5638	    ;;
5639	esac
5640    esac
5641    case "$ntp_os_cflags" in
5642     '')
5643	ntp_os_cflags_msg="none needed"
5644	;;
5645     *)
5646	ntp_os_cflags_msg="$ntp_os_cflags"
5647    esac
5648    CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5649    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5650$as_echo "$ntp_os_cflags_msg" >&6; }
5651    { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5652    ###
5653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5654$as_echo_n "checking additional linker flags... " >&6; }
5655    # HMS: The following might still need tweaking
5656    # allow ntp_os_ldflags to be preset to skip this stuff
5657    case "${ntp_os_ldflags+set}" in
5658     set)
5659	;;
5660     *)
5661	ntp_os_ldflags=
5662	case "$host_os" in
5663	 hpux*)
5664	    case "$GCC" in
5665	     yes)
5666		ntp_os_ldflags="-Wl,+allowdups"
5667		;;
5668	    esac
5669	    ;;
5670	esac
5671	;;
5672    esac
5673    case "$ntp_os_ldflags" in
5674     '')
5675	ntp_os_ldflags_msg="none needed"
5676	;;
5677     *)
5678	ntp_os_ldflags_msg="$ntp_os_ldflags"
5679    esac
5680    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5682$as_echo "$ntp_os_ldflags_msg" >&6; }
5683    { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5684
5685
5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5687$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
5688if ${ac_cv_c_bigendian+:} false; then :
5689  $as_echo_n "(cached) " >&6
5690else
5691  ac_cv_c_bigendian=unknown
5692    # See if we're dealing with a universal compiler.
5693    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5694/* end confdefs.h.  */
5695#ifndef __APPLE_CC__
5696	       not a universal capable compiler
5697	     #endif
5698	     typedef int dummy;
5699
5700_ACEOF
5701if ac_fn_c_try_compile "$LINENO"; then :
5702
5703	# Check for potential -arch flags.  It is not universal unless
5704	# there are at least two -arch flags with different values.
5705	ac_arch=
5706	ac_prev=
5707	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5708	 if test -n "$ac_prev"; then
5709	   case $ac_word in
5710	     i?86 | x86_64 | ppc | ppc64)
5711	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5712		 ac_arch=$ac_word
5713	       else
5714		 ac_cv_c_bigendian=universal
5715		 break
5716	       fi
5717	       ;;
5718	   esac
5719	   ac_prev=
5720	 elif test "x$ac_word" = "x-arch"; then
5721	   ac_prev=arch
5722	 fi
5723       done
5724fi
5725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5726    if test $ac_cv_c_bigendian = unknown; then
5727      # See if sys/param.h defines the BYTE_ORDER macro.
5728      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5729/* end confdefs.h.  */
5730#include <sys/types.h>
5731	     #include <sys/param.h>
5732
5733int
5734main ()
5735{
5736#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5737		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5738		     && LITTLE_ENDIAN)
5739	      bogus endian macros
5740	     #endif
5741
5742  ;
5743  return 0;
5744}
5745_ACEOF
5746if ac_fn_c_try_compile "$LINENO"; then :
5747  # It does; now see whether it defined to BIG_ENDIAN or not.
5748	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5749/* end confdefs.h.  */
5750#include <sys/types.h>
5751		#include <sys/param.h>
5752
5753int
5754main ()
5755{
5756#if BYTE_ORDER != BIG_ENDIAN
5757		 not big endian
5758		#endif
5759
5760  ;
5761  return 0;
5762}
5763_ACEOF
5764if ac_fn_c_try_compile "$LINENO"; then :
5765  ac_cv_c_bigendian=yes
5766else
5767  ac_cv_c_bigendian=no
5768fi
5769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5770fi
5771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5772    fi
5773    if test $ac_cv_c_bigendian = unknown; then
5774      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
5775      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5776/* end confdefs.h.  */
5777#include <limits.h>
5778
5779int
5780main ()
5781{
5782#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
5783	      bogus endian macros
5784	     #endif
5785
5786  ;
5787  return 0;
5788}
5789_ACEOF
5790if ac_fn_c_try_compile "$LINENO"; then :
5791  # It does; now see whether it defined to _BIG_ENDIAN or not.
5792	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5793/* end confdefs.h.  */
5794#include <limits.h>
5795
5796int
5797main ()
5798{
5799#ifndef _BIG_ENDIAN
5800		 not big endian
5801		#endif
5802
5803  ;
5804  return 0;
5805}
5806_ACEOF
5807if ac_fn_c_try_compile "$LINENO"; then :
5808  ac_cv_c_bigendian=yes
5809else
5810  ac_cv_c_bigendian=no
5811fi
5812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5813fi
5814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5815    fi
5816    if test $ac_cv_c_bigendian = unknown; then
5817      # Compile a test program.
5818      if test "$cross_compiling" = yes; then :
5819  # Try to guess by grepping values from an object file.
5820	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5821/* end confdefs.h.  */
5822short int ascii_mm[] =
5823		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
5824		short int ascii_ii[] =
5825		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
5826		int use_ascii (int i) {
5827		  return ascii_mm[i] + ascii_ii[i];
5828		}
5829		short int ebcdic_ii[] =
5830		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
5831		short int ebcdic_mm[] =
5832		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
5833		int use_ebcdic (int i) {
5834		  return ebcdic_mm[i] + ebcdic_ii[i];
5835		}
5836		extern int foo;
5837
5838int
5839main ()
5840{
5841return use_ascii (foo) == use_ebcdic (foo);
5842  ;
5843  return 0;
5844}
5845_ACEOF
5846if ac_fn_c_try_compile "$LINENO"; then :
5847  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
5848	      ac_cv_c_bigendian=yes
5849	    fi
5850	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
5851	      if test "$ac_cv_c_bigendian" = unknown; then
5852		ac_cv_c_bigendian=no
5853	      else
5854		# finding both strings is unlikely to happen, but who knows?
5855		ac_cv_c_bigendian=unknown
5856	      fi
5857	    fi
5858fi
5859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5860else
5861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5862/* end confdefs.h.  */
5863$ac_includes_default
5864int
5865main ()
5866{
5867
5868	     /* Are we little or big endian?  From Harbison&Steele.  */
5869	     union
5870	     {
5871	       long int l;
5872	       char c[sizeof (long int)];
5873	     } u;
5874	     u.l = 1;
5875	     return u.c[sizeof (long int) - 1] == 1;
5876
5877  ;
5878  return 0;
5879}
5880_ACEOF
5881if ac_fn_c_try_run "$LINENO"; then :
5882  ac_cv_c_bigendian=no
5883else
5884  ac_cv_c_bigendian=yes
5885fi
5886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5887  conftest.$ac_objext conftest.beam conftest.$ac_ext
5888fi
5889
5890    fi
5891fi
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
5893$as_echo "$ac_cv_c_bigendian" >&6; }
5894 case $ac_cv_c_bigendian in #(
5895   yes)
5896     $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
5897;; #(
5898   no)
5899      ;; #(
5900   universal)
5901
5902$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
5903
5904     ;; #(
5905   *)
5906     as_fn_error $? "unknown endianness
5907 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
5908 esac
5909
5910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
5911$as_echo_n "checking for working volatile... " >&6; }
5912if ${ac_cv_c_volatile+:} false; then :
5913  $as_echo_n "(cached) " >&6
5914else
5915  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5916/* end confdefs.h.  */
5917
5918int
5919main ()
5920{
5921
5922volatile int x;
5923int * volatile y = (int *) 0;
5924return !x && !y;
5925  ;
5926  return 0;
5927}
5928_ACEOF
5929if ac_fn_c_try_compile "$LINENO"; then :
5930  ac_cv_c_volatile=yes
5931else
5932  ac_cv_c_volatile=no
5933fi
5934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5935fi
5936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
5937$as_echo "$ac_cv_c_volatile" >&6; }
5938if test $ac_cv_c_volatile = no; then
5939
5940$as_echo "#define volatile /**/" >>confdefs.h
5941
5942fi
5943
5944ac_ext=c
5945ac_cpp='$CPP $CPPFLAGS'
5946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5948ac_compiler_gnu=$ac_cv_c_compiler_gnu
5949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5950$as_echo_n "checking how to run the C preprocessor... " >&6; }
5951# On Suns, sometimes $CPP names a directory.
5952if test -n "$CPP" && test -d "$CPP"; then
5953  CPP=
5954fi
5955if test -z "$CPP"; then
5956  if ${ac_cv_prog_CPP+:} false; then :
5957  $as_echo_n "(cached) " >&6
5958else
5959      # Double quotes because CPP needs to be expanded
5960    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5961    do
5962      ac_preproc_ok=false
5963for ac_c_preproc_warn_flag in '' yes
5964do
5965  # Use a header file that comes with gcc, so configuring glibc
5966  # with a fresh cross-compiler works.
5967  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5968  # <limits.h> exists even on freestanding compilers.
5969  # On the NeXT, cc -E runs the code through the compiler's parser,
5970  # not just through cpp. "Syntax error" is here to catch this case.
5971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5972/* end confdefs.h.  */
5973#ifdef __STDC__
5974# include <limits.h>
5975#else
5976# include <assert.h>
5977#endif
5978		     Syntax error
5979_ACEOF
5980if ac_fn_c_try_cpp "$LINENO"; then :
5981
5982else
5983  # Broken: fails on valid input.
5984continue
5985fi
5986rm -f conftest.err conftest.i conftest.$ac_ext
5987
5988  # OK, works on sane cases.  Now check whether nonexistent headers
5989  # can be detected and how.
5990  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5991/* end confdefs.h.  */
5992#include <ac_nonexistent.h>
5993_ACEOF
5994if ac_fn_c_try_cpp "$LINENO"; then :
5995  # Broken: success on invalid input.
5996continue
5997else
5998  # Passes both tests.
5999ac_preproc_ok=:
6000break
6001fi
6002rm -f conftest.err conftest.i conftest.$ac_ext
6003
6004done
6005# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6006rm -f conftest.i conftest.err conftest.$ac_ext
6007if $ac_preproc_ok; then :
6008  break
6009fi
6010
6011    done
6012    ac_cv_prog_CPP=$CPP
6013
6014fi
6015  CPP=$ac_cv_prog_CPP
6016else
6017  ac_cv_prog_CPP=$CPP
6018fi
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6020$as_echo "$CPP" >&6; }
6021ac_preproc_ok=false
6022for ac_c_preproc_warn_flag in '' yes
6023do
6024  # Use a header file that comes with gcc, so configuring glibc
6025  # with a fresh cross-compiler works.
6026  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6027  # <limits.h> exists even on freestanding compilers.
6028  # On the NeXT, cc -E runs the code through the compiler's parser,
6029  # not just through cpp. "Syntax error" is here to catch this case.
6030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031/* end confdefs.h.  */
6032#ifdef __STDC__
6033# include <limits.h>
6034#else
6035# include <assert.h>
6036#endif
6037		     Syntax error
6038_ACEOF
6039if ac_fn_c_try_cpp "$LINENO"; then :
6040
6041else
6042  # Broken: fails on valid input.
6043continue
6044fi
6045rm -f conftest.err conftest.i conftest.$ac_ext
6046
6047  # OK, works on sane cases.  Now check whether nonexistent headers
6048  # can be detected and how.
6049  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6050/* end confdefs.h.  */
6051#include <ac_nonexistent.h>
6052_ACEOF
6053if ac_fn_c_try_cpp "$LINENO"; then :
6054  # Broken: success on invalid input.
6055continue
6056else
6057  # Passes both tests.
6058ac_preproc_ok=:
6059break
6060fi
6061rm -f conftest.err conftest.i conftest.$ac_ext
6062
6063done
6064# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6065rm -f conftest.i conftest.err conftest.$ac_ext
6066if $ac_preproc_ok; then :
6067
6068else
6069  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6071as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6072See \`config.log' for more details" "$LINENO" 5; }
6073fi
6074
6075ac_ext=c
6076ac_cpp='$CPP $CPPFLAGS'
6077ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6078ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6079ac_compiler_gnu=$ac_cv_c_compiler_gnu
6080
6081
6082
6083
6084
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6086$as_echo_n "checking for compile/link hardening flags... " >&6; }
6087
6088
6089# Check whether --with-hardenfile was given.
6090if test "${with_hardenfile+set}" = set; then :
6091  withval=$with_hardenfile;
6092else
6093  with_hardenfile=no
6094
6095fi
6096
6097
6098(									\
6099    SENTINEL_DIR="$PWD" &&						\
6100    cd $srcdir/ &&							\
6101    case "$with_hardenfile" in						\
6102     yes|no|'')								\
6103	scripts/genHardFlags -d "$SENTINEL_DIR"				\
6104	;;								\
6105     *)									\
6106	scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile"	\
6107	;;								\
6108    esac								\
6109) > genHardFlags.i 2> genHardFlags.err
6110. ./genHardFlags.i
6111
6112case "$GENHARDFLAG" in
6113 OK)
6114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6115$as_echo "in file $GENHARDFLAGFILE" >&6; }
6116    rm genHardFlags.err genHardFlags.i
6117    ;;
6118 *)
6119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6120$as_echo "failed." >&6; }
6121    as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6122    ;;
6123esac
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6134$as_echo_n "checking for install dir and man conventions... " >&6; }
6135
6136
6137# Check whether --with-locfile was given.
6138if test "${with_locfile+set}" = set; then :
6139  withval=$with_locfile;
6140else
6141  with_locfile=no
6142
6143fi
6144
6145
6146(									\
6147    SENTINEL_DIR="$PWD" &&						\
6148    cd $srcdir/ &&							\
6149    case "$with_locfile" in						\
6150     yes|no|'')								\
6151	scripts/genLocInfo -d "$SENTINEL_DIR"				\
6152	;;								\
6153     *)									\
6154	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
6155	;;								\
6156    esac								\
6157) > genLocInfo.i 2> genLocInfo.err
6158. ./genLocInfo.i
6159
6160case "$GENLOCINFO" in
6161 OK)
6162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6163$as_echo "in file $GENLOCINFOFILE" >&6; }
6164    rm genLocInfo.err genLocInfo.i
6165    ;;
6166 *)
6167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6168$as_echo "failed." >&6; }
6169    as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6170    ;;
6171esac
6172
6173 if test "$CALC_TICKADJ_MS" ; then
6174  WANT_CALC_TICKADJ_MS_TRUE=
6175  WANT_CALC_TICKADJ_MS_FALSE='#'
6176else
6177  WANT_CALC_TICKADJ_MS_TRUE='#'
6178  WANT_CALC_TICKADJ_MS_FALSE=
6179fi
6180
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 if test -z "$NTPSWEEP_NI" ; then
6224  INSTALL_NTPSWEEP_TRUE=
6225  INSTALL_NTPSWEEP_FALSE='#'
6226else
6227  INSTALL_NTPSWEEP_TRUE='#'
6228  INSTALL_NTPSWEEP_FALSE=
6229fi
6230
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 if test -z "$UPDATE_LEAP_NI" ; then
6272  INSTALL_UPDATE_LEAP_TRUE=
6273  INSTALL_UPDATE_LEAP_FALSE='#'
6274else
6275  INSTALL_UPDATE_LEAP_TRUE='#'
6276  INSTALL_UPDATE_LEAP_FALSE=
6277fi
6278
6279
6280
6281
6282if test -n "$ac_tool_prefix"; then
6283  for ac_prog in ar lib "link -lib"
6284  do
6285    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6286set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6288$as_echo_n "checking for $ac_word... " >&6; }
6289if ${ac_cv_prog_AR+:} false; then :
6290  $as_echo_n "(cached) " >&6
6291else
6292  if test -n "$AR"; then
6293  ac_cv_prog_AR="$AR" # Let the user override the test.
6294else
6295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6296for as_dir in $PATH
6297do
6298  IFS=$as_save_IFS
6299  test -z "$as_dir" && as_dir=.
6300    for ac_exec_ext in '' $ac_executable_extensions; do
6301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6302    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6304    break 2
6305  fi
6306done
6307  done
6308IFS=$as_save_IFS
6309
6310fi
6311fi
6312AR=$ac_cv_prog_AR
6313if test -n "$AR"; then
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6315$as_echo "$AR" >&6; }
6316else
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }
6319fi
6320
6321
6322    test -n "$AR" && break
6323  done
6324fi
6325if test -z "$AR"; then
6326  ac_ct_AR=$AR
6327  for ac_prog in ar lib "link -lib"
6328do
6329  # Extract the first word of "$ac_prog", so it can be a program name with args.
6330set dummy $ac_prog; ac_word=$2
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6332$as_echo_n "checking for $ac_word... " >&6; }
6333if ${ac_cv_prog_ac_ct_AR+:} false; then :
6334  $as_echo_n "(cached) " >&6
6335else
6336  if test -n "$ac_ct_AR"; then
6337  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6338else
6339as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340for as_dir in $PATH
6341do
6342  IFS=$as_save_IFS
6343  test -z "$as_dir" && as_dir=.
6344    for ac_exec_ext in '' $ac_executable_extensions; do
6345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6346    ac_cv_prog_ac_ct_AR="$ac_prog"
6347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6348    break 2
6349  fi
6350done
6351  done
6352IFS=$as_save_IFS
6353
6354fi
6355fi
6356ac_ct_AR=$ac_cv_prog_ac_ct_AR
6357if test -n "$ac_ct_AR"; then
6358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6359$as_echo "$ac_ct_AR" >&6; }
6360else
6361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363fi
6364
6365
6366  test -n "$ac_ct_AR" && break
6367done
6368
6369  if test "x$ac_ct_AR" = x; then
6370    AR="false"
6371  else
6372    case $cross_compiling:$ac_tool_warned in
6373yes:)
6374{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6375$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6376ac_tool_warned=yes ;;
6377esac
6378    AR=$ac_ct_AR
6379  fi
6380fi
6381
6382: ${AR=ar}
6383
6384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6385$as_echo_n "checking the archiver ($AR) interface... " >&6; }
6386if ${am_cv_ar_interface+:} false; then :
6387  $as_echo_n "(cached) " >&6
6388else
6389  ac_ext=c
6390ac_cpp='$CPP $CPPFLAGS'
6391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6393ac_compiler_gnu=$ac_cv_c_compiler_gnu
6394
6395   am_cv_ar_interface=ar
6396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397/* end confdefs.h.  */
6398int some_variable = 0;
6399_ACEOF
6400if ac_fn_c_try_compile "$LINENO"; then :
6401  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6402      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6403  (eval $am_ar_try) 2>&5
6404  ac_status=$?
6405  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6406  test $ac_status = 0; }
6407      if test "$ac_status" -eq 0; then
6408        am_cv_ar_interface=ar
6409      else
6410        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6411        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6412  (eval $am_ar_try) 2>&5
6413  ac_status=$?
6414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6415  test $ac_status = 0; }
6416        if test "$ac_status" -eq 0; then
6417          am_cv_ar_interface=lib
6418        else
6419          am_cv_ar_interface=unknown
6420        fi
6421      fi
6422      rm -f conftest.lib libconftest.a
6423
6424fi
6425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6426   ac_ext=c
6427ac_cpp='$CPP $CPPFLAGS'
6428ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6429ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6430ac_compiler_gnu=$ac_cv_c_compiler_gnu
6431
6432fi
6433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6434$as_echo "$am_cv_ar_interface" >&6; }
6435
6436case $am_cv_ar_interface in
6437ar)
6438  ;;
6439lib)
6440  # Microsoft lib, so override with the ar-lib wrapper script.
6441  # FIXME: It is wrong to rewrite AR.
6442  # But if we don't then we get into trouble of one sort or another.
6443  # A longer-term fix would be to have automake use am__AR in this case,
6444  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6445  # similar.
6446  AR="$am_aux_dir/ar-lib $AR"
6447  ;;
6448unknown)
6449  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6450  ;;
6451esac
6452
6453
6454
6455
6456
6457# Expose a cross-compilation indicator to makefiles
6458 if test $build != $host; then
6459  NTP_CROSSCOMPILE_TRUE=
6460  NTP_CROSSCOMPILE_FALSE='#'
6461else
6462  NTP_CROSSCOMPILE_TRUE='#'
6463  NTP_CROSSCOMPILE_FALSE=
6464fi
6465
6466
6467
6468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6469$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6470if ${ac_cv_path_SED+:} false; then :
6471  $as_echo_n "(cached) " >&6
6472else
6473            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6474     for ac_i in 1 2 3 4 5 6 7; do
6475       ac_script="$ac_script$as_nl$ac_script"
6476     done
6477     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6478     { ac_script=; unset ac_script;}
6479     if test -z "$SED"; then
6480  ac_path_SED_found=false
6481  # Loop through the user's path and test for each of PROGNAME-LIST
6482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483for as_dir in $PATH
6484do
6485  IFS=$as_save_IFS
6486  test -z "$as_dir" && as_dir=.
6487    for ac_prog in sed gsed; do
6488    for ac_exec_ext in '' $ac_executable_extensions; do
6489      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6490      as_fn_executable_p "$ac_path_SED" || continue
6491# Check for GNU ac_path_SED and select it if it is found.
6492  # Check for GNU $ac_path_SED
6493case `"$ac_path_SED" --version 2>&1` in
6494*GNU*)
6495  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6496*)
6497  ac_count=0
6498  $as_echo_n 0123456789 >"conftest.in"
6499  while :
6500  do
6501    cat "conftest.in" "conftest.in" >"conftest.tmp"
6502    mv "conftest.tmp" "conftest.in"
6503    cp "conftest.in" "conftest.nl"
6504    $as_echo '' >> "conftest.nl"
6505    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6506    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6507    as_fn_arith $ac_count + 1 && ac_count=$as_val
6508    if test $ac_count -gt ${ac_path_SED_max-0}; then
6509      # Best one so far, save it but keep looking for a better one
6510      ac_cv_path_SED="$ac_path_SED"
6511      ac_path_SED_max=$ac_count
6512    fi
6513    # 10*(2^10) chars as input seems more than enough
6514    test $ac_count -gt 10 && break
6515  done
6516  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6517esac
6518
6519      $ac_path_SED_found && break 3
6520    done
6521  done
6522  done
6523IFS=$as_save_IFS
6524  if test -z "$ac_cv_path_SED"; then
6525    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6526  fi
6527else
6528  ac_cv_path_SED=$SED
6529fi
6530
6531fi
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6533$as_echo "$ac_cv_path_SED" >&6; }
6534 SED="$ac_cv_path_SED"
6535  rm -f conftest.sed
6536
6537test -z "$SED" && SED=sed
6538Xsed="$SED -e 1s/^X//"
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6551$as_echo_n "checking for fgrep... " >&6; }
6552if ${ac_cv_path_FGREP+:} false; then :
6553  $as_echo_n "(cached) " >&6
6554else
6555  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6556   then ac_cv_path_FGREP="$GREP -F"
6557   else
6558     if test -z "$FGREP"; then
6559  ac_path_FGREP_found=false
6560  # Loop through the user's path and test for each of PROGNAME-LIST
6561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6563do
6564  IFS=$as_save_IFS
6565  test -z "$as_dir" && as_dir=.
6566    for ac_prog in fgrep; do
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6569      as_fn_executable_p "$ac_path_FGREP" || continue
6570# Check for GNU ac_path_FGREP and select it if it is found.
6571  # Check for GNU $ac_path_FGREP
6572case `"$ac_path_FGREP" --version 2>&1` in
6573*GNU*)
6574  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6575*)
6576  ac_count=0
6577  $as_echo_n 0123456789 >"conftest.in"
6578  while :
6579  do
6580    cat "conftest.in" "conftest.in" >"conftest.tmp"
6581    mv "conftest.tmp" "conftest.in"
6582    cp "conftest.in" "conftest.nl"
6583    $as_echo 'FGREP' >> "conftest.nl"
6584    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6585    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6586    as_fn_arith $ac_count + 1 && ac_count=$as_val
6587    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6588      # Best one so far, save it but keep looking for a better one
6589      ac_cv_path_FGREP="$ac_path_FGREP"
6590      ac_path_FGREP_max=$ac_count
6591    fi
6592    # 10*(2^10) chars as input seems more than enough
6593    test $ac_count -gt 10 && break
6594  done
6595  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6596esac
6597
6598      $ac_path_FGREP_found && break 3
6599    done
6600  done
6601  done
6602IFS=$as_save_IFS
6603  if test -z "$ac_cv_path_FGREP"; then
6604    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6605  fi
6606else
6607  ac_cv_path_FGREP=$FGREP
6608fi
6609
6610   fi
6611fi
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6613$as_echo "$ac_cv_path_FGREP" >&6; }
6614 FGREP="$ac_cv_path_FGREP"
6615
6616
6617test -z "$GREP" && GREP=grep
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6636ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6637ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6638
6639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6640$as_echo_n "checking how to print strings... " >&6; }
6641# Test print first, because it will be a builtin if present.
6642if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6643   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6644  ECHO='print -r --'
6645elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6646  ECHO='printf %s\n'
6647else
6648  # Use this function as a fallback that always works.
6649  func_fallback_echo ()
6650  {
6651    eval 'cat <<_LTECHO_EOF
6652$1
6653_LTECHO_EOF'
6654  }
6655  ECHO='func_fallback_echo'
6656fi
6657
6658# func_echo_all arg...
6659# Invoke $ECHO with all args, space-separated.
6660func_echo_all ()
6661{
6662    $ECHO ""
6663}
6664
6665case $ECHO in
6666  printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6667$as_echo "printf" >&6; } ;;
6668  print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6669$as_echo "print -r" >&6; } ;;
6670  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6671$as_echo "cat" >&6; } ;;
6672esac
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
6688if test "x$ac_cv_type_pid_t" = xyes; then :
6689
6690else
6691
6692cat >>confdefs.h <<_ACEOF
6693#define pid_t int
6694_ACEOF
6695
6696fi
6697
6698ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6699if test "x$ac_cv_type_size_t" = xyes; then :
6700
6701else
6702
6703cat >>confdefs.h <<_ACEOF
6704#define size_t unsigned int
6705_ACEOF
6706
6707fi
6708
6709
6710            # Check whether --enable-c99-snprintf was given.
6711if test "${enable_c99_snprintf+set}" = set; then :
6712  enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
6713else
6714  force_c99_snprintf=no
6715
6716fi
6717
6718    case "$force_c99_snprintf" in
6719     yes)
6720	hw_force_rpl_snprintf=yes
6721	hw_force_rpl_vsnprintf=yes
6722    esac
6723
6724
6725
6726
6727
6728
6729  for ac_header in $ac_header_list
6730do :
6731  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6732ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6733"
6734if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6735  cat >>confdefs.h <<_ACEOF
6736#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6737_ACEOF
6738
6739fi
6740
6741done
6742
6743
6744
6745
6746
6747
6748
6749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
6750$as_echo_n "checking for unsigned long long int... " >&6; }
6751if ${ac_cv_type_unsigned_long_long_int+:} false; then :
6752  $as_echo_n "(cached) " >&6
6753else
6754  ac_cv_type_unsigned_long_long_int=yes
6755     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6756       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6757/* end confdefs.h.  */
6758
6759  /* For now, do not test the preprocessor; as of 2007 there are too many
6760         implementations with broken preprocessors.  Perhaps this can
6761         be revisited in 2012.  In the meantime, code should not expect
6762         #if to work with literals wider than 32 bits.  */
6763      /* Test literals.  */
6764      long long int ll = 9223372036854775807ll;
6765      long long int nll = -9223372036854775807LL;
6766      unsigned long long int ull = 18446744073709551615ULL;
6767      /* Test constant expressions.   */
6768      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
6769                     ? 1 : -1)];
6770      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
6771                     ? 1 : -1)];
6772      int i = 63;
6773int
6774main ()
6775{
6776/* Test availability of runtime routines for shift and division.  */
6777      long long int llmax = 9223372036854775807ll;
6778      unsigned long long int ullmax = 18446744073709551615ull;
6779      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
6780              | (llmax / ll) | (llmax % ll)
6781              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
6782              | (ullmax / ull) | (ullmax % ull));
6783  ;
6784  return 0;
6785}
6786
6787_ACEOF
6788if ac_fn_c_try_link "$LINENO"; then :
6789
6790else
6791  ac_cv_type_unsigned_long_long_int=no
6792fi
6793rm -f core conftest.err conftest.$ac_objext \
6794    conftest$ac_exeext conftest.$ac_ext
6795     fi
6796fi
6797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
6798$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
6799  if test $ac_cv_type_unsigned_long_long_int = yes; then
6800
6801$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
6802
6803  fi
6804
6805
6806      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6807if test "x$ac_cv_func_vsnprintf" = xyes; then :
6808  hw_cv_func_vsnprintf=yes
6809else
6810  hw_cv_func_vsnprintf=no
6811fi
6812
6813  if test "$hw_cv_func_vsnprintf" = yes; then :
6814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
6815$as_echo_n "checking whether vsnprintf is C99 compliant... " >&6; }
6816if ${hw_cv_func_vsnprintf_c99+:} false; then :
6817  $as_echo_n "(cached) " >&6
6818else
6819  if test "$cross_compiling" = yes; then :
6820  hw_cv_func_vsnprintf_c99=no
6821else
6822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6823/* end confdefs.h.  */
6824#if HAVE_STDARG_H
6825          #include <stdarg.h>
6826          #endif
6827          #include <stdio.h>
6828          static int testprintf(char *buf, size_t size, const char *format, ...)
6829          {
6830            int result;
6831            va_list ap;
6832            va_start(ap, format);
6833            result = vsnprintf(buf, size, format, ap);
6834            va_end(ap);
6835            return result;
6836          }
6837int
6838main ()
6839{
6840char buf[43];
6841          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
6842              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
6843              buf[0] != 'T' || buf[3] != '\0')
6844            return 1;
6845  ;
6846  return 0;
6847}
6848_ACEOF
6849if ac_fn_c_try_run "$LINENO"; then :
6850  hw_cv_func_vsnprintf_c99=yes
6851else
6852  hw_cv_func_vsnprintf_c99=no
6853fi
6854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6855  conftest.$ac_objext conftest.beam conftest.$ac_ext
6856fi
6857
6858fi
6859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
6860$as_echo "$hw_cv_func_vsnprintf_c99" >&6; }
6861else
6862  hw_cv_func_vsnprintf_c99=no
6863fi
6864
6865$as_echo "#define HAVE_VSNPRINTF 1" >>confdefs.h
6866
6867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
6868$as_echo_n "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
6869  if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no; then :
6870  hw_use_rpl_vsnprintf=yes
6871else
6872  hw_use_rpl_vsnprintf=no
6873fi
6874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
6875$as_echo "$hw_use_rpl_vsnprintf" >&6; }
6876  if test "$hw_use_rpl_vsnprintf" = yes; then :
6877
6878$as_echo "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
6879
6880    if test ${hw_nodef_vsnprintf=no} = no; then :
6881
6882$as_echo "#define vsnprintf rpl_vsnprintf" >>confdefs.h
6883
6884fi
6885    for ac_header in inttypes.h locale.h stddef.h stdint.h
6886do :
6887  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6888ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6889if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6890  cat >>confdefs.h <<_ACEOF
6891#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6892_ACEOF
6893
6894fi
6895
6896done
6897
6898    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
6899"
6900if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
6901
6902cat >>confdefs.h <<_ACEOF
6903#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
6904_ACEOF
6905
6906
6907fi
6908ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
6909"
6910if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes; then :
6911
6912cat >>confdefs.h <<_ACEOF
6913#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1
6914_ACEOF
6915
6916
6917fi
6918
6919
6920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
6921$as_echo_n "checking for long double... " >&6; }
6922if ${ac_cv_type_long_double+:} false; then :
6923  $as_echo_n "(cached) " >&6
6924else
6925  if test "$GCC" = yes; then
6926       ac_cv_type_long_double=yes
6927     else
6928       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929/* end confdefs.h.  */
6930/* The Stardent Vistra knows sizeof (long double), but does
6931		 not support it.  */
6932	      long double foo = 0.0L;
6933int
6934main ()
6935{
6936static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
6937	      sizeof (double) <= sizeof (long double))];
6938test_array [0] = 0;
6939return test_array [0];
6940
6941  ;
6942  return 0;
6943}
6944_ACEOF
6945if ac_fn_c_try_compile "$LINENO"; then :
6946  ac_cv_type_long_double=yes
6947else
6948  ac_cv_type_long_double=no
6949fi
6950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6951     fi
6952fi
6953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
6954$as_echo "$ac_cv_type_long_double" >&6; }
6955  if test $ac_cv_type_long_double = yes; then
6956
6957$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
6958
6959  fi
6960
6961
6962
6963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
6964$as_echo_n "checking for long long int... " >&6; }
6965if ${ac_cv_type_long_long_int+:} false; then :
6966  $as_echo_n "(cached) " >&6
6967else
6968  ac_cv_type_long_long_int=yes
6969      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
6970        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
6971        if test $ac_cv_type_long_long_int = yes; then
6972                                        if test "$cross_compiling" = yes; then :
6973  :
6974else
6975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6976/* end confdefs.h.  */
6977#include <limits.h>
6978                 #ifndef LLONG_MAX
6979                 # define HALF \
6980                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
6981                 # define LLONG_MAX (HALF - 1 + HALF)
6982                 #endif
6983int
6984main ()
6985{
6986long long int n = 1;
6987                 int i;
6988                 for (i = 0; ; i++)
6989                   {
6990                     long long int m = n << i;
6991                     if (m >> i != n)
6992                       return 1;
6993                     if (LLONG_MAX / 2 < m)
6994                       break;
6995                   }
6996                 return 0;
6997  ;
6998  return 0;
6999}
7000_ACEOF
7001if ac_fn_c_try_run "$LINENO"; then :
7002
7003else
7004  ac_cv_type_long_long_int=no
7005fi
7006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7007  conftest.$ac_objext conftest.beam conftest.$ac_ext
7008fi
7009
7010        fi
7011      fi
7012fi
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
7014$as_echo "$ac_cv_type_long_long_int" >&6; }
7015  if test $ac_cv_type_long_long_int = yes; then
7016
7017$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
7018
7019  fi
7020
7021
7022  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
7023$as_echo_n "checking for unsigned long long int... " >&6; }
7024if ${ac_cv_type_unsigned_long_long_int+:} false; then :
7025  $as_echo_n "(cached) " >&6
7026else
7027  ac_cv_type_unsigned_long_long_int=yes
7028     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
7029       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030/* end confdefs.h.  */
7031
7032  /* For now, do not test the preprocessor; as of 2007 there are too many
7033         implementations with broken preprocessors.  Perhaps this can
7034         be revisited in 2012.  In the meantime, code should not expect
7035         #if to work with literals wider than 32 bits.  */
7036      /* Test literals.  */
7037      long long int ll = 9223372036854775807ll;
7038      long long int nll = -9223372036854775807LL;
7039      unsigned long long int ull = 18446744073709551615ULL;
7040      /* Test constant expressions.   */
7041      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
7042                     ? 1 : -1)];
7043      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
7044                     ? 1 : -1)];
7045      int i = 63;
7046int
7047main ()
7048{
7049/* Test availability of runtime routines for shift and division.  */
7050      long long int llmax = 9223372036854775807ll;
7051      unsigned long long int ullmax = 18446744073709551615ull;
7052      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
7053              | (llmax / ll) | (llmax % ll)
7054              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
7055              | (ullmax / ull) | (ullmax % ull));
7056  ;
7057  return 0;
7058}
7059
7060_ACEOF
7061if ac_fn_c_try_link "$LINENO"; then :
7062
7063else
7064  ac_cv_type_unsigned_long_long_int=no
7065fi
7066rm -f core conftest.err conftest.$ac_objext \
7067    conftest$ac_exeext conftest.$ac_ext
7068     fi
7069fi
7070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
7071$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
7072  if test $ac_cv_type_unsigned_long_long_int = yes; then
7073
7074$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
7075
7076  fi
7077
7078    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7079if test "x$ac_cv_type_size_t" = xyes; then :
7080
7081else
7082
7083cat >>confdefs.h <<_ACEOF
7084#define size_t unsigned int
7085_ACEOF
7086
7087fi
7088
7089
7090
7091  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
7092if test "x$ac_cv_type_intmax_t" = xyes; then :
7093
7094$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
7095
7096else
7097  test $ac_cv_type_long_long_int = yes \
7098       && ac_type='long long int' \
7099       || ac_type='long int'
7100
7101cat >>confdefs.h <<_ACEOF
7102#define intmax_t $ac_type
7103_ACEOF
7104
7105fi
7106
7107
7108
7109
7110  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
7111if test "x$ac_cv_type_uintmax_t" = xyes; then :
7112
7113$as_echo "#define HAVE_UINTMAX_T 1" >>confdefs.h
7114
7115else
7116  test $ac_cv_type_unsigned_long_long_int = yes \
7117       && ac_type='unsigned long long int' \
7118       || ac_type='unsigned long int'
7119
7120cat >>confdefs.h <<_ACEOF
7121#define uintmax_t $ac_type
7122_ACEOF
7123
7124fi
7125
7126
7127
7128  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
7129if test "x$ac_cv_type_uintptr_t" = xyes; then :
7130
7131$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
7132
7133else
7134  for ac_type in 'unsigned int' 'unsigned long int' \
7135	'unsigned long long int'; do
7136       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7137/* end confdefs.h.  */
7138$ac_includes_default
7139int
7140main ()
7141{
7142static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
7143test_array [0] = 0;
7144return test_array [0];
7145
7146  ;
7147  return 0;
7148}
7149_ACEOF
7150if ac_fn_c_try_compile "$LINENO"; then :
7151
7152cat >>confdefs.h <<_ACEOF
7153#define uintptr_t $ac_type
7154_ACEOF
7155
7156	  ac_type=
7157fi
7158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7159       test -z "$ac_type" && break
7160     done
7161fi
7162
7163
7164    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
7165if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
7166
7167cat >>confdefs.h <<_ACEOF
7168#define HAVE_PTRDIFF_T 1
7169_ACEOF
7170
7171
7172fi
7173
7174    for ac_func in localeconv
7175do :
7176  ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
7177if test "x$ac_cv_func_localeconv" = xyes; then :
7178  cat >>confdefs.h <<_ACEOF
7179#define HAVE_LOCALECONV 1
7180_ACEOF
7181
7182fi
7183done
7184
7185
7186  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7188$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7189if ${ac_cv_c_const+:} false; then :
7190  $as_echo_n "(cached) " >&6
7191else
7192  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7193/* end confdefs.h.  */
7194
7195int
7196main ()
7197{
7198
7199#ifndef __cplusplus
7200  /* Ultrix mips cc rejects this sort of thing.  */
7201  typedef int charset[2];
7202  const charset cs = { 0, 0 };
7203  /* SunOS 4.1.1 cc rejects this.  */
7204  char const *const *pcpcc;
7205  char **ppc;
7206  /* NEC SVR4.0.2 mips cc rejects this.  */
7207  struct point {int x, y;};
7208  static struct point const zero = {0,0};
7209  /* AIX XL C 1.02.0.0 rejects this.
7210     It does not let you subtract one const X* pointer from another in
7211     an arm of an if-expression whose if-part is not a constant
7212     expression */
7213  const char *g = "string";
7214  pcpcc = &g + (g ? g-g : 0);
7215  /* HPUX 7.0 cc rejects these. */
7216  ++pcpcc;
7217  ppc = (char**) pcpcc;
7218  pcpcc = (char const *const *) ppc;
7219  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7220    char tx;
7221    char *t = &tx;
7222    char const *s = 0 ? (char *) 0 : (char const *) 0;
7223
7224    *t++ = 0;
7225    if (s) return 0;
7226  }
7227  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7228    int x[] = {25, 17};
7229    const int *foo = &x[0];
7230    ++foo;
7231  }
7232  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7233    typedef const int *iptr;
7234    iptr p = 0;
7235    ++p;
7236  }
7237  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7238       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7239    struct s { int j; const int *ap[3]; } bx;
7240    struct s *b = &bx; b->j = 5;
7241  }
7242  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7243    const int foo = 10;
7244    if (!foo) return 0;
7245  }
7246  return !cs[0] && !zero.x;
7247#endif
7248
7249  ;
7250  return 0;
7251}
7252_ACEOF
7253if ac_fn_c_try_compile "$LINENO"; then :
7254  ac_cv_c_const=yes
7255else
7256  ac_cv_c_const=no
7257fi
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259fi
7260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7261$as_echo "$ac_cv_c_const" >&6; }
7262if test $ac_cv_c_const = no; then
7263
7264$as_echo "#define const /**/" >>confdefs.h
7265
7266fi
7267
7268
7269
7270
7271    case " $LIBOBJS " in
7272  *" snprintf.$ac_objext "* ) ;;
7273  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7274 ;;
7275esac
7276
7277    _hw_cv_func_xprintf_replace_done=yes
7278fi
7279
7280fi
7281
7282
7283    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
7284if test "x$ac_cv_func_snprintf" = xyes; then :
7285  hw_cv_func_snprintf=yes
7286else
7287  hw_cv_func_snprintf=no
7288fi
7289
7290  if test "$hw_cv_func_snprintf" = yes; then :
7291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
7292$as_echo_n "checking whether snprintf is C99 compliant... " >&6; }
7293if ${hw_cv_func_snprintf_c99+:} false; then :
7294  $as_echo_n "(cached) " >&6
7295else
7296  if test "$cross_compiling" = yes; then :
7297  hw_cv_func_snprintf_c99=no
7298else
7299  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7300/* end confdefs.h.  */
7301#include <stdio.h>
7302int
7303main ()
7304{
7305char buf[43];
7306          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
7307              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
7308              buf[0] != 'T' || buf[3] != '\0')
7309            return 1;
7310  ;
7311  return 0;
7312}
7313_ACEOF
7314if ac_fn_c_try_run "$LINENO"; then :
7315  hw_cv_func_snprintf_c99=yes
7316else
7317  hw_cv_func_snprintf_c99=no
7318fi
7319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7320  conftest.$ac_objext conftest.beam conftest.$ac_ext
7321fi
7322
7323fi
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
7325$as_echo "$hw_cv_func_snprintf_c99" >&6; }
7326else
7327  hw_cv_func_snprintf_c99=no
7328fi
7329
7330$as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
7331
7332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
7333$as_echo_n "checking if C99-snprintf replacement snprintf will be used... " >&6; }
7334  if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no; then :
7335  hw_use_rpl_snprintf=yes
7336else
7337  hw_use_rpl_snprintf=no
7338fi
7339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
7340$as_echo "$hw_use_rpl_snprintf" >&6; }
7341  if test "$hw_use_rpl_snprintf" = yes; then :
7342
7343$as_echo "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
7344
7345    if test ${hw_nodef_snprintf=no} = no; then :
7346
7347$as_echo "#define snprintf rpl_snprintf" >>confdefs.h
7348
7349fi
7350
7351  if test "x$_hw_cv_func_xprintf_replace_done" != xyes; then :
7352  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
7353$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
7354if ${ac_cv_c_const+:} false; then :
7355  $as_echo_n "(cached) " >&6
7356else
7357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7358/* end confdefs.h.  */
7359
7360int
7361main ()
7362{
7363
7364#ifndef __cplusplus
7365  /* Ultrix mips cc rejects this sort of thing.  */
7366  typedef int charset[2];
7367  const charset cs = { 0, 0 };
7368  /* SunOS 4.1.1 cc rejects this.  */
7369  char const *const *pcpcc;
7370  char **ppc;
7371  /* NEC SVR4.0.2 mips cc rejects this.  */
7372  struct point {int x, y;};
7373  static struct point const zero = {0,0};
7374  /* AIX XL C 1.02.0.0 rejects this.
7375     It does not let you subtract one const X* pointer from another in
7376     an arm of an if-expression whose if-part is not a constant
7377     expression */
7378  const char *g = "string";
7379  pcpcc = &g + (g ? g-g : 0);
7380  /* HPUX 7.0 cc rejects these. */
7381  ++pcpcc;
7382  ppc = (char**) pcpcc;
7383  pcpcc = (char const *const *) ppc;
7384  { /* SCO 3.2v4 cc rejects this sort of thing.  */
7385    char tx;
7386    char *t = &tx;
7387    char const *s = 0 ? (char *) 0 : (char const *) 0;
7388
7389    *t++ = 0;
7390    if (s) return 0;
7391  }
7392  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
7393    int x[] = {25, 17};
7394    const int *foo = &x[0];
7395    ++foo;
7396  }
7397  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
7398    typedef const int *iptr;
7399    iptr p = 0;
7400    ++p;
7401  }
7402  { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
7403       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
7404    struct s { int j; const int *ap[3]; } bx;
7405    struct s *b = &bx; b->j = 5;
7406  }
7407  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
7408    const int foo = 10;
7409    if (!foo) return 0;
7410  }
7411  return !cs[0] && !zero.x;
7412#endif
7413
7414  ;
7415  return 0;
7416}
7417_ACEOF
7418if ac_fn_c_try_compile "$LINENO"; then :
7419  ac_cv_c_const=yes
7420else
7421  ac_cv_c_const=no
7422fi
7423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7424fi
7425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
7426$as_echo "$ac_cv_c_const" >&6; }
7427if test $ac_cv_c_const = no; then
7428
7429$as_echo "#define const /**/" >>confdefs.h
7430
7431fi
7432
7433
7434
7435
7436    case " $LIBOBJS " in
7437  *" snprintf.$ac_objext "* ) ;;
7438  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
7439 ;;
7440esac
7441
7442    _hw_cv_func_xprintf_replace_done=yes
7443fi
7444
7445fi
7446
7447
7448
7449
7450
7451# HMS: Save $LIBS and empty it.
7452# any LIBS we add here should go in to LDADD_LIBNTP
7453
7454__LIBS=$LIBS
7455LIBS=
7456
7457
7458
7459# [Bug 2332] because we need to know if we are using GNU ld...
7460
7461
7462# Check whether --with-gnu-ld was given.
7463if test "${with_gnu_ld+set}" = set; then :
7464  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7465else
7466  with_gnu_ld=no
7467fi
7468
7469ac_prog=ld
7470if test yes = "$GCC"; then
7471  # Check if gcc -print-prog-name=ld gives a path.
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7473$as_echo_n "checking for ld used by $CC... " >&6; }
7474  case $host in
7475  *-*-mingw*)
7476    # gcc leaves a trailing carriage return, which upsets mingw
7477    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7478  *)
7479    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7480  esac
7481  case $ac_prog in
7482    # Accept absolute paths.
7483    [\\/]* | ?:[\\/]*)
7484      re_direlt='/[^/][^/]*/\.\./'
7485      # Canonicalize the pathname of ld
7486      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7487      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7488	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7489      done
7490      test -z "$LD" && LD=$ac_prog
7491      ;;
7492  "")
7493    # If it fails, then pretend we aren't using GCC.
7494    ac_prog=ld
7495    ;;
7496  *)
7497    # If it is relative, then search for the first ld in PATH.
7498    with_gnu_ld=unknown
7499    ;;
7500  esac
7501elif test yes = "$with_gnu_ld"; then
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7503$as_echo_n "checking for GNU ld... " >&6; }
7504else
7505  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7506$as_echo_n "checking for non-GNU ld... " >&6; }
7507fi
7508if ${lt_cv_path_LD+:} false; then :
7509  $as_echo_n "(cached) " >&6
7510else
7511  if test -z "$LD"; then
7512  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7513  for ac_dir in $PATH; do
7514    IFS=$lt_save_ifs
7515    test -z "$ac_dir" && ac_dir=.
7516    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7517      lt_cv_path_LD=$ac_dir/$ac_prog
7518      # Check to see if the program is GNU ld.  I'd rather use --version,
7519      # but apparently some variants of GNU ld only accept -v.
7520      # Break only if it was the GNU/non-GNU ld that we prefer.
7521      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7522      *GNU* | *'with BFD'*)
7523	test no != "$with_gnu_ld" && break
7524	;;
7525      *)
7526	test yes != "$with_gnu_ld" && break
7527	;;
7528      esac
7529    fi
7530  done
7531  IFS=$lt_save_ifs
7532else
7533  lt_cv_path_LD=$LD # Let the user override the test with a path.
7534fi
7535fi
7536
7537LD=$lt_cv_path_LD
7538if test -n "$LD"; then
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7540$as_echo "$LD" >&6; }
7541else
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7543$as_echo "no" >&6; }
7544fi
7545test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7547$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
7548if ${lt_cv_prog_gnu_ld+:} false; then :
7549  $as_echo_n "(cached) " >&6
7550else
7551  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7552case `$LD -v 2>&1 </dev/null` in
7553*GNU* | *'with BFD'*)
7554  lt_cv_prog_gnu_ld=yes
7555  ;;
7556*)
7557  lt_cv_prog_gnu_ld=no
7558  ;;
7559esac
7560fi
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7562$as_echo "$lt_cv_prog_gnu_ld" >&6; }
7563with_gnu_ld=$lt_cv_prog_gnu_ld
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
7576$as_echo_n "checking for directory path separator... " >&6; }
7577if ${ntp_cv_dir_sep+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580
7581	case "$ntp_cv_dir_sep" in
7582	 '')
7583	    case "$host_os" in
7584	     *djgpp | *mingw32* | *emx*)
7585		ntp_cv_dir_sep="'\\'"
7586		;;
7587	     *)
7588		ntp_cv_dir_sep="'/'"
7589		;;
7590	    esac
7591	esac
7592
7593
7594fi
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
7596$as_echo "$ntp_cv_dir_sep" >&6; }
7597
7598cat >>confdefs.h <<_ACEOF
7599#define DIR_SEP $ntp_cv_dir_sep
7600_ACEOF
7601
7602
7603
7604    NTP_ORIG_LIBS="$LIBS"
7605
7606# Check whether --with-lineeditlibs was given.
7607if test "${with_lineeditlibs+set}" = set; then :
7608  withval=$with_lineeditlibs; use_lineeditlibs="$withval"
7609else
7610  use_lineeditlibs="edit,editline"
7611
7612fi
7613
7614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
7615$as_echo_n "checking line editing libraries... " >&6; }
7616    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
7617$as_echo "$use_lineeditlibs" >&6; }
7618    case "$use_lineeditlibs" in
7619     no)
7620	ntp_lib_lineedit=no
7621	;;
7622     *)
7623	for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
7624	    for term_lib in "" termcap curses ncurses; do
7625		case "$term_lib" in
7626		 '')
7627		    TRY_LIB="-l$lineedit_lib"
7628		    ;;
7629		 *)
7630		    TRY_LIB="-l$lineedit_lib -l$term_lib"
7631		    ;;
7632		esac
7633		LIBS="$NTP_ORIG_LIBS $TRY_LIB"
7634		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
7635$as_echo_n "checking for readline() with $TRY_LIB... " >&6; }
7636		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7637/* end confdefs.h.  */
7638
7639/* Override any GCC internal prototype to avoid an error.
7640   Use char because int might match the return type of a GCC
7641   builtin and then its argument prototype would still apply.  */
7642#ifdef __cplusplus
7643extern "C"
7644#endif
7645char readline ();
7646int
7647main ()
7648{
7649return readline ();
7650  ;
7651  return 0;
7652}
7653_ACEOF
7654if ac_fn_c_try_link "$LINENO"; then :
7655  ntp_lib_lineedit="$TRY_LIB"
7656fi
7657rm -f core conftest.err conftest.$ac_objext \
7658    conftest$ac_exeext conftest.$ac_ext
7659		case "$ntp_lib_lineedit" in
7660		 '')
7661		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7662$as_echo "no" >&6; }
7663		    ;;
7664		 *)
7665		    # Use readline()
7666		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7667$as_echo "yes" >&6; }
7668		    break
7669		esac
7670		case "$term_lib" in
7671		 '')
7672		    # do not try el_gets without a terminal library
7673		    ;;
7674		 *)
7675		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
7676$as_echo_n "checking for el_gets() with $TRY_LIB... " >&6; }
7677		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7678/* end confdefs.h.  */
7679
7680/* Override any GCC internal prototype to avoid an error.
7681   Use char because int might match the return type of a GCC
7682   builtin and then its argument prototype would still apply.  */
7683#ifdef __cplusplus
7684extern "C"
7685#endif
7686char el_gets ();
7687int
7688main ()
7689{
7690return el_gets ();
7691  ;
7692  return 0;
7693}
7694_ACEOF
7695if ac_fn_c_try_link "$LINENO"; then :
7696  ntp_lib_lineedit="$TRY_LIB"
7697fi
7698rm -f core conftest.err conftest.$ac_objext \
7699    conftest$ac_exeext conftest.$ac_ext
7700		    case "$ntp_lib_lineedit" in
7701		     '')
7702			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7703$as_echo "no" >&6; }
7704			;;
7705		     *) # Use el_gets()
7706			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7707$as_echo "yes" >&6; }
7708			break
7709			;;
7710		    esac	# $ntp_lib_lineedit
7711		esac		# $term_lib
7712	    done
7713	    case "$ntp_lib_lineedit" in
7714	     '')
7715		;;
7716	     *)
7717		break
7718		;;
7719	    esac
7720	done
7721	LIBS="$NTP_ORIG_LIBS"
7722	;;
7723    esac	# $use_lineeditlibs
7724
7725    case "$ntp_lib_lineedit" in
7726     '')
7727	ntp_lib_lineedit="no"
7728	;;
7729     no)
7730	;;
7731     *)
7732	EDITLINE_LIBS="$ntp_lib_lineedit"
7733
7734	;;
7735    esac	# $ntp_lib_lineedit
7736
7737    case "$ntp_lib_lineedit" in
7738     no)
7739	;;
7740     *)
7741	for ac_header in readline.h readline/readline.h histedit.h
7742do :
7743  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7744ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7745if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7746  cat >>confdefs.h <<_ACEOF
7747#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7748_ACEOF
7749
7750fi
7751
7752done
7753
7754	for ac_header in history.h readline/history.h
7755do :
7756  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7757ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7758if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7759  cat >>confdefs.h <<_ACEOF
7760#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7761_ACEOF
7762
7763fi
7764
7765done
7766
7767
7768	case "$ac_cv_header_histedit_h" in
7769	 yes)
7770	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
7771$as_echo_n "checking number of arguments to el_init()... " >&6; }
7772if ${ntp_cv_el_init_args+:} false; then :
7773  $as_echo_n "(cached) " >&6
7774else
7775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7776/* end confdefs.h.  */
7777
7778			    #include <stdio.h>
7779			    #include <histedit.h>
7780
7781int
7782main ()
7783{
7784
7785			    el_init("conftest", stdin, stdout, stderr);
7786
7787
7788  ;
7789  return 0;
7790}
7791_ACEOF
7792if ac_fn_c_try_compile "$LINENO"; then :
7793  ntp_cv_el_init_args=4
7794else
7795  ntp_cv_el_init_args=3
7796
7797fi
7798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7799
7800fi
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
7802$as_echo "$ntp_cv_el_init_args" >&6; }
7803
7804cat >>confdefs.h <<_ACEOF
7805#define EL_INIT_ARGS $ntp_cv_el_init_args
7806_ACEOF
7807
7808	esac
7809
7810	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
7811$as_echo_n "checking whether readline supports history... " >&6; }
7812
7813	ntp_lib_lineedit_history="no"
7814	ORIG_LIBS="$LIBS"
7815	LIBS="$ORIG_LIBS $ntp_lib_lineedit"
7816	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7817/* end confdefs.h.  */
7818
7819/* Override any GCC internal prototype to avoid an error.
7820   Use char because int might match the return type of a GCC
7821   builtin and then its argument prototype would still apply.  */
7822#ifdef __cplusplus
7823extern "C"
7824#endif
7825char add_history ();
7826int
7827main ()
7828{
7829return add_history ();
7830  ;
7831  return 0;
7832}
7833_ACEOF
7834if ac_fn_c_try_link "$LINENO"; then :
7835  ntp_lib_lineedit_history="yes"
7836fi
7837rm -f core conftest.err conftest.$ac_objext \
7838    conftest$ac_exeext conftest.$ac_ext
7839	LIBS="$ORIG_LIBS"
7840
7841	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
7842$as_echo "$ntp_lib_lineedit_history" >&6; }
7843
7844	case "$ntp_lib_lineedit_history" in
7845	 yes)
7846
7847$as_echo "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
7848
7849	esac
7850    esac	# $ntp_lib_lineedit
7851    { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
7852    { ORIG_LIBS=; unset ORIG_LIBS;}
7853    { TRY_LIB=; unset TRY_LIB;}
7854    { use_lineeditlibs=; unset use_lineeditlibs;}
7855
7856
7857LIBM=
7858case "$host" in
7859 *-*-darwin*)
7860    ;;
7861 *)
7862    _libs=$LIBS
7863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
7864$as_echo_n "checking for library containing cos... " >&6; }
7865if ${ac_cv_search_cos+:} false; then :
7866  $as_echo_n "(cached) " >&6
7867else
7868  ac_func_search_save_LIBS=$LIBS
7869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7870/* end confdefs.h.  */
7871
7872/* Override any GCC internal prototype to avoid an error.
7873   Use char because int might match the return type of a GCC
7874   builtin and then its argument prototype would still apply.  */
7875#ifdef __cplusplus
7876extern "C"
7877#endif
7878char cos ();
7879int
7880main ()
7881{
7882return cos ();
7883  ;
7884  return 0;
7885}
7886_ACEOF
7887for ac_lib in '' m; do
7888  if test -z "$ac_lib"; then
7889    ac_res="none required"
7890  else
7891    ac_res=-l$ac_lib
7892    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
7893  fi
7894  if ac_fn_c_try_link "$LINENO"; then :
7895  ac_cv_search_cos=$ac_res
7896fi
7897rm -f core conftest.err conftest.$ac_objext \
7898    conftest$ac_exeext
7899  if ${ac_cv_search_cos+:} false; then :
7900  break
7901fi
7902done
7903if ${ac_cv_search_cos+:} false; then :
7904
7905else
7906  ac_cv_search_cos=no
7907fi
7908rm conftest.$ac_ext
7909LIBS=$ac_func_search_save_LIBS
7910fi
7911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
7912$as_echo "$ac_cv_search_cos" >&6; }
7913ac_res=$ac_cv_search_cos
7914if test "$ac_res" != no; then :
7915  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7916  LIBM="-lm"
7917fi
7918
7919    LIBS=$_libs
7920    ;;
7921esac
7922
7923{ _libs=; unset _libs;}
7924
7925
7926for ac_header in vfork.h
7927do :
7928  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
7929if test "x$ac_cv_header_vfork_h" = xyes; then :
7930  cat >>confdefs.h <<_ACEOF
7931#define HAVE_VFORK_H 1
7932_ACEOF
7933
7934fi
7935
7936done
7937
7938for ac_func in fork vfork
7939do :
7940  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7941ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7942if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7943  cat >>confdefs.h <<_ACEOF
7944#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7945_ACEOF
7946
7947fi
7948done
7949
7950if test "x$ac_cv_func_fork" = xyes; then
7951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
7952$as_echo_n "checking for working fork... " >&6; }
7953if ${ac_cv_func_fork_works+:} false; then :
7954  $as_echo_n "(cached) " >&6
7955else
7956  if test "$cross_compiling" = yes; then :
7957  ac_cv_func_fork_works=cross
7958else
7959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7960/* end confdefs.h.  */
7961$ac_includes_default
7962int
7963main ()
7964{
7965
7966	  /* By Ruediger Kuhlmann. */
7967	  return fork () < 0;
7968
7969  ;
7970  return 0;
7971}
7972_ACEOF
7973if ac_fn_c_try_run "$LINENO"; then :
7974  ac_cv_func_fork_works=yes
7975else
7976  ac_cv_func_fork_works=no
7977fi
7978rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7979  conftest.$ac_objext conftest.beam conftest.$ac_ext
7980fi
7981
7982fi
7983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
7984$as_echo "$ac_cv_func_fork_works" >&6; }
7985
7986else
7987  ac_cv_func_fork_works=$ac_cv_func_fork
7988fi
7989if test "x$ac_cv_func_fork_works" = xcross; then
7990  case $host in
7991    *-*-amigaos* | *-*-msdosdjgpp*)
7992      # Override, as these systems have only a dummy fork() stub
7993      ac_cv_func_fork_works=no
7994      ;;
7995    *)
7996      ac_cv_func_fork_works=yes
7997      ;;
7998  esac
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
8000$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
8001fi
8002ac_cv_func_vfork_works=$ac_cv_func_vfork
8003if test "x$ac_cv_func_vfork" = xyes; then
8004  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
8005$as_echo_n "checking for working vfork... " >&6; }
8006if ${ac_cv_func_vfork_works+:} false; then :
8007  $as_echo_n "(cached) " >&6
8008else
8009  if test "$cross_compiling" = yes; then :
8010  ac_cv_func_vfork_works=cross
8011else
8012  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013/* end confdefs.h.  */
8014/* Thanks to Paul Eggert for this test.  */
8015$ac_includes_default
8016#include <sys/wait.h>
8017#ifdef HAVE_VFORK_H
8018# include <vfork.h>
8019#endif
8020/* On some sparc systems, changes by the child to local and incoming
8021   argument registers are propagated back to the parent.  The compiler
8022   is told about this with #include <vfork.h>, but some compilers
8023   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
8024   static variable whose address is put into a register that is
8025   clobbered by the vfork.  */
8026static void
8027#ifdef __cplusplus
8028sparc_address_test (int arg)
8029# else
8030sparc_address_test (arg) int arg;
8031#endif
8032{
8033  static pid_t child;
8034  if (!child) {
8035    child = vfork ();
8036    if (child < 0) {
8037      perror ("vfork");
8038      _exit(2);
8039    }
8040    if (!child) {
8041      arg = getpid();
8042      write(-1, "", 0);
8043      _exit (arg);
8044    }
8045  }
8046}
8047
8048int
8049main ()
8050{
8051  pid_t parent = getpid ();
8052  pid_t child;
8053
8054  sparc_address_test (0);
8055
8056  child = vfork ();
8057
8058  if (child == 0) {
8059    /* Here is another test for sparc vfork register problems.  This
8060       test uses lots of local variables, at least as many local
8061       variables as main has allocated so far including compiler
8062       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
8063       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
8064       reuse the register of parent for one of the local variables,
8065       since it will think that parent can't possibly be used any more
8066       in this routine.  Assigning to the local variable will thus
8067       munge parent in the parent process.  */
8068    pid_t
8069      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8070      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8071    /* Convince the compiler that p..p7 are live; otherwise, it might
8072       use the same hardware register for all 8 local variables.  */
8073    if (p != p1 || p != p2 || p != p3 || p != p4
8074	|| p != p5 || p != p6 || p != p7)
8075      _exit(1);
8076
8077    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
8078       from child file descriptors.  If the child closes a descriptor
8079       before it execs or exits, this munges the parent's descriptor
8080       as well.  Test for this by closing stdout in the child.  */
8081    _exit(close(fileno(stdout)) != 0);
8082  } else {
8083    int status;
8084    struct stat st;
8085
8086    while (wait(&status) != child)
8087      ;
8088    return (
8089	 /* Was there some problem with vforking?  */
8090	 child < 0
8091
8092	 /* Did the child fail?  (This shouldn't happen.)  */
8093	 || status
8094
8095	 /* Did the vfork/compiler bug occur?  */
8096	 || parent != getpid()
8097
8098	 /* Did the file descriptor bug occur?  */
8099	 || fstat(fileno(stdout), &st) != 0
8100	 );
8101  }
8102}
8103_ACEOF
8104if ac_fn_c_try_run "$LINENO"; then :
8105  ac_cv_func_vfork_works=yes
8106else
8107  ac_cv_func_vfork_works=no
8108fi
8109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8110  conftest.$ac_objext conftest.beam conftest.$ac_ext
8111fi
8112
8113fi
8114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
8115$as_echo "$ac_cv_func_vfork_works" >&6; }
8116
8117fi;
8118if test "x$ac_cv_func_fork_works" = xcross; then
8119  ac_cv_func_vfork_works=$ac_cv_func_vfork
8120  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
8121$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
8122fi
8123
8124if test "x$ac_cv_func_vfork_works" = xyes; then
8125
8126$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
8127
8128else
8129
8130$as_echo "#define vfork fork" >>confdefs.h
8131
8132fi
8133if test "x$ac_cv_func_fork_works" = xyes; then
8134
8135$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
8136
8137fi
8138
8139# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8140# for constant arguments.  Useless!
8141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8142$as_echo_n "checking for working alloca.h... " >&6; }
8143if ${ac_cv_working_alloca_h+:} false; then :
8144  $as_echo_n "(cached) " >&6
8145else
8146  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8147/* end confdefs.h.  */
8148#include <alloca.h>
8149int
8150main ()
8151{
8152char *p = (char *) alloca (2 * sizeof (int));
8153			  if (p) return 0;
8154  ;
8155  return 0;
8156}
8157_ACEOF
8158if ac_fn_c_try_link "$LINENO"; then :
8159  ac_cv_working_alloca_h=yes
8160else
8161  ac_cv_working_alloca_h=no
8162fi
8163rm -f core conftest.err conftest.$ac_objext \
8164    conftest$ac_exeext conftest.$ac_ext
8165fi
8166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8167$as_echo "$ac_cv_working_alloca_h" >&6; }
8168if test $ac_cv_working_alloca_h = yes; then
8169
8170$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8171
8172fi
8173
8174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8175$as_echo_n "checking for alloca... " >&6; }
8176if ${ac_cv_func_alloca_works+:} false; then :
8177  $as_echo_n "(cached) " >&6
8178else
8179  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h.  */
8181#ifdef __GNUC__
8182# define alloca __builtin_alloca
8183#else
8184# ifdef _MSC_VER
8185#  include <malloc.h>
8186#  define alloca _alloca
8187# else
8188#  ifdef HAVE_ALLOCA_H
8189#   include <alloca.h>
8190#  else
8191#   ifdef _AIX
8192 #pragma alloca
8193#   else
8194#    ifndef alloca /* predefined by HP cc +Olibcalls */
8195void *alloca (size_t);
8196#    endif
8197#   endif
8198#  endif
8199# endif
8200#endif
8201
8202int
8203main ()
8204{
8205char *p = (char *) alloca (1);
8206				    if (p) return 0;
8207  ;
8208  return 0;
8209}
8210_ACEOF
8211if ac_fn_c_try_link "$LINENO"; then :
8212  ac_cv_func_alloca_works=yes
8213else
8214  ac_cv_func_alloca_works=no
8215fi
8216rm -f core conftest.err conftest.$ac_objext \
8217    conftest$ac_exeext conftest.$ac_ext
8218fi
8219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8220$as_echo "$ac_cv_func_alloca_works" >&6; }
8221
8222if test $ac_cv_func_alloca_works = yes; then
8223
8224$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8225
8226else
8227  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8228# that cause trouble.  Some versions do not even contain alloca or
8229# contain a buggy version.  If you still want to use their alloca,
8230# use ar to extract alloca.o from them instead of compiling alloca.c.
8231
8232ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8233
8234$as_echo "#define C_ALLOCA 1" >>confdefs.h
8235
8236
8237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8238$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8239if ${ac_cv_os_cray+:} false; then :
8240  $as_echo_n "(cached) " >&6
8241else
8242  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8243/* end confdefs.h.  */
8244#if defined CRAY && ! defined CRAY2
8245webecray
8246#else
8247wenotbecray
8248#endif
8249
8250_ACEOF
8251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8252  $EGREP "webecray" >/dev/null 2>&1; then :
8253  ac_cv_os_cray=yes
8254else
8255  ac_cv_os_cray=no
8256fi
8257rm -f conftest*
8258
8259fi
8260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8261$as_echo "$ac_cv_os_cray" >&6; }
8262if test $ac_cv_os_cray = yes; then
8263  for ac_func in _getb67 GETB67 getb67; do
8264    as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8265ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8266if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8267
8268cat >>confdefs.h <<_ACEOF
8269#define CRAY_STACKSEG_END $ac_func
8270_ACEOF
8271
8272    break
8273fi
8274
8275  done
8276fi
8277
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8279$as_echo_n "checking stack direction for C alloca... " >&6; }
8280if ${ac_cv_c_stack_direction+:} false; then :
8281  $as_echo_n "(cached) " >&6
8282else
8283  if test "$cross_compiling" = yes; then :
8284  ac_cv_c_stack_direction=0
8285else
8286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8287/* end confdefs.h.  */
8288$ac_includes_default
8289int
8290find_stack_direction (int *addr, int depth)
8291{
8292  int dir, dummy = 0;
8293  if (! addr)
8294    addr = &dummy;
8295  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8296  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8297  return dir + dummy;
8298}
8299
8300int
8301main (int argc, char **argv)
8302{
8303  return find_stack_direction (0, argc + !argv + 20) < 0;
8304}
8305_ACEOF
8306if ac_fn_c_try_run "$LINENO"; then :
8307  ac_cv_c_stack_direction=1
8308else
8309  ac_cv_c_stack_direction=-1
8310fi
8311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8312  conftest.$ac_objext conftest.beam conftest.$ac_ext
8313fi
8314
8315fi
8316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8317$as_echo "$ac_cv_c_stack_direction" >&6; }
8318cat >>confdefs.h <<_ACEOF
8319#define STACK_DIRECTION $ac_cv_c_stack_direction
8320_ACEOF
8321
8322
8323fi
8324
8325ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
8326if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
8327  ac_have_decl=1
8328else
8329  ac_have_decl=0
8330fi
8331
8332cat >>confdefs.h <<_ACEOF
8333#define HAVE_DECL_STRERROR_R $ac_have_decl
8334_ACEOF
8335
8336for ac_func in strerror_r
8337do :
8338  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
8339if test "x$ac_cv_func_strerror_r" = xyes; then :
8340  cat >>confdefs.h <<_ACEOF
8341#define HAVE_STRERROR_R 1
8342_ACEOF
8343
8344fi
8345done
8346
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
8348$as_echo_n "checking whether strerror_r returns char *... " >&6; }
8349if ${ac_cv_func_strerror_r_char_p+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352
8353    ac_cv_func_strerror_r_char_p=no
8354    if test $ac_cv_have_decl_strerror_r = yes; then
8355      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8356/* end confdefs.h.  */
8357$ac_includes_default
8358int
8359main ()
8360{
8361
8362	  char buf[100];
8363	  char x = *strerror_r (0, buf, sizeof buf);
8364	  char *p = strerror_r (0, buf, sizeof buf);
8365	  return !p || x;
8366
8367  ;
8368  return 0;
8369}
8370_ACEOF
8371if ac_fn_c_try_compile "$LINENO"; then :
8372  ac_cv_func_strerror_r_char_p=yes
8373fi
8374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8375    else
8376      # strerror_r is not declared.  Choose between
8377      # systems that have relatively inaccessible declarations for the
8378      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
8379      # former has a strerror_r that returns char*, while the latter
8380      # has a strerror_r that returns `int'.
8381      # This test should segfault on the DEC system.
8382      if test "$cross_compiling" = yes; then :
8383  :
8384else
8385  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8386/* end confdefs.h.  */
8387$ac_includes_default
8388	extern char *strerror_r ();
8389int
8390main ()
8391{
8392char buf[100];
8393	  char x = *strerror_r (0, buf, sizeof buf);
8394	  return ! isalpha (x);
8395  ;
8396  return 0;
8397}
8398_ACEOF
8399if ac_fn_c_try_run "$LINENO"; then :
8400  ac_cv_func_strerror_r_char_p=yes
8401fi
8402rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8403  conftest.$ac_objext conftest.beam conftest.$ac_ext
8404fi
8405
8406    fi
8407
8408fi
8409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
8410$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
8411if test $ac_cv_func_strerror_r_char_p = yes; then
8412
8413$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
8414
8415fi
8416
8417
8418ac_busted_vpath_in_make=no
8419case "$build" in
8420 *-*-irix6.1*)	# 64 bit only
8421    # busted vpath?
8422    ;;
8423 *-*-irix6*)	# 6.2 (and later?)
8424    ac_busted_vpath_in_make=yes
8425    ;;
8426 *-*-solaris2.5.1)
8427    ac_busted_vpath_in_make=yes
8428    ;;
8429 *-*-unicosmp*)
8430    ac_busted_vpath_in_make=yes
8431    ;;
8432esac
8433
8434case "$ac_busted_vpath_in_make$srcdir" in
8435 yes.|no*)
8436    ;;
8437 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
8438     '')
8439	as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
8440    esac
8441    ;;
8442esac
8443
8444case "$host" in
8445 *-*-aix4*)
8446	# Bug 2516:
8447	# Was *-*-aix[[4-9]]*
8448	# XXX only verified thru AIX6.  But...
8449	# Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
8450	# that this support would be in 5.3, removed in 6, and added back.
8451	#
8452	# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
8453	# (returning ENOSYS).  I didn't check 4.2.  If, in the future,
8454	# IBM pulls its thumbs out long enough to implement clock_settime,
8455	# this conditional will need to change.  Maybe use AC_TRY_RUN
8456	# instead to try to set the time to itself and check errno.
8457    ;;
8458 *)
8459    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
8460$as_echo_n "checking for library containing clock_gettime... " >&6; }
8461if ${ac_cv_search_clock_gettime+:} false; then :
8462  $as_echo_n "(cached) " >&6
8463else
8464  ac_func_search_save_LIBS=$LIBS
8465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8466/* end confdefs.h.  */
8467
8468/* Override any GCC internal prototype to avoid an error.
8469   Use char because int might match the return type of a GCC
8470   builtin and then its argument prototype would still apply.  */
8471#ifdef __cplusplus
8472extern "C"
8473#endif
8474char clock_gettime ();
8475int
8476main ()
8477{
8478return clock_gettime ();
8479  ;
8480  return 0;
8481}
8482_ACEOF
8483for ac_lib in '' rt; do
8484  if test -z "$ac_lib"; then
8485    ac_res="none required"
8486  else
8487    ac_res=-l$ac_lib
8488    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8489  fi
8490  if ac_fn_c_try_link "$LINENO"; then :
8491  ac_cv_search_clock_gettime=$ac_res
8492fi
8493rm -f core conftest.err conftest.$ac_objext \
8494    conftest$ac_exeext
8495  if ${ac_cv_search_clock_gettime+:} false; then :
8496  break
8497fi
8498done
8499if ${ac_cv_search_clock_gettime+:} false; then :
8500
8501else
8502  ac_cv_search_clock_gettime=no
8503fi
8504rm conftest.$ac_ext
8505LIBS=$ac_func_search_save_LIBS
8506fi
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
8508$as_echo "$ac_cv_search_clock_gettime" >&6; }
8509ac_res=$ac_cv_search_clock_gettime
8510if test "$ac_res" != no; then :
8511  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8512  case "$ac_cv_search_clock_gettime" in
8513 'none required') ;;
8514 no) ;;
8515 *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
8516 esac
8517
8518fi
8519
8520    for ac_func in clock_getres clock_gettime clock_settime
8521do :
8522  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8523ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8524if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8525  cat >>confdefs.h <<_ACEOF
8526#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8527_ACEOF
8528
8529fi
8530done
8531
8532    ;;
8533esac
8534
8535for ac_func in getclock stime timegm strlcpy strlcat
8536do :
8537  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8538ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8539if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8540  cat >>confdefs.h <<_ACEOF
8541#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8542_ACEOF
8543
8544fi
8545done
8546
8547
8548# Bug 2713
8549LDADD_LIBUTIL=
8550
8551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
8552$as_echo_n "checking for library containing snprintb... " >&6; }
8553if ${ac_cv_search_snprintb+:} false; then :
8554  $as_echo_n "(cached) " >&6
8555else
8556  ac_func_search_save_LIBS=$LIBS
8557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8558/* end confdefs.h.  */
8559
8560/* Override any GCC internal prototype to avoid an error.
8561   Use char because int might match the return type of a GCC
8562   builtin and then its argument prototype would still apply.  */
8563#ifdef __cplusplus
8564extern "C"
8565#endif
8566char snprintb ();
8567int
8568main ()
8569{
8570return snprintb ();
8571  ;
8572  return 0;
8573}
8574_ACEOF
8575for ac_lib in '' util; do
8576  if test -z "$ac_lib"; then
8577    ac_res="none required"
8578  else
8579    ac_res=-l$ac_lib
8580    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8581  fi
8582  if ac_fn_c_try_link "$LINENO"; then :
8583  ac_cv_search_snprintb=$ac_res
8584fi
8585rm -f core conftest.err conftest.$ac_objext \
8586    conftest$ac_exeext
8587  if ${ac_cv_search_snprintb+:} false; then :
8588  break
8589fi
8590done
8591if ${ac_cv_search_snprintb+:} false; then :
8592
8593else
8594  ac_cv_search_snprintb=no
8595fi
8596rm conftest.$ac_ext
8597LIBS=$ac_func_search_save_LIBS
8598fi
8599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
8600$as_echo "$ac_cv_search_snprintb" >&6; }
8601ac_res=$ac_cv_search_snprintb
8602if test "$ac_res" != no; then :
8603  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8604  case "$ac_cv_search_snprintb" in
8605 'none required') ;;
8606 no) ;;
8607 *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
8608 esac
8609
8610$as_echo "#define USE_SNPRINTB 1" >>confdefs.h
8611
8612fi
8613
8614
8615#
8616for ac_header in errno.h sys/socket.h sys/types.h time.h
8617do :
8618  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8619ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8621  cat >>confdefs.h <<_ACEOF
8622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8623_ACEOF
8624
8625fi
8626
8627done
8628
8629for ac_header in net/if.h
8630do :
8631  ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
8632    #ifdef HAVE_SYS_SOCKET_H
8633    # include <sys/socket.h>
8634    #endif
8635
8636"
8637if test "x$ac_cv_header_net_if_h" = xyes; then :
8638  cat >>confdefs.h <<_ACEOF
8639#define HAVE_NET_IF_H 1
8640_ACEOF
8641
8642fi
8643
8644done
8645
8646case "$host" in
8647 *-hp-hpux*)
8648    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
8649$as_echo_n "checking if net/if.h requires mpinfou predeclaration... " >&6; }
8650if ${ntp_cv_predecl_mpinfou+:} false; then :
8651  $as_echo_n "(cached) " >&6
8652else
8653
8654	    np_cv_predecl_mpinfou=no
8655	    case "$ac_cv_header_net_if_h" in
8656	     no)
8657		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8658/* end confdefs.h.  */
8659
8660			    typedef union mpinfou {
8661				    struct pdk_mpinfo *pdkptr;
8662				    struct mpinfo *pikptr;
8663			    } mpinfou_t;
8664			    #ifdef HAVE_SYS_SOCKET_H
8665			    # include <sys/socket.h>
8666			    #endif
8667			    #include <net/if.h>
8668
8669int
8670main ()
8671{
8672
8673
8674
8675  ;
8676  return 0;
8677}
8678_ACEOF
8679if ac_fn_c_try_compile "$LINENO"; then :
8680
8681			ntp_cv_predecl_mpinfou=yes
8682			ac_cv_header_net_if_h=yes
8683
8684
8685fi
8686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8687	    esac
8688
8689
8690fi
8691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
8692$as_echo "$ntp_cv_predecl_mpinfou" >&6; }
8693    case "$ntp_cv_predecl_mpinfou" in
8694     yes)
8695	cat >>confdefs.h <<_ACEOF
8696#ifndef MPINFOU_PREDECLARED
8697# define MPINFOU_PREDECLARED
8698typedef union mpinfou {
8699	struct pdk_mpinfo *pdkptr;
8700	struct mpinfo *pikptr;
8701} mpinfou_t;
8702#endif
8703_ACEOF
8704
8705    esac
8706esac
8707
8708case "$host" in
8709 *-linux*)
8710    for ac_header in linux/if_addr.h
8711do :
8712  ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
8713	#ifdef HAVE_SYS_SOCKET_H
8714	# include <sys/socket.h>
8715	#endif
8716
8717"
8718if test "x$ac_cv_header_linux_if_addr_h" = xyes; then :
8719  cat >>confdefs.h <<_ACEOF
8720#define HAVE_LINUX_IF_ADDR_H 1
8721_ACEOF
8722
8723fi
8724
8725done
8726
8727
8728$as_echo "#define NEED_EARLY_FORK 1" >>confdefs.h
8729
8730esac
8731
8732for ac_header in arpa/nameser.h sys/param.h sys/time.h sys/timers.h
8733do :
8734  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8735ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8736if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8737  cat >>confdefs.h <<_ACEOF
8738#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8739_ACEOF
8740
8741fi
8742
8743done
8744
8745# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
8746for ac_header in sys/sysctl.h
8747do :
8748  ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
8749    #if defined HAVE_SYS_PARAM_H
8750    # include <sys/param.h>
8751    #endif
8752
8753"
8754if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
8755  cat >>confdefs.h <<_ACEOF
8756#define HAVE_SYS_SYSCTL_H 1
8757_ACEOF
8758
8759fi
8760
8761done
8762
8763for ac_header in netinet/in_system.h netinet/in_systm.h netinet/in.h
8764do :
8765  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8766ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8767if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8768  cat >>confdefs.h <<_ACEOF
8769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8770_ACEOF
8771
8772fi
8773
8774done
8775
8776
8777for ac_header in resolv.h
8778do :
8779  ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
8780    #ifdef HAVE_SYS_TYPES_H
8781    # include <sys/types.h>
8782    #endif
8783    #ifdef HAVE_NETINET_IN_H
8784    # include <netinet/in.h>
8785    #endif
8786    #ifdef HAVE_ARPA_NAMESER_H
8787    # include <arpa/nameser.h>
8788    #endif
8789
8790"
8791if test "x$ac_cv_header_resolv_h" = xyes; then :
8792  cat >>confdefs.h <<_ACEOF
8793#define HAVE_RESOLV_H 1
8794_ACEOF
8795
8796fi
8797
8798done
8799
8800
8801for ac_header in net/if_var.h
8802do :
8803  ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
8804    #if HAVE_SYS_TYPES_H
8805    # include <sys/types.h>
8806    #endif
8807    #ifdef HAVE_SYS_SOCKET_H
8808    # include <sys/socket.h>
8809    #endif
8810    #ifdef HAVE_NETINET_IN_H
8811    # include <netinet/in.h>
8812    #endif
8813    #ifdef HAVE_NET_IF_H
8814    # include <net/if.h>
8815    #endif
8816
8817"
8818if test "x$ac_cv_header_net_if_var_h" = xyes; then :
8819  cat >>confdefs.h <<_ACEOF
8820#define HAVE_NET_IF_VAR_H 1
8821_ACEOF
8822
8823fi
8824
8825done
8826
8827
8828for ac_header in netinet/ip.h netinet/in_var.h
8829do :
8830  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8831ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8832    #ifdef HAVE_SYS_TYPES_H
8833    # include <sys/types.h>
8834    #endif
8835    #ifdef HAVE_SYS_SOCKET_H
8836    # include <sys/socket.h>
8837    #endif
8838    #ifdef HAVE_NET_IF_H
8839    # include <net/if.h>
8840    #endif
8841    #ifdef HAVE_NETINET_IN_H
8842    # include <netinet/in.h>
8843    #endif
8844    #ifdef HAVE_NET_IF_VAR_H
8845    # include <net/if_var.h>
8846    #endif
8847    #ifdef HAVE_NETINET_IN_SYSTM_H
8848    # include <netinet/in_systm.h>
8849    #endif
8850
8851"
8852if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8853  cat >>confdefs.h <<_ACEOF
8854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8855_ACEOF
8856
8857fi
8858
8859done
8860
8861
8862# HMS: Do we need to check for -lsocket before or after these tests?
8863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
8864$as_echo_n "checking for library containing inet_pton... " >&6; }
8865if ${ac_cv_search_inet_pton+:} false; then :
8866  $as_echo_n "(cached) " >&6
8867else
8868  ac_func_search_save_LIBS=$LIBS
8869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870/* end confdefs.h.  */
8871
8872/* Override any GCC internal prototype to avoid an error.
8873   Use char because int might match the return type of a GCC
8874   builtin and then its argument prototype would still apply.  */
8875#ifdef __cplusplus
8876extern "C"
8877#endif
8878char inet_pton ();
8879int
8880main ()
8881{
8882return inet_pton ();
8883  ;
8884  return 0;
8885}
8886_ACEOF
8887for ac_lib in '' nsl; do
8888  if test -z "$ac_lib"; then
8889    ac_res="none required"
8890  else
8891    ac_res=-l$ac_lib
8892    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8893  fi
8894  if ac_fn_c_try_link "$LINENO"; then :
8895  ac_cv_search_inet_pton=$ac_res
8896fi
8897rm -f core conftest.err conftest.$ac_objext \
8898    conftest$ac_exeext
8899  if ${ac_cv_search_inet_pton+:} false; then :
8900  break
8901fi
8902done
8903if ${ac_cv_search_inet_pton+:} false; then :
8904
8905else
8906  ac_cv_search_inet_pton=no
8907fi
8908rm conftest.$ac_ext
8909LIBS=$ac_func_search_save_LIBS
8910fi
8911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
8912$as_echo "$ac_cv_search_inet_pton" >&6; }
8913ac_res=$ac_cv_search_inet_pton
8914if test "$ac_res" != no; then :
8915  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8916  case "$ac_cv_search_inet_pton" in
8917 'none required') ;;
8918 no) ;;
8919 *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
8920 esac
8921
8922fi
8923
8924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
8925$as_echo_n "checking for library containing inet_ntop... " >&6; }
8926if ${ac_cv_search_inet_ntop+:} false; then :
8927  $as_echo_n "(cached) " >&6
8928else
8929  ac_func_search_save_LIBS=$LIBS
8930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8931/* end confdefs.h.  */
8932
8933/* Override any GCC internal prototype to avoid an error.
8934   Use char because int might match the return type of a GCC
8935   builtin and then its argument prototype would still apply.  */
8936#ifdef __cplusplus
8937extern "C"
8938#endif
8939char inet_ntop ();
8940int
8941main ()
8942{
8943return inet_ntop ();
8944  ;
8945  return 0;
8946}
8947_ACEOF
8948for ac_lib in '' resolv; do
8949  if test -z "$ac_lib"; then
8950    ac_res="none required"
8951  else
8952    ac_res=-l$ac_lib
8953    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
8954  fi
8955  if ac_fn_c_try_link "$LINENO"; then :
8956  ac_cv_search_inet_ntop=$ac_res
8957fi
8958rm -f core conftest.err conftest.$ac_objext \
8959    conftest$ac_exeext
8960  if ${ac_cv_search_inet_ntop+:} false; then :
8961  break
8962fi
8963done
8964if ${ac_cv_search_inet_ntop+:} false; then :
8965
8966else
8967  ac_cv_search_inet_ntop=no
8968fi
8969rm conftest.$ac_ext
8970LIBS=$ac_func_search_save_LIBS
8971fi
8972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
8973$as_echo "$ac_cv_search_inet_ntop" >&6; }
8974ac_res=$ac_cv_search_inet_ntop
8975if test "$ac_res" != no; then :
8976  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8977  case "$ac_cv_search_inet_ntop" in
8978 'none required') ;;
8979 no) ;;
8980 *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
8981 esac
8982
8983fi
8984
8985
8986# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
8987# avoid keying on the OS name:  If we find socket functions in
8988# libsocket, next try for them in libxnet without libsocket, if found,
8989# list both.  If we simply tested libxnet first, we would find the
8990# functions there and never add libsocket.  See also [Bug 660]
8991# http://bugs.ntp.org/show_bug.cgi?id=660#c9
8992saved_LIBS=$LIBS
8993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
8994$as_echo_n "checking for library containing setsockopt... " >&6; }
8995if ${ac_cv_search_setsockopt+:} false; then :
8996  $as_echo_n "(cached) " >&6
8997else
8998  ac_func_search_save_LIBS=$LIBS
8999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9000/* end confdefs.h.  */
9001
9002/* Override any GCC internal prototype to avoid an error.
9003   Use char because int might match the return type of a GCC
9004   builtin and then its argument prototype would still apply.  */
9005#ifdef __cplusplus
9006extern "C"
9007#endif
9008char setsockopt ();
9009int
9010main ()
9011{
9012return setsockopt ();
9013  ;
9014  return 0;
9015}
9016_ACEOF
9017for ac_lib in '' socket; do
9018  if test -z "$ac_lib"; then
9019    ac_res="none required"
9020  else
9021    ac_res=-l$ac_lib
9022    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9023  fi
9024  if ac_fn_c_try_link "$LINENO"; then :
9025  ac_cv_search_setsockopt=$ac_res
9026fi
9027rm -f core conftest.err conftest.$ac_objext \
9028    conftest$ac_exeext
9029  if ${ac_cv_search_setsockopt+:} false; then :
9030  break
9031fi
9032done
9033if ${ac_cv_search_setsockopt+:} false; then :
9034
9035else
9036  ac_cv_search_setsockopt=no
9037fi
9038rm conftest.$ac_ext
9039LIBS=$ac_func_search_save_LIBS
9040fi
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
9042$as_echo "$ac_cv_search_setsockopt" >&6; }
9043ac_res=$ac_cv_search_setsockopt
9044if test "$ac_res" != no; then :
9045  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9046  case "$ac_cv_search_setsockopt" in
9047 'none required') ;;
9048 no) ;;
9049 *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
9050 esac
9051
9052fi
9053
9054case "$ac_cv_search_setsockopt" in
9055 -lsocket)
9056    LIBS="$saved_LIBS"
9057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
9058$as_echo_n "checking for library containing getsockopt... " >&6; }
9059if ${ac_cv_search_getsockopt+:} false; then :
9060  $as_echo_n "(cached) " >&6
9061else
9062  ac_func_search_save_LIBS=$LIBS
9063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9064/* end confdefs.h.  */
9065
9066/* Override any GCC internal prototype to avoid an error.
9067   Use char because int might match the return type of a GCC
9068   builtin and then its argument prototype would still apply.  */
9069#ifdef __cplusplus
9070extern "C"
9071#endif
9072char getsockopt ();
9073int
9074main ()
9075{
9076return getsockopt ();
9077  ;
9078  return 0;
9079}
9080_ACEOF
9081for ac_lib in '' xnet; do
9082  if test -z "$ac_lib"; then
9083    ac_res="none required"
9084  else
9085    ac_res=-l$ac_lib
9086    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9087  fi
9088  if ac_fn_c_try_link "$LINENO"; then :
9089  ac_cv_search_getsockopt=$ac_res
9090fi
9091rm -f core conftest.err conftest.$ac_objext \
9092    conftest$ac_exeext
9093  if ${ac_cv_search_getsockopt+:} false; then :
9094  break
9095fi
9096done
9097if ${ac_cv_search_getsockopt+:} false; then :
9098
9099else
9100  ac_cv_search_getsockopt=no
9101fi
9102rm conftest.$ac_ext
9103LIBS=$ac_func_search_save_LIBS
9104fi
9105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
9106$as_echo "$ac_cv_search_getsockopt" >&6; }
9107ac_res=$ac_cv_search_getsockopt
9108if test "$ac_res" != no; then :
9109  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9110  case "$ac_cv_search_getsockopt" in
9111 'none required') ;;
9112 no) ;;
9113 *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
9114 esac
9115
9116fi
9117
9118    # XXX Possible trouble here - reading the comments above and looking at the
9119    # code below I wonder if we'll add -lxnet when we don't need it.
9120    # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
9121    # there when it is not needed?
9122    case "$ac_cv_search_getsockopt" in
9123     -lxnet)
9124	LIBS="-lxnet -lsocket $saved_LIBS"
9125	;;
9126     *) LIBS="-lsocket $saved_LIBS"
9127	;;
9128    esac
9129    ;;
9130esac
9131{ saved_LIBS=; unset saved_LIBS;}
9132
9133# Bug 2427 - look for recvmsg here.
9134for ac_func in recvmsg
9135do :
9136  ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
9137if test "x$ac_cv_func_recvmsg" = xyes; then :
9138  cat >>confdefs.h <<_ACEOF
9139#define HAVE_RECVMSG 1
9140_ACEOF
9141
9142fi
9143done
9144
9145
9146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
9147$as_echo_n "checking for inline... " >&6; }
9148if ${ac_cv_c_inline+:} false; then :
9149  $as_echo_n "(cached) " >&6
9150else
9151  ac_cv_c_inline=no
9152for ac_kw in inline __inline__ __inline; do
9153  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154/* end confdefs.h.  */
9155#ifndef __cplusplus
9156typedef int foo_t;
9157static $ac_kw foo_t static_foo () {return 0; }
9158$ac_kw foo_t foo () {return 0; }
9159#endif
9160
9161_ACEOF
9162if ac_fn_c_try_compile "$LINENO"; then :
9163  ac_cv_c_inline=$ac_kw
9164fi
9165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9166  test "$ac_cv_c_inline" != no && break
9167done
9168
9169fi
9170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
9171$as_echo "$ac_cv_c_inline" >&6; }
9172
9173case $ac_cv_c_inline in
9174  inline | yes) ;;
9175  *)
9176    case $ac_cv_c_inline in
9177      no) ac_val=;;
9178      *) ac_val=$ac_cv_c_inline;;
9179    esac
9180    cat >>confdefs.h <<_ACEOF
9181#ifndef __cplusplus
9182#define inline $ac_val
9183#endif
9184_ACEOF
9185    ;;
9186esac
9187
9188
9189case "$ac_cv_c_inline" in
9190 '')
9191    ;;
9192 *)
9193
9194$as_echo "#define HAVE_INLINE 1" >>confdefs.h
9195
9196
9197esac
9198
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
9200$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
9201if ${ac_cv_header_time+:} false; then :
9202  $as_echo_n "(cached) " >&6
9203else
9204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9205/* end confdefs.h.  */
9206#include <sys/types.h>
9207#include <sys/time.h>
9208#include <time.h>
9209
9210int
9211main ()
9212{
9213if ((struct tm *) 0)
9214return 0;
9215  ;
9216  return 0;
9217}
9218_ACEOF
9219if ac_fn_c_try_compile "$LINENO"; then :
9220  ac_cv_header_time=yes
9221else
9222  ac_cv_header_time=no
9223fi
9224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9225fi
9226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
9227$as_echo "$ac_cv_header_time" >&6; }
9228if test $ac_cv_header_time = yes; then
9229
9230$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
9231
9232fi
9233
9234# The cast to long int works around a bug in the HP C Compiler
9235# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9236# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9237# This bug is HP SR number 8606223364.
9238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9239$as_echo_n "checking size of time_t... " >&6; }
9240if ${ac_cv_sizeof_time_t+:} false; then :
9241  $as_echo_n "(cached) " >&6
9242else
9243  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
9244
9245else
9246  if test "$ac_cv_type_time_t" = yes; then
9247     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9249as_fn_error 77 "cannot compute sizeof (time_t)
9250See \`config.log' for more details" "$LINENO" 5; }
9251   else
9252     ac_cv_sizeof_time_t=0
9253   fi
9254fi
9255
9256fi
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9258$as_echo "$ac_cv_sizeof_time_t" >&6; }
9259
9260
9261
9262cat >>confdefs.h <<_ACEOF
9263#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
9264_ACEOF
9265
9266
9267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
9268$as_echo_n "checking whether char is unsigned... " >&6; }
9269if ${ac_cv_c_char_unsigned+:} false; then :
9270  $as_echo_n "(cached) " >&6
9271else
9272  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9273/* end confdefs.h.  */
9274$ac_includes_default
9275int
9276main ()
9277{
9278static int test_array [1 - 2 * !(((char) -1) < 0)];
9279test_array [0] = 0;
9280return test_array [0];
9281
9282  ;
9283  return 0;
9284}
9285_ACEOF
9286if ac_fn_c_try_compile "$LINENO"; then :
9287  ac_cv_c_char_unsigned=no
9288else
9289  ac_cv_c_char_unsigned=yes
9290fi
9291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9292fi
9293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
9294$as_echo "$ac_cv_c_char_unsigned" >&6; }
9295if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
9296  $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
9297
9298fi
9299		# The cast to long int works around a bug in the HP C Compiler
9300# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9301# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9302# This bug is HP SR number 8606223364.
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
9304$as_echo_n "checking size of signed char... " >&6; }
9305if ${ac_cv_sizeof_signed_char+:} false; then :
9306  $as_echo_n "(cached) " >&6
9307else
9308  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"; then :
9309
9310else
9311  if test "$ac_cv_type_signed_char" = yes; then
9312     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9313$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9314as_fn_error 77 "cannot compute sizeof (signed char)
9315See \`config.log' for more details" "$LINENO" 5; }
9316   else
9317     ac_cv_sizeof_signed_char=0
9318   fi
9319fi
9320
9321fi
9322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
9323$as_echo "$ac_cv_sizeof_signed_char" >&6; }
9324
9325
9326
9327cat >>confdefs.h <<_ACEOF
9328#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9329_ACEOF
9330
9331
9332ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
9333if test "x$ac_cv_type_s_char" = xyes; then :
9334
9335cat >>confdefs.h <<_ACEOF
9336#define HAVE_S_CHAR 1
9337_ACEOF
9338
9339
9340fi
9341ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
9342if test "x$ac_cv_type_long_long" = xyes; then :
9343
9344cat >>confdefs.h <<_ACEOF
9345#define HAVE_LONG_LONG 1
9346_ACEOF
9347
9348
9349fi
9350
9351# The cast to long int works around a bug in the HP C Compiler
9352# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9353# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9354# This bug is HP SR number 8606223364.
9355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
9356$as_echo_n "checking size of short... " >&6; }
9357if ${ac_cv_sizeof_short+:} false; then :
9358  $as_echo_n "(cached) " >&6
9359else
9360  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
9361
9362else
9363  if test "$ac_cv_type_short" = yes; then
9364     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9365$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9366as_fn_error 77 "cannot compute sizeof (short)
9367See \`config.log' for more details" "$LINENO" 5; }
9368   else
9369     ac_cv_sizeof_short=0
9370   fi
9371fi
9372
9373fi
9374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
9375$as_echo "$ac_cv_sizeof_short" >&6; }
9376
9377
9378
9379cat >>confdefs.h <<_ACEOF
9380#define SIZEOF_SHORT $ac_cv_sizeof_short
9381_ACEOF
9382
9383
9384# The cast to long int works around a bug in the HP C Compiler
9385# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9386# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9387# This bug is HP SR number 8606223364.
9388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
9389$as_echo_n "checking size of int... " >&6; }
9390if ${ac_cv_sizeof_int+:} false; then :
9391  $as_echo_n "(cached) " >&6
9392else
9393  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
9394
9395else
9396  if test "$ac_cv_type_int" = yes; then
9397     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9399as_fn_error 77 "cannot compute sizeof (int)
9400See \`config.log' for more details" "$LINENO" 5; }
9401   else
9402     ac_cv_sizeof_int=0
9403   fi
9404fi
9405
9406fi
9407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
9408$as_echo "$ac_cv_sizeof_int" >&6; }
9409
9410
9411
9412cat >>confdefs.h <<_ACEOF
9413#define SIZEOF_INT $ac_cv_sizeof_int
9414_ACEOF
9415
9416
9417# The cast to long int works around a bug in the HP C Compiler
9418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9420# This bug is HP SR number 8606223364.
9421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
9422$as_echo_n "checking size of long... " >&6; }
9423if ${ac_cv_sizeof_long+:} false; then :
9424  $as_echo_n "(cached) " >&6
9425else
9426  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
9427
9428else
9429  if test "$ac_cv_type_long" = yes; then
9430     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9431$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9432as_fn_error 77 "cannot compute sizeof (long)
9433See \`config.log' for more details" "$LINENO" 5; }
9434   else
9435     ac_cv_sizeof_long=0
9436   fi
9437fi
9438
9439fi
9440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
9441$as_echo "$ac_cv_sizeof_long" >&6; }
9442
9443
9444
9445cat >>confdefs.h <<_ACEOF
9446#define SIZEOF_LONG $ac_cv_sizeof_long
9447_ACEOF
9448
9449
9450
9451case "$ac_cv_type_long_long" in
9452 no)
9453    ;;
9454 *)
9455    # The cast to long int works around a bug in the HP C Compiler
9456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9458# This bug is HP SR number 8606223364.
9459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
9460$as_echo_n "checking size of long long... " >&6; }
9461if ${ac_cv_sizeof_long_long+:} false; then :
9462  $as_echo_n "(cached) " >&6
9463else
9464  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"; then :
9465
9466else
9467  if test "$ac_cv_type_long_long" = yes; then
9468     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9470as_fn_error 77 "cannot compute sizeof (long long)
9471See \`config.log' for more details" "$LINENO" 5; }
9472   else
9473     ac_cv_sizeof_long_long=0
9474   fi
9475fi
9476
9477fi
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
9479$as_echo "$ac_cv_sizeof_long_long" >&6; }
9480
9481
9482
9483cat >>confdefs.h <<_ACEOF
9484#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
9485_ACEOF
9486
9487
9488    ;;
9489esac
9490
9491case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
9492 *yes)
9493    # We have a typedef for s_char.  Might as well believe it...
9494    ;;
9495 no0no)
9496    # We have signed chars, can't say 'signed char', no s_char typedef.
9497
9498$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9499
9500    ;;
9501 no1no)
9502    # We have signed chars, can say 'signed char', no s_char typedef.
9503
9504$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9505
9506    ;;
9507 yes0no)
9508    # We have unsigned chars, can't say 'signed char', no s_char typedef.
9509    as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
9510    ;;
9511 yes1no)
9512    # We have unsigned chars, can say 'signed char', no s_char typedef.
9513
9514$as_echo "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
9515
9516    ;;
9517esac
9518
9519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
9520$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
9521if ${ac_cv_type_uid_t+:} false; then :
9522  $as_echo_n "(cached) " >&6
9523else
9524  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9525/* end confdefs.h.  */
9526#include <sys/types.h>
9527
9528_ACEOF
9529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9530  $EGREP "uid_t" >/dev/null 2>&1; then :
9531  ac_cv_type_uid_t=yes
9532else
9533  ac_cv_type_uid_t=no
9534fi
9535rm -f conftest*
9536
9537fi
9538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
9539$as_echo "$ac_cv_type_uid_t" >&6; }
9540if test $ac_cv_type_uid_t = no; then
9541
9542$as_echo "#define uid_t int" >>confdefs.h
9543
9544
9545$as_echo "#define gid_t int" >>confdefs.h
9546
9547fi
9548
9549
9550
9551
9552
9553
9554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
9555$as_echo_n "checking if we're including debugging code... " >&6; }
9556# Check whether --enable-debugging was given.
9557if test "${enable_debugging+set}" = set; then :
9558  enableval=$enable_debugging; ntp_ok=$enableval
9559else
9560  ntp_ok=yes
9561
9562fi
9563
9564case "$ntp_ok" in
9565 yes)
9566
9567$as_echo "#define DEBUG 1" >>confdefs.h
9568
9569esac
9570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
9571$as_echo "$ntp_ok" >&6; }
9572
9573
9574
9575# check if we can compile with pthreads
9576for ac_header in semaphore.h
9577do :
9578  ac_fn_c_check_header_mongrel "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
9579if test "x$ac_cv_header_semaphore_h" = xyes; then :
9580  cat >>confdefs.h <<_ACEOF
9581#define HAVE_SEMAPHORE_H 1
9582_ACEOF
9583
9584fi
9585
9586done
9587
9588for ac_func in socketpair
9589do :
9590  ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
9591if test "x$ac_cv_func_socketpair" = xyes; then :
9592  cat >>confdefs.h <<_ACEOF
9593#define HAVE_SOCKETPAIR 1
9594_ACEOF
9595
9596fi
9597done
9598
9599# Check whether --enable-thread-support was given.
9600if test "${enable_thread_support+set}" = set; then :
9601  enableval=$enable_thread_support;
9602else
9603  enable_thread_support=yes
9604
9605fi
9606
9607have_pthreads=no
9608case "$enable_thread_support" in
9609 no) ;;
9610 *)
9611    ol_found_pthreads=no
9612
9613
9614
9615ac_ext=c
9616ac_cpp='$CPP $CPPFLAGS'
9617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9619ac_compiler_gnu=$ac_cv_c_compiler_gnu
9620
9621# OpenLDAP --with-threads
9622
9623# Check whether --with-threads was given.
9624if test "${with_threads+set}" = set; then :
9625  withval=$with_threads;
9626	ol_arg=invalid
9627	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
9628		if test "$withval" = "$ol_val" ; then
9629			ol_arg="$ol_val"
9630		fi
9631	done
9632	if test "$ol_arg" = "invalid" ; then
9633		as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
9634	fi
9635	ol_with_threads="$ol_arg"
9636
9637else
9638  	ol_with_threads="auto"
9639fi
9640# end --with-threads
9641
9642
9643case "$ol_with_threads$host" in
9644 auto*-*-solaris2.[0-6])
9645        ol_with_threads=no
9646    ;;
9647esac
9648
9649
9650ol_aix_threads=no
9651case "$host" in
9652*-*-aix*) 	if test -z "$CC" ; then
9653		case "$ol_with_threads" in
9654		auto | yes |  posix) ol_aix_threads=yes ;;
9655		esac
9656	fi
9657;;
9658esac
9659
9660if test $ol_aix_threads = yes ; then
9661	if test -z "${CC}" ; then
9662		for ac_prog in cc_r xlc_r cc
9663do
9664  # Extract the first word of "$ac_prog", so it can be a program name with args.
9665set dummy $ac_prog; ac_word=$2
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9667$as_echo_n "checking for $ac_word... " >&6; }
9668if ${ac_cv_prog_CC+:} false; then :
9669  $as_echo_n "(cached) " >&6
9670else
9671  if test -n "$CC"; then
9672  ac_cv_prog_CC="$CC" # Let the user override the test.
9673else
9674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9675for as_dir in $PATH
9676do
9677  IFS=$as_save_IFS
9678  test -z "$as_dir" && as_dir=.
9679    for ac_exec_ext in '' $ac_executable_extensions; do
9680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9681    ac_cv_prog_CC="$ac_prog"
9682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9683    break 2
9684  fi
9685done
9686  done
9687IFS=$as_save_IFS
9688
9689fi
9690fi
9691CC=$ac_cv_prog_CC
9692if test -n "$CC"; then
9693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
9694$as_echo "$CC" >&6; }
9695else
9696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9697$as_echo "no" >&6; }
9698fi
9699
9700
9701  test -n "$CC" && break
9702done
9703
9704
9705		if test "$CC" = cc ; then
9706						if test $ol_with_threads != auto ; then
9707				as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
9708			else
9709				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
9710$as_echo "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
9711			fi
9712			ol_with_threads=no
9713  		fi
9714	fi
9715
9716	case ${CC} in cc_r | xlc_r)
9717		ol_with_threads=posix
9718		ol_cv_pthread_create=yes
9719		;;
9720	esac
9721fi
9722
9723ol_link_threads=no
9724# OpenLDAP --with-yielding_select
9725
9726# Check whether --with-yielding_select was given.
9727if test "${with_yielding_select+set}" = set; then :
9728  withval=$with_yielding_select;
9729	ol_arg=invalid
9730	for ol_val in auto yes no manual  ; do
9731		if test "$withval" = "$ol_val" ; then
9732			ol_arg="$ol_val"
9733		fi
9734	done
9735	if test "$ol_arg" = "invalid" ; then
9736		as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
9737	fi
9738	ol_with_yielding_select="$ol_arg"
9739
9740else
9741  	ol_with_yielding_select="auto"
9742fi
9743# end --with-yielding_select
9744
9745
9746case $ol_with_threads in auto | yes | nt)
9747
9748
9749	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
9750if test "x$ac_cv_func__beginthread" = xyes; then :
9751
9752fi
9753
9754
9755	if test $ac_cv_func__beginthread = yes ; then
9756
9757$as_echo "#define HAVE_NT_THREADS 1" >>confdefs.h
9758
9759		ol_cv_nt_threads=yes
9760	fi
9761
9762
9763	if test "$ol_cv_nt_threads" = yes ; then
9764		ol_link_threads=nt
9765		ol_with_threads=found
9766		ol_with_yielding_select=yes
9767
9768
9769$as_echo "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
9770
9771
9772$as_echo "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
9773
9774	fi
9775
9776	if test $ol_with_threads = nt ; then
9777		as_fn_error $? "could not locate NT Threads" "$LINENO" 5
9778	fi
9779	;;
9780esac
9781
9782case $ol_with_threads in auto | yes | posix)
9783
9784	for ac_header in pthread.h
9785do :
9786  ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
9787if test "x$ac_cv_header_pthread_h" = xyes; then :
9788  cat >>confdefs.h <<_ACEOF
9789#define HAVE_PTHREAD_H 1
9790_ACEOF
9791
9792fi
9793
9794done
9795
9796
9797	if test $ac_cv_header_pthread_h = yes ; then
9798		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
9799$as_echo_n "checking POSIX thread version... " >&6; }
9800if ${ol_cv_pthread_version+:} false; then :
9801  $as_echo_n "(cached) " >&6
9802else
9803
9804	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9805/* end confdefs.h.  */
9806
9807#		include <pthread.h>
9808
9809int
9810main ()
9811{
9812
9813		int i = PTHREAD_CREATE_JOINABLE;
9814
9815  ;
9816  return 0;
9817}
9818_ACEOF
9819if ac_fn_c_try_compile "$LINENO"; then :
9820
9821	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9822/* end confdefs.h.  */
9823#include <pthread.h>
9824
9825_ACEOF
9826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9827  $EGREP "pthread_detach" >/dev/null 2>&1; then :
9828  ol_cv_pthread_version=10
9829else
9830  ol_cv_pthread_version=8
9831fi
9832rm -f conftest*
9833
9834else
9835
9836	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9837/* end confdefs.h.  */
9838
9839#		include <pthread.h>
9840#		ifdef PTHREAD_CREATE_UNDETACHED
9841		draft7
9842#		endif
9843
9844_ACEOF
9845if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9846  $EGREP "draft7" >/dev/null 2>&1; then :
9847  ol_cv_pthread_version=7
9848else
9849
9850	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851/* end confdefs.h.  */
9852#include <pthread.h>
9853
9854_ACEOF
9855if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9856  $EGREP "pthread_attr_init" >/dev/null 2>&1; then :
9857  ol_cv_pthread_version=6
9858else
9859
9860	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9861/* end confdefs.h.  */
9862
9863#		include <pthread.h>
9864#ifdef		PTHREAD_MUTEX_INITIALIZER
9865		draft5
9866#endif
9867
9868_ACEOF
9869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9870  $EGREP "draft5" >/dev/null 2>&1; then :
9871  ol_cv_pthread_version=5
9872else
9873  ol_cv_pthread_version=4
9874fi
9875rm -f conftest*
9876
9877fi
9878rm -f conftest*
9879
9880fi
9881rm -f conftest*
9882
9883fi
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9885
9886fi
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
9888$as_echo "$ol_cv_pthread_version" >&6; }
9889
9890
9891		if test $ol_cv_pthread_version != 0 ; then
9892
9893cat >>confdefs.h <<_ACEOF
9894#define HAVE_PTHREADS $ol_cv_pthread_version
9895_ACEOF
9896
9897		else
9898			as_fn_error $? "unknown pthread version" "$LINENO" 5
9899		fi
9900
9901		# consider threads found
9902		ol_with_threads=found
9903
9904
9905	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
9906$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
9907if ${ol_cv_header_linux_threads+:} false; then :
9908  $as_echo_n "(cached) " >&6
9909else
9910  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9911/* end confdefs.h.  */
9912#include <pthread.h>
9913_ACEOF
9914if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9915  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
9916  ol_cv_header_linux_threads=yes
9917else
9918  ol_cv_header_linux_threads=no
9919fi
9920rm -f conftest*
9921
9922
9923fi
9924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
9925$as_echo "$ol_cv_header_linux_threads" >&6; }
9926	if test $ol_cv_header_linux_threads = yes; then
9927
9928$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
9929
9930	fi
9931
9932
9933	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
9934$as_echo_n "checking for GNU Pth pthread.h... " >&6; }
9935if ${ol_cv_header_gnu_pth_pthread_h+:} false; then :
9936  $as_echo_n "(cached) " >&6
9937else
9938  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9939/* end confdefs.h.  */
9940#include <pthread.h>
9941#ifdef _POSIX_THREAD_IS_GNU_PTH
9942	__gnu_pth__;
9943#endif
9944
9945_ACEOF
9946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9947  $EGREP "__gnu_pth__" >/dev/null 2>&1; then :
9948  ol_cv_header_gnu_pth_pthread_h=yes
9949else
9950  ol_cv_header_gnu_pth_pthread_h=no
9951fi
9952rm -f conftest*
9953
9954
9955fi
9956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
9957$as_echo "$ol_cv_header_gnu_pth_pthread_h" >&6; }
9958
9959
9960		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
9961			for ac_header in sched.h
9962do :
9963  ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
9964if test "x$ac_cv_header_sched_h" = xyes; then :
9965  cat >>confdefs.h <<_ACEOF
9966#define HAVE_SCHED_H 1
9967_ACEOF
9968
9969fi
9970
9971done
9972
9973		fi
9974
9975
9976				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
9977$as_echo_n "checking for pthread_create in default libraries... " >&6; }
9978if ${ol_cv_pthread_create+:} false; then :
9979  $as_echo_n "(cached) " >&6
9980else
9981
9982			if test "$cross_compiling" = yes; then :
9983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984/* end confdefs.h.  */
9985
9986/* pthread test headers */
9987#include <pthread.h>
9988#if HAVE_PTHREADS < 7
9989#include <errno.h>
9990#endif
9991#ifndef NULL
9992#define NULL (void*)0
9993#endif
9994
9995static void *task(p)
9996	void *p;
9997{
9998	return (void *) (p == NULL);
9999}
10000
10001int
10002main ()
10003{
10004
10005	/* pthread test function */
10006#ifndef PTHREAD_CREATE_DETACHED
10007#define	PTHREAD_CREATE_DETACHED	1
10008#endif
10009	pthread_t t;
10010	int status;
10011	int detach = PTHREAD_CREATE_DETACHED;
10012
10013#if HAVE_PTHREADS > 4
10014	/* Final pthreads */
10015	pthread_attr_t attr;
10016
10017	status = pthread_attr_init(&attr);
10018	if( status ) return status;
10019
10020#if HAVE_PTHREADS < 7
10021	status = pthread_attr_setdetachstate(&attr, &detach);
10022	if( status < 0 ) status = errno;
10023#else
10024	status = pthread_attr_setdetachstate(&attr, detach);
10025#endif
10026	if( status ) return status;
10027	status = pthread_create( &t, &attr, task, NULL );
10028#if HAVE_PTHREADS < 7
10029	if( status < 0 ) status = errno;
10030#endif
10031	if( status ) return status;
10032#else
10033	/* Draft 4 pthreads */
10034	status = pthread_create( &t, pthread_attr_default, task, NULL );
10035	if( status ) return errno;
10036
10037	/* give thread a chance to complete */
10038	/* it should remain joinable and hence detachable */
10039	sleep( 1 );
10040
10041	status = pthread_detach( &t );
10042	if( status ) return errno;
10043#endif
10044
10045#ifdef HAVE_LINUX_THREADS
10046	pthread_kill_other_threads_np();
10047#endif
10048
10049	return 0;
10050
10051  ;
10052  return 0;
10053}
10054_ACEOF
10055if ac_fn_c_try_link "$LINENO"; then :
10056  ol_cv_pthread_create=yes
10057else
10058  ol_cv_pthread_create=no
10059fi
10060rm -f core conftest.err conftest.$ac_objext \
10061    conftest$ac_exeext conftest.$ac_ext
10062else
10063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10064/* end confdefs.h.  */
10065
10066
10067/* pthread test headers */
10068#include <pthread.h>
10069#if HAVE_PTHREADS < 7
10070#include <errno.h>
10071#endif
10072#ifndef NULL
10073#define NULL (void*)0
10074#endif
10075
10076static void *task(p)
10077	void *p;
10078{
10079	return (void *) (p == NULL);
10080}
10081
10082
10083int main(argc, argv)
10084	int argc;
10085	char **argv;
10086{
10087
10088	/* pthread test function */
10089#ifndef PTHREAD_CREATE_DETACHED
10090#define	PTHREAD_CREATE_DETACHED	1
10091#endif
10092	pthread_t t;
10093	int status;
10094	int detach = PTHREAD_CREATE_DETACHED;
10095
10096#if HAVE_PTHREADS > 4
10097	/* Final pthreads */
10098	pthread_attr_t attr;
10099
10100	status = pthread_attr_init(&attr);
10101	if( status ) return status;
10102
10103#if HAVE_PTHREADS < 7
10104	status = pthread_attr_setdetachstate(&attr, &detach);
10105	if( status < 0 ) status = errno;
10106#else
10107	status = pthread_attr_setdetachstate(&attr, detach);
10108#endif
10109	if( status ) return status;
10110	status = pthread_create( &t, &attr, task, NULL );
10111#if HAVE_PTHREADS < 7
10112	if( status < 0 ) status = errno;
10113#endif
10114	if( status ) return status;
10115#else
10116	/* Draft 4 pthreads */
10117	status = pthread_create( &t, pthread_attr_default, task, NULL );
10118	if( status ) return errno;
10119
10120	/* give thread a chance to complete */
10121	/* it should remain joinable and hence detachable */
10122	sleep( 1 );
10123
10124	status = pthread_detach( &t );
10125	if( status ) return errno;
10126#endif
10127
10128#ifdef HAVE_LINUX_THREADS
10129	pthread_kill_other_threads_np();
10130#endif
10131
10132	return 0;
10133
10134}
10135
10136_ACEOF
10137if ac_fn_c_try_run "$LINENO"; then :
10138  ol_cv_pthread_create=yes
10139else
10140  ol_cv_pthread_create=no
10141fi
10142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10143  conftest.$ac_objext conftest.beam conftest.$ac_ext
10144fi
10145
10146fi
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
10148$as_echo "$ol_cv_pthread_create" >&6; }
10149
10150		if test $ol_cv_pthread_create != no ; then
10151			ol_link_threads=posix
10152			ol_link_pthreads=""
10153		fi
10154
10155		# Pthread try link: -kthread (ol_cv_pthread_kthread)
10156if test "$ol_link_threads" = no ; then
10157	# try -kthread
10158	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
10159$as_echo_n "checking for pthread link with -kthread... " >&6; }
10160if ${ol_cv_pthread_kthread+:} false; then :
10161  $as_echo_n "(cached) " >&6
10162else
10163
10164		# save the flags
10165		ol_LIBS="$LIBS"
10166		LIBS="-kthread $LIBS"
10167
10168		if test "$cross_compiling" = yes; then :
10169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10170/* end confdefs.h.  */
10171
10172/* pthread test headers */
10173#include <pthread.h>
10174#if HAVE_PTHREADS < 7
10175#include <errno.h>
10176#endif
10177#ifndef NULL
10178#define NULL (void*)0
10179#endif
10180
10181static void *task(p)
10182	void *p;
10183{
10184	return (void *) (p == NULL);
10185}
10186
10187int
10188main ()
10189{
10190
10191	/* pthread test function */
10192#ifndef PTHREAD_CREATE_DETACHED
10193#define	PTHREAD_CREATE_DETACHED	1
10194#endif
10195	pthread_t t;
10196	int status;
10197	int detach = PTHREAD_CREATE_DETACHED;
10198
10199#if HAVE_PTHREADS > 4
10200	/* Final pthreads */
10201	pthread_attr_t attr;
10202
10203	status = pthread_attr_init(&attr);
10204	if( status ) return status;
10205
10206#if HAVE_PTHREADS < 7
10207	status = pthread_attr_setdetachstate(&attr, &detach);
10208	if( status < 0 ) status = errno;
10209#else
10210	status = pthread_attr_setdetachstate(&attr, detach);
10211#endif
10212	if( status ) return status;
10213	status = pthread_create( &t, &attr, task, NULL );
10214#if HAVE_PTHREADS < 7
10215	if( status < 0 ) status = errno;
10216#endif
10217	if( status ) return status;
10218#else
10219	/* Draft 4 pthreads */
10220	status = pthread_create( &t, pthread_attr_default, task, NULL );
10221	if( status ) return errno;
10222
10223	/* give thread a chance to complete */
10224	/* it should remain joinable and hence detachable */
10225	sleep( 1 );
10226
10227	status = pthread_detach( &t );
10228	if( status ) return errno;
10229#endif
10230
10231#ifdef HAVE_LINUX_THREADS
10232	pthread_kill_other_threads_np();
10233#endif
10234
10235	return 0;
10236
10237  ;
10238  return 0;
10239}
10240_ACEOF
10241if ac_fn_c_try_link "$LINENO"; then :
10242  ol_cv_pthread_kthread=yes
10243else
10244  ol_cv_pthread_kthread=no
10245fi
10246rm -f core conftest.err conftest.$ac_objext \
10247    conftest$ac_exeext conftest.$ac_ext
10248else
10249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10250/* end confdefs.h.  */
10251
10252
10253/* pthread test headers */
10254#include <pthread.h>
10255#if HAVE_PTHREADS < 7
10256#include <errno.h>
10257#endif
10258#ifndef NULL
10259#define NULL (void*)0
10260#endif
10261
10262static void *task(p)
10263	void *p;
10264{
10265	return (void *) (p == NULL);
10266}
10267
10268
10269int main(argc, argv)
10270	int argc;
10271	char **argv;
10272{
10273
10274	/* pthread test function */
10275#ifndef PTHREAD_CREATE_DETACHED
10276#define	PTHREAD_CREATE_DETACHED	1
10277#endif
10278	pthread_t t;
10279	int status;
10280	int detach = PTHREAD_CREATE_DETACHED;
10281
10282#if HAVE_PTHREADS > 4
10283	/* Final pthreads */
10284	pthread_attr_t attr;
10285
10286	status = pthread_attr_init(&attr);
10287	if( status ) return status;
10288
10289#if HAVE_PTHREADS < 7
10290	status = pthread_attr_setdetachstate(&attr, &detach);
10291	if( status < 0 ) status = errno;
10292#else
10293	status = pthread_attr_setdetachstate(&attr, detach);
10294#endif
10295	if( status ) return status;
10296	status = pthread_create( &t, &attr, task, NULL );
10297#if HAVE_PTHREADS < 7
10298	if( status < 0 ) status = errno;
10299#endif
10300	if( status ) return status;
10301#else
10302	/* Draft 4 pthreads */
10303	status = pthread_create( &t, pthread_attr_default, task, NULL );
10304	if( status ) return errno;
10305
10306	/* give thread a chance to complete */
10307	/* it should remain joinable and hence detachable */
10308	sleep( 1 );
10309
10310	status = pthread_detach( &t );
10311	if( status ) return errno;
10312#endif
10313
10314#ifdef HAVE_LINUX_THREADS
10315	pthread_kill_other_threads_np();
10316#endif
10317
10318	return 0;
10319
10320}
10321
10322_ACEOF
10323if ac_fn_c_try_run "$LINENO"; then :
10324  ol_cv_pthread_kthread=yes
10325else
10326  ol_cv_pthread_kthread=no
10327fi
10328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10329  conftest.$ac_objext conftest.beam conftest.$ac_ext
10330fi
10331
10332
10333		# restore the LIBS
10334		LIBS="$ol_LIBS"
10335
10336fi
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
10338$as_echo "$ol_cv_pthread_kthread" >&6; }
10339
10340	if test $ol_cv_pthread_kthread = yes ; then
10341		ol_link_pthreads="-kthread"
10342		ol_link_threads=posix
10343	fi
10344fi
10345
10346		# Pthread try link: -pthread (ol_cv_pthread_pthread)
10347if test "$ol_link_threads" = no ; then
10348	# try -pthread
10349	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
10350$as_echo_n "checking for pthread link with -pthread... " >&6; }
10351if ${ol_cv_pthread_pthread+:} false; then :
10352  $as_echo_n "(cached) " >&6
10353else
10354
10355		# save the flags
10356		ol_LIBS="$LIBS"
10357		LIBS="-pthread $LIBS"
10358
10359		if test "$cross_compiling" = yes; then :
10360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10361/* end confdefs.h.  */
10362
10363/* pthread test headers */
10364#include <pthread.h>
10365#if HAVE_PTHREADS < 7
10366#include <errno.h>
10367#endif
10368#ifndef NULL
10369#define NULL (void*)0
10370#endif
10371
10372static void *task(p)
10373	void *p;
10374{
10375	return (void *) (p == NULL);
10376}
10377
10378int
10379main ()
10380{
10381
10382	/* pthread test function */
10383#ifndef PTHREAD_CREATE_DETACHED
10384#define	PTHREAD_CREATE_DETACHED	1
10385#endif
10386	pthread_t t;
10387	int status;
10388	int detach = PTHREAD_CREATE_DETACHED;
10389
10390#if HAVE_PTHREADS > 4
10391	/* Final pthreads */
10392	pthread_attr_t attr;
10393
10394	status = pthread_attr_init(&attr);
10395	if( status ) return status;
10396
10397#if HAVE_PTHREADS < 7
10398	status = pthread_attr_setdetachstate(&attr, &detach);
10399	if( status < 0 ) status = errno;
10400#else
10401	status = pthread_attr_setdetachstate(&attr, detach);
10402#endif
10403	if( status ) return status;
10404	status = pthread_create( &t, &attr, task, NULL );
10405#if HAVE_PTHREADS < 7
10406	if( status < 0 ) status = errno;
10407#endif
10408	if( status ) return status;
10409#else
10410	/* Draft 4 pthreads */
10411	status = pthread_create( &t, pthread_attr_default, task, NULL );
10412	if( status ) return errno;
10413
10414	/* give thread a chance to complete */
10415	/* it should remain joinable and hence detachable */
10416	sleep( 1 );
10417
10418	status = pthread_detach( &t );
10419	if( status ) return errno;
10420#endif
10421
10422#ifdef HAVE_LINUX_THREADS
10423	pthread_kill_other_threads_np();
10424#endif
10425
10426	return 0;
10427
10428  ;
10429  return 0;
10430}
10431_ACEOF
10432if ac_fn_c_try_link "$LINENO"; then :
10433  ol_cv_pthread_pthread=yes
10434else
10435  ol_cv_pthread_pthread=no
10436fi
10437rm -f core conftest.err conftest.$ac_objext \
10438    conftest$ac_exeext conftest.$ac_ext
10439else
10440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10441/* end confdefs.h.  */
10442
10443
10444/* pthread test headers */
10445#include <pthread.h>
10446#if HAVE_PTHREADS < 7
10447#include <errno.h>
10448#endif
10449#ifndef NULL
10450#define NULL (void*)0
10451#endif
10452
10453static void *task(p)
10454	void *p;
10455{
10456	return (void *) (p == NULL);
10457}
10458
10459
10460int main(argc, argv)
10461	int argc;
10462	char **argv;
10463{
10464
10465	/* pthread test function */
10466#ifndef PTHREAD_CREATE_DETACHED
10467#define	PTHREAD_CREATE_DETACHED	1
10468#endif
10469	pthread_t t;
10470	int status;
10471	int detach = PTHREAD_CREATE_DETACHED;
10472
10473#if HAVE_PTHREADS > 4
10474	/* Final pthreads */
10475	pthread_attr_t attr;
10476
10477	status = pthread_attr_init(&attr);
10478	if( status ) return status;
10479
10480#if HAVE_PTHREADS < 7
10481	status = pthread_attr_setdetachstate(&attr, &detach);
10482	if( status < 0 ) status = errno;
10483#else
10484	status = pthread_attr_setdetachstate(&attr, detach);
10485#endif
10486	if( status ) return status;
10487	status = pthread_create( &t, &attr, task, NULL );
10488#if HAVE_PTHREADS < 7
10489	if( status < 0 ) status = errno;
10490#endif
10491	if( status ) return status;
10492#else
10493	/* Draft 4 pthreads */
10494	status = pthread_create( &t, pthread_attr_default, task, NULL );
10495	if( status ) return errno;
10496
10497	/* give thread a chance to complete */
10498	/* it should remain joinable and hence detachable */
10499	sleep( 1 );
10500
10501	status = pthread_detach( &t );
10502	if( status ) return errno;
10503#endif
10504
10505#ifdef HAVE_LINUX_THREADS
10506	pthread_kill_other_threads_np();
10507#endif
10508
10509	return 0;
10510
10511}
10512
10513_ACEOF
10514if ac_fn_c_try_run "$LINENO"; then :
10515  ol_cv_pthread_pthread=yes
10516else
10517  ol_cv_pthread_pthread=no
10518fi
10519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10520  conftest.$ac_objext conftest.beam conftest.$ac_ext
10521fi
10522
10523
10524		# restore the LIBS
10525		LIBS="$ol_LIBS"
10526
10527fi
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
10529$as_echo "$ol_cv_pthread_pthread" >&6; }
10530
10531	if test $ol_cv_pthread_pthread = yes ; then
10532		ol_link_pthreads="-pthread"
10533		ol_link_threads=posix
10534	fi
10535fi
10536
10537		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
10538if test "$ol_link_threads" = no ; then
10539	# try -pthreads
10540	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
10541$as_echo_n "checking for pthread link with -pthreads... " >&6; }
10542if ${ol_cv_pthread_pthreads+:} false; then :
10543  $as_echo_n "(cached) " >&6
10544else
10545
10546		# save the flags
10547		ol_LIBS="$LIBS"
10548		LIBS="-pthreads $LIBS"
10549
10550		if test "$cross_compiling" = yes; then :
10551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10552/* end confdefs.h.  */
10553
10554/* pthread test headers */
10555#include <pthread.h>
10556#if HAVE_PTHREADS < 7
10557#include <errno.h>
10558#endif
10559#ifndef NULL
10560#define NULL (void*)0
10561#endif
10562
10563static void *task(p)
10564	void *p;
10565{
10566	return (void *) (p == NULL);
10567}
10568
10569int
10570main ()
10571{
10572
10573	/* pthread test function */
10574#ifndef PTHREAD_CREATE_DETACHED
10575#define	PTHREAD_CREATE_DETACHED	1
10576#endif
10577	pthread_t t;
10578	int status;
10579	int detach = PTHREAD_CREATE_DETACHED;
10580
10581#if HAVE_PTHREADS > 4
10582	/* Final pthreads */
10583	pthread_attr_t attr;
10584
10585	status = pthread_attr_init(&attr);
10586	if( status ) return status;
10587
10588#if HAVE_PTHREADS < 7
10589	status = pthread_attr_setdetachstate(&attr, &detach);
10590	if( status < 0 ) status = errno;
10591#else
10592	status = pthread_attr_setdetachstate(&attr, detach);
10593#endif
10594	if( status ) return status;
10595	status = pthread_create( &t, &attr, task, NULL );
10596#if HAVE_PTHREADS < 7
10597	if( status < 0 ) status = errno;
10598#endif
10599	if( status ) return status;
10600#else
10601	/* Draft 4 pthreads */
10602	status = pthread_create( &t, pthread_attr_default, task, NULL );
10603	if( status ) return errno;
10604
10605	/* give thread a chance to complete */
10606	/* it should remain joinable and hence detachable */
10607	sleep( 1 );
10608
10609	status = pthread_detach( &t );
10610	if( status ) return errno;
10611#endif
10612
10613#ifdef HAVE_LINUX_THREADS
10614	pthread_kill_other_threads_np();
10615#endif
10616
10617	return 0;
10618
10619  ;
10620  return 0;
10621}
10622_ACEOF
10623if ac_fn_c_try_link "$LINENO"; then :
10624  ol_cv_pthread_pthreads=yes
10625else
10626  ol_cv_pthread_pthreads=no
10627fi
10628rm -f core conftest.err conftest.$ac_objext \
10629    conftest$ac_exeext conftest.$ac_ext
10630else
10631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10632/* end confdefs.h.  */
10633
10634
10635/* pthread test headers */
10636#include <pthread.h>
10637#if HAVE_PTHREADS < 7
10638#include <errno.h>
10639#endif
10640#ifndef NULL
10641#define NULL (void*)0
10642#endif
10643
10644static void *task(p)
10645	void *p;
10646{
10647	return (void *) (p == NULL);
10648}
10649
10650
10651int main(argc, argv)
10652	int argc;
10653	char **argv;
10654{
10655
10656	/* pthread test function */
10657#ifndef PTHREAD_CREATE_DETACHED
10658#define	PTHREAD_CREATE_DETACHED	1
10659#endif
10660	pthread_t t;
10661	int status;
10662	int detach = PTHREAD_CREATE_DETACHED;
10663
10664#if HAVE_PTHREADS > 4
10665	/* Final pthreads */
10666	pthread_attr_t attr;
10667
10668	status = pthread_attr_init(&attr);
10669	if( status ) return status;
10670
10671#if HAVE_PTHREADS < 7
10672	status = pthread_attr_setdetachstate(&attr, &detach);
10673	if( status < 0 ) status = errno;
10674#else
10675	status = pthread_attr_setdetachstate(&attr, detach);
10676#endif
10677	if( status ) return status;
10678	status = pthread_create( &t, &attr, task, NULL );
10679#if HAVE_PTHREADS < 7
10680	if( status < 0 ) status = errno;
10681#endif
10682	if( status ) return status;
10683#else
10684	/* Draft 4 pthreads */
10685	status = pthread_create( &t, pthread_attr_default, task, NULL );
10686	if( status ) return errno;
10687
10688	/* give thread a chance to complete */
10689	/* it should remain joinable and hence detachable */
10690	sleep( 1 );
10691
10692	status = pthread_detach( &t );
10693	if( status ) return errno;
10694#endif
10695
10696#ifdef HAVE_LINUX_THREADS
10697	pthread_kill_other_threads_np();
10698#endif
10699
10700	return 0;
10701
10702}
10703
10704_ACEOF
10705if ac_fn_c_try_run "$LINENO"; then :
10706  ol_cv_pthread_pthreads=yes
10707else
10708  ol_cv_pthread_pthreads=no
10709fi
10710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10711  conftest.$ac_objext conftest.beam conftest.$ac_ext
10712fi
10713
10714
10715		# restore the LIBS
10716		LIBS="$ol_LIBS"
10717
10718fi
10719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
10720$as_echo "$ol_cv_pthread_pthreads" >&6; }
10721
10722	if test $ol_cv_pthread_pthreads = yes ; then
10723		ol_link_pthreads="-pthreads"
10724		ol_link_threads=posix
10725	fi
10726fi
10727
10728		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
10729if test "$ol_link_threads" = no ; then
10730	# try -mthreads
10731	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
10732$as_echo_n "checking for pthread link with -mthreads... " >&6; }
10733if ${ol_cv_pthread_mthreads+:} false; then :
10734  $as_echo_n "(cached) " >&6
10735else
10736
10737		# save the flags
10738		ol_LIBS="$LIBS"
10739		LIBS="-mthreads $LIBS"
10740
10741		if test "$cross_compiling" = yes; then :
10742  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10743/* end confdefs.h.  */
10744
10745/* pthread test headers */
10746#include <pthread.h>
10747#if HAVE_PTHREADS < 7
10748#include <errno.h>
10749#endif
10750#ifndef NULL
10751#define NULL (void*)0
10752#endif
10753
10754static void *task(p)
10755	void *p;
10756{
10757	return (void *) (p == NULL);
10758}
10759
10760int
10761main ()
10762{
10763
10764	/* pthread test function */
10765#ifndef PTHREAD_CREATE_DETACHED
10766#define	PTHREAD_CREATE_DETACHED	1
10767#endif
10768	pthread_t t;
10769	int status;
10770	int detach = PTHREAD_CREATE_DETACHED;
10771
10772#if HAVE_PTHREADS > 4
10773	/* Final pthreads */
10774	pthread_attr_t attr;
10775
10776	status = pthread_attr_init(&attr);
10777	if( status ) return status;
10778
10779#if HAVE_PTHREADS < 7
10780	status = pthread_attr_setdetachstate(&attr, &detach);
10781	if( status < 0 ) status = errno;
10782#else
10783	status = pthread_attr_setdetachstate(&attr, detach);
10784#endif
10785	if( status ) return status;
10786	status = pthread_create( &t, &attr, task, NULL );
10787#if HAVE_PTHREADS < 7
10788	if( status < 0 ) status = errno;
10789#endif
10790	if( status ) return status;
10791#else
10792	/* Draft 4 pthreads */
10793	status = pthread_create( &t, pthread_attr_default, task, NULL );
10794	if( status ) return errno;
10795
10796	/* give thread a chance to complete */
10797	/* it should remain joinable and hence detachable */
10798	sleep( 1 );
10799
10800	status = pthread_detach( &t );
10801	if( status ) return errno;
10802#endif
10803
10804#ifdef HAVE_LINUX_THREADS
10805	pthread_kill_other_threads_np();
10806#endif
10807
10808	return 0;
10809
10810  ;
10811  return 0;
10812}
10813_ACEOF
10814if ac_fn_c_try_link "$LINENO"; then :
10815  ol_cv_pthread_mthreads=yes
10816else
10817  ol_cv_pthread_mthreads=no
10818fi
10819rm -f core conftest.err conftest.$ac_objext \
10820    conftest$ac_exeext conftest.$ac_ext
10821else
10822  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10823/* end confdefs.h.  */
10824
10825
10826/* pthread test headers */
10827#include <pthread.h>
10828#if HAVE_PTHREADS < 7
10829#include <errno.h>
10830#endif
10831#ifndef NULL
10832#define NULL (void*)0
10833#endif
10834
10835static void *task(p)
10836	void *p;
10837{
10838	return (void *) (p == NULL);
10839}
10840
10841
10842int main(argc, argv)
10843	int argc;
10844	char **argv;
10845{
10846
10847	/* pthread test function */
10848#ifndef PTHREAD_CREATE_DETACHED
10849#define	PTHREAD_CREATE_DETACHED	1
10850#endif
10851	pthread_t t;
10852	int status;
10853	int detach = PTHREAD_CREATE_DETACHED;
10854
10855#if HAVE_PTHREADS > 4
10856	/* Final pthreads */
10857	pthread_attr_t attr;
10858
10859	status = pthread_attr_init(&attr);
10860	if( status ) return status;
10861
10862#if HAVE_PTHREADS < 7
10863	status = pthread_attr_setdetachstate(&attr, &detach);
10864	if( status < 0 ) status = errno;
10865#else
10866	status = pthread_attr_setdetachstate(&attr, detach);
10867#endif
10868	if( status ) return status;
10869	status = pthread_create( &t, &attr, task, NULL );
10870#if HAVE_PTHREADS < 7
10871	if( status < 0 ) status = errno;
10872#endif
10873	if( status ) return status;
10874#else
10875	/* Draft 4 pthreads */
10876	status = pthread_create( &t, pthread_attr_default, task, NULL );
10877	if( status ) return errno;
10878
10879	/* give thread a chance to complete */
10880	/* it should remain joinable and hence detachable */
10881	sleep( 1 );
10882
10883	status = pthread_detach( &t );
10884	if( status ) return errno;
10885#endif
10886
10887#ifdef HAVE_LINUX_THREADS
10888	pthread_kill_other_threads_np();
10889#endif
10890
10891	return 0;
10892
10893}
10894
10895_ACEOF
10896if ac_fn_c_try_run "$LINENO"; then :
10897  ol_cv_pthread_mthreads=yes
10898else
10899  ol_cv_pthread_mthreads=no
10900fi
10901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10902  conftest.$ac_objext conftest.beam conftest.$ac_ext
10903fi
10904
10905
10906		# restore the LIBS
10907		LIBS="$ol_LIBS"
10908
10909fi
10910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
10911$as_echo "$ol_cv_pthread_mthreads" >&6; }
10912
10913	if test $ol_cv_pthread_mthreads = yes ; then
10914		ol_link_pthreads="-mthreads"
10915		ol_link_threads=posix
10916	fi
10917fi
10918
10919		# Pthread try link: -thread (ol_cv_pthread_thread)
10920if test "$ol_link_threads" = no ; then
10921	# try -thread
10922	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
10923$as_echo_n "checking for pthread link with -thread... " >&6; }
10924if ${ol_cv_pthread_thread+:} false; then :
10925  $as_echo_n "(cached) " >&6
10926else
10927
10928		# save the flags
10929		ol_LIBS="$LIBS"
10930		LIBS="-thread $LIBS"
10931
10932		if test "$cross_compiling" = yes; then :
10933  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934/* end confdefs.h.  */
10935
10936/* pthread test headers */
10937#include <pthread.h>
10938#if HAVE_PTHREADS < 7
10939#include <errno.h>
10940#endif
10941#ifndef NULL
10942#define NULL (void*)0
10943#endif
10944
10945static void *task(p)
10946	void *p;
10947{
10948	return (void *) (p == NULL);
10949}
10950
10951int
10952main ()
10953{
10954
10955	/* pthread test function */
10956#ifndef PTHREAD_CREATE_DETACHED
10957#define	PTHREAD_CREATE_DETACHED	1
10958#endif
10959	pthread_t t;
10960	int status;
10961	int detach = PTHREAD_CREATE_DETACHED;
10962
10963#if HAVE_PTHREADS > 4
10964	/* Final pthreads */
10965	pthread_attr_t attr;
10966
10967	status = pthread_attr_init(&attr);
10968	if( status ) return status;
10969
10970#if HAVE_PTHREADS < 7
10971	status = pthread_attr_setdetachstate(&attr, &detach);
10972	if( status < 0 ) status = errno;
10973#else
10974	status = pthread_attr_setdetachstate(&attr, detach);
10975#endif
10976	if( status ) return status;
10977	status = pthread_create( &t, &attr, task, NULL );
10978#if HAVE_PTHREADS < 7
10979	if( status < 0 ) status = errno;
10980#endif
10981	if( status ) return status;
10982#else
10983	/* Draft 4 pthreads */
10984	status = pthread_create( &t, pthread_attr_default, task, NULL );
10985	if( status ) return errno;
10986
10987	/* give thread a chance to complete */
10988	/* it should remain joinable and hence detachable */
10989	sleep( 1 );
10990
10991	status = pthread_detach( &t );
10992	if( status ) return errno;
10993#endif
10994
10995#ifdef HAVE_LINUX_THREADS
10996	pthread_kill_other_threads_np();
10997#endif
10998
10999	return 0;
11000
11001  ;
11002  return 0;
11003}
11004_ACEOF
11005if ac_fn_c_try_link "$LINENO"; then :
11006  ol_cv_pthread_thread=yes
11007else
11008  ol_cv_pthread_thread=no
11009fi
11010rm -f core conftest.err conftest.$ac_objext \
11011    conftest$ac_exeext conftest.$ac_ext
11012else
11013  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11014/* end confdefs.h.  */
11015
11016
11017/* pthread test headers */
11018#include <pthread.h>
11019#if HAVE_PTHREADS < 7
11020#include <errno.h>
11021#endif
11022#ifndef NULL
11023#define NULL (void*)0
11024#endif
11025
11026static void *task(p)
11027	void *p;
11028{
11029	return (void *) (p == NULL);
11030}
11031
11032
11033int main(argc, argv)
11034	int argc;
11035	char **argv;
11036{
11037
11038	/* pthread test function */
11039#ifndef PTHREAD_CREATE_DETACHED
11040#define	PTHREAD_CREATE_DETACHED	1
11041#endif
11042	pthread_t t;
11043	int status;
11044	int detach = PTHREAD_CREATE_DETACHED;
11045
11046#if HAVE_PTHREADS > 4
11047	/* Final pthreads */
11048	pthread_attr_t attr;
11049
11050	status = pthread_attr_init(&attr);
11051	if( status ) return status;
11052
11053#if HAVE_PTHREADS < 7
11054	status = pthread_attr_setdetachstate(&attr, &detach);
11055	if( status < 0 ) status = errno;
11056#else
11057	status = pthread_attr_setdetachstate(&attr, detach);
11058#endif
11059	if( status ) return status;
11060	status = pthread_create( &t, &attr, task, NULL );
11061#if HAVE_PTHREADS < 7
11062	if( status < 0 ) status = errno;
11063#endif
11064	if( status ) return status;
11065#else
11066	/* Draft 4 pthreads */
11067	status = pthread_create( &t, pthread_attr_default, task, NULL );
11068	if( status ) return errno;
11069
11070	/* give thread a chance to complete */
11071	/* it should remain joinable and hence detachable */
11072	sleep( 1 );
11073
11074	status = pthread_detach( &t );
11075	if( status ) return errno;
11076#endif
11077
11078#ifdef HAVE_LINUX_THREADS
11079	pthread_kill_other_threads_np();
11080#endif
11081
11082	return 0;
11083
11084}
11085
11086_ACEOF
11087if ac_fn_c_try_run "$LINENO"; then :
11088  ol_cv_pthread_thread=yes
11089else
11090  ol_cv_pthread_thread=no
11091fi
11092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11093  conftest.$ac_objext conftest.beam conftest.$ac_ext
11094fi
11095
11096
11097		# restore the LIBS
11098		LIBS="$ol_LIBS"
11099
11100fi
11101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
11102$as_echo "$ol_cv_pthread_thread" >&6; }
11103
11104	if test $ol_cv_pthread_thread = yes ; then
11105		ol_link_pthreads="-thread"
11106		ol_link_threads=posix
11107	fi
11108fi
11109
11110
11111		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
11112if test "$ol_link_threads" = no ; then
11113	# try -lpthread -lmach -lexc -lc_r
11114	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
11115$as_echo_n "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
11116if ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+:} false; then :
11117  $as_echo_n "(cached) " >&6
11118else
11119
11120		# save the flags
11121		ol_LIBS="$LIBS"
11122		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
11123
11124		if test "$cross_compiling" = yes; then :
11125  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11126/* end confdefs.h.  */
11127
11128/* pthread test headers */
11129#include <pthread.h>
11130#if HAVE_PTHREADS < 7
11131#include <errno.h>
11132#endif
11133#ifndef NULL
11134#define NULL (void*)0
11135#endif
11136
11137static void *task(p)
11138	void *p;
11139{
11140	return (void *) (p == NULL);
11141}
11142
11143int
11144main ()
11145{
11146
11147	/* pthread test function */
11148#ifndef PTHREAD_CREATE_DETACHED
11149#define	PTHREAD_CREATE_DETACHED	1
11150#endif
11151	pthread_t t;
11152	int status;
11153	int detach = PTHREAD_CREATE_DETACHED;
11154
11155#if HAVE_PTHREADS > 4
11156	/* Final pthreads */
11157	pthread_attr_t attr;
11158
11159	status = pthread_attr_init(&attr);
11160	if( status ) return status;
11161
11162#if HAVE_PTHREADS < 7
11163	status = pthread_attr_setdetachstate(&attr, &detach);
11164	if( status < 0 ) status = errno;
11165#else
11166	status = pthread_attr_setdetachstate(&attr, detach);
11167#endif
11168	if( status ) return status;
11169	status = pthread_create( &t, &attr, task, NULL );
11170#if HAVE_PTHREADS < 7
11171	if( status < 0 ) status = errno;
11172#endif
11173	if( status ) return status;
11174#else
11175	/* Draft 4 pthreads */
11176	status = pthread_create( &t, pthread_attr_default, task, NULL );
11177	if( status ) return errno;
11178
11179	/* give thread a chance to complete */
11180	/* it should remain joinable and hence detachable */
11181	sleep( 1 );
11182
11183	status = pthread_detach( &t );
11184	if( status ) return errno;
11185#endif
11186
11187#ifdef HAVE_LINUX_THREADS
11188	pthread_kill_other_threads_np();
11189#endif
11190
11191	return 0;
11192
11193  ;
11194  return 0;
11195}
11196_ACEOF
11197if ac_fn_c_try_link "$LINENO"; then :
11198  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11199else
11200  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11201fi
11202rm -f core conftest.err conftest.$ac_objext \
11203    conftest$ac_exeext conftest.$ac_ext
11204else
11205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11206/* end confdefs.h.  */
11207
11208
11209/* pthread test headers */
11210#include <pthread.h>
11211#if HAVE_PTHREADS < 7
11212#include <errno.h>
11213#endif
11214#ifndef NULL
11215#define NULL (void*)0
11216#endif
11217
11218static void *task(p)
11219	void *p;
11220{
11221	return (void *) (p == NULL);
11222}
11223
11224
11225int main(argc, argv)
11226	int argc;
11227	char **argv;
11228{
11229
11230	/* pthread test function */
11231#ifndef PTHREAD_CREATE_DETACHED
11232#define	PTHREAD_CREATE_DETACHED	1
11233#endif
11234	pthread_t t;
11235	int status;
11236	int detach = PTHREAD_CREATE_DETACHED;
11237
11238#if HAVE_PTHREADS > 4
11239	/* Final pthreads */
11240	pthread_attr_t attr;
11241
11242	status = pthread_attr_init(&attr);
11243	if( status ) return status;
11244
11245#if HAVE_PTHREADS < 7
11246	status = pthread_attr_setdetachstate(&attr, &detach);
11247	if( status < 0 ) status = errno;
11248#else
11249	status = pthread_attr_setdetachstate(&attr, detach);
11250#endif
11251	if( status ) return status;
11252	status = pthread_create( &t, &attr, task, NULL );
11253#if HAVE_PTHREADS < 7
11254	if( status < 0 ) status = errno;
11255#endif
11256	if( status ) return status;
11257#else
11258	/* Draft 4 pthreads */
11259	status = pthread_create( &t, pthread_attr_default, task, NULL );
11260	if( status ) return errno;
11261
11262	/* give thread a chance to complete */
11263	/* it should remain joinable and hence detachable */
11264	sleep( 1 );
11265
11266	status = pthread_detach( &t );
11267	if( status ) return errno;
11268#endif
11269
11270#ifdef HAVE_LINUX_THREADS
11271	pthread_kill_other_threads_np();
11272#endif
11273
11274	return 0;
11275
11276}
11277
11278_ACEOF
11279if ac_fn_c_try_run "$LINENO"; then :
11280  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
11281else
11282  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
11283fi
11284rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11285  conftest.$ac_objext conftest.beam conftest.$ac_ext
11286fi
11287
11288
11289		# restore the LIBS
11290		LIBS="$ol_LIBS"
11291
11292fi
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
11294$as_echo "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
11295
11296	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
11297		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
11298		ol_link_threads=posix
11299	fi
11300fi
11301
11302		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
11303if test "$ol_link_threads" = no ; then
11304	# try -lpthread -lmach -lexc
11305	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
11306$as_echo_n "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
11307if ${ol_cv_pthread_lpthread_lmach_lexc+:} false; then :
11308  $as_echo_n "(cached) " >&6
11309else
11310
11311		# save the flags
11312		ol_LIBS="$LIBS"
11313		LIBS="-lpthread -lmach -lexc $LIBS"
11314
11315		if test "$cross_compiling" = yes; then :
11316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317/* end confdefs.h.  */
11318
11319/* pthread test headers */
11320#include <pthread.h>
11321#if HAVE_PTHREADS < 7
11322#include <errno.h>
11323#endif
11324#ifndef NULL
11325#define NULL (void*)0
11326#endif
11327
11328static void *task(p)
11329	void *p;
11330{
11331	return (void *) (p == NULL);
11332}
11333
11334int
11335main ()
11336{
11337
11338	/* pthread test function */
11339#ifndef PTHREAD_CREATE_DETACHED
11340#define	PTHREAD_CREATE_DETACHED	1
11341#endif
11342	pthread_t t;
11343	int status;
11344	int detach = PTHREAD_CREATE_DETACHED;
11345
11346#if HAVE_PTHREADS > 4
11347	/* Final pthreads */
11348	pthread_attr_t attr;
11349
11350	status = pthread_attr_init(&attr);
11351	if( status ) return status;
11352
11353#if HAVE_PTHREADS < 7
11354	status = pthread_attr_setdetachstate(&attr, &detach);
11355	if( status < 0 ) status = errno;
11356#else
11357	status = pthread_attr_setdetachstate(&attr, detach);
11358#endif
11359	if( status ) return status;
11360	status = pthread_create( &t, &attr, task, NULL );
11361#if HAVE_PTHREADS < 7
11362	if( status < 0 ) status = errno;
11363#endif
11364	if( status ) return status;
11365#else
11366	/* Draft 4 pthreads */
11367	status = pthread_create( &t, pthread_attr_default, task, NULL );
11368	if( status ) return errno;
11369
11370	/* give thread a chance to complete */
11371	/* it should remain joinable and hence detachable */
11372	sleep( 1 );
11373
11374	status = pthread_detach( &t );
11375	if( status ) return errno;
11376#endif
11377
11378#ifdef HAVE_LINUX_THREADS
11379	pthread_kill_other_threads_np();
11380#endif
11381
11382	return 0;
11383
11384  ;
11385  return 0;
11386}
11387_ACEOF
11388if ac_fn_c_try_link "$LINENO"; then :
11389  ol_cv_pthread_lpthread_lmach_lexc=yes
11390else
11391  ol_cv_pthread_lpthread_lmach_lexc=no
11392fi
11393rm -f core conftest.err conftest.$ac_objext \
11394    conftest$ac_exeext conftest.$ac_ext
11395else
11396  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11397/* end confdefs.h.  */
11398
11399
11400/* pthread test headers */
11401#include <pthread.h>
11402#if HAVE_PTHREADS < 7
11403#include <errno.h>
11404#endif
11405#ifndef NULL
11406#define NULL (void*)0
11407#endif
11408
11409static void *task(p)
11410	void *p;
11411{
11412	return (void *) (p == NULL);
11413}
11414
11415
11416int main(argc, argv)
11417	int argc;
11418	char **argv;
11419{
11420
11421	/* pthread test function */
11422#ifndef PTHREAD_CREATE_DETACHED
11423#define	PTHREAD_CREATE_DETACHED	1
11424#endif
11425	pthread_t t;
11426	int status;
11427	int detach = PTHREAD_CREATE_DETACHED;
11428
11429#if HAVE_PTHREADS > 4
11430	/* Final pthreads */
11431	pthread_attr_t attr;
11432
11433	status = pthread_attr_init(&attr);
11434	if( status ) return status;
11435
11436#if HAVE_PTHREADS < 7
11437	status = pthread_attr_setdetachstate(&attr, &detach);
11438	if( status < 0 ) status = errno;
11439#else
11440	status = pthread_attr_setdetachstate(&attr, detach);
11441#endif
11442	if( status ) return status;
11443	status = pthread_create( &t, &attr, task, NULL );
11444#if HAVE_PTHREADS < 7
11445	if( status < 0 ) status = errno;
11446#endif
11447	if( status ) return status;
11448#else
11449	/* Draft 4 pthreads */
11450	status = pthread_create( &t, pthread_attr_default, task, NULL );
11451	if( status ) return errno;
11452
11453	/* give thread a chance to complete */
11454	/* it should remain joinable and hence detachable */
11455	sleep( 1 );
11456
11457	status = pthread_detach( &t );
11458	if( status ) return errno;
11459#endif
11460
11461#ifdef HAVE_LINUX_THREADS
11462	pthread_kill_other_threads_np();
11463#endif
11464
11465	return 0;
11466
11467}
11468
11469_ACEOF
11470if ac_fn_c_try_run "$LINENO"; then :
11471  ol_cv_pthread_lpthread_lmach_lexc=yes
11472else
11473  ol_cv_pthread_lpthread_lmach_lexc=no
11474fi
11475rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11476  conftest.$ac_objext conftest.beam conftest.$ac_ext
11477fi
11478
11479
11480		# restore the LIBS
11481		LIBS="$ol_LIBS"
11482
11483fi
11484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
11485$as_echo "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
11486
11487	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
11488		ol_link_pthreads="-lpthread -lmach -lexc"
11489		ol_link_threads=posix
11490	fi
11491fi
11492
11493
11494		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
11495if test "$ol_link_threads" = no ; then
11496	# try -lpthread -Wl,-woff,85
11497	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
11498$as_echo_n "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
11499if ${ol_cv_pthread_lib_lpthread_woff+:} false; then :
11500  $as_echo_n "(cached) " >&6
11501else
11502
11503		# save the flags
11504		ol_LIBS="$LIBS"
11505		LIBS="-lpthread -Wl,-woff,85 $LIBS"
11506
11507		if test "$cross_compiling" = yes; then :
11508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11509/* end confdefs.h.  */
11510
11511/* pthread test headers */
11512#include <pthread.h>
11513#if HAVE_PTHREADS < 7
11514#include <errno.h>
11515#endif
11516#ifndef NULL
11517#define NULL (void*)0
11518#endif
11519
11520static void *task(p)
11521	void *p;
11522{
11523	return (void *) (p == NULL);
11524}
11525
11526int
11527main ()
11528{
11529
11530	/* pthread test function */
11531#ifndef PTHREAD_CREATE_DETACHED
11532#define	PTHREAD_CREATE_DETACHED	1
11533#endif
11534	pthread_t t;
11535	int status;
11536	int detach = PTHREAD_CREATE_DETACHED;
11537
11538#if HAVE_PTHREADS > 4
11539	/* Final pthreads */
11540	pthread_attr_t attr;
11541
11542	status = pthread_attr_init(&attr);
11543	if( status ) return status;
11544
11545#if HAVE_PTHREADS < 7
11546	status = pthread_attr_setdetachstate(&attr, &detach);
11547	if( status < 0 ) status = errno;
11548#else
11549	status = pthread_attr_setdetachstate(&attr, detach);
11550#endif
11551	if( status ) return status;
11552	status = pthread_create( &t, &attr, task, NULL );
11553#if HAVE_PTHREADS < 7
11554	if( status < 0 ) status = errno;
11555#endif
11556	if( status ) return status;
11557#else
11558	/* Draft 4 pthreads */
11559	status = pthread_create( &t, pthread_attr_default, task, NULL );
11560	if( status ) return errno;
11561
11562	/* give thread a chance to complete */
11563	/* it should remain joinable and hence detachable */
11564	sleep( 1 );
11565
11566	status = pthread_detach( &t );
11567	if( status ) return errno;
11568#endif
11569
11570#ifdef HAVE_LINUX_THREADS
11571	pthread_kill_other_threads_np();
11572#endif
11573
11574	return 0;
11575
11576  ;
11577  return 0;
11578}
11579_ACEOF
11580if ac_fn_c_try_link "$LINENO"; then :
11581  ol_cv_pthread_lib_lpthread_woff=yes
11582else
11583  ol_cv_pthread_lib_lpthread_woff=no
11584fi
11585rm -f core conftest.err conftest.$ac_objext \
11586    conftest$ac_exeext conftest.$ac_ext
11587else
11588  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11589/* end confdefs.h.  */
11590
11591
11592/* pthread test headers */
11593#include <pthread.h>
11594#if HAVE_PTHREADS < 7
11595#include <errno.h>
11596#endif
11597#ifndef NULL
11598#define NULL (void*)0
11599#endif
11600
11601static void *task(p)
11602	void *p;
11603{
11604	return (void *) (p == NULL);
11605}
11606
11607
11608int main(argc, argv)
11609	int argc;
11610	char **argv;
11611{
11612
11613	/* pthread test function */
11614#ifndef PTHREAD_CREATE_DETACHED
11615#define	PTHREAD_CREATE_DETACHED	1
11616#endif
11617	pthread_t t;
11618	int status;
11619	int detach = PTHREAD_CREATE_DETACHED;
11620
11621#if HAVE_PTHREADS > 4
11622	/* Final pthreads */
11623	pthread_attr_t attr;
11624
11625	status = pthread_attr_init(&attr);
11626	if( status ) return status;
11627
11628#if HAVE_PTHREADS < 7
11629	status = pthread_attr_setdetachstate(&attr, &detach);
11630	if( status < 0 ) status = errno;
11631#else
11632	status = pthread_attr_setdetachstate(&attr, detach);
11633#endif
11634	if( status ) return status;
11635	status = pthread_create( &t, &attr, task, NULL );
11636#if HAVE_PTHREADS < 7
11637	if( status < 0 ) status = errno;
11638#endif
11639	if( status ) return status;
11640#else
11641	/* Draft 4 pthreads */
11642	status = pthread_create( &t, pthread_attr_default, task, NULL );
11643	if( status ) return errno;
11644
11645	/* give thread a chance to complete */
11646	/* it should remain joinable and hence detachable */
11647	sleep( 1 );
11648
11649	status = pthread_detach( &t );
11650	if( status ) return errno;
11651#endif
11652
11653#ifdef HAVE_LINUX_THREADS
11654	pthread_kill_other_threads_np();
11655#endif
11656
11657	return 0;
11658
11659}
11660
11661_ACEOF
11662if ac_fn_c_try_run "$LINENO"; then :
11663  ol_cv_pthread_lib_lpthread_woff=yes
11664else
11665  ol_cv_pthread_lib_lpthread_woff=no
11666fi
11667rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11668  conftest.$ac_objext conftest.beam conftest.$ac_ext
11669fi
11670
11671
11672		# restore the LIBS
11673		LIBS="$ol_LIBS"
11674
11675fi
11676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
11677$as_echo "$ol_cv_pthread_lib_lpthread_woff" >&6; }
11678
11679	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
11680		ol_link_pthreads="-lpthread -Wl,-woff,85"
11681		ol_link_threads=posix
11682	fi
11683fi
11684
11685
11686		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
11687if test "$ol_link_threads" = no ; then
11688	# try -lpthread
11689	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
11690$as_echo_n "checking for pthread link with -lpthread... " >&6; }
11691if ${ol_cv_pthread_lpthread+:} false; then :
11692  $as_echo_n "(cached) " >&6
11693else
11694
11695		# save the flags
11696		ol_LIBS="$LIBS"
11697		LIBS="-lpthread $LIBS"
11698
11699		if test "$cross_compiling" = yes; then :
11700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11701/* end confdefs.h.  */
11702
11703/* pthread test headers */
11704#include <pthread.h>
11705#if HAVE_PTHREADS < 7
11706#include <errno.h>
11707#endif
11708#ifndef NULL
11709#define NULL (void*)0
11710#endif
11711
11712static void *task(p)
11713	void *p;
11714{
11715	return (void *) (p == NULL);
11716}
11717
11718int
11719main ()
11720{
11721
11722	/* pthread test function */
11723#ifndef PTHREAD_CREATE_DETACHED
11724#define	PTHREAD_CREATE_DETACHED	1
11725#endif
11726	pthread_t t;
11727	int status;
11728	int detach = PTHREAD_CREATE_DETACHED;
11729
11730#if HAVE_PTHREADS > 4
11731	/* Final pthreads */
11732	pthread_attr_t attr;
11733
11734	status = pthread_attr_init(&attr);
11735	if( status ) return status;
11736
11737#if HAVE_PTHREADS < 7
11738	status = pthread_attr_setdetachstate(&attr, &detach);
11739	if( status < 0 ) status = errno;
11740#else
11741	status = pthread_attr_setdetachstate(&attr, detach);
11742#endif
11743	if( status ) return status;
11744	status = pthread_create( &t, &attr, task, NULL );
11745#if HAVE_PTHREADS < 7
11746	if( status < 0 ) status = errno;
11747#endif
11748	if( status ) return status;
11749#else
11750	/* Draft 4 pthreads */
11751	status = pthread_create( &t, pthread_attr_default, task, NULL );
11752	if( status ) return errno;
11753
11754	/* give thread a chance to complete */
11755	/* it should remain joinable and hence detachable */
11756	sleep( 1 );
11757
11758	status = pthread_detach( &t );
11759	if( status ) return errno;
11760#endif
11761
11762#ifdef HAVE_LINUX_THREADS
11763	pthread_kill_other_threads_np();
11764#endif
11765
11766	return 0;
11767
11768  ;
11769  return 0;
11770}
11771_ACEOF
11772if ac_fn_c_try_link "$LINENO"; then :
11773  ol_cv_pthread_lpthread=yes
11774else
11775  ol_cv_pthread_lpthread=no
11776fi
11777rm -f core conftest.err conftest.$ac_objext \
11778    conftest$ac_exeext conftest.$ac_ext
11779else
11780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11781/* end confdefs.h.  */
11782
11783
11784/* pthread test headers */
11785#include <pthread.h>
11786#if HAVE_PTHREADS < 7
11787#include <errno.h>
11788#endif
11789#ifndef NULL
11790#define NULL (void*)0
11791#endif
11792
11793static void *task(p)
11794	void *p;
11795{
11796	return (void *) (p == NULL);
11797}
11798
11799
11800int main(argc, argv)
11801	int argc;
11802	char **argv;
11803{
11804
11805	/* pthread test function */
11806#ifndef PTHREAD_CREATE_DETACHED
11807#define	PTHREAD_CREATE_DETACHED	1
11808#endif
11809	pthread_t t;
11810	int status;
11811	int detach = PTHREAD_CREATE_DETACHED;
11812
11813#if HAVE_PTHREADS > 4
11814	/* Final pthreads */
11815	pthread_attr_t attr;
11816
11817	status = pthread_attr_init(&attr);
11818	if( status ) return status;
11819
11820#if HAVE_PTHREADS < 7
11821	status = pthread_attr_setdetachstate(&attr, &detach);
11822	if( status < 0 ) status = errno;
11823#else
11824	status = pthread_attr_setdetachstate(&attr, detach);
11825#endif
11826	if( status ) return status;
11827	status = pthread_create( &t, &attr, task, NULL );
11828#if HAVE_PTHREADS < 7
11829	if( status < 0 ) status = errno;
11830#endif
11831	if( status ) return status;
11832#else
11833	/* Draft 4 pthreads */
11834	status = pthread_create( &t, pthread_attr_default, task, NULL );
11835	if( status ) return errno;
11836
11837	/* give thread a chance to complete */
11838	/* it should remain joinable and hence detachable */
11839	sleep( 1 );
11840
11841	status = pthread_detach( &t );
11842	if( status ) return errno;
11843#endif
11844
11845#ifdef HAVE_LINUX_THREADS
11846	pthread_kill_other_threads_np();
11847#endif
11848
11849	return 0;
11850
11851}
11852
11853_ACEOF
11854if ac_fn_c_try_run "$LINENO"; then :
11855  ol_cv_pthread_lpthread=yes
11856else
11857  ol_cv_pthread_lpthread=no
11858fi
11859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11860  conftest.$ac_objext conftest.beam conftest.$ac_ext
11861fi
11862
11863
11864		# restore the LIBS
11865		LIBS="$ol_LIBS"
11866
11867fi
11868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
11869$as_echo "$ol_cv_pthread_lpthread" >&6; }
11870
11871	if test $ol_cv_pthread_lpthread = yes ; then
11872		ol_link_pthreads="-lpthread"
11873		ol_link_threads=posix
11874	fi
11875fi
11876
11877		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
11878if test "$ol_link_threads" = no ; then
11879	# try -lc_r
11880	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
11881$as_echo_n "checking for pthread link with -lc_r... " >&6; }
11882if ${ol_cv_pthread_lc_r+:} false; then :
11883  $as_echo_n "(cached) " >&6
11884else
11885
11886		# save the flags
11887		ol_LIBS="$LIBS"
11888		LIBS="-lc_r $LIBS"
11889
11890		if test "$cross_compiling" = yes; then :
11891  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11892/* end confdefs.h.  */
11893
11894/* pthread test headers */
11895#include <pthread.h>
11896#if HAVE_PTHREADS < 7
11897#include <errno.h>
11898#endif
11899#ifndef NULL
11900#define NULL (void*)0
11901#endif
11902
11903static void *task(p)
11904	void *p;
11905{
11906	return (void *) (p == NULL);
11907}
11908
11909int
11910main ()
11911{
11912
11913	/* pthread test function */
11914#ifndef PTHREAD_CREATE_DETACHED
11915#define	PTHREAD_CREATE_DETACHED	1
11916#endif
11917	pthread_t t;
11918	int status;
11919	int detach = PTHREAD_CREATE_DETACHED;
11920
11921#if HAVE_PTHREADS > 4
11922	/* Final pthreads */
11923	pthread_attr_t attr;
11924
11925	status = pthread_attr_init(&attr);
11926	if( status ) return status;
11927
11928#if HAVE_PTHREADS < 7
11929	status = pthread_attr_setdetachstate(&attr, &detach);
11930	if( status < 0 ) status = errno;
11931#else
11932	status = pthread_attr_setdetachstate(&attr, detach);
11933#endif
11934	if( status ) return status;
11935	status = pthread_create( &t, &attr, task, NULL );
11936#if HAVE_PTHREADS < 7
11937	if( status < 0 ) status = errno;
11938#endif
11939	if( status ) return status;
11940#else
11941	/* Draft 4 pthreads */
11942	status = pthread_create( &t, pthread_attr_default, task, NULL );
11943	if( status ) return errno;
11944
11945	/* give thread a chance to complete */
11946	/* it should remain joinable and hence detachable */
11947	sleep( 1 );
11948
11949	status = pthread_detach( &t );
11950	if( status ) return errno;
11951#endif
11952
11953#ifdef HAVE_LINUX_THREADS
11954	pthread_kill_other_threads_np();
11955#endif
11956
11957	return 0;
11958
11959  ;
11960  return 0;
11961}
11962_ACEOF
11963if ac_fn_c_try_link "$LINENO"; then :
11964  ol_cv_pthread_lc_r=yes
11965else
11966  ol_cv_pthread_lc_r=no
11967fi
11968rm -f core conftest.err conftest.$ac_objext \
11969    conftest$ac_exeext conftest.$ac_ext
11970else
11971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11972/* end confdefs.h.  */
11973
11974
11975/* pthread test headers */
11976#include <pthread.h>
11977#if HAVE_PTHREADS < 7
11978#include <errno.h>
11979#endif
11980#ifndef NULL
11981#define NULL (void*)0
11982#endif
11983
11984static void *task(p)
11985	void *p;
11986{
11987	return (void *) (p == NULL);
11988}
11989
11990
11991int main(argc, argv)
11992	int argc;
11993	char **argv;
11994{
11995
11996	/* pthread test function */
11997#ifndef PTHREAD_CREATE_DETACHED
11998#define	PTHREAD_CREATE_DETACHED	1
11999#endif
12000	pthread_t t;
12001	int status;
12002	int detach = PTHREAD_CREATE_DETACHED;
12003
12004#if HAVE_PTHREADS > 4
12005	/* Final pthreads */
12006	pthread_attr_t attr;
12007
12008	status = pthread_attr_init(&attr);
12009	if( status ) return status;
12010
12011#if HAVE_PTHREADS < 7
12012	status = pthread_attr_setdetachstate(&attr, &detach);
12013	if( status < 0 ) status = errno;
12014#else
12015	status = pthread_attr_setdetachstate(&attr, detach);
12016#endif
12017	if( status ) return status;
12018	status = pthread_create( &t, &attr, task, NULL );
12019#if HAVE_PTHREADS < 7
12020	if( status < 0 ) status = errno;
12021#endif
12022	if( status ) return status;
12023#else
12024	/* Draft 4 pthreads */
12025	status = pthread_create( &t, pthread_attr_default, task, NULL );
12026	if( status ) return errno;
12027
12028	/* give thread a chance to complete */
12029	/* it should remain joinable and hence detachable */
12030	sleep( 1 );
12031
12032	status = pthread_detach( &t );
12033	if( status ) return errno;
12034#endif
12035
12036#ifdef HAVE_LINUX_THREADS
12037	pthread_kill_other_threads_np();
12038#endif
12039
12040	return 0;
12041
12042}
12043
12044_ACEOF
12045if ac_fn_c_try_run "$LINENO"; then :
12046  ol_cv_pthread_lc_r=yes
12047else
12048  ol_cv_pthread_lc_r=no
12049fi
12050rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12051  conftest.$ac_objext conftest.beam conftest.$ac_ext
12052fi
12053
12054
12055		# restore the LIBS
12056		LIBS="$ol_LIBS"
12057
12058fi
12059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
12060$as_echo "$ol_cv_pthread_lc_r" >&6; }
12061
12062	if test $ol_cv_pthread_lc_r = yes ; then
12063		ol_link_pthreads="-lc_r"
12064		ol_link_threads=posix
12065	fi
12066fi
12067
12068
12069		# Pthread try link: -threads (ol_cv_pthread_threads)
12070if test "$ol_link_threads" = no ; then
12071	# try -threads
12072	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
12073$as_echo_n "checking for pthread link with -threads... " >&6; }
12074if ${ol_cv_pthread_threads+:} false; then :
12075  $as_echo_n "(cached) " >&6
12076else
12077
12078		# save the flags
12079		ol_LIBS="$LIBS"
12080		LIBS="-threads $LIBS"
12081
12082		if test "$cross_compiling" = yes; then :
12083  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12084/* end confdefs.h.  */
12085
12086/* pthread test headers */
12087#include <pthread.h>
12088#if HAVE_PTHREADS < 7
12089#include <errno.h>
12090#endif
12091#ifndef NULL
12092#define NULL (void*)0
12093#endif
12094
12095static void *task(p)
12096	void *p;
12097{
12098	return (void *) (p == NULL);
12099}
12100
12101int
12102main ()
12103{
12104
12105	/* pthread test function */
12106#ifndef PTHREAD_CREATE_DETACHED
12107#define	PTHREAD_CREATE_DETACHED	1
12108#endif
12109	pthread_t t;
12110	int status;
12111	int detach = PTHREAD_CREATE_DETACHED;
12112
12113#if HAVE_PTHREADS > 4
12114	/* Final pthreads */
12115	pthread_attr_t attr;
12116
12117	status = pthread_attr_init(&attr);
12118	if( status ) return status;
12119
12120#if HAVE_PTHREADS < 7
12121	status = pthread_attr_setdetachstate(&attr, &detach);
12122	if( status < 0 ) status = errno;
12123#else
12124	status = pthread_attr_setdetachstate(&attr, detach);
12125#endif
12126	if( status ) return status;
12127	status = pthread_create( &t, &attr, task, NULL );
12128#if HAVE_PTHREADS < 7
12129	if( status < 0 ) status = errno;
12130#endif
12131	if( status ) return status;
12132#else
12133	/* Draft 4 pthreads */
12134	status = pthread_create( &t, pthread_attr_default, task, NULL );
12135	if( status ) return errno;
12136
12137	/* give thread a chance to complete */
12138	/* it should remain joinable and hence detachable */
12139	sleep( 1 );
12140
12141	status = pthread_detach( &t );
12142	if( status ) return errno;
12143#endif
12144
12145#ifdef HAVE_LINUX_THREADS
12146	pthread_kill_other_threads_np();
12147#endif
12148
12149	return 0;
12150
12151  ;
12152  return 0;
12153}
12154_ACEOF
12155if ac_fn_c_try_link "$LINENO"; then :
12156  ol_cv_pthread_threads=yes
12157else
12158  ol_cv_pthread_threads=no
12159fi
12160rm -f core conftest.err conftest.$ac_objext \
12161    conftest$ac_exeext conftest.$ac_ext
12162else
12163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12164/* end confdefs.h.  */
12165
12166
12167/* pthread test headers */
12168#include <pthread.h>
12169#if HAVE_PTHREADS < 7
12170#include <errno.h>
12171#endif
12172#ifndef NULL
12173#define NULL (void*)0
12174#endif
12175
12176static void *task(p)
12177	void *p;
12178{
12179	return (void *) (p == NULL);
12180}
12181
12182
12183int main(argc, argv)
12184	int argc;
12185	char **argv;
12186{
12187
12188	/* pthread test function */
12189#ifndef PTHREAD_CREATE_DETACHED
12190#define	PTHREAD_CREATE_DETACHED	1
12191#endif
12192	pthread_t t;
12193	int status;
12194	int detach = PTHREAD_CREATE_DETACHED;
12195
12196#if HAVE_PTHREADS > 4
12197	/* Final pthreads */
12198	pthread_attr_t attr;
12199
12200	status = pthread_attr_init(&attr);
12201	if( status ) return status;
12202
12203#if HAVE_PTHREADS < 7
12204	status = pthread_attr_setdetachstate(&attr, &detach);
12205	if( status < 0 ) status = errno;
12206#else
12207	status = pthread_attr_setdetachstate(&attr, detach);
12208#endif
12209	if( status ) return status;
12210	status = pthread_create( &t, &attr, task, NULL );
12211#if HAVE_PTHREADS < 7
12212	if( status < 0 ) status = errno;
12213#endif
12214	if( status ) return status;
12215#else
12216	/* Draft 4 pthreads */
12217	status = pthread_create( &t, pthread_attr_default, task, NULL );
12218	if( status ) return errno;
12219
12220	/* give thread a chance to complete */
12221	/* it should remain joinable and hence detachable */
12222	sleep( 1 );
12223
12224	status = pthread_detach( &t );
12225	if( status ) return errno;
12226#endif
12227
12228#ifdef HAVE_LINUX_THREADS
12229	pthread_kill_other_threads_np();
12230#endif
12231
12232	return 0;
12233
12234}
12235
12236_ACEOF
12237if ac_fn_c_try_run "$LINENO"; then :
12238  ol_cv_pthread_threads=yes
12239else
12240  ol_cv_pthread_threads=no
12241fi
12242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12243  conftest.$ac_objext conftest.beam conftest.$ac_ext
12244fi
12245
12246
12247		# restore the LIBS
12248		LIBS="$ol_LIBS"
12249
12250fi
12251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
12252$as_echo "$ol_cv_pthread_threads" >&6; }
12253
12254	if test $ol_cv_pthread_threads = yes ; then
12255		ol_link_pthreads="-threads"
12256		ol_link_threads=posix
12257	fi
12258fi
12259
12260
12261		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
12262if test "$ol_link_threads" = no ; then
12263	# try -lpthreads -lmach -lexc -lc_r
12264	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
12265$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
12266if ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+:} false; then :
12267  $as_echo_n "(cached) " >&6
12268else
12269
12270		# save the flags
12271		ol_LIBS="$LIBS"
12272		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
12273
12274		if test "$cross_compiling" = yes; then :
12275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276/* end confdefs.h.  */
12277
12278/* pthread test headers */
12279#include <pthread.h>
12280#if HAVE_PTHREADS < 7
12281#include <errno.h>
12282#endif
12283#ifndef NULL
12284#define NULL (void*)0
12285#endif
12286
12287static void *task(p)
12288	void *p;
12289{
12290	return (void *) (p == NULL);
12291}
12292
12293int
12294main ()
12295{
12296
12297	/* pthread test function */
12298#ifndef PTHREAD_CREATE_DETACHED
12299#define	PTHREAD_CREATE_DETACHED	1
12300#endif
12301	pthread_t t;
12302	int status;
12303	int detach = PTHREAD_CREATE_DETACHED;
12304
12305#if HAVE_PTHREADS > 4
12306	/* Final pthreads */
12307	pthread_attr_t attr;
12308
12309	status = pthread_attr_init(&attr);
12310	if( status ) return status;
12311
12312#if HAVE_PTHREADS < 7
12313	status = pthread_attr_setdetachstate(&attr, &detach);
12314	if( status < 0 ) status = errno;
12315#else
12316	status = pthread_attr_setdetachstate(&attr, detach);
12317#endif
12318	if( status ) return status;
12319	status = pthread_create( &t, &attr, task, NULL );
12320#if HAVE_PTHREADS < 7
12321	if( status < 0 ) status = errno;
12322#endif
12323	if( status ) return status;
12324#else
12325	/* Draft 4 pthreads */
12326	status = pthread_create( &t, pthread_attr_default, task, NULL );
12327	if( status ) return errno;
12328
12329	/* give thread a chance to complete */
12330	/* it should remain joinable and hence detachable */
12331	sleep( 1 );
12332
12333	status = pthread_detach( &t );
12334	if( status ) return errno;
12335#endif
12336
12337#ifdef HAVE_LINUX_THREADS
12338	pthread_kill_other_threads_np();
12339#endif
12340
12341	return 0;
12342
12343  ;
12344  return 0;
12345}
12346_ACEOF
12347if ac_fn_c_try_link "$LINENO"; then :
12348  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12349else
12350  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12351fi
12352rm -f core conftest.err conftest.$ac_objext \
12353    conftest$ac_exeext conftest.$ac_ext
12354else
12355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12356/* end confdefs.h.  */
12357
12358
12359/* pthread test headers */
12360#include <pthread.h>
12361#if HAVE_PTHREADS < 7
12362#include <errno.h>
12363#endif
12364#ifndef NULL
12365#define NULL (void*)0
12366#endif
12367
12368static void *task(p)
12369	void *p;
12370{
12371	return (void *) (p == NULL);
12372}
12373
12374
12375int main(argc, argv)
12376	int argc;
12377	char **argv;
12378{
12379
12380	/* pthread test function */
12381#ifndef PTHREAD_CREATE_DETACHED
12382#define	PTHREAD_CREATE_DETACHED	1
12383#endif
12384	pthread_t t;
12385	int status;
12386	int detach = PTHREAD_CREATE_DETACHED;
12387
12388#if HAVE_PTHREADS > 4
12389	/* Final pthreads */
12390	pthread_attr_t attr;
12391
12392	status = pthread_attr_init(&attr);
12393	if( status ) return status;
12394
12395#if HAVE_PTHREADS < 7
12396	status = pthread_attr_setdetachstate(&attr, &detach);
12397	if( status < 0 ) status = errno;
12398#else
12399	status = pthread_attr_setdetachstate(&attr, detach);
12400#endif
12401	if( status ) return status;
12402	status = pthread_create( &t, &attr, task, NULL );
12403#if HAVE_PTHREADS < 7
12404	if( status < 0 ) status = errno;
12405#endif
12406	if( status ) return status;
12407#else
12408	/* Draft 4 pthreads */
12409	status = pthread_create( &t, pthread_attr_default, task, NULL );
12410	if( status ) return errno;
12411
12412	/* give thread a chance to complete */
12413	/* it should remain joinable and hence detachable */
12414	sleep( 1 );
12415
12416	status = pthread_detach( &t );
12417	if( status ) return errno;
12418#endif
12419
12420#ifdef HAVE_LINUX_THREADS
12421	pthread_kill_other_threads_np();
12422#endif
12423
12424	return 0;
12425
12426}
12427
12428_ACEOF
12429if ac_fn_c_try_run "$LINENO"; then :
12430  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
12431else
12432  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
12433fi
12434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12435  conftest.$ac_objext conftest.beam conftest.$ac_ext
12436fi
12437
12438
12439		# restore the LIBS
12440		LIBS="$ol_LIBS"
12441
12442fi
12443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
12444$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
12445
12446	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
12447		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
12448		ol_link_threads=posix
12449	fi
12450fi
12451
12452		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
12453if test "$ol_link_threads" = no ; then
12454	# try -lpthreads -lmach -lexc
12455	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
12456$as_echo_n "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
12457if ${ol_cv_pthread_lpthreads_lmach_lexc+:} false; then :
12458  $as_echo_n "(cached) " >&6
12459else
12460
12461		# save the flags
12462		ol_LIBS="$LIBS"
12463		LIBS="-lpthreads -lmach -lexc $LIBS"
12464
12465		if test "$cross_compiling" = yes; then :
12466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467/* end confdefs.h.  */
12468
12469/* pthread test headers */
12470#include <pthread.h>
12471#if HAVE_PTHREADS < 7
12472#include <errno.h>
12473#endif
12474#ifndef NULL
12475#define NULL (void*)0
12476#endif
12477
12478static void *task(p)
12479	void *p;
12480{
12481	return (void *) (p == NULL);
12482}
12483
12484int
12485main ()
12486{
12487
12488	/* pthread test function */
12489#ifndef PTHREAD_CREATE_DETACHED
12490#define	PTHREAD_CREATE_DETACHED	1
12491#endif
12492	pthread_t t;
12493	int status;
12494	int detach = PTHREAD_CREATE_DETACHED;
12495
12496#if HAVE_PTHREADS > 4
12497	/* Final pthreads */
12498	pthread_attr_t attr;
12499
12500	status = pthread_attr_init(&attr);
12501	if( status ) return status;
12502
12503#if HAVE_PTHREADS < 7
12504	status = pthread_attr_setdetachstate(&attr, &detach);
12505	if( status < 0 ) status = errno;
12506#else
12507	status = pthread_attr_setdetachstate(&attr, detach);
12508#endif
12509	if( status ) return status;
12510	status = pthread_create( &t, &attr, task, NULL );
12511#if HAVE_PTHREADS < 7
12512	if( status < 0 ) status = errno;
12513#endif
12514	if( status ) return status;
12515#else
12516	/* Draft 4 pthreads */
12517	status = pthread_create( &t, pthread_attr_default, task, NULL );
12518	if( status ) return errno;
12519
12520	/* give thread a chance to complete */
12521	/* it should remain joinable and hence detachable */
12522	sleep( 1 );
12523
12524	status = pthread_detach( &t );
12525	if( status ) return errno;
12526#endif
12527
12528#ifdef HAVE_LINUX_THREADS
12529	pthread_kill_other_threads_np();
12530#endif
12531
12532	return 0;
12533
12534  ;
12535  return 0;
12536}
12537_ACEOF
12538if ac_fn_c_try_link "$LINENO"; then :
12539  ol_cv_pthread_lpthreads_lmach_lexc=yes
12540else
12541  ol_cv_pthread_lpthreads_lmach_lexc=no
12542fi
12543rm -f core conftest.err conftest.$ac_objext \
12544    conftest$ac_exeext conftest.$ac_ext
12545else
12546  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12547/* end confdefs.h.  */
12548
12549
12550/* pthread test headers */
12551#include <pthread.h>
12552#if HAVE_PTHREADS < 7
12553#include <errno.h>
12554#endif
12555#ifndef NULL
12556#define NULL (void*)0
12557#endif
12558
12559static void *task(p)
12560	void *p;
12561{
12562	return (void *) (p == NULL);
12563}
12564
12565
12566int main(argc, argv)
12567	int argc;
12568	char **argv;
12569{
12570
12571	/* pthread test function */
12572#ifndef PTHREAD_CREATE_DETACHED
12573#define	PTHREAD_CREATE_DETACHED	1
12574#endif
12575	pthread_t t;
12576	int status;
12577	int detach = PTHREAD_CREATE_DETACHED;
12578
12579#if HAVE_PTHREADS > 4
12580	/* Final pthreads */
12581	pthread_attr_t attr;
12582
12583	status = pthread_attr_init(&attr);
12584	if( status ) return status;
12585
12586#if HAVE_PTHREADS < 7
12587	status = pthread_attr_setdetachstate(&attr, &detach);
12588	if( status < 0 ) status = errno;
12589#else
12590	status = pthread_attr_setdetachstate(&attr, detach);
12591#endif
12592	if( status ) return status;
12593	status = pthread_create( &t, &attr, task, NULL );
12594#if HAVE_PTHREADS < 7
12595	if( status < 0 ) status = errno;
12596#endif
12597	if( status ) return status;
12598#else
12599	/* Draft 4 pthreads */
12600	status = pthread_create( &t, pthread_attr_default, task, NULL );
12601	if( status ) return errno;
12602
12603	/* give thread a chance to complete */
12604	/* it should remain joinable and hence detachable */
12605	sleep( 1 );
12606
12607	status = pthread_detach( &t );
12608	if( status ) return errno;
12609#endif
12610
12611#ifdef HAVE_LINUX_THREADS
12612	pthread_kill_other_threads_np();
12613#endif
12614
12615	return 0;
12616
12617}
12618
12619_ACEOF
12620if ac_fn_c_try_run "$LINENO"; then :
12621  ol_cv_pthread_lpthreads_lmach_lexc=yes
12622else
12623  ol_cv_pthread_lpthreads_lmach_lexc=no
12624fi
12625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12626  conftest.$ac_objext conftest.beam conftest.$ac_ext
12627fi
12628
12629
12630		# restore the LIBS
12631		LIBS="$ol_LIBS"
12632
12633fi
12634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
12635$as_echo "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
12636
12637	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
12638		ol_link_pthreads="-lpthreads -lmach -lexc"
12639		ol_link_threads=posix
12640	fi
12641fi
12642
12643		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
12644if test "$ol_link_threads" = no ; then
12645	# try -lpthreads -lexc
12646	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
12647$as_echo_n "checking for pthread link with -lpthreads -lexc... " >&6; }
12648if ${ol_cv_pthread_lpthreads_lexc+:} false; then :
12649  $as_echo_n "(cached) " >&6
12650else
12651
12652		# save the flags
12653		ol_LIBS="$LIBS"
12654		LIBS="-lpthreads -lexc $LIBS"
12655
12656		if test "$cross_compiling" = yes; then :
12657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658/* end confdefs.h.  */
12659
12660/* pthread test headers */
12661#include <pthread.h>
12662#if HAVE_PTHREADS < 7
12663#include <errno.h>
12664#endif
12665#ifndef NULL
12666#define NULL (void*)0
12667#endif
12668
12669static void *task(p)
12670	void *p;
12671{
12672	return (void *) (p == NULL);
12673}
12674
12675int
12676main ()
12677{
12678
12679	/* pthread test function */
12680#ifndef PTHREAD_CREATE_DETACHED
12681#define	PTHREAD_CREATE_DETACHED	1
12682#endif
12683	pthread_t t;
12684	int status;
12685	int detach = PTHREAD_CREATE_DETACHED;
12686
12687#if HAVE_PTHREADS > 4
12688	/* Final pthreads */
12689	pthread_attr_t attr;
12690
12691	status = pthread_attr_init(&attr);
12692	if( status ) return status;
12693
12694#if HAVE_PTHREADS < 7
12695	status = pthread_attr_setdetachstate(&attr, &detach);
12696	if( status < 0 ) status = errno;
12697#else
12698	status = pthread_attr_setdetachstate(&attr, detach);
12699#endif
12700	if( status ) return status;
12701	status = pthread_create( &t, &attr, task, NULL );
12702#if HAVE_PTHREADS < 7
12703	if( status < 0 ) status = errno;
12704#endif
12705	if( status ) return status;
12706#else
12707	/* Draft 4 pthreads */
12708	status = pthread_create( &t, pthread_attr_default, task, NULL );
12709	if( status ) return errno;
12710
12711	/* give thread a chance to complete */
12712	/* it should remain joinable and hence detachable */
12713	sleep( 1 );
12714
12715	status = pthread_detach( &t );
12716	if( status ) return errno;
12717#endif
12718
12719#ifdef HAVE_LINUX_THREADS
12720	pthread_kill_other_threads_np();
12721#endif
12722
12723	return 0;
12724
12725  ;
12726  return 0;
12727}
12728_ACEOF
12729if ac_fn_c_try_link "$LINENO"; then :
12730  ol_cv_pthread_lpthreads_lexc=yes
12731else
12732  ol_cv_pthread_lpthreads_lexc=no
12733fi
12734rm -f core conftest.err conftest.$ac_objext \
12735    conftest$ac_exeext conftest.$ac_ext
12736else
12737  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12738/* end confdefs.h.  */
12739
12740
12741/* pthread test headers */
12742#include <pthread.h>
12743#if HAVE_PTHREADS < 7
12744#include <errno.h>
12745#endif
12746#ifndef NULL
12747#define NULL (void*)0
12748#endif
12749
12750static void *task(p)
12751	void *p;
12752{
12753	return (void *) (p == NULL);
12754}
12755
12756
12757int main(argc, argv)
12758	int argc;
12759	char **argv;
12760{
12761
12762	/* pthread test function */
12763#ifndef PTHREAD_CREATE_DETACHED
12764#define	PTHREAD_CREATE_DETACHED	1
12765#endif
12766	pthread_t t;
12767	int status;
12768	int detach = PTHREAD_CREATE_DETACHED;
12769
12770#if HAVE_PTHREADS > 4
12771	/* Final pthreads */
12772	pthread_attr_t attr;
12773
12774	status = pthread_attr_init(&attr);
12775	if( status ) return status;
12776
12777#if HAVE_PTHREADS < 7
12778	status = pthread_attr_setdetachstate(&attr, &detach);
12779	if( status < 0 ) status = errno;
12780#else
12781	status = pthread_attr_setdetachstate(&attr, detach);
12782#endif
12783	if( status ) return status;
12784	status = pthread_create( &t, &attr, task, NULL );
12785#if HAVE_PTHREADS < 7
12786	if( status < 0 ) status = errno;
12787#endif
12788	if( status ) return status;
12789#else
12790	/* Draft 4 pthreads */
12791	status = pthread_create( &t, pthread_attr_default, task, NULL );
12792	if( status ) return errno;
12793
12794	/* give thread a chance to complete */
12795	/* it should remain joinable and hence detachable */
12796	sleep( 1 );
12797
12798	status = pthread_detach( &t );
12799	if( status ) return errno;
12800#endif
12801
12802#ifdef HAVE_LINUX_THREADS
12803	pthread_kill_other_threads_np();
12804#endif
12805
12806	return 0;
12807
12808}
12809
12810_ACEOF
12811if ac_fn_c_try_run "$LINENO"; then :
12812  ol_cv_pthread_lpthreads_lexc=yes
12813else
12814  ol_cv_pthread_lpthreads_lexc=no
12815fi
12816rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12817  conftest.$ac_objext conftest.beam conftest.$ac_ext
12818fi
12819
12820
12821		# restore the LIBS
12822		LIBS="$ol_LIBS"
12823
12824fi
12825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
12826$as_echo "$ol_cv_pthread_lpthreads_lexc" >&6; }
12827
12828	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
12829		ol_link_pthreads="-lpthreads -lexc"
12830		ol_link_threads=posix
12831	fi
12832fi
12833
12834
12835		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
12836if test "$ol_link_threads" = no ; then
12837	# try -lpthreads
12838	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
12839$as_echo_n "checking for pthread link with -lpthreads... " >&6; }
12840if ${ol_cv_pthread_lib_lpthreads+:} false; then :
12841  $as_echo_n "(cached) " >&6
12842else
12843
12844		# save the flags
12845		ol_LIBS="$LIBS"
12846		LIBS="-lpthreads $LIBS"
12847
12848		if test "$cross_compiling" = yes; then :
12849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12850/* end confdefs.h.  */
12851
12852/* pthread test headers */
12853#include <pthread.h>
12854#if HAVE_PTHREADS < 7
12855#include <errno.h>
12856#endif
12857#ifndef NULL
12858#define NULL (void*)0
12859#endif
12860
12861static void *task(p)
12862	void *p;
12863{
12864	return (void *) (p == NULL);
12865}
12866
12867int
12868main ()
12869{
12870
12871	/* pthread test function */
12872#ifndef PTHREAD_CREATE_DETACHED
12873#define	PTHREAD_CREATE_DETACHED	1
12874#endif
12875	pthread_t t;
12876	int status;
12877	int detach = PTHREAD_CREATE_DETACHED;
12878
12879#if HAVE_PTHREADS > 4
12880	/* Final pthreads */
12881	pthread_attr_t attr;
12882
12883	status = pthread_attr_init(&attr);
12884	if( status ) return status;
12885
12886#if HAVE_PTHREADS < 7
12887	status = pthread_attr_setdetachstate(&attr, &detach);
12888	if( status < 0 ) status = errno;
12889#else
12890	status = pthread_attr_setdetachstate(&attr, detach);
12891#endif
12892	if( status ) return status;
12893	status = pthread_create( &t, &attr, task, NULL );
12894#if HAVE_PTHREADS < 7
12895	if( status < 0 ) status = errno;
12896#endif
12897	if( status ) return status;
12898#else
12899	/* Draft 4 pthreads */
12900	status = pthread_create( &t, pthread_attr_default, task, NULL );
12901	if( status ) return errno;
12902
12903	/* give thread a chance to complete */
12904	/* it should remain joinable and hence detachable */
12905	sleep( 1 );
12906
12907	status = pthread_detach( &t );
12908	if( status ) return errno;
12909#endif
12910
12911#ifdef HAVE_LINUX_THREADS
12912	pthread_kill_other_threads_np();
12913#endif
12914
12915	return 0;
12916
12917  ;
12918  return 0;
12919}
12920_ACEOF
12921if ac_fn_c_try_link "$LINENO"; then :
12922  ol_cv_pthread_lib_lpthreads=yes
12923else
12924  ol_cv_pthread_lib_lpthreads=no
12925fi
12926rm -f core conftest.err conftest.$ac_objext \
12927    conftest$ac_exeext conftest.$ac_ext
12928else
12929  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930/* end confdefs.h.  */
12931
12932
12933/* pthread test headers */
12934#include <pthread.h>
12935#if HAVE_PTHREADS < 7
12936#include <errno.h>
12937#endif
12938#ifndef NULL
12939#define NULL (void*)0
12940#endif
12941
12942static void *task(p)
12943	void *p;
12944{
12945	return (void *) (p == NULL);
12946}
12947
12948
12949int main(argc, argv)
12950	int argc;
12951	char **argv;
12952{
12953
12954	/* pthread test function */
12955#ifndef PTHREAD_CREATE_DETACHED
12956#define	PTHREAD_CREATE_DETACHED	1
12957#endif
12958	pthread_t t;
12959	int status;
12960	int detach = PTHREAD_CREATE_DETACHED;
12961
12962#if HAVE_PTHREADS > 4
12963	/* Final pthreads */
12964	pthread_attr_t attr;
12965
12966	status = pthread_attr_init(&attr);
12967	if( status ) return status;
12968
12969#if HAVE_PTHREADS < 7
12970	status = pthread_attr_setdetachstate(&attr, &detach);
12971	if( status < 0 ) status = errno;
12972#else
12973	status = pthread_attr_setdetachstate(&attr, detach);
12974#endif
12975	if( status ) return status;
12976	status = pthread_create( &t, &attr, task, NULL );
12977#if HAVE_PTHREADS < 7
12978	if( status < 0 ) status = errno;
12979#endif
12980	if( status ) return status;
12981#else
12982	/* Draft 4 pthreads */
12983	status = pthread_create( &t, pthread_attr_default, task, NULL );
12984	if( status ) return errno;
12985
12986	/* give thread a chance to complete */
12987	/* it should remain joinable and hence detachable */
12988	sleep( 1 );
12989
12990	status = pthread_detach( &t );
12991	if( status ) return errno;
12992#endif
12993
12994#ifdef HAVE_LINUX_THREADS
12995	pthread_kill_other_threads_np();
12996#endif
12997
12998	return 0;
12999
13000}
13001
13002_ACEOF
13003if ac_fn_c_try_run "$LINENO"; then :
13004  ol_cv_pthread_lib_lpthreads=yes
13005else
13006  ol_cv_pthread_lib_lpthreads=no
13007fi
13008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13009  conftest.$ac_objext conftest.beam conftest.$ac_ext
13010fi
13011
13012
13013		# restore the LIBS
13014		LIBS="$ol_LIBS"
13015
13016fi
13017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
13018$as_echo "$ol_cv_pthread_lib_lpthreads" >&6; }
13019
13020	if test $ol_cv_pthread_lib_lpthreads = yes ; then
13021		ol_link_pthreads="-lpthreads"
13022		ol_link_threads=posix
13023	fi
13024fi
13025
13026
13027{ $as_echo "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
13028$as_echo "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
13029
13030		if test $ol_link_threads != no ; then
13031			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
13032
13033						save_CPPFLAGS="$CPPFLAGS"
13034			save_LIBS="$LIBS"
13035			LIBS="$LTHREAD_LIBS $LIBS"
13036
13037												for ac_func in sched_yield pthread_yield thr_yield
13038do :
13039  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13040ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13041if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13042  cat >>confdefs.h <<_ACEOF
13043#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13044_ACEOF
13045
13046fi
13047done
13048
13049
13050			if test $ac_cv_func_sched_yield = no &&
13051			   test $ac_cv_func_pthread_yield = no &&
13052			   test $ac_cv_func_thr_yield = no ; then
13053								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
13054$as_echo_n "checking for sched_yield in -lrt... " >&6; }
13055if ${ac_cv_lib_rt_sched_yield+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  ac_check_lib_save_LIBS=$LIBS
13059LIBS="-lrt  $LIBS"
13060cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13061/* end confdefs.h.  */
13062
13063/* Override any GCC internal prototype to avoid an error.
13064   Use char because int might match the return type of a GCC
13065   builtin and then its argument prototype would still apply.  */
13066#ifdef __cplusplus
13067extern "C"
13068#endif
13069char sched_yield ();
13070int
13071main ()
13072{
13073return sched_yield ();
13074  ;
13075  return 0;
13076}
13077_ACEOF
13078if ac_fn_c_try_link "$LINENO"; then :
13079  ac_cv_lib_rt_sched_yield=yes
13080else
13081  ac_cv_lib_rt_sched_yield=no
13082fi
13083rm -f core conftest.err conftest.$ac_objext \
13084    conftest$ac_exeext conftest.$ac_ext
13085LIBS=$ac_check_lib_save_LIBS
13086fi
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
13088$as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
13089if test "x$ac_cv_lib_rt_sched_yield" = xyes; then :
13090  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
13091
13092$as_echo "#define HAVE_SCHED_YIELD 1" >>confdefs.h
13093
13094					ac_cv_func_sched_yield=yes
13095else
13096  ac_cv_func_sched_yield=no
13097fi
13098
13099			fi
13100			if test $ac_cv_func_sched_yield = no &&
13101			   test $ac_cv_func_pthread_yield = no &&
13102			   test "$ac_cv_func_thr_yield" = no ; then
13103				{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
13104$as_echo "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
13105			fi
13106
13107						for ac_func in pthread_kill
13108do :
13109  ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
13110if test "x$ac_cv_func_pthread_kill" = xyes; then :
13111  cat >>confdefs.h <<_ACEOF
13112#define HAVE_PTHREAD_KILL 1
13113_ACEOF
13114
13115fi
13116done
13117
13118
13119									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
13120$as_echo_n "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
13121if ${ol_cv_func_pthread_rwlock_destroy+:} false; then :
13122  $as_echo_n "(cached) " >&6
13123else
13124
13125								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13126/* end confdefs.h.  */
13127
13128#include <pthread.h>
13129pthread_rwlock_t rwlock;
13130
13131int
13132main ()
13133{
13134pthread_rwlock_destroy(&rwlock);
13135  ;
13136  return 0;
13137}
13138_ACEOF
13139if ac_fn_c_try_link "$LINENO"; then :
13140  ol_cv_func_pthread_rwlock_destroy=yes
13141else
13142  ol_cv_func_pthread_rwlock_destroy=no
13143fi
13144rm -f core conftest.err conftest.$ac_objext \
13145    conftest$ac_exeext conftest.$ac_ext
13146
13147fi
13148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
13149$as_echo "$ol_cv_func_pthread_rwlock_destroy" >&6; }
13150			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
13151
13152$as_echo "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
13153
13154			fi
13155
13156									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
13157$as_echo_n "checking for pthread_detach with <pthread.h>... " >&6; }
13158if ${ol_cv_func_pthread_detach+:} false; then :
13159  $as_echo_n "(cached) " >&6
13160else
13161
13162								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13163/* end confdefs.h.  */
13164
13165#include <pthread.h>
13166#ifndef NULL
13167#define NULL (void*)0
13168#endif
13169
13170int
13171main ()
13172{
13173pthread_detach(NULL);
13174  ;
13175  return 0;
13176}
13177_ACEOF
13178if ac_fn_c_try_link "$LINENO"; then :
13179  ol_cv_func_pthread_detach=yes
13180else
13181  ol_cv_func_pthread_detach=no
13182fi
13183rm -f core conftest.err conftest.$ac_objext \
13184    conftest$ac_exeext conftest.$ac_ext
13185
13186fi
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
13188$as_echo "$ol_cv_func_pthread_detach" >&6; }
13189
13190			if test $ol_cv_func_pthread_detach = no ; then
13191				as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
13192			fi
13193
13194
13195$as_echo "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
13196
13197
13198						for ac_func in \
13199				pthread_setconcurrency \
13200				pthread_getconcurrency \
13201				thr_setconcurrency \
13202				thr_getconcurrency \
13203
13204do :
13205  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13206ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13207if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13208  cat >>confdefs.h <<_ACEOF
13209#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13210_ACEOF
13211
13212fi
13213done
13214
13215
13216
13217	for ac_func in pthread_kill_other_threads_np
13218do :
13219  ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
13220if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes; then :
13221  cat >>confdefs.h <<_ACEOF
13222#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1
13223_ACEOF
13224
13225fi
13226done
13227
13228	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
13229$as_echo_n "checking for LinuxThreads implementation... " >&6; }
13230if ${ol_cv_sys_linux_threads+:} false; then :
13231  $as_echo_n "(cached) " >&6
13232else
13233  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
13234fi
13235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
13236$as_echo "$ol_cv_sys_linux_threads" >&6; }
13237
13238
13239
13240
13241	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
13242$as_echo_n "checking for LinuxThreads consistency... " >&6; }
13243if ${ol_cv_linux_threads+:} false; then :
13244  $as_echo_n "(cached) " >&6
13245else
13246
13247		if test $ol_cv_header_linux_threads = yes &&
13248		   test $ol_cv_sys_linux_threads = yes; then
13249			ol_cv_linux_threads=yes
13250		elif test $ol_cv_header_linux_threads = no &&
13251		     test $ol_cv_sys_linux_threads = no; then
13252			ol_cv_linux_threads=no
13253		else
13254			ol_cv_linux_threads=error
13255		fi
13256
13257fi
13258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
13259$as_echo "$ol_cv_linux_threads" >&6; }
13260
13261
13262			if test $ol_cv_linux_threads = error; then
13263				as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
13264			fi
13265
13266			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
13267$as_echo_n "checking if pthread_create() works... " >&6; }
13268if ${ol_cv_pthread_create_works+:} false; then :
13269  $as_echo_n "(cached) " >&6
13270else
13271
13272			if test "$cross_compiling" = yes; then :
13273  				ol_cv_pthread_create_works=yes
13274else
13275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13276/* end confdefs.h.  */
13277
13278
13279/* pthread test headers */
13280#include <pthread.h>
13281#if HAVE_PTHREADS < 7
13282#include <errno.h>
13283#endif
13284#ifndef NULL
13285#define NULL (void*)0
13286#endif
13287
13288static void *task(p)
13289	void *p;
13290{
13291	return (void *) (p == NULL);
13292}
13293
13294
13295int main(argc, argv)
13296	int argc;
13297	char **argv;
13298{
13299
13300	/* pthread test function */
13301#ifndef PTHREAD_CREATE_DETACHED
13302#define	PTHREAD_CREATE_DETACHED	1
13303#endif
13304	pthread_t t;
13305	int status;
13306	int detach = PTHREAD_CREATE_DETACHED;
13307
13308#if HAVE_PTHREADS > 4
13309	/* Final pthreads */
13310	pthread_attr_t attr;
13311
13312	status = pthread_attr_init(&attr);
13313	if( status ) return status;
13314
13315#if HAVE_PTHREADS < 7
13316	status = pthread_attr_setdetachstate(&attr, &detach);
13317	if( status < 0 ) status = errno;
13318#else
13319	status = pthread_attr_setdetachstate(&attr, detach);
13320#endif
13321	if( status ) return status;
13322	status = pthread_create( &t, &attr, task, NULL );
13323#if HAVE_PTHREADS < 7
13324	if( status < 0 ) status = errno;
13325#endif
13326	if( status ) return status;
13327#else
13328	/* Draft 4 pthreads */
13329	status = pthread_create( &t, pthread_attr_default, task, NULL );
13330	if( status ) return errno;
13331
13332	/* give thread a chance to complete */
13333	/* it should remain joinable and hence detachable */
13334	sleep( 1 );
13335
13336	status = pthread_detach( &t );
13337	if( status ) return errno;
13338#endif
13339
13340#ifdef HAVE_LINUX_THREADS
13341	pthread_kill_other_threads_np();
13342#endif
13343
13344	return 0;
13345
13346}
13347
13348_ACEOF
13349if ac_fn_c_try_run "$LINENO"; then :
13350  ol_cv_pthread_create_works=yes
13351else
13352  ol_cv_pthread_create_works=no
13353fi
13354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13355  conftest.$ac_objext conftest.beam conftest.$ac_ext
13356fi
13357
13358fi
13359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
13360$as_echo "$ol_cv_pthread_create_works" >&6; }
13361
13362			if test $ol_cv_pthread_create_works = no ; then
13363				as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
13364			fi
13365
13366			ol_replace_broken_yield=no
13367
13368			if test $ol_replace_broken_yield = yes ; then
13369
13370$as_echo "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
13371
13372			fi
13373
13374						if test x$ol_with_yielding_select = xauto ; then
13375				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
13376$as_echo_n "checking if select yields when using pthreads... " >&6; }
13377if ${ol_cv_pthread_select_yields+:} false; then :
13378  $as_echo_n "(cached) " >&6
13379else
13380
13381				if test "$cross_compiling" = yes; then :
13382  ol_cv_pthread_select_yields=cross
13383else
13384  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13385/* end confdefs.h.  */
13386
13387#include <sys/types.h>
13388#include <sys/time.h>
13389#include <unistd.h>
13390#include <pthread.h>
13391#ifndef NULL
13392#define NULL (void*) 0
13393#endif
13394
13395static int fildes[2];
13396
13397static void *task(p)
13398	void *p;
13399{
13400	int i;
13401	struct timeval tv;
13402
13403	fd_set rfds;
13404
13405	tv.tv_sec=10;
13406	tv.tv_usec=0;
13407
13408	FD_ZERO(&rfds);
13409	FD_SET(fildes[0], &rfds);
13410
13411	/* we're not interested in any fds */
13412	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
13413
13414	if(i < 0) {
13415		perror("select");
13416		exit(10);
13417	}
13418
13419	exit(0); /* if we exit here, the select blocked the whole process */
13420}
13421
13422int main(argc, argv)
13423	int argc;
13424	char **argv;
13425{
13426	pthread_t t;
13427
13428	/* create a pipe to select */
13429	if(pipe(&fildes[0])) {
13430		perror("select");
13431		exit(1);
13432	}
13433
13434#ifdef HAVE_PTHREAD_SETCONCURRENCY
13435	(void) pthread_setconcurrency(2);
13436#else
13437#ifdef HAVE_THR_SETCONCURRENCY
13438	/* Set Solaris LWP concurrency to 2 */
13439	thr_setconcurrency(2);
13440#endif
13441#endif
13442
13443#if HAVE_PTHREADS < 6
13444	pthread_create(&t, pthread_attr_default, task, NULL);
13445#else
13446	pthread_create(&t, NULL, task, NULL);
13447#endif
13448
13449	/* make sure task runs first */
13450#ifdef HAVE_THR_YIELD
13451	thr_yield();
13452#elif defined( HAVE_SCHED_YIELD )
13453	sched_yield();
13454#elif defined( HAVE_PTHREAD_YIELD )
13455	pthread_yield();
13456#endif
13457
13458	exit(2);
13459}
13460_ACEOF
13461if ac_fn_c_try_run "$LINENO"; then :
13462  ol_cv_pthread_select_yields=no
13463else
13464  ol_cv_pthread_select_yields=yes
13465fi
13466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13467  conftest.$ac_objext conftest.beam conftest.$ac_ext
13468fi
13469
13470fi
13471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
13472$as_echo "$ol_cv_pthread_select_yields" >&6; }
13473
13474				if test $ol_cv_pthread_select_yields = cross ; then
13475					as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
13476				fi
13477
13478				if test $ol_cv_pthread_select_yields = yes ; then
13479					ol_with_yielding_select=yes
13480				fi
13481			fi
13482
13483						CPPFLAGS="$save_CPPFLAGS"
13484			LIBS="$save_LIBS"
13485		else
13486			as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
13487		fi
13488	fi
13489
13490	if test $ol_with_threads = posix ; then
13491		as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
13492	fi
13493	;;
13494esac
13495
13496case $ol_with_threads in auto | yes | mach)
13497
13498		for ac_header in mach/cthreads.h cthreads.h
13499do :
13500  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13501ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13502if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13503  cat >>confdefs.h <<_ACEOF
13504#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13505_ACEOF
13506
13507fi
13508
13509done
13510
13511	if test $ac_cv_header_mach_cthreads_h = yes ; then
13512		ol_with_threads=found
13513
13514				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13515if test "x$ac_cv_func_cthread_fork" = xyes; then :
13516  ol_link_threads=yes
13517fi
13518
13519
13520		if test $ol_link_threads = no ; then
13521									{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
13522$as_echo_n "checking for cthread_fork with -all_load... " >&6; }
13523if ${ol_cv_cthread_all_load+:} false; then :
13524  $as_echo_n "(cached) " >&6
13525else
13526
13527								save_LIBS="$LIBS"
13528				LIBS="-all_load $LIBS"
13529				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530/* end confdefs.h.  */
13531#include <mach/cthreads.h>
13532int
13533main ()
13534{
13535
13536					cthread_fork((void *)0, (void *)0);
13537
13538  ;
13539  return 0;
13540}
13541_ACEOF
13542if ac_fn_c_try_link "$LINENO"; then :
13543  ol_cv_cthread_all_load=yes
13544else
13545  ol_cv_cthread_all_load=no
13546fi
13547rm -f core conftest.err conftest.$ac_objext \
13548    conftest$ac_exeext conftest.$ac_ext
13549								LIBS="$save_LIBS"
13550
13551fi
13552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
13553$as_echo "$ol_cv_cthread_all_load" >&6; }
13554
13555			if test $ol_cv_cthread_all_load = yes ; then
13556				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
13557				ol_link_threads=mach
13558				ol_with_threads=found
13559			fi
13560		fi
13561
13562	elif test $ac_cv_header_cthreads_h = yes ; then
13563
13564		ol_with_threads=found
13565
13566				save_LIBS="$LIBS"
13567		LIBS="$LIBS -lthreads"
13568		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
13569if test "x$ac_cv_func_cthread_fork" = xyes; then :
13570  ol_link_threads=yes
13571fi
13572
13573		LIBS="$save_LIBS"
13574
13575		if test $ol_link_threads = yes ; then
13576			LTHREAD_LIBS="-lthreads"
13577			ol_link_threads=mach
13578			ol_with_threads=found
13579		else
13580			as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13581		fi
13582
13583	elif test $ol_with_threads = mach ; then
13584		as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
13585	fi
13586
13587	if test $ol_link_threads = mach ; then
13588
13589$as_echo "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
13590
13591	elif test $ol_with_threads = found ; then
13592		as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
13593	fi
13594	;;
13595esac
13596
13597case $ol_with_threads in auto | yes | pth)
13598
13599	for ac_header in pth.h
13600do :
13601  ac_fn_c_check_header_mongrel "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
13602if test "x$ac_cv_header_pth_h" = xyes; then :
13603  cat >>confdefs.h <<_ACEOF
13604#define HAVE_PTH_H 1
13605_ACEOF
13606
13607fi
13608
13609done
13610
13611
13612	if test $ac_cv_header_pth_h = yes ; then
13613		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
13614$as_echo_n "checking for pth_version in -lpth... " >&6; }
13615if ${ac_cv_lib_pth_pth_version+:} false; then :
13616  $as_echo_n "(cached) " >&6
13617else
13618  ac_check_lib_save_LIBS=$LIBS
13619LIBS="-lpth  $LIBS"
13620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621/* end confdefs.h.  */
13622
13623/* Override any GCC internal prototype to avoid an error.
13624   Use char because int might match the return type of a GCC
13625   builtin and then its argument prototype would still apply.  */
13626#ifdef __cplusplus
13627extern "C"
13628#endif
13629char pth_version ();
13630int
13631main ()
13632{
13633return pth_version ();
13634  ;
13635  return 0;
13636}
13637_ACEOF
13638if ac_fn_c_try_link "$LINENO"; then :
13639  ac_cv_lib_pth_pth_version=yes
13640else
13641  ac_cv_lib_pth_pth_version=no
13642fi
13643rm -f core conftest.err conftest.$ac_objext \
13644    conftest$ac_exeext conftest.$ac_ext
13645LIBS=$ac_check_lib_save_LIBS
13646fi
13647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
13648$as_echo "$ac_cv_lib_pth_pth_version" >&6; }
13649if test "x$ac_cv_lib_pth_pth_version" = xyes; then :
13650  have_pth=yes
13651else
13652  have_pth=no
13653fi
13654
13655
13656		if test $have_pth = yes ; then
13657
13658$as_echo "#define HAVE_GNU_PTH 1" >>confdefs.h
13659
13660			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
13661			ol_link_threads=pth
13662			ol_with_threads=found
13663
13664			if test x$ol_with_yielding_select = xauto ; then
13665				ol_with_yielding_select=yes
13666			fi
13667		fi
13668	fi
13669	;;
13670esac
13671
13672case $ol_with_threads in auto | yes | lwp)
13673
13674		for ac_header in thread.h synch.h
13675do :
13676  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13677ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13678if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13679  cat >>confdefs.h <<_ACEOF
13680#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13681_ACEOF
13682
13683fi
13684
13685done
13686
13687	if test $ac_cv_header_thread_h = yes &&
13688	   test $ac_cv_header_synch_h = yes ; then
13689		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
13690$as_echo_n "checking for thr_create in -lthread... " >&6; }
13691if ${ac_cv_lib_thread_thr_create+:} false; then :
13692  $as_echo_n "(cached) " >&6
13693else
13694  ac_check_lib_save_LIBS=$LIBS
13695LIBS="-lthread  $LIBS"
13696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697/* end confdefs.h.  */
13698
13699/* Override any GCC internal prototype to avoid an error.
13700   Use char because int might match the return type of a GCC
13701   builtin and then its argument prototype would still apply.  */
13702#ifdef __cplusplus
13703extern "C"
13704#endif
13705char thr_create ();
13706int
13707main ()
13708{
13709return thr_create ();
13710  ;
13711  return 0;
13712}
13713_ACEOF
13714if ac_fn_c_try_link "$LINENO"; then :
13715  ac_cv_lib_thread_thr_create=yes
13716else
13717  ac_cv_lib_thread_thr_create=no
13718fi
13719rm -f core conftest.err conftest.$ac_objext \
13720    conftest$ac_exeext conftest.$ac_ext
13721LIBS=$ac_check_lib_save_LIBS
13722fi
13723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
13724$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
13725if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
13726  have_thr=yes
13727else
13728  have_thr=no
13729fi
13730
13731
13732		if test $have_thr = yes ; then
13733
13734$as_echo "#define HAVE_THR 1" >>confdefs.h
13735
13736			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
13737			ol_link_threads=thr
13738
13739			if test x$ol_with_yielding_select = xauto ; then
13740				ol_with_yielding_select=yes
13741			fi
13742
13743						for ac_func in \
13744				thr_setconcurrency \
13745				thr_getconcurrency \
13746
13747do :
13748  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13749ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13750if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13751  cat >>confdefs.h <<_ACEOF
13752#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13753_ACEOF
13754
13755fi
13756done
13757
13758		fi
13759	fi
13760
13761		for ac_header in lwp/lwp.h
13762do :
13763  ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13764if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13765  cat >>confdefs.h <<_ACEOF
13766#define HAVE_LWP_LWP_H 1
13767_ACEOF
13768
13769fi
13770
13771done
13772
13773	if test $ac_cv_header_lwp_lwp_h = yes ; then
13774		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
13775$as_echo_n "checking for lwp_create in -llwp... " >&6; }
13776if ${ac_cv_lib_lwp_lwp_create+:} false; then :
13777  $as_echo_n "(cached) " >&6
13778else
13779  ac_check_lib_save_LIBS=$LIBS
13780LIBS="-llwp  $LIBS"
13781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782/* end confdefs.h.  */
13783
13784/* Override any GCC internal prototype to avoid an error.
13785   Use char because int might match the return type of a GCC
13786   builtin and then its argument prototype would still apply.  */
13787#ifdef __cplusplus
13788extern "C"
13789#endif
13790char lwp_create ();
13791int
13792main ()
13793{
13794return lwp_create ();
13795  ;
13796  return 0;
13797}
13798_ACEOF
13799if ac_fn_c_try_link "$LINENO"; then :
13800  ac_cv_lib_lwp_lwp_create=yes
13801else
13802  ac_cv_lib_lwp_lwp_create=no
13803fi
13804rm -f core conftest.err conftest.$ac_objext \
13805    conftest$ac_exeext conftest.$ac_ext
13806LIBS=$ac_check_lib_save_LIBS
13807fi
13808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
13809$as_echo "$ac_cv_lib_lwp_lwp_create" >&6; }
13810if test "x$ac_cv_lib_lwp_lwp_create" = xyes; then :
13811  have_lwp=yes
13812else
13813  have_lwp=no
13814fi
13815
13816
13817		if test $have_lwp = yes ; then
13818
13819$as_echo "#define HAVE_LWP 1" >>confdefs.h
13820
13821			LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
13822			ol_link_threads=lwp
13823
13824			if test x$ol_with_yielding_select = xauto ; then
13825				ol_with_yielding_select=no
13826			fi
13827		fi
13828	fi
13829	;;
13830esac
13831
13832if test $ol_with_yielding_select = yes ; then
13833
13834$as_echo "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
13835
13836fi
13837
13838if test $ol_with_threads = manual ; then
13839		ol_link_threads=yes
13840
13841	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
13842$as_echo "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
13843
13844	for ac_header in pthread.h sched.h
13845do :
13846  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13847ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13848if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13849  cat >>confdefs.h <<_ACEOF
13850#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13851_ACEOF
13852
13853fi
13854
13855done
13856
13857	for ac_func in sched_yield pthread_yield
13858do :
13859  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13860ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13861if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13862  cat >>confdefs.h <<_ACEOF
13863#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13864_ACEOF
13865
13866fi
13867done
13868
13869
13870	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
13871$as_echo_n "checking for LinuxThreads pthread.h... " >&6; }
13872if ${ol_cv_header_linux_threads+:} false; then :
13873  $as_echo_n "(cached) " >&6
13874else
13875  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13876/* end confdefs.h.  */
13877#include <pthread.h>
13878_ACEOF
13879if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13880  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1; then :
13881  ol_cv_header_linux_threads=yes
13882else
13883  ol_cv_header_linux_threads=no
13884fi
13885rm -f conftest*
13886
13887
13888fi
13889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
13890$as_echo "$ol_cv_header_linux_threads" >&6; }
13891	if test $ol_cv_header_linux_threads = yes; then
13892
13893$as_echo "#define HAVE_LINUX_THREADS 1" >>confdefs.h
13894
13895	fi
13896
13897
13898	for ac_header in mach/cthreads.h
13899do :
13900  ac_fn_c_check_header_mongrel "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
13901if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
13902  cat >>confdefs.h <<_ACEOF
13903#define HAVE_MACH_CTHREADS_H 1
13904_ACEOF
13905
13906fi
13907
13908done
13909
13910	for ac_header in lwp/lwp.h
13911do :
13912  ac_fn_c_check_header_mongrel "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
13913if test "x$ac_cv_header_lwp_lwp_h" = xyes; then :
13914  cat >>confdefs.h <<_ACEOF
13915#define HAVE_LWP_LWP_H 1
13916_ACEOF
13917
13918fi
13919
13920done
13921
13922	for ac_header in thread.h synch.h
13923do :
13924  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13925ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13926if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13927  cat >>confdefs.h <<_ACEOF
13928#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13929_ACEOF
13930
13931fi
13932
13933done
13934
13935fi
13936
13937if test $ol_link_threads != no && test $ol_link_threads != nt ; then
13938
13939$as_echo "#define REENTRANT 1" >>confdefs.h
13940
13941
13942$as_echo "#define _REENTRANT 1" >>confdefs.h
13943
13944
13945$as_echo "#define THREAD_SAFE 1" >>confdefs.h
13946
13947
13948$as_echo "#define _THREAD_SAFE 1" >>confdefs.h
13949
13950
13951$as_echo "#define THREADSAFE 1" >>confdefs.h
13952
13953
13954$as_echo "#define _THREADSAFE 1" >>confdefs.h
13955
13956
13957$as_echo "#define _SGI_MP_SOURCE 1" >>confdefs.h
13958
13959
13960			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
13961$as_echo_n "checking for thread specific errno... " >&6; }
13962if ${ol_cv_errno_thread_specific+:} false; then :
13963  $as_echo_n "(cached) " >&6
13964else
13965
13966		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13967/* end confdefs.h.  */
13968#include <errno.h>
13969int
13970main ()
13971{
13972errno = 0;
13973  ;
13974  return 0;
13975}
13976_ACEOF
13977if ac_fn_c_try_link "$LINENO"; then :
13978  ol_cv_errno_thread_specific=yes
13979else
13980  ol_cv_errno_thread_specific=no
13981fi
13982rm -f core conftest.err conftest.$ac_objext \
13983    conftest$ac_exeext conftest.$ac_ext
13984
13985fi
13986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
13987$as_echo "$ol_cv_errno_thread_specific" >&6; }
13988
13989			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
13990$as_echo_n "checking for thread specific h_errno... " >&6; }
13991if ${ol_cv_h_errno_thread_specific+:} false; then :
13992  $as_echo_n "(cached) " >&6
13993else
13994
13995		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13996/* end confdefs.h.  */
13997#include <netdb.h>
13998int
13999main ()
14000{
14001h_errno = 0;
14002  ;
14003  return 0;
14004}
14005_ACEOF
14006if ac_fn_c_try_link "$LINENO"; then :
14007  ol_cv_h_errno_thread_specific=yes
14008else
14009  ol_cv_h_errno_thread_specific=no
14010fi
14011rm -f core conftest.err conftest.$ac_objext \
14012    conftest$ac_exeext conftest.$ac_ext
14013
14014fi
14015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
14016$as_echo "$ol_cv_h_errno_thread_specific" >&6; }
14017
14018	if test $ol_cv_errno_thread_specific != yes ||
14019	   test $ol_cv_h_errno_thread_specific != yes ; then
14020		LIBS="$LTHREAD_LIBS $LIBS"
14021		LTHREAD_LIBS=""
14022	fi
14023
14024fi
14025
14026if test $ol_link_threads = no ; then
14027	if test $ol_with_threads = yes ; then
14028		as_fn_error $? "no suitable thread support" "$LINENO" 5
14029	fi
14030
14031	if test $ol_with_threads = auto ; then
14032		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
14033$as_echo "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
14034		ol_with_threads=no
14035	fi
14036
14037
14038$as_echo "#define NO_THREADS 1" >>confdefs.h
14039
14040	LTHREAD_LIBS=""
14041	BUILD_THREAD=no
14042else
14043	BUILD_THREAD=yes
14044fi
14045
14046if test $ol_link_threads != no ; then
14047
14048$as_echo "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
14049
14050fi
14051
14052# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14053case "$ol_with_threads" in
14054 no)
14055    ol_pthread_ok=no
14056
14057    ;;
14058 *)
14059    ol_found_pthreads=yes
14060    ;;
14061esac
14062
14063ac_ext=c
14064ac_cpp='$CPP $CPPFLAGS'
14065ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14066ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14067ac_compiler_gnu=$ac_cv_c_compiler_gnu
14068
14069
14070
14071
14072
14073
14074    case "$ol_found_pthreads" in
14075     yes)
14076	saved_LIBS="$LIBS"
14077	LIBS="$LTHREAD_LIBS $LIBS"
14078	saved_CFLAGS="$CFLAGS"
14079	CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14080	for ac_func in sem_timedwait
14081do :
14082  ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
14083if test "x$ac_cv_func_sem_timedwait" = xyes; then :
14084  cat >>confdefs.h <<_ACEOF
14085#define HAVE_SEM_TIMEDWAIT 1
14086_ACEOF
14087
14088fi
14089done
14090
14091	LIBS="$saved_LIBS"
14092	{ saved_LIBS=; unset saved_LIBS;}
14093	CFLAGS="$saved_CFLAGS"
14094	{ saved_CFLAGS=; unset saved_CFLAGS;}
14095	case "$ac_cv_func_sem_timedwait" in
14096	 yes)
14097	    PTHREAD_LIBS="$LTHREAD_LIBS"
14098	    have_pthreads=yes
14099	esac
14100    esac
14101esac
14102
14103case "$have_pthreads" in
14104 yes)
14105    CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
14106    saved_LIBS="$LIBS"
14107    LIBS="$LTHREAD_LIBS $LIBS"
14108    saved_CFLAGS="$CFLAGS"
14109    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
14110    # The cast to long int works around a bug in the HP C Compiler
14111# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14112# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14113# This bug is HP SR number 8606223364.
14114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
14115$as_echo_n "checking size of pthread_t... " >&6; }
14116if ${ac_cv_sizeof_pthread_t+:} false; then :
14117  $as_echo_n "(cached) " >&6
14118else
14119  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
14120	    $ac_includes_default
14121	    #include <pthread.h>
14122
14123
14124"; then :
14125
14126else
14127  if test "$ac_cv_type_pthread_t" = yes; then
14128     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14130as_fn_error 77 "cannot compute sizeof (pthread_t)
14131See \`config.log' for more details" "$LINENO" 5; }
14132   else
14133     ac_cv_sizeof_pthread_t=0
14134   fi
14135fi
14136
14137fi
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
14139$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
14140
14141
14142
14143cat >>confdefs.h <<_ACEOF
14144#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
14145_ACEOF
14146
14147
14148    LIBISC_PTHREADS_NOTHREADS=pthreads
14149
14150$as_echo "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
14151
14152    #
14153    # We'd like to use sigwait() too
14154    #
14155    ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
14156if test "x$ac_cv_func_sigwait" = xyes; then :
14157  have_sigwait=yes
14158else
14159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
14160$as_echo_n "checking for sigwait in -lc... " >&6; }
14161if ${ac_cv_lib_c_sigwait+:} false; then :
14162  $as_echo_n "(cached) " >&6
14163else
14164  ac_check_lib_save_LIBS=$LIBS
14165LIBS="-lc  $LIBS"
14166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14167/* end confdefs.h.  */
14168
14169/* Override any GCC internal prototype to avoid an error.
14170   Use char because int might match the return type of a GCC
14171   builtin and then its argument prototype would still apply.  */
14172#ifdef __cplusplus
14173extern "C"
14174#endif
14175char sigwait ();
14176int
14177main ()
14178{
14179return sigwait ();
14180  ;
14181  return 0;
14182}
14183_ACEOF
14184if ac_fn_c_try_link "$LINENO"; then :
14185  ac_cv_lib_c_sigwait=yes
14186else
14187  ac_cv_lib_c_sigwait=no
14188fi
14189rm -f core conftest.err conftest.$ac_objext \
14190    conftest$ac_exeext conftest.$ac_ext
14191LIBS=$ac_check_lib_save_LIBS
14192fi
14193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
14194$as_echo "$ac_cv_lib_c_sigwait" >&6; }
14195if test "x$ac_cv_lib_c_sigwait" = xyes; then :
14196  have_sigwait=yes
14197else
14198  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
14199$as_echo_n "checking for sigwait in -lpthread... " >&6; }
14200if ${ac_cv_lib_pthread_sigwait+:} false; then :
14201  $as_echo_n "(cached) " >&6
14202else
14203  ac_check_lib_save_LIBS=$LIBS
14204LIBS="-lpthread  $LIBS"
14205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14206/* end confdefs.h.  */
14207
14208/* Override any GCC internal prototype to avoid an error.
14209   Use char because int might match the return type of a GCC
14210   builtin and then its argument prototype would still apply.  */
14211#ifdef __cplusplus
14212extern "C"
14213#endif
14214char sigwait ();
14215int
14216main ()
14217{
14218return sigwait ();
14219  ;
14220  return 0;
14221}
14222_ACEOF
14223if ac_fn_c_try_link "$LINENO"; then :
14224  ac_cv_lib_pthread_sigwait=yes
14225else
14226  ac_cv_lib_pthread_sigwait=no
14227fi
14228rm -f core conftest.err conftest.$ac_objext \
14229    conftest$ac_exeext conftest.$ac_ext
14230LIBS=$ac_check_lib_save_LIBS
14231fi
14232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
14233$as_echo "$ac_cv_lib_pthread_sigwait" >&6; }
14234if test "x$ac_cv_lib_pthread_sigwait" = xyes; then :
14235  have_sigwait=yes
14236else
14237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
14238$as_echo_n "checking for _Psigwait in -lpthread... " >&6; }
14239if ${ac_cv_lib_pthread__Psigwait+:} false; then :
14240  $as_echo_n "(cached) " >&6
14241else
14242  ac_check_lib_save_LIBS=$LIBS
14243LIBS="-lpthread  $LIBS"
14244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14245/* end confdefs.h.  */
14246
14247/* Override any GCC internal prototype to avoid an error.
14248   Use char because int might match the return type of a GCC
14249   builtin and then its argument prototype would still apply.  */
14250#ifdef __cplusplus
14251extern "C"
14252#endif
14253char _Psigwait ();
14254int
14255main ()
14256{
14257return _Psigwait ();
14258  ;
14259  return 0;
14260}
14261_ACEOF
14262if ac_fn_c_try_link "$LINENO"; then :
14263  ac_cv_lib_pthread__Psigwait=yes
14264else
14265  ac_cv_lib_pthread__Psigwait=no
14266fi
14267rm -f core conftest.err conftest.$ac_objext \
14268    conftest$ac_exeext conftest.$ac_ext
14269LIBS=$ac_check_lib_save_LIBS
14270fi
14271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
14272$as_echo "$ac_cv_lib_pthread__Psigwait" >&6; }
14273if test "x$ac_cv_lib_pthread__Psigwait" = xyes; then :
14274  have_sigwait=yes
14275else
14276  have_sigwait=no
14277
14278fi
14279
14280
14281fi
14282
14283
14284fi
14285
14286
14287fi
14288
14289    case "$host:$have_sigwait" in
14290     *-freebsd*:no)
14291	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
14292$as_echo_n "checking for sigwait in -lc_r... " >&6; }
14293if ${ac_cv_lib_c_r_sigwait+:} false; then :
14294  $as_echo_n "(cached) " >&6
14295else
14296  ac_check_lib_save_LIBS=$LIBS
14297LIBS="-lc_r  $LIBS"
14298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14299/* end confdefs.h.  */
14300
14301/* Override any GCC internal prototype to avoid an error.
14302   Use char because int might match the return type of a GCC
14303   builtin and then its argument prototype would still apply.  */
14304#ifdef __cplusplus
14305extern "C"
14306#endif
14307char sigwait ();
14308int
14309main ()
14310{
14311return sigwait ();
14312  ;
14313  return 0;
14314}
14315_ACEOF
14316if ac_fn_c_try_link "$LINENO"; then :
14317  ac_cv_lib_c_r_sigwait=yes
14318else
14319  ac_cv_lib_c_r_sigwait=no
14320fi
14321rm -f core conftest.err conftest.$ac_objext \
14322    conftest$ac_exeext conftest.$ac_ext
14323LIBS=$ac_check_lib_save_LIBS
14324fi
14325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
14326$as_echo "$ac_cv_lib_c_r_sigwait" >&6; }
14327if test "x$ac_cv_lib_c_r_sigwait" = xyes; then :
14328  have_sigwait=yes
14329
14330fi
14331
14332    esac
14333    case "$have_sigwait" in
14334     yes)
14335	ac_cv_func_sigwait=yes
14336
14337$as_echo "#define HAVE_SIGWAIT 1" >>confdefs.h
14338
14339    esac
14340
14341    for ac_func in pthread_attr_getstacksize
14342do :
14343  ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
14344if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes; then :
14345  cat >>confdefs.h <<_ACEOF
14346#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
14347_ACEOF
14348
14349fi
14350done
14351
14352    for ac_func in pthread_attr_setstacksize sysconf
14353do :
14354  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14355ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14356if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14357  cat >>confdefs.h <<_ACEOF
14358#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14359_ACEOF
14360
14361fi
14362done
14363
14364
14365    case "$host" in
14366     *-freebsd5.[012]|*-freebsd5.[012].*)
14367	;;
14368     *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
14369
14370$as_echo "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
14371
14372	;;
14373     *-bsdi3.*|*-bsdi4.0*)
14374
14375$as_echo "#define NEED_PTHREAD_INIT 1" >>confdefs.h
14376
14377	;;
14378     *-linux*)
14379
14380$as_echo "#define HAVE_LINUXTHREADS 1" >>confdefs.h
14381
14382	;;
14383     *-solaris*)
14384	$as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
14385
14386	for ac_func in pthread_setconcurrency
14387do :
14388  ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
14389if test "x$ac_cv_func_pthread_setconcurrency" = xyes; then :
14390  cat >>confdefs.h <<_ACEOF
14391#define HAVE_PTHREAD_SETCONCURRENCY 1
14392_ACEOF
14393
14394fi
14395done
14396
14397	case "$ac_cv_func_pthread_setconcurrency" in
14398	 yes)
14399
14400$as_echo "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
14401
14402	esac
14403	;;
14404     *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
14405
14406$as_echo "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
14407
14408	;;
14409    esac
14410    hack_shutup_pthreadonceinit=no
14411    case "$host" in
14412     *-aix5.[123].*)
14413	hack_shutup_pthreadonceinit=yes
14414	;;
14415     *-solaris2.[89])
14416	hack_shutup_pthreadonceinit=yes
14417	;;
14418     *-solaris2.1[0-9])
14419	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
14420$as_echo_n "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
14421if ${ntp_cv_braces_around_pthread_once_init+:} false; then :
14422  $as_echo_n "(cached) " >&6
14423else
14424  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14425/* end confdefs.h.  */
14426
14427			#include <pthread.h>
14428
14429int
14430main ()
14431{
14432
14433		        static pthread_once_t once_test =
14434						PTHREAD_ONCE_INIT;
14435
14436
14437  ;
14438  return 0;
14439}
14440_ACEOF
14441if ac_fn_c_try_compile "$LINENO"; then :
14442  ntp_cv_braces_around_pthread_once_init=no
14443else
14444  ntp_cv_braces_around_pthread_once_init=yes
14445
14446fi
14447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14448
14449fi
14450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
14451$as_echo "$ntp_cv_braces_around_pthread_once_init" >&6; }
14452	case "$ntp_cv_braces_around_pthread_once_init" in
14453	 yes)
14454	    hack_shutup_pthreadonceinit=yes
14455	esac
14456	;;
14457    esac
14458    case "$hack_shutup_pthreadonceinit" in
14459     yes)
14460
14461$as_echo "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
14462
14463    esac
14464    LIBS="$saved_LIBS"
14465    { saved_LIBS=; unset saved_LIBS;}
14466    CFLAGS="$saved_CFLAGS"
14467    { saved_CFLAGS=; unset saved_CFLAGS;}
14468    ;;
14469 *)
14470    LIBISC_PTHREADS_NOTHREADS=nothreads
14471    ;;
14472esac
14473
14474 if test "$have_pthreads" != "no"; then
14475  PTHREADS_TRUE=
14476  PTHREADS_FALSE='#'
14477else
14478  PTHREADS_TRUE='#'
14479  PTHREADS_FALSE=
14480fi
14481
14482
14483
14484
14485
14486
14487
14488case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
14489 no:yes)
14490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
14491$as_echo_n "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
14492if ${ntp_cv_vsnprintf_percent_m+:} false; then :
14493  $as_echo_n "(cached) " >&6
14494else
14495  if test "$cross_compiling" = yes; then :
14496  ntp_cv_vsnprintf_percent_m=no
14497
14498else
14499  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500/* end confdefs.h.  */
14501
14502		    #include <stdarg.h>
14503		    #include <errno.h>
14504		    #include <stdio.h>
14505		    #include <string.h>
14506
14507		    int call_vsnprintf(
14508			    char *	dst,
14509			    size_t	sz,
14510			    const char *fmt,
14511			    ...
14512			    );
14513
14514		    int call_vsnprintf(
14515			    char *	dst,
14516			    size_t	sz,
14517			    const char *fmt,
14518			    ...
14519			    )
14520		    {
14521			    va_list	ap;
14522			    int		rc;
14523
14524			    va_start(ap, fmt);
14525			    rc = vsnprintf(dst, sz, fmt, ap);
14526			    va_end(ap);
14527
14528			    return rc;
14529		    }
14530
14531int
14532main ()
14533{
14534
14535		    char	sbuf[512];
14536		    char	pbuf[512];
14537		    int		slen;
14538
14539		    strcpy(sbuf, strerror(ENOENT));
14540		    errno = ENOENT;
14541		    slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
14542					  "wrong");
14543		    return strcmp(sbuf, pbuf);
14544
14545
14546  ;
14547  return 0;
14548}
14549_ACEOF
14550if ac_fn_c_try_run "$LINENO"; then :
14551  ntp_cv_vsnprintf_percent_m=yes
14552else
14553  ntp_cv_vsnprintf_percent_m=no
14554fi
14555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14556  conftest.$ac_objext conftest.beam conftest.$ac_ext
14557fi
14558
14559
14560fi
14561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
14562$as_echo "$ntp_cv_vsnprintf_percent_m" >&6; }
14563    case "$ntp_cv_vsnprintf_percent_m" in
14564     yes)
14565
14566$as_echo "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
14567
14568    esac
14569esac
14570
14571for ac_header in sys/clockctl.h
14572do :
14573  ac_fn_c_check_header_mongrel "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
14574if test "x$ac_cv_header_sys_clockctl_h" = xyes; then :
14575  cat >>confdefs.h <<_ACEOF
14576#define HAVE_SYS_CLOCKCTL_H 1
14577_ACEOF
14578
14579fi
14580
14581done
14582
14583
14584# Check whether --enable-clockctl was given.
14585if test "${enable_clockctl+set}" = set; then :
14586  enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
14587else
14588  ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
14589
14590fi
14591
14592
14593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
14594$as_echo_n "checking if we should use /dev/clockctl... " >&6; }
14595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
14596$as_echo "$ntp_use_dev_clockctl" >&6; }
14597
14598
14599for ac_header in sys/capability.h sys/prctl.h
14600do :
14601  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14602ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14604  cat >>confdefs.h <<_ACEOF
14605#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14606_ACEOF
14607
14608fi
14609
14610done
14611
14612
14613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
14614$as_echo_n "checking if we have linux capabilities (libcap)... " >&6; }
14615
14616case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
14617 yesyes)
14618    case "$host" in
14619     mips-sgi-irix*)
14620	ntp_have_linuxcaps=no
14621	;;
14622     *) ntp_have_linuxcaps=yes
14623	;;
14624    esac
14625    ;;
14626 *)
14627    ntp_have_linuxcaps=no
14628    ;;
14629esac
14630
14631# Check whether --enable-linuxcaps was given.
14632if test "${enable_linuxcaps+set}" = set; then :
14633  enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
14634
14635fi
14636
14637
14638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
14639$as_echo "$ntp_have_linuxcaps" >&6; }
14640
14641case "$ntp_have_linuxcaps" in
14642 yes)
14643
14644$as_echo "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
14645
14646    LIBS="$LIBS -lcap"
14647    ;;
14648esac
14649
14650
14651for ac_header in priv.h
14652do :
14653  ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
14654if test "x$ac_cv_header_priv_h" = xyes; then :
14655  cat >>confdefs.h <<_ACEOF
14656#define HAVE_PRIV_H 1
14657_ACEOF
14658
14659fi
14660
14661done
14662
14663case "$ac_cv_header_priv_h" in
14664 yes)
14665    case "$host" in
14666     *-solaris*)
14667	ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
14668if test "x$ac_cv_func_setppriv" = xyes; then :
14669  ntp_have_solarisprivs=yes
14670else
14671  ntp_have_solarisprivs=no
14672
14673fi
14674
14675	;;
14676    esac
14677esac
14678
14679# Check whether --enable-solarisprivs was given.
14680if test "${enable_solarisprivs+set}" = set; then :
14681  enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
14682
14683fi
14684
14685
14686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
14687$as_echo_n "checking if we have solaris privileges... " >&6; }
14688
14689case "$ntp_have_solarisprivs" in
14690 yes)
14691
14692$as_echo "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
14693
14694    ;;
14695 '') ntp_have_solarisprivs="no"
14696    ;;
14697esac
14698
14699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
14700$as_echo "$ntp_have_solarisprivs" >&6; }
14701
14702for ac_header in sys/mac.h
14703do :
14704  ac_fn_c_check_header_mongrel "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
14705if test "x$ac_cv_header_sys_mac_h" = xyes; then :
14706  cat >>confdefs.h <<_ACEOF
14707#define HAVE_SYS_MAC_H 1
14708_ACEOF
14709
14710fi
14711
14712done
14713
14714
14715# Check whether --enable-trustedbsd_mac was given.
14716if test "${enable_trustedbsd_mac+set}" = set; then :
14717  enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
14718
14719fi
14720
14721
14722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
14723$as_echo_n "checking if we should use TrustedBSD MAC privileges... " >&6; }
14724
14725case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
14726 yesyes)
14727
14728$as_echo "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
14729
14730    ;;
14731 *) ntp_use_trustedbsd_mac="no";
14732    ;;
14733esac
14734
14735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
14736$as_echo "$ntp_use_trustedbsd_mac" >&6; }
14737
14738case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
14739 *yes*)
14740
14741$as_echo "#define HAVE_DROPROOT 1" >>confdefs.h
14742
14743esac
14744
14745case "$host" in
14746 *-*-darwin*)
14747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
14748$as_echo_n "checking for library containing res_9_init... " >&6; }
14749if ${ac_cv_search_res_9_init+:} false; then :
14750  $as_echo_n "(cached) " >&6
14751else
14752  ac_func_search_save_LIBS=$LIBS
14753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14754/* end confdefs.h.  */
14755
14756/* Override any GCC internal prototype to avoid an error.
14757   Use char because int might match the return type of a GCC
14758   builtin and then its argument prototype would still apply.  */
14759#ifdef __cplusplus
14760extern "C"
14761#endif
14762char res_9_init ();
14763int
14764main ()
14765{
14766return res_9_init ();
14767  ;
14768  return 0;
14769}
14770_ACEOF
14771for ac_lib in '' resolv; do
14772  if test -z "$ac_lib"; then
14773    ac_res="none required"
14774  else
14775    ac_res=-l$ac_lib
14776    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14777  fi
14778  if ac_fn_c_try_link "$LINENO"; then :
14779  ac_cv_search_res_9_init=$ac_res
14780fi
14781rm -f core conftest.err conftest.$ac_objext \
14782    conftest$ac_exeext
14783  if ${ac_cv_search_res_9_init+:} false; then :
14784  break
14785fi
14786done
14787if ${ac_cv_search_res_9_init+:} false; then :
14788
14789else
14790  ac_cv_search_res_9_init=no
14791fi
14792rm conftest.$ac_ext
14793LIBS=$ac_func_search_save_LIBS
14794fi
14795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
14796$as_echo "$ac_cv_search_res_9_init" >&6; }
14797ac_res=$ac_cv_search_res_9_init
14798if test "$ac_res" != no; then :
14799  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14800
14801fi
14802
14803    ;;
14804 *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
14805$as_echo_n "checking for library containing res_init... " >&6; }
14806if ${ac_cv_search_res_init+:} false; then :
14807  $as_echo_n "(cached) " >&6
14808else
14809  ac_func_search_save_LIBS=$LIBS
14810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14811/* end confdefs.h.  */
14812
14813/* Override any GCC internal prototype to avoid an error.
14814   Use char because int might match the return type of a GCC
14815   builtin and then its argument prototype would still apply.  */
14816#ifdef __cplusplus
14817extern "C"
14818#endif
14819char res_init ();
14820int
14821main ()
14822{
14823return res_init ();
14824  ;
14825  return 0;
14826}
14827_ACEOF
14828for ac_lib in '' resolv; do
14829  if test -z "$ac_lib"; then
14830    ac_res="none required"
14831  else
14832    ac_res=-l$ac_lib
14833    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14834  fi
14835  if ac_fn_c_try_link "$LINENO"; then :
14836  ac_cv_search_res_init=$ac_res
14837fi
14838rm -f core conftest.err conftest.$ac_objext \
14839    conftest$ac_exeext
14840  if ${ac_cv_search_res_init+:} false; then :
14841  break
14842fi
14843done
14844if ${ac_cv_search_res_init+:} false; then :
14845
14846else
14847  ac_cv_search_res_init=no
14848fi
14849rm conftest.$ac_ext
14850LIBS=$ac_func_search_save_LIBS
14851fi
14852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
14853$as_echo "$ac_cv_search_res_init" >&6; }
14854ac_res=$ac_cv_search_res_init
14855if test "$ac_res" != no; then :
14856  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14857
14858fi
14859
14860    ;;
14861esac
14862for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
14863do :
14864  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14865ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
14866#  include <sys/types.h>
14867#endif
14868#ifdef HAVE_NETINET_IN_H
14869#  include <netinet/in.h>   /* inet_ functions / structs */
14870#endif
14871#ifdef HAVE_ARPA_NAMESER_H
14872#  include <arpa/nameser.h> /* DNS HEADER struct */
14873#endif
14874#ifdef HAVE_NETDB_H
14875#  include <netdb.h>
14876#endif
14877"
14878if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14879  cat >>confdefs.h <<_ACEOF
14880#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14881_ACEOF
14882
14883fi
14884
14885done
14886
14887
14888#HMS: Why do we do this check so "early"?
14889for ac_func in res_init
14890do :
14891  ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
14892if test "x$ac_cv_func_res_init" = xyes; then :
14893  cat >>confdefs.h <<_ACEOF
14894#define HAVE_RES_INIT 1
14895_ACEOF
14896
14897else
14898  for ac_func in __res_init
14899do :
14900  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
14901if test "x$ac_cv_func___res_init" = xyes; then :
14902  cat >>confdefs.h <<_ACEOF
14903#define HAVE___RES_INIT 1
14904_ACEOF
14905
14906fi
14907done
14908
14909fi
14910done
14911
14912
14913# We also need -lsocket, but we have tested for that already.
14914ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
14915if test "x$ac_cv_func_inet_ntop" = xyes; then :
14916
14917else
14918
14919$as_echo "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
14920
14921fi
14922
14923ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
14924if test "x$ac_cv_func_inet_pton" = xyes; then :
14925
14926else
14927
14928$as_echo "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
14929
14930fi
14931
14932
14933ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
14934if test "x$ac_cv_type_uintptr_t" = xyes; then :
14935
14936cat >>confdefs.h <<_ACEOF
14937#define HAVE_UINTPTR_T 1
14938_ACEOF
14939
14940
14941fi
14942ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
14943if test "x$ac_cv_type_int32" = xyes; then :
14944
14945cat >>confdefs.h <<_ACEOF
14946#define HAVE_INT32 1
14947_ACEOF
14948
14949
14950fi
14951ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
14952if test "x$ac_cv_type_u_int32" = xyes; then :
14953
14954cat >>confdefs.h <<_ACEOF
14955#define HAVE_U_INT32 1
14956_ACEOF
14957
14958
14959fi
14960
14961
14962
14963
14964case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
14965 no::yes)
14966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
14967$as_echo_n "checking for int32 with DNS headers included... " >&6; }
14968if ${ntp_cv_type_int32_with_dns+:} false; then :
14969  $as_echo_n "(cached) " >&6
14970else
14971  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14972/* end confdefs.h.  */
14973
14974		    #ifdef HAVE_ARPA_NAMESER_H
14975		    # include <arpa/nameser.h>
14976		    #endif
14977		    #include <resolv.h>
14978
14979int
14980main ()
14981{
14982
14983		    size_t cb = sizeof(int32);
14984
14985
14986  ;
14987  return 0;
14988}
14989_ACEOF
14990if ac_fn_c_try_compile "$LINENO"; then :
14991  ntp_cv_type_int32_with_dns=yes
14992else
14993  ntp_cv_type_int32_with_dns=no
14994
14995fi
14996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14997
14998fi
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
15000$as_echo "$ntp_cv_type_int32_with_dns" >&6; }
15001    case "$ntp_cv_type_int32_with_dns" in
15002     yes)
15003
15004$as_echo "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15005
15006    esac
15007esac
15008
15009case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
15010 no::yes)
15011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
15012$as_echo_n "checking for u_int32 with DNS headers included... " >&6; }
15013if ${ntp_cv_type_u_int32_with_dns+:} false; then :
15014  $as_echo_n "(cached) " >&6
15015else
15016  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15017/* end confdefs.h.  */
15018
15019		    #ifdef HAVE_ARPA_NAMESER_H
15020		    # include <arpa/nameser.h>
15021		    #endif
15022		    #include <resolv.h>
15023
15024int
15025main ()
15026{
15027
15028		    size_t cb = sizeof(u_int32);
15029
15030
15031  ;
15032  return 0;
15033}
15034_ACEOF
15035if ac_fn_c_try_compile "$LINENO"; then :
15036  ntp_cv_type_u_int32_with_dns=yes
15037else
15038  ntp_cv_type_u_int32_with_dns=no
15039
15040fi
15041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15042
15043fi
15044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
15045$as_echo "$ntp_cv_type_u_int32_with_dns" >&6; }
15046    case "$ntp_cv_type_u_int32_with_dns" in
15047     yes)
15048
15049$as_echo "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
15050
15051    esac
15052esac
15053
15054for ac_header in sys/timepps.h
15055do :
15056  ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
15057	#ifdef HAVE_SYS_TIME_H
15058	# include <sys/time.h>
15059	#endif
15060	#ifdef HAVE_ERRNO_H
15061	# include <errno.h>
15062	#endif
15063
15064
15065"
15066if test "x$ac_cv_header_sys_timepps_h" = xyes; then :
15067  cat >>confdefs.h <<_ACEOF
15068#define HAVE_SYS_TIMEPPS_H 1
15069_ACEOF
15070
15071fi
15072
15073done
15074
15075
15076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
15077$as_echo_n "checking for struct timespec... " >&6; }
15078if ${ntp_cv_struct_timespec+:} false; then :
15079  $as_echo_n "(cached) " >&6
15080else
15081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15082/* end confdefs.h.  */
15083
15084		#include <sys/time.h>
15085		/* Under SunOS, timespec is in sys/timepps.h,
15086		   which needs errno.h and FRAC */
15087		#ifdef HAVE_ERRNO_H
15088		# include <errno.h>
15089		#endif
15090		#ifdef HAVE_SYS_TIMEPPS_H
15091		# define FRAC 4294967296
15092		# include <sys/timepps.h>
15093		#endif
15094
15095int
15096main ()
15097{
15098
15099		struct timespec n;
15100
15101
15102  ;
15103  return 0;
15104}
15105_ACEOF
15106if ac_fn_c_try_compile "$LINENO"; then :
15107  ntp_cv_struct_timespec=yes
15108else
15109  ntp_cv_struct_timespec=no
15110
15111fi
15112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15113
15114fi
15115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
15116$as_echo "$ntp_cv_struct_timespec" >&6; }
15117case "$ntp_cv_struct_timespec" in
15118 yes)
15119
15120$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
15121
15122esac
15123
15124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
15125$as_echo_n "checking for struct ntptimeval... " >&6; }
15126if ${ntp_cv_struct_ntptimeval+:} false; then :
15127  $as_echo_n "(cached) " >&6
15128else
15129  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15130/* end confdefs.h.  */
15131
15132		#include <sys/time.h>
15133		#include <sys/timex.h>
15134
15135int
15136main ()
15137{
15138
15139		struct ntptimeval n;
15140
15141
15142  ;
15143  return 0;
15144}
15145_ACEOF
15146if ac_fn_c_try_compile "$LINENO"; then :
15147  ntp_cv_struct_ntptimeval=yes
15148else
15149  ntp_cv_struct_ntptimeval=no
15150
15151fi
15152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15153
15154fi
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
15156$as_echo "$ntp_cv_struct_ntptimeval" >&6; }
15157case "$ntp_cv_struct_ntptimeval" in
15158 yes)
15159
15160$as_echo "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
15161
15162esac
15163
15164for ac_header in md5.h
15165do :
15166  ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
15167	#ifdef HAVE_SYS_TYPES_H
15168	# include <sys/types.h>
15169	#endif
15170
15171
15172"
15173if test "x$ac_cv_header_md5_h" = xyes; then :
15174  cat >>confdefs.h <<_ACEOF
15175#define HAVE_MD5_H 1
15176_ACEOF
15177
15178fi
15179
15180done
15181
15182
15183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
15184$as_echo_n "checking for library containing MD5Init... " >&6; }
15185if ${ac_cv_search_MD5Init+:} false; then :
15186  $as_echo_n "(cached) " >&6
15187else
15188  ac_func_search_save_LIBS=$LIBS
15189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15190/* end confdefs.h.  */
15191
15192/* Override any GCC internal prototype to avoid an error.
15193   Use char because int might match the return type of a GCC
15194   builtin and then its argument prototype would still apply.  */
15195#ifdef __cplusplus
15196extern "C"
15197#endif
15198char MD5Init ();
15199int
15200main ()
15201{
15202return MD5Init ();
15203  ;
15204  return 0;
15205}
15206_ACEOF
15207for ac_lib in '' md5 md; do
15208  if test -z "$ac_lib"; then
15209    ac_res="none required"
15210  else
15211    ac_res=-l$ac_lib
15212    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15213  fi
15214  if ac_fn_c_try_link "$LINENO"; then :
15215  ac_cv_search_MD5Init=$ac_res
15216fi
15217rm -f core conftest.err conftest.$ac_objext \
15218    conftest$ac_exeext
15219  if ${ac_cv_search_MD5Init+:} false; then :
15220  break
15221fi
15222done
15223if ${ac_cv_search_MD5Init+:} false; then :
15224
15225else
15226  ac_cv_search_MD5Init=no
15227fi
15228rm conftest.$ac_ext
15229LIBS=$ac_func_search_save_LIBS
15230fi
15231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
15232$as_echo "$ac_cv_search_MD5Init" >&6; }
15233ac_res=$ac_cv_search_MD5Init
15234if test "$ac_res" != no; then :
15235  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15236
15237fi
15238
15239for ac_func in MD5Init sysconf getdtablesize sigaction sigset sigvec
15240do :
15241  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15242ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15243if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15244  cat >>confdefs.h <<_ACEOF
15245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15246_ACEOF
15247
15248fi
15249done
15250
15251
15252# HMS: does this need to be a cached variable?
15253# Check whether --enable-signalled-io was given.
15254if test "${enable_signalled_io+set}" = set; then :
15255  enableval=$enable_signalled_io; use_signalled_io=$enableval
15256else
15257  use_signalled_io=yes
15258
15259fi
15260
15261
15262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
15263$as_echo_n "checking for SIGIO... " >&6; }
15264if ${ntp_cv_hdr_def_sigio+:} false; then :
15265  $as_echo_n "(cached) " >&6
15266else
15267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15268/* end confdefs.h.  */
15269
15270	    #include <signal.h>
15271
15272	    #ifndef SIGIO
15273	    # error
15274	    #endif
15275
15276_ACEOF
15277if ac_fn_c_try_cpp "$LINENO"; then :
15278  ntp_cv_hdr_def_sigio=yes
15279else
15280  ntp_cv_hdr_def_sigio=no
15281
15282fi
15283rm -f conftest.err conftest.i conftest.$ac_ext
15284
15285fi
15286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
15287$as_echo "$ntp_cv_hdr_def_sigio" >&6; }
15288
15289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
15290$as_echo_n "checking if we want to use SIGIO... " >&6; }
15291ans=no
15292case "$ntp_cv_hdr_def_sigio" in
15293 yes)
15294    ans=yes
15295    case "$host" in
15296     alpha*-dec-osf4*|alpha*-dec-osf5*)
15297	ans=no
15298	;;
15299     *-convex-*)
15300	ans=no
15301	;;
15302     *-dec-*)
15303	ans=no
15304	;;
15305     *-pc-cygwin*)
15306	ans=no
15307	;;
15308     *-sni-sysv*)
15309	ans=no
15310	;;
15311     *-stratus-vos)
15312	ans=no
15313	;;
15314     *-univel-sysv*)
15315	ans=no
15316	;;
15317     *-*-irix6*)
15318	ans=no
15319	;;
15320     *-*-freebsd*)
15321	ans=no
15322	;;
15323     *-*-*linux*)
15324	ans=no
15325	;;
15326     *-*-unicosmp*)
15327	ans=no
15328	;;
15329     *-*-kfreebsd*)
15330	ans=no
15331	;;
15332     m68k-*-mint*)
15333	ans=no
15334	;;
15335    esac
15336    case "$ans" in
15337     no)
15338	ans="Possible for $host but disabled because of reported problems"
15339	;;
15340    esac
15341    ;;
15342esac
15343case "$ans" in
15344 yes)
15345    case "$use_signalled_io" in
15346     yes)
15347
15348$as_echo "#define HAVE_SIGNALED_IO 1" >>confdefs.h
15349
15350	;;
15351     *) ans="Allowed for $host but --disable-signalled-io was given"
15352	;;
15353    esac
15354esac
15355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15356$as_echo "$ans" >&6; }
15357
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
15359$as_echo_n "checking for SIGPOLL... " >&6; }
15360if ${ntp_cv_hdr_def_sigpoll+:} false; then :
15361  $as_echo_n "(cached) " >&6
15362else
15363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364/* end confdefs.h.  */
15365
15366	    #include <signal.h>
15367
15368	    #ifndef SIGPOLL
15369	    # error
15370	    #endif
15371
15372_ACEOF
15373if ac_fn_c_try_cpp "$LINENO"; then :
15374  ntp_cv_hdr_def_sigpoll=yes
15375else
15376  ntp_cv_hdr_def_sigpoll=no
15377
15378fi
15379rm -f conftest.err conftest.i conftest.$ac_ext
15380
15381fi
15382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
15383$as_echo "$ntp_cv_hdr_def_sigpoll" >&6; }
15384
15385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
15386$as_echo_n "checking if we can use SIGPOLL for UDP I/O... " >&6; }
15387ans=no
15388case "$ntp_cv_hdr_def_sigpoll" in
15389 yes)
15390    case "$host" in
15391     mips-sgi-irix*)
15392	ans=no
15393	;;
15394     vax-dec-bsd)
15395	ans=no
15396	;;
15397     *-pc-cygwin*)
15398	ans=no
15399	;;
15400     *-sni-sysv*)
15401	ans=no
15402	;;
15403     *-stratus-vos)
15404	ans=no
15405	;;
15406     *-*-aix[4-9]*)
15407	# XXX Only verified thru AIX6
15408	ans=no
15409	;;
15410     *-*-hpux*)
15411	ans=no
15412	;;
15413     *-*-*linux*)
15414	ans=no
15415	;;
15416     *-*-osf*)
15417	ans=no
15418	;;
15419     *-*-qnx*)
15420	ans=no
15421	;;
15422     *-*-sunos*)
15423	ans=no
15424	;;
15425     *-*-solaris*)
15426	ans=no
15427	;;
15428     *-*-ultrix*)
15429	ans=no
15430	;;
15431     *-*-unicosmp*)
15432	ans=no
15433	;;
15434     *-*-kfreebsd*)
15435	ans=no
15436	;;
15437     *) ans=yes
15438	;;
15439    esac
15440    ;;
15441esac
15442case "$ans" in
15443 yes)
15444
15445$as_echo "#define USE_UDP_SIGPOLL 1" >>confdefs.h
15446
15447esac
15448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15449$as_echo "$ans" >&6; }
15450
15451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
15452$as_echo_n "checking if we can use SIGPOLL for TTY I/O... " >&6; }
15453ans=no
15454case "$ntp_cv_hdr_def_sigpoll" in
15455 yes)
15456    case "$host" in
15457     mips-sgi-irix*)
15458	ans=no
15459	;;
15460     vax-dec-bsd)
15461	ans=no
15462	;;
15463     *-pc-cygwin*)
15464	ans=no
15465	;;
15466     *-sni-sysv*)
15467	ans=no
15468	;;
15469     *-stratus-vos)
15470	ans=no
15471	;;
15472     *-*-aix[4-9]*)
15473	# XXX Only verified thru AIX6
15474	ans=no
15475	;;
15476     *-*-hpux*)
15477	ans=no
15478	;;
15479     *-*-*linux*)
15480	ans=no
15481	;;
15482     *-*-osf*)
15483	ans=no
15484	;;
15485     *-*-sunos*)
15486	ans=no
15487	;;
15488     *-*-ultrix*)
15489	ans=no
15490	;;
15491     *-*-qnx*)
15492	ans=no
15493	;;
15494     *-*-unicosmp*)
15495	ans=no
15496	;;
15497     *-*-kfreebsd*)
15498	ans=no
15499	;;
15500     *) ans=yes
15501	;;
15502    esac
15503    ;;
15504esac
15505case "$ans" in
15506 yes)
15507
15508$as_echo "#define USE_TTY_SIGPOLL 1" >>confdefs.h
15509
15510esac
15511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15512$as_echo "$ans" >&6; }
15513
15514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
15515$as_echo_n "checking number of arguments to gettimeofday()... " >&6; }
15516if ${ntp_cv_func_Xettimeofday_nargs+:} false; then :
15517  $as_echo_n "(cached) " >&6
15518else
15519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15520/* end confdefs.h.  */
15521
15522		#include <sys/time.h>
15523
15524int
15525main ()
15526{
15527
15528		gettimeofday(0, 0);
15529		settimeofday(0, 0);
15530
15531
15532  ;
15533  return 0;
15534}
15535_ACEOF
15536if ac_fn_c_try_compile "$LINENO"; then :
15537  ntp_cv_func_Xettimeofday_nargs=2
15538else
15539  ntp_cv_func_Xettimeofday_nargs=1
15540
15541fi
15542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15543
15544fi
15545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
15546$as_echo "$ntp_cv_func_Xettimeofday_nargs" >&6; }
15547case "$ntp_cv_func_Xettimeofday_nargs" in
15548 1)
15549
15550$as_echo "#define SYSV_TIMEOFDAY 1" >>confdefs.h
15551
15552esac
15553
15554for ac_func in settimeofday
15555do :
15556  ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
15557if test "x$ac_cv_func_settimeofday" = xyes; then :
15558  cat >>confdefs.h <<_ACEOF
15559#define HAVE_SETTIMEOFDAY 1
15560_ACEOF
15561
15562else
15563
15564    case "$host" in
15565     *-*-mpeix*) ac_cv_func_settimeofday=yes
15566    esac
15567
15568fi
15569done
15570
15571
15572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
15573$as_echo_n "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
15574ntp_warning='GRONK'
15575ans=none
15576case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
15577 yes*)
15578    ntp_warning=''
15579    ans='clock_settime()'
15580    ;;
15581 noyes*)
15582    ntp_warning='But clock_settime() would be better (if we had it)'
15583    ans='settimeofday()'
15584    ;;
15585 nonoyes)
15586    ntp_warning='Which is the worst of the three'
15587    ans='stime()'
15588    ;;
15589 *)
15590    case "$build" in
15591     $host)
15592	ntp_warning='Which leaves us with nothing to use!'
15593    esac
15594esac
15595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
15596$as_echo "$ans" >&6; }
15597case "$ntp_warning" in
15598 '')
15599    ;;
15600 *)
15601    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
15602$as_echo "$as_me: WARNING: *** $ntp_warning ***" >&2;}
15603    ;;
15604esac
15605
15606
15607LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
15608LIBS=$__LIBS
15609{ __LIBS=; unset __LIBS;}
15610
15611
15612
15613# Check whether --enable-shared was given.
15614if test "${enable_shared+set}" = set; then :
15615  enableval=$enable_shared; p=${PACKAGE-default}
15616    case $enableval in
15617    yes) enable_shared=yes ;;
15618    no) enable_shared=no ;;
15619    *)
15620      enable_shared=no
15621      # Look at the argument we got.  We use all the common list separators.
15622      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
15623      for pkg in $enableval; do
15624	IFS=$lt_save_ifs
15625	if test "X$pkg" = "X$p"; then
15626	  enable_shared=yes
15627	fi
15628      done
15629      IFS=$lt_save_ifs
15630      ;;
15631    esac
15632else
15633  enable_shared=no
15634fi
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644case `pwd` in
15645  *\ * | *\	*)
15646    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
15647$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
15648esac
15649
15650
15651
15652macro_version='2.4.6'
15653macro_revision='2.4.6'
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667ltmain=$ac_aux_dir/ltmain.sh
15668
15669# Backslashify metacharacters that are still active within
15670# double-quoted strings.
15671sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
15672
15673# Same as above, but do not quote variable references.
15674double_quote_subst='s/\(["`\\]\)/\\\1/g'
15675
15676# Sed substitution to delay expansion of an escaped shell variable in a
15677# double_quote_subst'ed string.
15678delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
15679
15680# Sed substitution to delay expansion of an escaped single quote.
15681delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
15682
15683# Sed substitution to avoid accidental globbing in evaled expressions
15684no_glob_subst='s/\*/\\\*/g'
15685
15686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
15687$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
15688if ${lt_cv_path_NM+:} false; then :
15689  $as_echo_n "(cached) " >&6
15690else
15691  if test -n "$NM"; then
15692  # Let the user override the test.
15693  lt_cv_path_NM=$NM
15694else
15695  lt_nm_to_check=${ac_tool_prefix}nm
15696  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
15697    lt_nm_to_check="$lt_nm_to_check nm"
15698  fi
15699  for lt_tmp_nm in $lt_nm_to_check; do
15700    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
15701    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
15702      IFS=$lt_save_ifs
15703      test -z "$ac_dir" && ac_dir=.
15704      tmp_nm=$ac_dir/$lt_tmp_nm
15705      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
15706	# Check to see if the nm accepts a BSD-compat flag.
15707	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
15708	#   nm: unknown option "B" ignored
15709	# Tru64's nm complains that /dev/null is an invalid object file
15710	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
15711	case $build_os in
15712	mingw*) lt_bad_file=conftest.nm/nofile ;;
15713	*) lt_bad_file=/dev/null ;;
15714	esac
15715	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
15716	*$lt_bad_file* | *'Invalid file or object type'*)
15717	  lt_cv_path_NM="$tmp_nm -B"
15718	  break 2
15719	  ;;
15720	*)
15721	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
15722	  */dev/null*)
15723	    lt_cv_path_NM="$tmp_nm -p"
15724	    break 2
15725	    ;;
15726	  *)
15727	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
15728	    continue # so that we can try to find one that supports BSD flags
15729	    ;;
15730	  esac
15731	  ;;
15732	esac
15733      fi
15734    done
15735    IFS=$lt_save_ifs
15736  done
15737  : ${lt_cv_path_NM=no}
15738fi
15739fi
15740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
15741$as_echo "$lt_cv_path_NM" >&6; }
15742if test no != "$lt_cv_path_NM"; then
15743  NM=$lt_cv_path_NM
15744else
15745  # Didn't find any BSD compatible name lister, look for dumpbin.
15746  if test -n "$DUMPBIN"; then :
15747    # Let the user override the test.
15748  else
15749    if test -n "$ac_tool_prefix"; then
15750  for ac_prog in dumpbin "link -dump"
15751  do
15752    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
15753set dummy $ac_tool_prefix$ac_prog; ac_word=$2
15754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15755$as_echo_n "checking for $ac_word... " >&6; }
15756if ${ac_cv_prog_DUMPBIN+:} false; then :
15757  $as_echo_n "(cached) " >&6
15758else
15759  if test -n "$DUMPBIN"; then
15760  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
15761else
15762as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15763for as_dir in $PATH
15764do
15765  IFS=$as_save_IFS
15766  test -z "$as_dir" && as_dir=.
15767    for ac_exec_ext in '' $ac_executable_extensions; do
15768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15769    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
15770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15771    break 2
15772  fi
15773done
15774  done
15775IFS=$as_save_IFS
15776
15777fi
15778fi
15779DUMPBIN=$ac_cv_prog_DUMPBIN
15780if test -n "$DUMPBIN"; then
15781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
15782$as_echo "$DUMPBIN" >&6; }
15783else
15784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15785$as_echo "no" >&6; }
15786fi
15787
15788
15789    test -n "$DUMPBIN" && break
15790  done
15791fi
15792if test -z "$DUMPBIN"; then
15793  ac_ct_DUMPBIN=$DUMPBIN
15794  for ac_prog in dumpbin "link -dump"
15795do
15796  # Extract the first word of "$ac_prog", so it can be a program name with args.
15797set dummy $ac_prog; ac_word=$2
15798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15799$as_echo_n "checking for $ac_word... " >&6; }
15800if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then :
15801  $as_echo_n "(cached) " >&6
15802else
15803  if test -n "$ac_ct_DUMPBIN"; then
15804  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
15805else
15806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15807for as_dir in $PATH
15808do
15809  IFS=$as_save_IFS
15810  test -z "$as_dir" && as_dir=.
15811    for ac_exec_ext in '' $ac_executable_extensions; do
15812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15813    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
15814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15815    break 2
15816  fi
15817done
15818  done
15819IFS=$as_save_IFS
15820
15821fi
15822fi
15823ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
15824if test -n "$ac_ct_DUMPBIN"; then
15825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
15826$as_echo "$ac_ct_DUMPBIN" >&6; }
15827else
15828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15829$as_echo "no" >&6; }
15830fi
15831
15832
15833  test -n "$ac_ct_DUMPBIN" && break
15834done
15835
15836  if test "x$ac_ct_DUMPBIN" = x; then
15837    DUMPBIN=":"
15838  else
15839    case $cross_compiling:$ac_tool_warned in
15840yes:)
15841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
15842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
15843ac_tool_warned=yes ;;
15844esac
15845    DUMPBIN=$ac_ct_DUMPBIN
15846  fi
15847fi
15848
15849    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
15850    *COFF*)
15851      DUMPBIN="$DUMPBIN -symbols -headers"
15852      ;;
15853    *)
15854      DUMPBIN=:
15855      ;;
15856    esac
15857  fi
15858
15859  if test : != "$DUMPBIN"; then
15860    NM=$DUMPBIN
15861  fi
15862fi
15863test -z "$NM" && NM=nm
15864
15865
15866
15867
15868
15869
15870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
15871$as_echo_n "checking the name lister ($NM) interface... " >&6; }
15872if ${lt_cv_nm_interface+:} false; then :
15873  $as_echo_n "(cached) " >&6
15874else
15875  lt_cv_nm_interface="BSD nm"
15876  echo "int some_variable = 0;" > conftest.$ac_ext
15877  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
15878  (eval "$ac_compile" 2>conftest.err)
15879  cat conftest.err >&5
15880  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
15881  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
15882  cat conftest.err >&5
15883  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
15884  cat conftest.out >&5
15885  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
15886    lt_cv_nm_interface="MS dumpbin"
15887  fi
15888  rm -f conftest*
15889fi
15890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
15891$as_echo "$lt_cv_nm_interface" >&6; }
15892
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
15894$as_echo_n "checking whether ln -s works... " >&6; }
15895LN_S=$as_ln_s
15896if test "$LN_S" = "ln -s"; then
15897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15898$as_echo "yes" >&6; }
15899else
15900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
15901$as_echo "no, using $LN_S" >&6; }
15902fi
15903
15904# find the maximum length of command line arguments
15905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
15906$as_echo_n "checking the maximum length of command line arguments... " >&6; }
15907if ${lt_cv_sys_max_cmd_len+:} false; then :
15908  $as_echo_n "(cached) " >&6
15909else
15910    i=0
15911  teststring=ABCD
15912
15913  case $build_os in
15914  msdosdjgpp*)
15915    # On DJGPP, this test can blow up pretty badly due to problems in libc
15916    # (any single argument exceeding 2000 bytes causes a buffer overrun
15917    # during glob expansion).  Even if it were fixed, the result of this
15918    # check would be larger than it should be.
15919    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
15920    ;;
15921
15922  gnu*)
15923    # Under GNU Hurd, this test is not required because there is
15924    # no limit to the length of command line arguments.
15925    # Libtool will interpret -1 as no limit whatsoever
15926    lt_cv_sys_max_cmd_len=-1;
15927    ;;
15928
15929  cygwin* | mingw* | cegcc*)
15930    # On Win9x/ME, this test blows up -- it succeeds, but takes
15931    # about 5 minutes as the teststring grows exponentially.
15932    # Worse, since 9x/ME are not pre-emptively multitasking,
15933    # you end up with a "frozen" computer, even though with patience
15934    # the test eventually succeeds (with a max line length of 256k).
15935    # Instead, let's just punt: use the minimum linelength reported by
15936    # all of the supported platforms: 8192 (on NT/2K/XP).
15937    lt_cv_sys_max_cmd_len=8192;
15938    ;;
15939
15940  mint*)
15941    # On MiNT this can take a long time and run out of memory.
15942    lt_cv_sys_max_cmd_len=8192;
15943    ;;
15944
15945  amigaos*)
15946    # On AmigaOS with pdksh, this test takes hours, literally.
15947    # So we just punt and use a minimum line length of 8192.
15948    lt_cv_sys_max_cmd_len=8192;
15949    ;;
15950
15951  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
15952    # This has been around since 386BSD, at least.  Likely further.
15953    if test -x /sbin/sysctl; then
15954      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
15955    elif test -x /usr/sbin/sysctl; then
15956      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
15957    else
15958      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
15959    fi
15960    # And add a safety zone
15961    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
15962    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
15963    ;;
15964
15965  interix*)
15966    # We know the value 262144 and hardcode it with a safety zone (like BSD)
15967    lt_cv_sys_max_cmd_len=196608
15968    ;;
15969
15970  os2*)
15971    # The test takes a long time on OS/2.
15972    lt_cv_sys_max_cmd_len=8192
15973    ;;
15974
15975  osf*)
15976    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
15977    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
15978    # nice to cause kernel panics so lets avoid the loop below.
15979    # First set a reasonable default.
15980    lt_cv_sys_max_cmd_len=16384
15981    #
15982    if test -x /sbin/sysconfig; then
15983      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
15984        *1*) lt_cv_sys_max_cmd_len=-1 ;;
15985      esac
15986    fi
15987    ;;
15988  sco3.2v5*)
15989    lt_cv_sys_max_cmd_len=102400
15990    ;;
15991  sysv5* | sco5v6* | sysv4.2uw2*)
15992    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
15993    if test -n "$kargmax"; then
15994      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
15995    else
15996      lt_cv_sys_max_cmd_len=32768
15997    fi
15998    ;;
15999  *)
16000    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
16001    if test -n "$lt_cv_sys_max_cmd_len" && \
16002       test undefined != "$lt_cv_sys_max_cmd_len"; then
16003      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
16004      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
16005    else
16006      # Make teststring a little bigger before we do anything with it.
16007      # a 1K string should be a reasonable start.
16008      for i in 1 2 3 4 5 6 7 8; do
16009        teststring=$teststring$teststring
16010      done
16011      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
16012      # If test is not a shell built-in, we'll probably end up computing a
16013      # maximum length that is only half of the actual maximum length, but
16014      # we can't tell.
16015      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
16016	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
16017	      test 17 != "$i" # 1/2 MB should be enough
16018      do
16019        i=`expr $i + 1`
16020        teststring=$teststring$teststring
16021      done
16022      # Only check the string length outside the loop.
16023      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
16024      teststring=
16025      # Add a significant safety factor because C++ compilers can tack on
16026      # massive amounts of additional arguments before passing them to the
16027      # linker.  It appears as though 1/2 is a usable value.
16028      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
16029    fi
16030    ;;
16031  esac
16032
16033fi
16034
16035if test -n "$lt_cv_sys_max_cmd_len"; then
16036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
16037$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
16038else
16039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
16040$as_echo "none" >&6; }
16041fi
16042max_cmd_len=$lt_cv_sys_max_cmd_len
16043
16044
16045
16046
16047
16048
16049: ${CP="cp -f"}
16050: ${MV="mv -f"}
16051: ${RM="rm -f"}
16052
16053if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
16054  lt_unset=unset
16055else
16056  lt_unset=false
16057fi
16058
16059
16060
16061
16062
16063# test EBCDIC or ASCII
16064case `echo X|tr X '\101'` in
16065 A) # ASCII based system
16066    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
16067  lt_SP2NL='tr \040 \012'
16068  lt_NL2SP='tr \015\012 \040\040'
16069  ;;
16070 *) # EBCDIC based system
16071  lt_SP2NL='tr \100 \n'
16072  lt_NL2SP='tr \r\n \100\100'
16073  ;;
16074esac
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
16085$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
16086if ${lt_cv_to_host_file_cmd+:} false; then :
16087  $as_echo_n "(cached) " >&6
16088else
16089  case $host in
16090  *-*-mingw* )
16091    case $build in
16092      *-*-mingw* ) # actually msys
16093        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
16094        ;;
16095      *-*-cygwin* )
16096        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
16097        ;;
16098      * ) # otherwise, assume *nix
16099        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
16100        ;;
16101    esac
16102    ;;
16103  *-*-cygwin* )
16104    case $build in
16105      *-*-mingw* ) # actually msys
16106        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
16107        ;;
16108      *-*-cygwin* )
16109        lt_cv_to_host_file_cmd=func_convert_file_noop
16110        ;;
16111      * ) # otherwise, assume *nix
16112        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
16113        ;;
16114    esac
16115    ;;
16116  * ) # unhandled hosts (and "normal" native builds)
16117    lt_cv_to_host_file_cmd=func_convert_file_noop
16118    ;;
16119esac
16120
16121fi
16122
16123to_host_file_cmd=$lt_cv_to_host_file_cmd
16124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
16125$as_echo "$lt_cv_to_host_file_cmd" >&6; }
16126
16127
16128
16129
16130
16131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
16132$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
16133if ${lt_cv_to_tool_file_cmd+:} false; then :
16134  $as_echo_n "(cached) " >&6
16135else
16136  #assume ordinary cross tools, or native build.
16137lt_cv_to_tool_file_cmd=func_convert_file_noop
16138case $host in
16139  *-*-mingw* )
16140    case $build in
16141      *-*-mingw* ) # actually msys
16142        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
16143        ;;
16144    esac
16145    ;;
16146esac
16147
16148fi
16149
16150to_tool_file_cmd=$lt_cv_to_tool_file_cmd
16151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
16152$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
16153
16154
16155
16156
16157
16158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
16159$as_echo_n "checking for $LD option to reload object files... " >&6; }
16160if ${lt_cv_ld_reload_flag+:} false; then :
16161  $as_echo_n "(cached) " >&6
16162else
16163  lt_cv_ld_reload_flag='-r'
16164fi
16165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
16166$as_echo "$lt_cv_ld_reload_flag" >&6; }
16167reload_flag=$lt_cv_ld_reload_flag
16168case $reload_flag in
16169"" | " "*) ;;
16170*) reload_flag=" $reload_flag" ;;
16171esac
16172reload_cmds='$LD$reload_flag -o $output$reload_objs'
16173case $host_os in
16174  cygwin* | mingw* | pw32* | cegcc*)
16175    if test yes != "$GCC"; then
16176      reload_cmds=false
16177    fi
16178    ;;
16179  darwin*)
16180    if test yes = "$GCC"; then
16181      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
16182    else
16183      reload_cmds='$LD$reload_flag -o $output$reload_objs'
16184    fi
16185    ;;
16186esac
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196if test -n "$ac_tool_prefix"; then
16197  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
16198set dummy ${ac_tool_prefix}objdump; ac_word=$2
16199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16200$as_echo_n "checking for $ac_word... " >&6; }
16201if ${ac_cv_prog_OBJDUMP+:} false; then :
16202  $as_echo_n "(cached) " >&6
16203else
16204  if test -n "$OBJDUMP"; then
16205  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
16206else
16207as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16208for as_dir in $PATH
16209do
16210  IFS=$as_save_IFS
16211  test -z "$as_dir" && as_dir=.
16212    for ac_exec_ext in '' $ac_executable_extensions; do
16213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16214    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
16215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16216    break 2
16217  fi
16218done
16219  done
16220IFS=$as_save_IFS
16221
16222fi
16223fi
16224OBJDUMP=$ac_cv_prog_OBJDUMP
16225if test -n "$OBJDUMP"; then
16226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
16227$as_echo "$OBJDUMP" >&6; }
16228else
16229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16230$as_echo "no" >&6; }
16231fi
16232
16233
16234fi
16235if test -z "$ac_cv_prog_OBJDUMP"; then
16236  ac_ct_OBJDUMP=$OBJDUMP
16237  # Extract the first word of "objdump", so it can be a program name with args.
16238set dummy objdump; ac_word=$2
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16240$as_echo_n "checking for $ac_word... " >&6; }
16241if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
16242  $as_echo_n "(cached) " >&6
16243else
16244  if test -n "$ac_ct_OBJDUMP"; then
16245  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
16246else
16247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16248for as_dir in $PATH
16249do
16250  IFS=$as_save_IFS
16251  test -z "$as_dir" && as_dir=.
16252    for ac_exec_ext in '' $ac_executable_extensions; do
16253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16254    ac_cv_prog_ac_ct_OBJDUMP="objdump"
16255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16256    break 2
16257  fi
16258done
16259  done
16260IFS=$as_save_IFS
16261
16262fi
16263fi
16264ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
16265if test -n "$ac_ct_OBJDUMP"; then
16266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
16267$as_echo "$ac_ct_OBJDUMP" >&6; }
16268else
16269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16270$as_echo "no" >&6; }
16271fi
16272
16273  if test "x$ac_ct_OBJDUMP" = x; then
16274    OBJDUMP="false"
16275  else
16276    case $cross_compiling:$ac_tool_warned in
16277yes:)
16278{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16279$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16280ac_tool_warned=yes ;;
16281esac
16282    OBJDUMP=$ac_ct_OBJDUMP
16283  fi
16284else
16285  OBJDUMP="$ac_cv_prog_OBJDUMP"
16286fi
16287
16288test -z "$OBJDUMP" && OBJDUMP=objdump
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
16299$as_echo_n "checking how to recognize dependent libraries... " >&6; }
16300if ${lt_cv_deplibs_check_method+:} false; then :
16301  $as_echo_n "(cached) " >&6
16302else
16303  lt_cv_file_magic_cmd='$MAGIC_CMD'
16304lt_cv_file_magic_test_file=
16305lt_cv_deplibs_check_method='unknown'
16306# Need to set the preceding variable on all platforms that support
16307# interlibrary dependencies.
16308# 'none' -- dependencies not supported.
16309# 'unknown' -- same as none, but documents that we really don't know.
16310# 'pass_all' -- all dependencies passed with no checks.
16311# 'test_compile' -- check by making test program.
16312# 'file_magic [[regex]]' -- check by looking for files in library path
16313# that responds to the $file_magic_cmd with a given extended regex.
16314# If you have 'file' or equivalent on your system and you're not sure
16315# whether 'pass_all' will *always* work, you probably want this one.
16316
16317case $host_os in
16318aix[4-9]*)
16319  lt_cv_deplibs_check_method=pass_all
16320  ;;
16321
16322beos*)
16323  lt_cv_deplibs_check_method=pass_all
16324  ;;
16325
16326bsdi[45]*)
16327  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
16328  lt_cv_file_magic_cmd='/usr/bin/file -L'
16329  lt_cv_file_magic_test_file=/shlib/libc.so
16330  ;;
16331
16332cygwin*)
16333  # func_win32_libid is a shell function defined in ltmain.sh
16334  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16335  lt_cv_file_magic_cmd='func_win32_libid'
16336  ;;
16337
16338mingw* | pw32*)
16339  # Base MSYS/MinGW do not provide the 'file' command needed by
16340  # func_win32_libid shell function, so use a weaker test based on 'objdump',
16341  # unless we find 'file', for example because we are cross-compiling.
16342  if ( file / ) >/dev/null 2>&1; then
16343    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
16344    lt_cv_file_magic_cmd='func_win32_libid'
16345  else
16346    # Keep this pattern in sync with the one in func_win32_libid.
16347    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
16348    lt_cv_file_magic_cmd='$OBJDUMP -f'
16349  fi
16350  ;;
16351
16352cegcc*)
16353  # use the weaker test based on 'objdump'. See mingw*.
16354  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
16355  lt_cv_file_magic_cmd='$OBJDUMP -f'
16356  ;;
16357
16358darwin* | rhapsody*)
16359  lt_cv_deplibs_check_method=pass_all
16360  ;;
16361
16362freebsd* | dragonfly*)
16363  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16364    case $host_cpu in
16365    i*86 )
16366      # Not sure whether the presence of OpenBSD here was a mistake.
16367      # Let's accept both of them until this is cleared up.
16368      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
16369      lt_cv_file_magic_cmd=/usr/bin/file
16370      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
16371      ;;
16372    esac
16373  else
16374    lt_cv_deplibs_check_method=pass_all
16375  fi
16376  ;;
16377
16378haiku*)
16379  lt_cv_deplibs_check_method=pass_all
16380  ;;
16381
16382hpux10.20* | hpux11*)
16383  lt_cv_file_magic_cmd=/usr/bin/file
16384  case $host_cpu in
16385  ia64*)
16386    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
16387    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
16388    ;;
16389  hppa*64*)
16390    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]'
16391    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
16392    ;;
16393  *)
16394    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
16395    lt_cv_file_magic_test_file=/usr/lib/libc.sl
16396    ;;
16397  esac
16398  ;;
16399
16400interix[3-9]*)
16401  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
16402  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
16403  ;;
16404
16405irix5* | irix6* | nonstopux*)
16406  case $LD in
16407  *-32|*"-32 ") libmagic=32-bit;;
16408  *-n32|*"-n32 ") libmagic=N32;;
16409  *-64|*"-64 ") libmagic=64-bit;;
16410  *) libmagic=never-match;;
16411  esac
16412  lt_cv_deplibs_check_method=pass_all
16413  ;;
16414
16415# This must be glibc/ELF.
16416linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
16417  lt_cv_deplibs_check_method=pass_all
16418  ;;
16419
16420netbsd*)
16421  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
16422    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16423  else
16424    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
16425  fi
16426  ;;
16427
16428newos6*)
16429  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
16430  lt_cv_file_magic_cmd=/usr/bin/file
16431  lt_cv_file_magic_test_file=/usr/lib/libnls.so
16432  ;;
16433
16434*nto* | *qnx*)
16435  lt_cv_deplibs_check_method=pass_all
16436  ;;
16437
16438openbsd* | bitrig*)
16439  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
16440    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
16441  else
16442    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
16443  fi
16444  ;;
16445
16446osf3* | osf4* | osf5*)
16447  lt_cv_deplibs_check_method=pass_all
16448  ;;
16449
16450rdos*)
16451  lt_cv_deplibs_check_method=pass_all
16452  ;;
16453
16454solaris*)
16455  lt_cv_deplibs_check_method=pass_all
16456  ;;
16457
16458sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
16459  lt_cv_deplibs_check_method=pass_all
16460  ;;
16461
16462sysv4 | sysv4.3*)
16463  case $host_vendor in
16464  motorola)
16465    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]'
16466    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
16467    ;;
16468  ncr)
16469    lt_cv_deplibs_check_method=pass_all
16470    ;;
16471  sequent)
16472    lt_cv_file_magic_cmd='/bin/file'
16473    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
16474    ;;
16475  sni)
16476    lt_cv_file_magic_cmd='/bin/file'
16477    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
16478    lt_cv_file_magic_test_file=/lib/libc.so
16479    ;;
16480  siemens)
16481    lt_cv_deplibs_check_method=pass_all
16482    ;;
16483  pc)
16484    lt_cv_deplibs_check_method=pass_all
16485    ;;
16486  esac
16487  ;;
16488
16489tpf*)
16490  lt_cv_deplibs_check_method=pass_all
16491  ;;
16492os2*)
16493  lt_cv_deplibs_check_method=pass_all
16494  ;;
16495esac
16496
16497fi
16498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
16499$as_echo "$lt_cv_deplibs_check_method" >&6; }
16500
16501file_magic_glob=
16502want_nocaseglob=no
16503if test "$build" = "$host"; then
16504  case $host_os in
16505  mingw* | pw32*)
16506    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
16507      want_nocaseglob=yes
16508    else
16509      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
16510    fi
16511    ;;
16512  esac
16513fi
16514
16515file_magic_cmd=$lt_cv_file_magic_cmd
16516deplibs_check_method=$lt_cv_deplibs_check_method
16517test -z "$deplibs_check_method" && deplibs_check_method=unknown
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540if test -n "$ac_tool_prefix"; then
16541  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
16542set dummy ${ac_tool_prefix}dlltool; ac_word=$2
16543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16544$as_echo_n "checking for $ac_word... " >&6; }
16545if ${ac_cv_prog_DLLTOOL+:} false; then :
16546  $as_echo_n "(cached) " >&6
16547else
16548  if test -n "$DLLTOOL"; then
16549  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
16550else
16551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16552for as_dir in $PATH
16553do
16554  IFS=$as_save_IFS
16555  test -z "$as_dir" && as_dir=.
16556    for ac_exec_ext in '' $ac_executable_extensions; do
16557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16558    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
16559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16560    break 2
16561  fi
16562done
16563  done
16564IFS=$as_save_IFS
16565
16566fi
16567fi
16568DLLTOOL=$ac_cv_prog_DLLTOOL
16569if test -n "$DLLTOOL"; then
16570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
16571$as_echo "$DLLTOOL" >&6; }
16572else
16573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16574$as_echo "no" >&6; }
16575fi
16576
16577
16578fi
16579if test -z "$ac_cv_prog_DLLTOOL"; then
16580  ac_ct_DLLTOOL=$DLLTOOL
16581  # Extract the first word of "dlltool", so it can be a program name with args.
16582set dummy dlltool; ac_word=$2
16583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16584$as_echo_n "checking for $ac_word... " >&6; }
16585if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
16586  $as_echo_n "(cached) " >&6
16587else
16588  if test -n "$ac_ct_DLLTOOL"; then
16589  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
16590else
16591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16592for as_dir in $PATH
16593do
16594  IFS=$as_save_IFS
16595  test -z "$as_dir" && as_dir=.
16596    for ac_exec_ext in '' $ac_executable_extensions; do
16597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16598    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
16599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16600    break 2
16601  fi
16602done
16603  done
16604IFS=$as_save_IFS
16605
16606fi
16607fi
16608ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
16609if test -n "$ac_ct_DLLTOOL"; then
16610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
16611$as_echo "$ac_ct_DLLTOOL" >&6; }
16612else
16613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16614$as_echo "no" >&6; }
16615fi
16616
16617  if test "x$ac_ct_DLLTOOL" = x; then
16618    DLLTOOL="false"
16619  else
16620    case $cross_compiling:$ac_tool_warned in
16621yes:)
16622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16624ac_tool_warned=yes ;;
16625esac
16626    DLLTOOL=$ac_ct_DLLTOOL
16627  fi
16628else
16629  DLLTOOL="$ac_cv_prog_DLLTOOL"
16630fi
16631
16632test -z "$DLLTOOL" && DLLTOOL=dlltool
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
16644$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
16645if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then :
16646  $as_echo_n "(cached) " >&6
16647else
16648  lt_cv_sharedlib_from_linklib_cmd='unknown'
16649
16650case $host_os in
16651cygwin* | mingw* | pw32* | cegcc*)
16652  # two different shell functions defined in ltmain.sh;
16653  # decide which one to use based on capabilities of $DLLTOOL
16654  case `$DLLTOOL --help 2>&1` in
16655  *--identify-strict*)
16656    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
16657    ;;
16658  *)
16659    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
16660    ;;
16661  esac
16662  ;;
16663*)
16664  # fallback: assume linklib IS sharedlib
16665  lt_cv_sharedlib_from_linklib_cmd=$ECHO
16666  ;;
16667esac
16668
16669fi
16670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
16671$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
16672sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
16673test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
16674
16675
16676
16677
16678
16679
16680
16681if test -n "$ac_tool_prefix"; then
16682  for ac_prog in ar
16683  do
16684    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16685set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16687$as_echo_n "checking for $ac_word... " >&6; }
16688if ${ac_cv_prog_AR+:} false; then :
16689  $as_echo_n "(cached) " >&6
16690else
16691  if test -n "$AR"; then
16692  ac_cv_prog_AR="$AR" # Let the user override the test.
16693else
16694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16695for as_dir in $PATH
16696do
16697  IFS=$as_save_IFS
16698  test -z "$as_dir" && as_dir=.
16699    for ac_exec_ext in '' $ac_executable_extensions; do
16700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16701    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
16702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16703    break 2
16704  fi
16705done
16706  done
16707IFS=$as_save_IFS
16708
16709fi
16710fi
16711AR=$ac_cv_prog_AR
16712if test -n "$AR"; then
16713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
16714$as_echo "$AR" >&6; }
16715else
16716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16717$as_echo "no" >&6; }
16718fi
16719
16720
16721    test -n "$AR" && break
16722  done
16723fi
16724if test -z "$AR"; then
16725  ac_ct_AR=$AR
16726  for ac_prog in ar
16727do
16728  # Extract the first word of "$ac_prog", so it can be a program name with args.
16729set dummy $ac_prog; ac_word=$2
16730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16731$as_echo_n "checking for $ac_word... " >&6; }
16732if ${ac_cv_prog_ac_ct_AR+:} false; then :
16733  $as_echo_n "(cached) " >&6
16734else
16735  if test -n "$ac_ct_AR"; then
16736  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
16737else
16738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16739for as_dir in $PATH
16740do
16741  IFS=$as_save_IFS
16742  test -z "$as_dir" && as_dir=.
16743    for ac_exec_ext in '' $ac_executable_extensions; do
16744  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16745    ac_cv_prog_ac_ct_AR="$ac_prog"
16746    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16747    break 2
16748  fi
16749done
16750  done
16751IFS=$as_save_IFS
16752
16753fi
16754fi
16755ac_ct_AR=$ac_cv_prog_ac_ct_AR
16756if test -n "$ac_ct_AR"; then
16757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
16758$as_echo "$ac_ct_AR" >&6; }
16759else
16760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16761$as_echo "no" >&6; }
16762fi
16763
16764
16765  test -n "$ac_ct_AR" && break
16766done
16767
16768  if test "x$ac_ct_AR" = x; then
16769    AR="false"
16770  else
16771    case $cross_compiling:$ac_tool_warned in
16772yes:)
16773{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16774$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16775ac_tool_warned=yes ;;
16776esac
16777    AR=$ac_ct_AR
16778  fi
16779fi
16780
16781: ${AR=ar}
16782: ${AR_FLAGS=cru}
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
16795$as_echo_n "checking for archiver @FILE support... " >&6; }
16796if ${lt_cv_ar_at_file+:} false; then :
16797  $as_echo_n "(cached) " >&6
16798else
16799  lt_cv_ar_at_file=no
16800   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16801/* end confdefs.h.  */
16802
16803int
16804main ()
16805{
16806
16807  ;
16808  return 0;
16809}
16810_ACEOF
16811if ac_fn_c_try_compile "$LINENO"; then :
16812  echo conftest.$ac_objext > conftest.lst
16813      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
16814      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16815  (eval $lt_ar_try) 2>&5
16816  ac_status=$?
16817  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16818  test $ac_status = 0; }
16819      if test 0 -eq "$ac_status"; then
16820	# Ensure the archiver fails upon bogus file names.
16821	rm -f conftest.$ac_objext libconftest.a
16822	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
16823  (eval $lt_ar_try) 2>&5
16824  ac_status=$?
16825  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16826  test $ac_status = 0; }
16827	if test 0 -ne "$ac_status"; then
16828          lt_cv_ar_at_file=@
16829        fi
16830      fi
16831      rm -f conftest.* libconftest.a
16832
16833fi
16834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16835
16836fi
16837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
16838$as_echo "$lt_cv_ar_at_file" >&6; }
16839
16840if test no = "$lt_cv_ar_at_file"; then
16841  archiver_list_spec=
16842else
16843  archiver_list_spec=$lt_cv_ar_at_file
16844fi
16845
16846
16847
16848
16849
16850
16851
16852if test -n "$ac_tool_prefix"; then
16853  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
16854set dummy ${ac_tool_prefix}strip; ac_word=$2
16855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16856$as_echo_n "checking for $ac_word... " >&6; }
16857if ${ac_cv_prog_STRIP+:} false; then :
16858  $as_echo_n "(cached) " >&6
16859else
16860  if test -n "$STRIP"; then
16861  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
16862else
16863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16864for as_dir in $PATH
16865do
16866  IFS=$as_save_IFS
16867  test -z "$as_dir" && as_dir=.
16868    for ac_exec_ext in '' $ac_executable_extensions; do
16869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16870    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
16871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16872    break 2
16873  fi
16874done
16875  done
16876IFS=$as_save_IFS
16877
16878fi
16879fi
16880STRIP=$ac_cv_prog_STRIP
16881if test -n "$STRIP"; then
16882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
16883$as_echo "$STRIP" >&6; }
16884else
16885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16886$as_echo "no" >&6; }
16887fi
16888
16889
16890fi
16891if test -z "$ac_cv_prog_STRIP"; then
16892  ac_ct_STRIP=$STRIP
16893  # Extract the first word of "strip", so it can be a program name with args.
16894set dummy strip; ac_word=$2
16895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16896$as_echo_n "checking for $ac_word... " >&6; }
16897if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
16898  $as_echo_n "(cached) " >&6
16899else
16900  if test -n "$ac_ct_STRIP"; then
16901  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
16902else
16903as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16904for as_dir in $PATH
16905do
16906  IFS=$as_save_IFS
16907  test -z "$as_dir" && as_dir=.
16908    for ac_exec_ext in '' $ac_executable_extensions; do
16909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16910    ac_cv_prog_ac_ct_STRIP="strip"
16911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16912    break 2
16913  fi
16914done
16915  done
16916IFS=$as_save_IFS
16917
16918fi
16919fi
16920ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
16921if test -n "$ac_ct_STRIP"; then
16922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
16923$as_echo "$ac_ct_STRIP" >&6; }
16924else
16925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16926$as_echo "no" >&6; }
16927fi
16928
16929  if test "x$ac_ct_STRIP" = x; then
16930    STRIP=":"
16931  else
16932    case $cross_compiling:$ac_tool_warned in
16933yes:)
16934{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16935$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16936ac_tool_warned=yes ;;
16937esac
16938    STRIP=$ac_ct_STRIP
16939  fi
16940else
16941  STRIP="$ac_cv_prog_STRIP"
16942fi
16943
16944test -z "$STRIP" && STRIP=:
16945
16946
16947
16948
16949
16950
16951if test -n "$ac_tool_prefix"; then
16952  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
16953set dummy ${ac_tool_prefix}ranlib; ac_word=$2
16954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16955$as_echo_n "checking for $ac_word... " >&6; }
16956if ${ac_cv_prog_RANLIB+:} false; then :
16957  $as_echo_n "(cached) " >&6
16958else
16959  if test -n "$RANLIB"; then
16960  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
16961else
16962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16963for as_dir in $PATH
16964do
16965  IFS=$as_save_IFS
16966  test -z "$as_dir" && as_dir=.
16967    for ac_exec_ext in '' $ac_executable_extensions; do
16968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16969    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
16970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16971    break 2
16972  fi
16973done
16974  done
16975IFS=$as_save_IFS
16976
16977fi
16978fi
16979RANLIB=$ac_cv_prog_RANLIB
16980if test -n "$RANLIB"; then
16981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
16982$as_echo "$RANLIB" >&6; }
16983else
16984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16985$as_echo "no" >&6; }
16986fi
16987
16988
16989fi
16990if test -z "$ac_cv_prog_RANLIB"; then
16991  ac_ct_RANLIB=$RANLIB
16992  # Extract the first word of "ranlib", so it can be a program name with args.
16993set dummy ranlib; ac_word=$2
16994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16995$as_echo_n "checking for $ac_word... " >&6; }
16996if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
16997  $as_echo_n "(cached) " >&6
16998else
16999  if test -n "$ac_ct_RANLIB"; then
17000  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
17001else
17002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17003for as_dir in $PATH
17004do
17005  IFS=$as_save_IFS
17006  test -z "$as_dir" && as_dir=.
17007    for ac_exec_ext in '' $ac_executable_extensions; do
17008  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17009    ac_cv_prog_ac_ct_RANLIB="ranlib"
17010    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17011    break 2
17012  fi
17013done
17014  done
17015IFS=$as_save_IFS
17016
17017fi
17018fi
17019ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
17020if test -n "$ac_ct_RANLIB"; then
17021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
17022$as_echo "$ac_ct_RANLIB" >&6; }
17023else
17024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025$as_echo "no" >&6; }
17026fi
17027
17028  if test "x$ac_ct_RANLIB" = x; then
17029    RANLIB=":"
17030  else
17031    case $cross_compiling:$ac_tool_warned in
17032yes:)
17033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17035ac_tool_warned=yes ;;
17036esac
17037    RANLIB=$ac_ct_RANLIB
17038  fi
17039else
17040  RANLIB="$ac_cv_prog_RANLIB"
17041fi
17042
17043test -z "$RANLIB" && RANLIB=:
17044
17045
17046
17047
17048
17049
17050# Determine commands to create old-style static archives.
17051old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
17052old_postinstall_cmds='chmod 644 $oldlib'
17053old_postuninstall_cmds=
17054
17055if test -n "$RANLIB"; then
17056  case $host_os in
17057  bitrig* | openbsd*)
17058    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
17059    ;;
17060  *)
17061    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
17062    ;;
17063  esac
17064  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
17065fi
17066
17067case $host_os in
17068  darwin*)
17069    lock_old_archive_extraction=yes ;;
17070  *)
17071    lock_old_archive_extraction=no ;;
17072esac
17073
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# If no C compiler was specified, use CC.
17113LTCC=${LTCC-"$CC"}
17114
17115# If no C compiler flags were specified, use CFLAGS.
17116LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
17117
17118# Allow CC to be a program name with arguments.
17119compiler=$CC
17120
17121
17122# Check for command to grab the raw symbol name followed by C symbol from nm.
17123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
17124$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
17125if ${lt_cv_sys_global_symbol_pipe+:} false; then :
17126  $as_echo_n "(cached) " >&6
17127else
17128
17129# These are sane defaults that work on at least a few old systems.
17130# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
17131
17132# Character class describing NM global symbol codes.
17133symcode='[BCDEGRST]'
17134
17135# Regexp to match symbols that can be accessed directly from C.
17136sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
17137
17138# Define system-specific variables.
17139case $host_os in
17140aix*)
17141  symcode='[BCDT]'
17142  ;;
17143cygwin* | mingw* | pw32* | cegcc*)
17144  symcode='[ABCDGISTW]'
17145  ;;
17146hpux*)
17147  if test ia64 = "$host_cpu"; then
17148    symcode='[ABCDEGRST]'
17149  fi
17150  ;;
17151irix* | nonstopux*)
17152  symcode='[BCDEGRST]'
17153  ;;
17154osf*)
17155  symcode='[BCDEGQRST]'
17156  ;;
17157solaris*)
17158  symcode='[BDRT]'
17159  ;;
17160sco3.2v5*)
17161  symcode='[DT]'
17162  ;;
17163sysv4.2uw2*)
17164  symcode='[DT]'
17165  ;;
17166sysv5* | sco5v6* | unixware* | OpenUNIX*)
17167  symcode='[ABDT]'
17168  ;;
17169sysv4)
17170  symcode='[DFNSTU]'
17171  ;;
17172esac
17173
17174# If we're using GNU nm, then use its standard symbol codes.
17175case `$NM -V 2>&1` in
17176*GNU* | *'with BFD'*)
17177  symcode='[ABCDGIRSTW]' ;;
17178esac
17179
17180if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17181  # Gets list of data symbols to import.
17182  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
17183  # Adjust the below global symbol transforms to fixup imported variables.
17184  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
17185  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
17186  lt_c_name_lib_hook="\
17187  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
17188  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
17189else
17190  # Disable hooks by default.
17191  lt_cv_sys_global_symbol_to_import=
17192  lt_cdecl_hook=
17193  lt_c_name_hook=
17194  lt_c_name_lib_hook=
17195fi
17196
17197# Transform an extracted symbol line into a proper C declaration.
17198# Some systems (esp. on ia64) link data and code symbols differently,
17199# so use this general approach.
17200lt_cv_sys_global_symbol_to_cdecl="sed -n"\
17201$lt_cdecl_hook\
17202" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
17203" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
17204
17205# Transform an extracted symbol line into symbol name and symbol address
17206lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
17207$lt_c_name_hook\
17208" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17209" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
17210
17211# Transform an extracted symbol line into symbol name with lib prefix and
17212# symbol address.
17213lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
17214$lt_c_name_lib_hook\
17215" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
17216" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
17217" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
17218
17219# Handle CRLF in mingw tool chain
17220opt_cr=
17221case $build_os in
17222mingw*)
17223  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
17224  ;;
17225esac
17226
17227# Try without a prefix underscore, then with it.
17228for ac_symprfx in "" "_"; do
17229
17230  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
17231  symxfrm="\\1 $ac_symprfx\\2 \\2"
17232
17233  # Write the raw and C identifiers.
17234  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17235    # Fake it for dumpbin and say T for any non-static function,
17236    # D for any global variable and I for any imported variable.
17237    # Also find C++ and __fastcall symbols from MSVC++,
17238    # which start with @ or ?.
17239    lt_cv_sys_global_symbol_pipe="$AWK '"\
17240"     {last_section=section; section=\$ 3};"\
17241"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
17242"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
17243"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
17244"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
17245"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
17246"     \$ 0!~/External *\|/{next};"\
17247"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
17248"     {if(hide[section]) next};"\
17249"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
17250"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
17251"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
17252"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
17253"     ' prfx=^$ac_symprfx"
17254  else
17255    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
17256  fi
17257  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
17258
17259  # Check to see that the pipe works correctly.
17260  pipe_works=no
17261
17262  rm -f conftest*
17263  cat > conftest.$ac_ext <<_LT_EOF
17264#ifdef __cplusplus
17265extern "C" {
17266#endif
17267char nm_test_var;
17268void nm_test_func(void);
17269void nm_test_func(void){}
17270#ifdef __cplusplus
17271}
17272#endif
17273int main(){nm_test_var='a';nm_test_func();return(0);}
17274_LT_EOF
17275
17276  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17277  (eval $ac_compile) 2>&5
17278  ac_status=$?
17279  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17280  test $ac_status = 0; }; then
17281    # Now try to grab the symbols.
17282    nlist=conftest.nm
17283    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
17284  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
17285  ac_status=$?
17286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17287  test $ac_status = 0; } && test -s "$nlist"; then
17288      # Try sorting and uniquifying the output.
17289      if sort "$nlist" | uniq > "$nlist"T; then
17290	mv -f "$nlist"T "$nlist"
17291      else
17292	rm -f "$nlist"T
17293      fi
17294
17295      # Make sure that we snagged all the symbols we need.
17296      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
17297	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
17298	  cat <<_LT_EOF > conftest.$ac_ext
17299/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
17300#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
17301/* DATA imports from DLLs on WIN32 can't be const, because runtime
17302   relocations are performed -- see ld's documentation on pseudo-relocs.  */
17303# define LT_DLSYM_CONST
17304#elif defined __osf__
17305/* This system does not cope well with relocations in const data.  */
17306# define LT_DLSYM_CONST
17307#else
17308# define LT_DLSYM_CONST const
17309#endif
17310
17311#ifdef __cplusplus
17312extern "C" {
17313#endif
17314
17315_LT_EOF
17316	  # Now generate the symbol file.
17317	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
17318
17319	  cat <<_LT_EOF >> conftest.$ac_ext
17320
17321/* The mapping between symbol names and symbols.  */
17322LT_DLSYM_CONST struct {
17323  const char *name;
17324  void       *address;
17325}
17326lt__PROGRAM__LTX_preloaded_symbols[] =
17327{
17328  { "@PROGRAM@", (void *) 0 },
17329_LT_EOF
17330	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
17331	  cat <<\_LT_EOF >> conftest.$ac_ext
17332  {0, (void *) 0}
17333};
17334
17335/* This works around a problem in FreeBSD linker */
17336#ifdef FREEBSD_WORKAROUND
17337static const void *lt_preloaded_setup() {
17338  return lt__PROGRAM__LTX_preloaded_symbols;
17339}
17340#endif
17341
17342#ifdef __cplusplus
17343}
17344#endif
17345_LT_EOF
17346	  # Now try linking the two files.
17347	  mv conftest.$ac_objext conftstm.$ac_objext
17348	  lt_globsym_save_LIBS=$LIBS
17349	  lt_globsym_save_CFLAGS=$CFLAGS
17350	  LIBS=conftstm.$ac_objext
17351	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
17352	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
17353  (eval $ac_link) 2>&5
17354  ac_status=$?
17355  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17356  test $ac_status = 0; } && test -s conftest$ac_exeext; then
17357	    pipe_works=yes
17358	  fi
17359	  LIBS=$lt_globsym_save_LIBS
17360	  CFLAGS=$lt_globsym_save_CFLAGS
17361	else
17362	  echo "cannot find nm_test_func in $nlist" >&5
17363	fi
17364      else
17365	echo "cannot find nm_test_var in $nlist" >&5
17366      fi
17367    else
17368      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
17369    fi
17370  else
17371    echo "$progname: failed program was:" >&5
17372    cat conftest.$ac_ext >&5
17373  fi
17374  rm -rf conftest* conftst*
17375
17376  # Do not use the global_symbol_pipe unless it works.
17377  if test yes = "$pipe_works"; then
17378    break
17379  else
17380    lt_cv_sys_global_symbol_pipe=
17381  fi
17382done
17383
17384fi
17385
17386if test -z "$lt_cv_sys_global_symbol_pipe"; then
17387  lt_cv_sys_global_symbol_to_cdecl=
17388fi
17389if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
17390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17391$as_echo "failed" >&6; }
17392else
17393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17394$as_echo "ok" >&6; }
17395fi
17396
17397# Response file support.
17398if test "$lt_cv_nm_interface" = "MS dumpbin"; then
17399  nm_file_list_spec='@'
17400elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
17401  nm_file_list_spec='@'
17402fi
17403
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{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17441$as_echo_n "checking for sysroot... " >&6; }
17442
17443# Check whether --with-sysroot was given.
17444if test "${with_sysroot+set}" = set; then :
17445  withval=$with_sysroot;
17446else
17447  with_sysroot=no
17448fi
17449
17450
17451lt_sysroot=
17452case $with_sysroot in #(
17453 yes)
17454   if test yes = "$GCC"; then
17455     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
17456   fi
17457   ;; #(
17458 /*)
17459   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
17460   ;; #(
17461 no|'')
17462   ;; #(
17463 *)
17464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
17465$as_echo "$with_sysroot" >&6; }
17466   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
17467   ;;
17468esac
17469
17470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
17471$as_echo "${lt_sysroot:-no}" >&6; }
17472
17473
17474
17475
17476
17477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
17478$as_echo_n "checking for a working dd... " >&6; }
17479if ${ac_cv_path_lt_DD+:} false; then :
17480  $as_echo_n "(cached) " >&6
17481else
17482  printf 0123456789abcdef0123456789abcdef >conftest.i
17483cat conftest.i conftest.i >conftest2.i
17484: ${lt_DD:=$DD}
17485if test -z "$lt_DD"; then
17486  ac_path_lt_DD_found=false
17487  # Loop through the user's path and test for each of PROGNAME-LIST
17488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17489for as_dir in $PATH
17490do
17491  IFS=$as_save_IFS
17492  test -z "$as_dir" && as_dir=.
17493    for ac_prog in dd; do
17494    for ac_exec_ext in '' $ac_executable_extensions; do
17495      ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
17496      as_fn_executable_p "$ac_path_lt_DD" || continue
17497if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17498  cmp -s conftest.i conftest.out \
17499  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
17500fi
17501      $ac_path_lt_DD_found && break 3
17502    done
17503  done
17504  done
17505IFS=$as_save_IFS
17506  if test -z "$ac_cv_path_lt_DD"; then
17507    :
17508  fi
17509else
17510  ac_cv_path_lt_DD=$lt_DD
17511fi
17512
17513rm -f conftest.i conftest2.i conftest.out
17514fi
17515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
17516$as_echo "$ac_cv_path_lt_DD" >&6; }
17517
17518
17519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
17520$as_echo_n "checking how to truncate binary pipes... " >&6; }
17521if ${lt_cv_truncate_bin+:} false; then :
17522  $as_echo_n "(cached) " >&6
17523else
17524  printf 0123456789abcdef0123456789abcdef >conftest.i
17525cat conftest.i conftest.i >conftest2.i
17526lt_cv_truncate_bin=
17527if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
17528  cmp -s conftest.i conftest.out \
17529  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
17530fi
17531rm -f conftest.i conftest2.i conftest.out
17532test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
17533fi
17534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
17535$as_echo "$lt_cv_truncate_bin" >&6; }
17536
17537
17538
17539
17540
17541
17542
17543# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
17544func_cc_basename ()
17545{
17546    for cc_temp in $*""; do
17547      case $cc_temp in
17548        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
17549        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
17550        \-*) ;;
17551        *) break;;
17552      esac
17553    done
17554    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
17555}
17556
17557# Check whether --enable-libtool-lock was given.
17558if test "${enable_libtool_lock+set}" = set; then :
17559  enableval=$enable_libtool_lock;
17560fi
17561
17562test no = "$enable_libtool_lock" || enable_libtool_lock=yes
17563
17564# Some flags need to be propagated to the compiler or linker for good
17565# libtool support.
17566case $host in
17567ia64-*-hpux*)
17568  # Find out what ABI is being produced by ac_compile, and set mode
17569  # options accordingly.
17570  echo 'int i;' > conftest.$ac_ext
17571  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17572  (eval $ac_compile) 2>&5
17573  ac_status=$?
17574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17575  test $ac_status = 0; }; then
17576    case `/usr/bin/file conftest.$ac_objext` in
17577      *ELF-32*)
17578	HPUX_IA64_MODE=32
17579	;;
17580      *ELF-64*)
17581	HPUX_IA64_MODE=64
17582	;;
17583    esac
17584  fi
17585  rm -rf conftest*
17586  ;;
17587*-*-irix6*)
17588  # Find out what ABI is being produced by ac_compile, and set linker
17589  # options accordingly.
17590  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17591  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17592  (eval $ac_compile) 2>&5
17593  ac_status=$?
17594  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17595  test $ac_status = 0; }; then
17596    if test yes = "$lt_cv_prog_gnu_ld"; then
17597      case `/usr/bin/file conftest.$ac_objext` in
17598	*32-bit*)
17599	  LD="${LD-ld} -melf32bsmip"
17600	  ;;
17601	*N32*)
17602	  LD="${LD-ld} -melf32bmipn32"
17603	  ;;
17604	*64-bit*)
17605	  LD="${LD-ld} -melf64bmip"
17606	;;
17607      esac
17608    else
17609      case `/usr/bin/file conftest.$ac_objext` in
17610	*32-bit*)
17611	  LD="${LD-ld} -32"
17612	  ;;
17613	*N32*)
17614	  LD="${LD-ld} -n32"
17615	  ;;
17616	*64-bit*)
17617	  LD="${LD-ld} -64"
17618	  ;;
17619      esac
17620    fi
17621  fi
17622  rm -rf conftest*
17623  ;;
17624
17625mips64*-*linux*)
17626  # Find out what ABI is being produced by ac_compile, and set linker
17627  # options accordingly.
17628  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
17629  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17630  (eval $ac_compile) 2>&5
17631  ac_status=$?
17632  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17633  test $ac_status = 0; }; then
17634    emul=elf
17635    case `/usr/bin/file conftest.$ac_objext` in
17636      *32-bit*)
17637	emul="${emul}32"
17638	;;
17639      *64-bit*)
17640	emul="${emul}64"
17641	;;
17642    esac
17643    case `/usr/bin/file conftest.$ac_objext` in
17644      *MSB*)
17645	emul="${emul}btsmip"
17646	;;
17647      *LSB*)
17648	emul="${emul}ltsmip"
17649	;;
17650    esac
17651    case `/usr/bin/file conftest.$ac_objext` in
17652      *N32*)
17653	emul="${emul}n32"
17654	;;
17655    esac
17656    LD="${LD-ld} -m $emul"
17657  fi
17658  rm -rf conftest*
17659  ;;
17660
17661x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
17662s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
17663  # Find out what ABI is being produced by ac_compile, and set linker
17664  # options accordingly.  Note that the listed cases only cover the
17665  # situations where additional linker options are needed (such as when
17666  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
17667  # vice versa); the common cases where no linker options are needed do
17668  # not appear in the list.
17669  echo 'int i;' > conftest.$ac_ext
17670  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17671  (eval $ac_compile) 2>&5
17672  ac_status=$?
17673  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17674  test $ac_status = 0; }; then
17675    case `/usr/bin/file conftest.o` in
17676      *32-bit*)
17677	case $host in
17678	  x86_64-*kfreebsd*-gnu)
17679	    LD="${LD-ld} -m elf_i386_fbsd"
17680	    ;;
17681	  x86_64-*linux*)
17682	    case `/usr/bin/file conftest.o` in
17683	      *x86-64*)
17684		LD="${LD-ld} -m elf32_x86_64"
17685		;;
17686	      *)
17687		LD="${LD-ld} -m elf_i386"
17688		;;
17689	    esac
17690	    ;;
17691	  powerpc64le-*linux*)
17692	    LD="${LD-ld} -m elf32lppclinux"
17693	    ;;
17694	  powerpc64-*linux*)
17695	    LD="${LD-ld} -m elf32ppclinux"
17696	    ;;
17697	  s390x-*linux*)
17698	    LD="${LD-ld} -m elf_s390"
17699	    ;;
17700	  sparc64-*linux*)
17701	    LD="${LD-ld} -m elf32_sparc"
17702	    ;;
17703	esac
17704	;;
17705      *64-bit*)
17706	case $host in
17707	  x86_64-*kfreebsd*-gnu)
17708	    LD="${LD-ld} -m elf_x86_64_fbsd"
17709	    ;;
17710	  x86_64-*linux*)
17711	    LD="${LD-ld} -m elf_x86_64"
17712	    ;;
17713	  powerpcle-*linux*)
17714	    LD="${LD-ld} -m elf64lppc"
17715	    ;;
17716	  powerpc-*linux*)
17717	    LD="${LD-ld} -m elf64ppc"
17718	    ;;
17719	  s390*-*linux*|s390*-*tpf*)
17720	    LD="${LD-ld} -m elf64_s390"
17721	    ;;
17722	  sparc*-*linux*)
17723	    LD="${LD-ld} -m elf64_sparc"
17724	    ;;
17725	esac
17726	;;
17727    esac
17728  fi
17729  rm -rf conftest*
17730  ;;
17731
17732*-*-sco3.2v5*)
17733  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
17734  SAVE_CFLAGS=$CFLAGS
17735  CFLAGS="$CFLAGS -belf"
17736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
17737$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
17738if ${lt_cv_cc_needs_belf+:} false; then :
17739  $as_echo_n "(cached) " >&6
17740else
17741  ac_ext=c
17742ac_cpp='$CPP $CPPFLAGS'
17743ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17744ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17745ac_compiler_gnu=$ac_cv_c_compiler_gnu
17746
17747     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17748/* end confdefs.h.  */
17749
17750int
17751main ()
17752{
17753
17754  ;
17755  return 0;
17756}
17757_ACEOF
17758if ac_fn_c_try_link "$LINENO"; then :
17759  lt_cv_cc_needs_belf=yes
17760else
17761  lt_cv_cc_needs_belf=no
17762fi
17763rm -f core conftest.err conftest.$ac_objext \
17764    conftest$ac_exeext conftest.$ac_ext
17765     ac_ext=c
17766ac_cpp='$CPP $CPPFLAGS'
17767ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17768ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17769ac_compiler_gnu=$ac_cv_c_compiler_gnu
17770
17771fi
17772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
17773$as_echo "$lt_cv_cc_needs_belf" >&6; }
17774  if test yes != "$lt_cv_cc_needs_belf"; then
17775    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
17776    CFLAGS=$SAVE_CFLAGS
17777  fi
17778  ;;
17779*-*solaris*)
17780  # Find out what ABI is being produced by ac_compile, and set linker
17781  # options accordingly.
17782  echo 'int i;' > conftest.$ac_ext
17783  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
17784  (eval $ac_compile) 2>&5
17785  ac_status=$?
17786  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
17787  test $ac_status = 0; }; then
17788    case `/usr/bin/file conftest.o` in
17789    *64-bit*)
17790      case $lt_cv_prog_gnu_ld in
17791      yes*)
17792        case $host in
17793        i?86-*-solaris*|x86_64-*-solaris*)
17794          LD="${LD-ld} -m elf_x86_64"
17795          ;;
17796        sparc*-*-solaris*)
17797          LD="${LD-ld} -m elf64_sparc"
17798          ;;
17799        esac
17800        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
17801        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
17802          LD=${LD-ld}_sol2
17803        fi
17804        ;;
17805      *)
17806	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
17807	  LD="${LD-ld} -64"
17808	fi
17809	;;
17810      esac
17811      ;;
17812    esac
17813  fi
17814  rm -rf conftest*
17815  ;;
17816esac
17817
17818need_locks=$enable_libtool_lock
17819
17820if test -n "$ac_tool_prefix"; then
17821  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
17822set dummy ${ac_tool_prefix}mt; ac_word=$2
17823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17824$as_echo_n "checking for $ac_word... " >&6; }
17825if ${ac_cv_prog_MANIFEST_TOOL+:} false; then :
17826  $as_echo_n "(cached) " >&6
17827else
17828  if test -n "$MANIFEST_TOOL"; then
17829  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
17830else
17831as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17832for as_dir in $PATH
17833do
17834  IFS=$as_save_IFS
17835  test -z "$as_dir" && as_dir=.
17836    for ac_exec_ext in '' $ac_executable_extensions; do
17837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17838    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
17839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17840    break 2
17841  fi
17842done
17843  done
17844IFS=$as_save_IFS
17845
17846fi
17847fi
17848MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
17849if test -n "$MANIFEST_TOOL"; then
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
17851$as_echo "$MANIFEST_TOOL" >&6; }
17852else
17853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17854$as_echo "no" >&6; }
17855fi
17856
17857
17858fi
17859if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
17860  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
17861  # Extract the first word of "mt", so it can be a program name with args.
17862set dummy mt; ac_word=$2
17863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17864$as_echo_n "checking for $ac_word... " >&6; }
17865if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then :
17866  $as_echo_n "(cached) " >&6
17867else
17868  if test -n "$ac_ct_MANIFEST_TOOL"; then
17869  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
17870else
17871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17872for as_dir in $PATH
17873do
17874  IFS=$as_save_IFS
17875  test -z "$as_dir" && as_dir=.
17876    for ac_exec_ext in '' $ac_executable_extensions; do
17877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17878    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
17879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17880    break 2
17881  fi
17882done
17883  done
17884IFS=$as_save_IFS
17885
17886fi
17887fi
17888ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
17889if test -n "$ac_ct_MANIFEST_TOOL"; then
17890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
17891$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
17892else
17893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17894$as_echo "no" >&6; }
17895fi
17896
17897  if test "x$ac_ct_MANIFEST_TOOL" = x; then
17898    MANIFEST_TOOL=":"
17899  else
17900    case $cross_compiling:$ac_tool_warned in
17901yes:)
17902{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17903$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17904ac_tool_warned=yes ;;
17905esac
17906    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
17907  fi
17908else
17909  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
17910fi
17911
17912test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
17913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
17914$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
17915if ${lt_cv_path_mainfest_tool+:} false; then :
17916  $as_echo_n "(cached) " >&6
17917else
17918  lt_cv_path_mainfest_tool=no
17919  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
17920  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
17921  cat conftest.err >&5
17922  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
17923    lt_cv_path_mainfest_tool=yes
17924  fi
17925  rm -f conftest*
17926fi
17927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
17928$as_echo "$lt_cv_path_mainfest_tool" >&6; }
17929if test yes != "$lt_cv_path_mainfest_tool"; then
17930  MANIFEST_TOOL=:
17931fi
17932
17933
17934
17935
17936
17937
17938  case $host_os in
17939    rhapsody* | darwin*)
17940    if test -n "$ac_tool_prefix"; then
17941  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
17942set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_prog_DSYMUTIL+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  if test -n "$DSYMUTIL"; then
17949  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
17950else
17951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17952for as_dir in $PATH
17953do
17954  IFS=$as_save_IFS
17955  test -z "$as_dir" && as_dir=.
17956    for ac_exec_ext in '' $ac_executable_extensions; do
17957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17958    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
17959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17960    break 2
17961  fi
17962done
17963  done
17964IFS=$as_save_IFS
17965
17966fi
17967fi
17968DSYMUTIL=$ac_cv_prog_DSYMUTIL
17969if test -n "$DSYMUTIL"; then
17970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
17971$as_echo "$DSYMUTIL" >&6; }
17972else
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17974$as_echo "no" >&6; }
17975fi
17976
17977
17978fi
17979if test -z "$ac_cv_prog_DSYMUTIL"; then
17980  ac_ct_DSYMUTIL=$DSYMUTIL
17981  # Extract the first word of "dsymutil", so it can be a program name with args.
17982set dummy dsymutil; ac_word=$2
17983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17984$as_echo_n "checking for $ac_word... " >&6; }
17985if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then :
17986  $as_echo_n "(cached) " >&6
17987else
17988  if test -n "$ac_ct_DSYMUTIL"; then
17989  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
17990else
17991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17992for as_dir in $PATH
17993do
17994  IFS=$as_save_IFS
17995  test -z "$as_dir" && as_dir=.
17996    for ac_exec_ext in '' $ac_executable_extensions; do
17997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17998    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
17999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18000    break 2
18001  fi
18002done
18003  done
18004IFS=$as_save_IFS
18005
18006fi
18007fi
18008ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
18009if test -n "$ac_ct_DSYMUTIL"; then
18010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
18011$as_echo "$ac_ct_DSYMUTIL" >&6; }
18012else
18013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18014$as_echo "no" >&6; }
18015fi
18016
18017  if test "x$ac_ct_DSYMUTIL" = x; then
18018    DSYMUTIL=":"
18019  else
18020    case $cross_compiling:$ac_tool_warned in
18021yes:)
18022{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18023$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18024ac_tool_warned=yes ;;
18025esac
18026    DSYMUTIL=$ac_ct_DSYMUTIL
18027  fi
18028else
18029  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
18030fi
18031
18032    if test -n "$ac_tool_prefix"; then
18033  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
18034set dummy ${ac_tool_prefix}nmedit; ac_word=$2
18035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18036$as_echo_n "checking for $ac_word... " >&6; }
18037if ${ac_cv_prog_NMEDIT+:} false; then :
18038  $as_echo_n "(cached) " >&6
18039else
18040  if test -n "$NMEDIT"; then
18041  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
18042else
18043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18044for as_dir in $PATH
18045do
18046  IFS=$as_save_IFS
18047  test -z "$as_dir" && as_dir=.
18048    for ac_exec_ext in '' $ac_executable_extensions; do
18049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18050    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
18051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18052    break 2
18053  fi
18054done
18055  done
18056IFS=$as_save_IFS
18057
18058fi
18059fi
18060NMEDIT=$ac_cv_prog_NMEDIT
18061if test -n "$NMEDIT"; then
18062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
18063$as_echo "$NMEDIT" >&6; }
18064else
18065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18066$as_echo "no" >&6; }
18067fi
18068
18069
18070fi
18071if test -z "$ac_cv_prog_NMEDIT"; then
18072  ac_ct_NMEDIT=$NMEDIT
18073  # Extract the first word of "nmedit", so it can be a program name with args.
18074set dummy nmedit; ac_word=$2
18075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18076$as_echo_n "checking for $ac_word... " >&6; }
18077if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then :
18078  $as_echo_n "(cached) " >&6
18079else
18080  if test -n "$ac_ct_NMEDIT"; then
18081  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
18082else
18083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18084for as_dir in $PATH
18085do
18086  IFS=$as_save_IFS
18087  test -z "$as_dir" && as_dir=.
18088    for ac_exec_ext in '' $ac_executable_extensions; do
18089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18090    ac_cv_prog_ac_ct_NMEDIT="nmedit"
18091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18092    break 2
18093  fi
18094done
18095  done
18096IFS=$as_save_IFS
18097
18098fi
18099fi
18100ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
18101if test -n "$ac_ct_NMEDIT"; then
18102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
18103$as_echo "$ac_ct_NMEDIT" >&6; }
18104else
18105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18106$as_echo "no" >&6; }
18107fi
18108
18109  if test "x$ac_ct_NMEDIT" = x; then
18110    NMEDIT=":"
18111  else
18112    case $cross_compiling:$ac_tool_warned in
18113yes:)
18114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18116ac_tool_warned=yes ;;
18117esac
18118    NMEDIT=$ac_ct_NMEDIT
18119  fi
18120else
18121  NMEDIT="$ac_cv_prog_NMEDIT"
18122fi
18123
18124    if test -n "$ac_tool_prefix"; then
18125  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
18126set dummy ${ac_tool_prefix}lipo; ac_word=$2
18127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18128$as_echo_n "checking for $ac_word... " >&6; }
18129if ${ac_cv_prog_LIPO+:} false; then :
18130  $as_echo_n "(cached) " >&6
18131else
18132  if test -n "$LIPO"; then
18133  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
18134else
18135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18136for as_dir in $PATH
18137do
18138  IFS=$as_save_IFS
18139  test -z "$as_dir" && as_dir=.
18140    for ac_exec_ext in '' $ac_executable_extensions; do
18141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18142    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
18143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18144    break 2
18145  fi
18146done
18147  done
18148IFS=$as_save_IFS
18149
18150fi
18151fi
18152LIPO=$ac_cv_prog_LIPO
18153if test -n "$LIPO"; then
18154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
18155$as_echo "$LIPO" >&6; }
18156else
18157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18158$as_echo "no" >&6; }
18159fi
18160
18161
18162fi
18163if test -z "$ac_cv_prog_LIPO"; then
18164  ac_ct_LIPO=$LIPO
18165  # Extract the first word of "lipo", so it can be a program name with args.
18166set dummy lipo; ac_word=$2
18167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18168$as_echo_n "checking for $ac_word... " >&6; }
18169if ${ac_cv_prog_ac_ct_LIPO+:} false; then :
18170  $as_echo_n "(cached) " >&6
18171else
18172  if test -n "$ac_ct_LIPO"; then
18173  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
18174else
18175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18176for as_dir in $PATH
18177do
18178  IFS=$as_save_IFS
18179  test -z "$as_dir" && as_dir=.
18180    for ac_exec_ext in '' $ac_executable_extensions; do
18181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18182    ac_cv_prog_ac_ct_LIPO="lipo"
18183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18184    break 2
18185  fi
18186done
18187  done
18188IFS=$as_save_IFS
18189
18190fi
18191fi
18192ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
18193if test -n "$ac_ct_LIPO"; then
18194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
18195$as_echo "$ac_ct_LIPO" >&6; }
18196else
18197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18198$as_echo "no" >&6; }
18199fi
18200
18201  if test "x$ac_ct_LIPO" = x; then
18202    LIPO=":"
18203  else
18204    case $cross_compiling:$ac_tool_warned in
18205yes:)
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18207$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18208ac_tool_warned=yes ;;
18209esac
18210    LIPO=$ac_ct_LIPO
18211  fi
18212else
18213  LIPO="$ac_cv_prog_LIPO"
18214fi
18215
18216    if test -n "$ac_tool_prefix"; then
18217  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
18218set dummy ${ac_tool_prefix}otool; ac_word=$2
18219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18220$as_echo_n "checking for $ac_word... " >&6; }
18221if ${ac_cv_prog_OTOOL+:} false; then :
18222  $as_echo_n "(cached) " >&6
18223else
18224  if test -n "$OTOOL"; then
18225  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
18226else
18227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18228for as_dir in $PATH
18229do
18230  IFS=$as_save_IFS
18231  test -z "$as_dir" && as_dir=.
18232    for ac_exec_ext in '' $ac_executable_extensions; do
18233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18234    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
18235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18236    break 2
18237  fi
18238done
18239  done
18240IFS=$as_save_IFS
18241
18242fi
18243fi
18244OTOOL=$ac_cv_prog_OTOOL
18245if test -n "$OTOOL"; then
18246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18247$as_echo "$OTOOL" >&6; }
18248else
18249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18250$as_echo "no" >&6; }
18251fi
18252
18253
18254fi
18255if test -z "$ac_cv_prog_OTOOL"; then
18256  ac_ct_OTOOL=$OTOOL
18257  # Extract the first word of "otool", so it can be a program name with args.
18258set dummy otool; ac_word=$2
18259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18260$as_echo_n "checking for $ac_word... " >&6; }
18261if ${ac_cv_prog_ac_ct_OTOOL+:} false; then :
18262  $as_echo_n "(cached) " >&6
18263else
18264  if test -n "$ac_ct_OTOOL"; then
18265  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
18266else
18267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18268for as_dir in $PATH
18269do
18270  IFS=$as_save_IFS
18271  test -z "$as_dir" && as_dir=.
18272    for ac_exec_ext in '' $ac_executable_extensions; do
18273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18274    ac_cv_prog_ac_ct_OTOOL="otool"
18275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18276    break 2
18277  fi
18278done
18279  done
18280IFS=$as_save_IFS
18281
18282fi
18283fi
18284ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
18285if test -n "$ac_ct_OTOOL"; then
18286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
18287$as_echo "$ac_ct_OTOOL" >&6; }
18288else
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290$as_echo "no" >&6; }
18291fi
18292
18293  if test "x$ac_ct_OTOOL" = x; then
18294    OTOOL=":"
18295  else
18296    case $cross_compiling:$ac_tool_warned in
18297yes:)
18298{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18299$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18300ac_tool_warned=yes ;;
18301esac
18302    OTOOL=$ac_ct_OTOOL
18303  fi
18304else
18305  OTOOL="$ac_cv_prog_OTOOL"
18306fi
18307
18308    if test -n "$ac_tool_prefix"; then
18309  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
18310set dummy ${ac_tool_prefix}otool64; ac_word=$2
18311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18312$as_echo_n "checking for $ac_word... " >&6; }
18313if ${ac_cv_prog_OTOOL64+:} false; then :
18314  $as_echo_n "(cached) " >&6
18315else
18316  if test -n "$OTOOL64"; then
18317  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
18318else
18319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18320for as_dir in $PATH
18321do
18322  IFS=$as_save_IFS
18323  test -z "$as_dir" && as_dir=.
18324    for ac_exec_ext in '' $ac_executable_extensions; do
18325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18326    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
18327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18328    break 2
18329  fi
18330done
18331  done
18332IFS=$as_save_IFS
18333
18334fi
18335fi
18336OTOOL64=$ac_cv_prog_OTOOL64
18337if test -n "$OTOOL64"; then
18338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
18339$as_echo "$OTOOL64" >&6; }
18340else
18341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18342$as_echo "no" >&6; }
18343fi
18344
18345
18346fi
18347if test -z "$ac_cv_prog_OTOOL64"; then
18348  ac_ct_OTOOL64=$OTOOL64
18349  # Extract the first word of "otool64", so it can be a program name with args.
18350set dummy otool64; ac_word=$2
18351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18352$as_echo_n "checking for $ac_word... " >&6; }
18353if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then :
18354  $as_echo_n "(cached) " >&6
18355else
18356  if test -n "$ac_ct_OTOOL64"; then
18357  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
18358else
18359as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18360for as_dir in $PATH
18361do
18362  IFS=$as_save_IFS
18363  test -z "$as_dir" && as_dir=.
18364    for ac_exec_ext in '' $ac_executable_extensions; do
18365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18366    ac_cv_prog_ac_ct_OTOOL64="otool64"
18367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18368    break 2
18369  fi
18370done
18371  done
18372IFS=$as_save_IFS
18373
18374fi
18375fi
18376ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
18377if test -n "$ac_ct_OTOOL64"; then
18378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
18379$as_echo "$ac_ct_OTOOL64" >&6; }
18380else
18381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18382$as_echo "no" >&6; }
18383fi
18384
18385  if test "x$ac_ct_OTOOL64" = x; then
18386    OTOOL64=":"
18387  else
18388    case $cross_compiling:$ac_tool_warned in
18389yes:)
18390{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18391$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18392ac_tool_warned=yes ;;
18393esac
18394    OTOOL64=$ac_ct_OTOOL64
18395  fi
18396else
18397  OTOOL64="$ac_cv_prog_OTOOL64"
18398fi
18399
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    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
18427$as_echo_n "checking for -single_module linker flag... " >&6; }
18428if ${lt_cv_apple_cc_single_mod+:} false; then :
18429  $as_echo_n "(cached) " >&6
18430else
18431  lt_cv_apple_cc_single_mod=no
18432      if test -z "$LT_MULTI_MODULE"; then
18433	# By default we will add the -single_module flag. You can override
18434	# by either setting the environment variable LT_MULTI_MODULE
18435	# non-empty at configure time, or by adding -multi_module to the
18436	# link flags.
18437	rm -rf libconftest.dylib*
18438	echo "int foo(void){return 1;}" > conftest.c
18439	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18440-dynamiclib -Wl,-single_module conftest.c" >&5
18441	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
18442	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
18443        _lt_result=$?
18444	# If there is a non-empty error log, and "single_module"
18445	# appears in it, assume the flag caused a linker warning
18446        if test -s conftest.err && $GREP single_module conftest.err; then
18447	  cat conftest.err >&5
18448	# Otherwise, if the output was created with a 0 exit code from
18449	# the compiler, it worked.
18450	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
18451	  lt_cv_apple_cc_single_mod=yes
18452	else
18453	  cat conftest.err >&5
18454	fi
18455	rm -rf libconftest.dylib*
18456	rm -f conftest.*
18457      fi
18458fi
18459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
18460$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
18461
18462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
18463$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
18464if ${lt_cv_ld_exported_symbols_list+:} false; then :
18465  $as_echo_n "(cached) " >&6
18466else
18467  lt_cv_ld_exported_symbols_list=no
18468      save_LDFLAGS=$LDFLAGS
18469      echo "_main" > conftest.sym
18470      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
18471      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18472/* end confdefs.h.  */
18473
18474int
18475main ()
18476{
18477
18478  ;
18479  return 0;
18480}
18481_ACEOF
18482if ac_fn_c_try_link "$LINENO"; then :
18483  lt_cv_ld_exported_symbols_list=yes
18484else
18485  lt_cv_ld_exported_symbols_list=no
18486fi
18487rm -f core conftest.err conftest.$ac_objext \
18488    conftest$ac_exeext conftest.$ac_ext
18489	LDFLAGS=$save_LDFLAGS
18490
18491fi
18492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
18493$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
18494
18495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
18496$as_echo_n "checking for -force_load linker flag... " >&6; }
18497if ${lt_cv_ld_force_load+:} false; then :
18498  $as_echo_n "(cached) " >&6
18499else
18500  lt_cv_ld_force_load=no
18501      cat > conftest.c << _LT_EOF
18502int forced_loaded() { return 2;}
18503_LT_EOF
18504      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
18505      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
18506      echo "$AR cru libconftest.a conftest.o" >&5
18507      $AR cru libconftest.a conftest.o 2>&5
18508      echo "$RANLIB libconftest.a" >&5
18509      $RANLIB libconftest.a 2>&5
18510      cat > conftest.c << _LT_EOF
18511int main() { return 0;}
18512_LT_EOF
18513      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
18514      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
18515      _lt_result=$?
18516      if test -s conftest.err && $GREP force_load conftest.err; then
18517	cat conftest.err >&5
18518      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
18519	lt_cv_ld_force_load=yes
18520      else
18521	cat conftest.err >&5
18522      fi
18523        rm -f conftest.err libconftest.a conftest conftest.c
18524        rm -rf conftest.dSYM
18525
18526fi
18527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
18528$as_echo "$lt_cv_ld_force_load" >&6; }
18529    case $host_os in
18530    rhapsody* | darwin1.[012])
18531      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
18532    darwin1.*)
18533      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18534    darwin*) # darwin 5.x on
18535      # if running on 10.5 or later, the deployment target defaults
18536      # to the OS version, if on x86, and 10.4, the deployment
18537      # target defaults to 10.4. Don't you love it?
18538      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
18539	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
18540	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18541	10.[012][,.]*)
18542	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
18543	10.*)
18544	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
18545      esac
18546    ;;
18547  esac
18548    if test yes = "$lt_cv_apple_cc_single_mod"; then
18549      _lt_dar_single_mod='$single_module'
18550    fi
18551    if test yes = "$lt_cv_ld_exported_symbols_list"; then
18552      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
18553    else
18554      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
18555    fi
18556    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
18557      _lt_dsymutil='~$DSYMUTIL $lib || :'
18558    else
18559      _lt_dsymutil=
18560    fi
18561    ;;
18562  esac
18563
18564# func_munge_path_list VARIABLE PATH
18565# -----------------------------------
18566# VARIABLE is name of variable containing _space_ separated list of
18567# directories to be munged by the contents of PATH, which is string
18568# having a format:
18569# "DIR[:DIR]:"
18570#       string "DIR[ DIR]" will be prepended to VARIABLE
18571# ":DIR[:DIR]"
18572#       string "DIR[ DIR]" will be appended to VARIABLE
18573# "DIRP[:DIRP]::[DIRA:]DIRA"
18574#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
18575#       "DIRA[ DIRA]" will be appended to VARIABLE
18576# "DIR[:DIR]"
18577#       VARIABLE will be replaced by "DIR[ DIR]"
18578func_munge_path_list ()
18579{
18580    case x$2 in
18581    x)
18582        ;;
18583    *:)
18584        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
18585        ;;
18586    x:*)
18587        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
18588        ;;
18589    *::*)
18590        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
18591        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
18592        ;;
18593    *)
18594        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
18595        ;;
18596    esac
18597}
18598
18599for ac_header in dlfcn.h
18600do :
18601  ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
18602"
18603if test "x$ac_cv_header_dlfcn_h" = xyes; then :
18604  cat >>confdefs.h <<_ACEOF
18605#define HAVE_DLFCN_H 1
18606_ACEOF
18607
18608fi
18609
18610done
18611
18612
18613
18614
18615
18616# Set options
18617
18618
18619
18620        enable_dlopen=no
18621
18622
18623  enable_win32_dll=no
18624
18625
18626
18627  # Check whether --enable-static was given.
18628if test "${enable_static+set}" = set; then :
18629  enableval=$enable_static; p=${PACKAGE-default}
18630    case $enableval in
18631    yes) enable_static=yes ;;
18632    no) enable_static=no ;;
18633    *)
18634     enable_static=no
18635      # Look at the argument we got.  We use all the common list separators.
18636      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18637      for pkg in $enableval; do
18638	IFS=$lt_save_ifs
18639	if test "X$pkg" = "X$p"; then
18640	  enable_static=yes
18641	fi
18642      done
18643      IFS=$lt_save_ifs
18644      ;;
18645    esac
18646else
18647  enable_static=yes
18648fi
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659# Check whether --with-pic was given.
18660if test "${with_pic+set}" = set; then :
18661  withval=$with_pic; lt_p=${PACKAGE-default}
18662    case $withval in
18663    yes|no) pic_mode=$withval ;;
18664    *)
18665      pic_mode=default
18666      # Look at the argument we got.  We use all the common list separators.
18667      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18668      for lt_pkg in $withval; do
18669	IFS=$lt_save_ifs
18670	if test "X$lt_pkg" = "X$lt_p"; then
18671	  pic_mode=yes
18672	fi
18673      done
18674      IFS=$lt_save_ifs
18675      ;;
18676    esac
18677else
18678  pic_mode=default
18679fi
18680
18681
18682
18683
18684
18685
18686
18687
18688  # Check whether --enable-fast-install was given.
18689if test "${enable_fast_install+set}" = set; then :
18690  enableval=$enable_fast_install; p=${PACKAGE-default}
18691    case $enableval in
18692    yes) enable_fast_install=yes ;;
18693    no) enable_fast_install=no ;;
18694    *)
18695      enable_fast_install=no
18696      # Look at the argument we got.  We use all the common list separators.
18697      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
18698      for pkg in $enableval; do
18699	IFS=$lt_save_ifs
18700	if test "X$pkg" = "X$p"; then
18701	  enable_fast_install=yes
18702	fi
18703      done
18704      IFS=$lt_save_ifs
18705      ;;
18706    esac
18707else
18708  enable_fast_install=yes
18709fi
18710
18711
18712
18713
18714
18715
18716
18717
18718  shared_archive_member_spec=
18719case $host,$enable_shared in
18720power*-*-aix[5-9]*,yes)
18721  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
18722$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
18723
18724# Check whether --with-aix-soname was given.
18725if test "${with_aix_soname+set}" = set; then :
18726  withval=$with_aix_soname; case $withval in
18727    aix|svr4|both)
18728      ;;
18729    *)
18730      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
18731      ;;
18732    esac
18733    lt_cv_with_aix_soname=$with_aix_soname
18734else
18735  if ${lt_cv_with_aix_soname+:} false; then :
18736  $as_echo_n "(cached) " >&6
18737else
18738  lt_cv_with_aix_soname=aix
18739fi
18740
18741    with_aix_soname=$lt_cv_with_aix_soname
18742fi
18743
18744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
18745$as_echo "$with_aix_soname" >&6; }
18746  if test aix != "$with_aix_soname"; then
18747    # For the AIX way of multilib, we name the shared archive member
18748    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
18749    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
18750    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
18751    # the AIX toolchain works better with OBJECT_MODE set (default 32).
18752    if test 64 = "${OBJECT_MODE-32}"; then
18753      shared_archive_member_spec=shr_64
18754    else
18755      shared_archive_member_spec=shr
18756    fi
18757  fi
18758  ;;
18759*)
18760  with_aix_soname=aix
18761  ;;
18762esac
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773# This can be used to rebuild libtool when needed
18774LIBTOOL_DEPS=$ltmain
18775
18776# Always use our own libtool.
18777LIBTOOL='$(SHELL) $(top_builddir)/libtool'
18778
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
18808test -z "$LN_S" && LN_S="ln -s"
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823if test -n "${ZSH_VERSION+set}"; then
18824   setopt NO_GLOB_SUBST
18825fi
18826
18827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
18828$as_echo_n "checking for objdir... " >&6; }
18829if ${lt_cv_objdir+:} false; then :
18830  $as_echo_n "(cached) " >&6
18831else
18832  rm -f .libs 2>/dev/null
18833mkdir .libs 2>/dev/null
18834if test -d .libs; then
18835  lt_cv_objdir=.libs
18836else
18837  # MS-DOS does not allow filenames that begin with a dot.
18838  lt_cv_objdir=_libs
18839fi
18840rmdir .libs 2>/dev/null
18841fi
18842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
18843$as_echo "$lt_cv_objdir" >&6; }
18844objdir=$lt_cv_objdir
18845
18846
18847
18848
18849
18850cat >>confdefs.h <<_ACEOF
18851#define LT_OBJDIR "$lt_cv_objdir/"
18852_ACEOF
18853
18854
18855
18856
18857case $host_os in
18858aix3*)
18859  # AIX sometimes has problems with the GCC collect2 program.  For some
18860  # reason, if we set the COLLECT_NAMES environment variable, the problems
18861  # vanish in a puff of smoke.
18862  if test set != "${COLLECT_NAMES+set}"; then
18863    COLLECT_NAMES=
18864    export COLLECT_NAMES
18865  fi
18866  ;;
18867esac
18868
18869# Global variables:
18870ofile=libtool
18871can_build_shared=yes
18872
18873# All known linkers require a '.a' archive for static linking (except MSVC,
18874# which needs '.lib').
18875libext=a
18876
18877with_gnu_ld=$lt_cv_prog_gnu_ld
18878
18879old_CC=$CC
18880old_CFLAGS=$CFLAGS
18881
18882# Set sane defaults for various variables
18883test -z "$CC" && CC=cc
18884test -z "$LTCC" && LTCC=$CC
18885test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
18886test -z "$LD" && LD=ld
18887test -z "$ac_objext" && ac_objext=o
18888
18889func_cc_basename $compiler
18890cc_basename=$func_cc_basename_result
18891
18892
18893# Only perform the check for file, if the check method requires it
18894test -z "$MAGIC_CMD" && MAGIC_CMD=file
18895case $deplibs_check_method in
18896file_magic*)
18897  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
18898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
18899$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
18900if ${lt_cv_path_MAGIC_CMD+:} false; then :
18901  $as_echo_n "(cached) " >&6
18902else
18903  case $MAGIC_CMD in
18904[\\/*] |  ?:[\\/]*)
18905  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18906  ;;
18907*)
18908  lt_save_MAGIC_CMD=$MAGIC_CMD
18909  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18910  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18911  for ac_dir in $ac_dummy; do
18912    IFS=$lt_save_ifs
18913    test -z "$ac_dir" && ac_dir=.
18914    if test -f "$ac_dir/${ac_tool_prefix}file"; then
18915      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
18916      if test -n "$file_magic_test_file"; then
18917	case $deplibs_check_method in
18918	"file_magic "*)
18919	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18920	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18921	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18922	    $EGREP "$file_magic_regex" > /dev/null; then
18923	    :
18924	  else
18925	    cat <<_LT_EOF 1>&2
18926
18927*** Warning: the command libtool uses to detect shared libraries,
18928*** $file_magic_cmd, produces output that libtool cannot recognize.
18929*** The result is that libtool may fail to recognize shared libraries
18930*** as such.  This will affect the creation of libtool libraries that
18931*** depend on shared libraries, but programs linked with such libtool
18932*** libraries will work regardless of this problem.  Nevertheless, you
18933*** may want to report the problem to your system manager and/or to
18934*** bug-libtool@gnu.org
18935
18936_LT_EOF
18937	  fi ;;
18938	esac
18939      fi
18940      break
18941    fi
18942  done
18943  IFS=$lt_save_ifs
18944  MAGIC_CMD=$lt_save_MAGIC_CMD
18945  ;;
18946esac
18947fi
18948
18949MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18950if test -n "$MAGIC_CMD"; then
18951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
18952$as_echo "$MAGIC_CMD" >&6; }
18953else
18954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18955$as_echo "no" >&6; }
18956fi
18957
18958
18959
18960
18961
18962if test -z "$lt_cv_path_MAGIC_CMD"; then
18963  if test -n "$ac_tool_prefix"; then
18964    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
18965$as_echo_n "checking for file... " >&6; }
18966if ${lt_cv_path_MAGIC_CMD+:} false; then :
18967  $as_echo_n "(cached) " >&6
18968else
18969  case $MAGIC_CMD in
18970[\\/*] |  ?:[\\/]*)
18971  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
18972  ;;
18973*)
18974  lt_save_MAGIC_CMD=$MAGIC_CMD
18975  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
18976  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
18977  for ac_dir in $ac_dummy; do
18978    IFS=$lt_save_ifs
18979    test -z "$ac_dir" && ac_dir=.
18980    if test -f "$ac_dir/file"; then
18981      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
18982      if test -n "$file_magic_test_file"; then
18983	case $deplibs_check_method in
18984	"file_magic "*)
18985	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
18986	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
18987	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
18988	    $EGREP "$file_magic_regex" > /dev/null; then
18989	    :
18990	  else
18991	    cat <<_LT_EOF 1>&2
18992
18993*** Warning: the command libtool uses to detect shared libraries,
18994*** $file_magic_cmd, produces output that libtool cannot recognize.
18995*** The result is that libtool may fail to recognize shared libraries
18996*** as such.  This will affect the creation of libtool libraries that
18997*** depend on shared libraries, but programs linked with such libtool
18998*** libraries will work regardless of this problem.  Nevertheless, you
18999*** may want to report the problem to your system manager and/or to
19000*** bug-libtool@gnu.org
19001
19002_LT_EOF
19003	  fi ;;
19004	esac
19005      fi
19006      break
19007    fi
19008  done
19009  IFS=$lt_save_ifs
19010  MAGIC_CMD=$lt_save_MAGIC_CMD
19011  ;;
19012esac
19013fi
19014
19015MAGIC_CMD=$lt_cv_path_MAGIC_CMD
19016if test -n "$MAGIC_CMD"; then
19017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
19018$as_echo "$MAGIC_CMD" >&6; }
19019else
19020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19021$as_echo "no" >&6; }
19022fi
19023
19024
19025  else
19026    MAGIC_CMD=:
19027  fi
19028fi
19029
19030  fi
19031  ;;
19032esac
19033
19034# Use C for the default configuration in the libtool script
19035
19036lt_save_CC=$CC
19037ac_ext=c
19038ac_cpp='$CPP $CPPFLAGS'
19039ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19040ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19041ac_compiler_gnu=$ac_cv_c_compiler_gnu
19042
19043
19044# Source file extension for C test sources.
19045ac_ext=c
19046
19047# Object file extension for compiled C test sources.
19048objext=o
19049objext=$objext
19050
19051# Code to be used in simple compile tests
19052lt_simple_compile_test_code="int some_variable = 0;"
19053
19054# Code to be used in simple link tests
19055lt_simple_link_test_code='int main(){return(0);}'
19056
19057
19058
19059
19060
19061
19062
19063# If no C compiler was specified, use CC.
19064LTCC=${LTCC-"$CC"}
19065
19066# If no C compiler flags were specified, use CFLAGS.
19067LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19068
19069# Allow CC to be a program name with arguments.
19070compiler=$CC
19071
19072# Save the default compiler, since it gets overwritten when the other
19073# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
19074compiler_DEFAULT=$CC
19075
19076# save warnings/boilerplate of simple test code
19077ac_outfile=conftest.$ac_objext
19078echo "$lt_simple_compile_test_code" >conftest.$ac_ext
19079eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19080_lt_compiler_boilerplate=`cat conftest.err`
19081$RM conftest*
19082
19083ac_outfile=conftest.$ac_objext
19084echo "$lt_simple_link_test_code" >conftest.$ac_ext
19085eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19086_lt_linker_boilerplate=`cat conftest.err`
19087$RM -r conftest*
19088
19089
19090## CAVEAT EMPTOR:
19091## There is no encapsulation within the following macros, do not change
19092## the running order or otherwise move them around unless you know exactly
19093## what you are doing...
19094if test -n "$compiler"; then
19095
19096lt_prog_compiler_no_builtin_flag=
19097
19098if test yes = "$GCC"; then
19099  case $cc_basename in
19100  nvcc*)
19101    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
19102  *)
19103    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
19104  esac
19105
19106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
19107$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
19108if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then :
19109  $as_echo_n "(cached) " >&6
19110else
19111  lt_cv_prog_compiler_rtti_exceptions=no
19112   ac_outfile=conftest.$ac_objext
19113   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19114   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
19115   # Insert the option either (1) after the last *FLAGS variable, or
19116   # (2) before a word containing "conftest.", or (3) at the end.
19117   # Note that $ac_compile itself does not contain backslashes and begins
19118   # with a dollar sign (not a hyphen), so the echo should work correctly.
19119   # The option is referenced via a variable to avoid confusing sed.
19120   lt_compile=`echo "$ac_compile" | $SED \
19121   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19122   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19123   -e 's:$: $lt_compiler_flag:'`
19124   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19125   (eval "$lt_compile" 2>conftest.err)
19126   ac_status=$?
19127   cat conftest.err >&5
19128   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19129   if (exit $ac_status) && test -s "$ac_outfile"; then
19130     # The compiler can only warn and ignore the option if not recognized
19131     # So say no if there are warnings other than the usual output.
19132     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19133     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19134     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19135       lt_cv_prog_compiler_rtti_exceptions=yes
19136     fi
19137   fi
19138   $RM conftest*
19139
19140fi
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
19142$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
19143
19144if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
19145    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
19146else
19147    :
19148fi
19149
19150fi
19151
19152
19153
19154
19155
19156
19157  lt_prog_compiler_wl=
19158lt_prog_compiler_pic=
19159lt_prog_compiler_static=
19160
19161
19162  if test yes = "$GCC"; then
19163    lt_prog_compiler_wl='-Wl,'
19164    lt_prog_compiler_static='-static'
19165
19166    case $host_os in
19167      aix*)
19168      # All AIX code is PIC.
19169      if test ia64 = "$host_cpu"; then
19170	# AIX 5 now supports IA64 processor
19171	lt_prog_compiler_static='-Bstatic'
19172      fi
19173      lt_prog_compiler_pic='-fPIC'
19174      ;;
19175
19176    amigaos*)
19177      case $host_cpu in
19178      powerpc)
19179            # see comment about AmigaOS4 .so support
19180            lt_prog_compiler_pic='-fPIC'
19181        ;;
19182      m68k)
19183            # FIXME: we need at least 68020 code to build shared libraries, but
19184            # adding the '-m68020' flag to GCC prevents building anything better,
19185            # like '-m68040'.
19186            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
19187        ;;
19188      esac
19189      ;;
19190
19191    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
19192      # PIC is the default for these OSes.
19193      ;;
19194
19195    mingw* | cygwin* | pw32* | os2* | cegcc*)
19196      # This hack is so that the source file can tell whether it is being
19197      # built for inclusion in a dll (and should export symbols for example).
19198      # Although the cygwin gcc ignores -fPIC, still need this for old-style
19199      # (--disable-auto-import) libraries
19200      lt_prog_compiler_pic='-DDLL_EXPORT'
19201      case $host_os in
19202      os2*)
19203	lt_prog_compiler_static='$wl-static'
19204	;;
19205      esac
19206      ;;
19207
19208    darwin* | rhapsody*)
19209      # PIC is the default on this platform
19210      # Common symbols not allowed in MH_DYLIB files
19211      lt_prog_compiler_pic='-fno-common'
19212      ;;
19213
19214    haiku*)
19215      # PIC is the default for Haiku.
19216      # The "-static" flag exists, but is broken.
19217      lt_prog_compiler_static=
19218      ;;
19219
19220    hpux*)
19221      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
19222      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
19223      # sets the default TLS model and affects inlining.
19224      case $host_cpu in
19225      hppa*64*)
19226	# +Z the default
19227	;;
19228      *)
19229	lt_prog_compiler_pic='-fPIC'
19230	;;
19231      esac
19232      ;;
19233
19234    interix[3-9]*)
19235      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
19236      # Instead, we relocate shared libraries at runtime.
19237      ;;
19238
19239    msdosdjgpp*)
19240      # Just because we use GCC doesn't mean we suddenly get shared libraries
19241      # on systems that don't support them.
19242      lt_prog_compiler_can_build_shared=no
19243      enable_shared=no
19244      ;;
19245
19246    *nto* | *qnx*)
19247      # QNX uses GNU C++, but need to define -shared option too, otherwise
19248      # it will coredump.
19249      lt_prog_compiler_pic='-fPIC -shared'
19250      ;;
19251
19252    sysv4*MP*)
19253      if test -d /usr/nec; then
19254	lt_prog_compiler_pic=-Kconform_pic
19255      fi
19256      ;;
19257
19258    *)
19259      lt_prog_compiler_pic='-fPIC'
19260      ;;
19261    esac
19262
19263    case $cc_basename in
19264    nvcc*) # Cuda Compiler Driver 2.2
19265      lt_prog_compiler_wl='-Xlinker '
19266      if test -n "$lt_prog_compiler_pic"; then
19267        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
19268      fi
19269      ;;
19270    esac
19271  else
19272    # PORTME Check for flag to pass linker flags through the system compiler.
19273    case $host_os in
19274    aix*)
19275      lt_prog_compiler_wl='-Wl,'
19276      if test ia64 = "$host_cpu"; then
19277	# AIX 5 now supports IA64 processor
19278	lt_prog_compiler_static='-Bstatic'
19279      else
19280	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
19281      fi
19282      ;;
19283
19284    darwin* | rhapsody*)
19285      # PIC is the default on this platform
19286      # Common symbols not allowed in MH_DYLIB files
19287      lt_prog_compiler_pic='-fno-common'
19288      case $cc_basename in
19289      nagfor*)
19290        # NAG Fortran compiler
19291        lt_prog_compiler_wl='-Wl,-Wl,,'
19292        lt_prog_compiler_pic='-PIC'
19293        lt_prog_compiler_static='-Bstatic'
19294        ;;
19295      esac
19296      ;;
19297
19298    mingw* | cygwin* | pw32* | os2* | cegcc*)
19299      # This hack is so that the source file can tell whether it is being
19300      # built for inclusion in a dll (and should export symbols for example).
19301      lt_prog_compiler_pic='-DDLL_EXPORT'
19302      case $host_os in
19303      os2*)
19304	lt_prog_compiler_static='$wl-static'
19305	;;
19306      esac
19307      ;;
19308
19309    hpux9* | hpux10* | hpux11*)
19310      lt_prog_compiler_wl='-Wl,'
19311      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
19312      # not for PA HP-UX.
19313      case $host_cpu in
19314      hppa*64*|ia64*)
19315	# +Z the default
19316	;;
19317      *)
19318	lt_prog_compiler_pic='+Z'
19319	;;
19320      esac
19321      # Is there a better lt_prog_compiler_static that works with the bundled CC?
19322      lt_prog_compiler_static='$wl-a ${wl}archive'
19323      ;;
19324
19325    irix5* | irix6* | nonstopux*)
19326      lt_prog_compiler_wl='-Wl,'
19327      # PIC (with -KPIC) is the default.
19328      lt_prog_compiler_static='-non_shared'
19329      ;;
19330
19331    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
19332      case $cc_basename in
19333      # old Intel for x86_64, which still supported -KPIC.
19334      ecc*)
19335	lt_prog_compiler_wl='-Wl,'
19336	lt_prog_compiler_pic='-KPIC'
19337	lt_prog_compiler_static='-static'
19338        ;;
19339      # icc used to be incompatible with GCC.
19340      # ICC 10 doesn't accept -KPIC any more.
19341      icc* | ifort*)
19342	lt_prog_compiler_wl='-Wl,'
19343	lt_prog_compiler_pic='-fPIC'
19344	lt_prog_compiler_static='-static'
19345        ;;
19346      # Lahey Fortran 8.1.
19347      lf95*)
19348	lt_prog_compiler_wl='-Wl,'
19349	lt_prog_compiler_pic='--shared'
19350	lt_prog_compiler_static='--static'
19351	;;
19352      nagfor*)
19353	# NAG Fortran compiler
19354	lt_prog_compiler_wl='-Wl,-Wl,,'
19355	lt_prog_compiler_pic='-PIC'
19356	lt_prog_compiler_static='-Bstatic'
19357	;;
19358      tcc*)
19359	# Fabrice Bellard et al's Tiny C Compiler
19360	lt_prog_compiler_wl='-Wl,'
19361	lt_prog_compiler_pic='-fPIC'
19362	lt_prog_compiler_static='-static'
19363	;;
19364      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
19365        # Portland Group compilers (*not* the Pentium gcc compiler,
19366	# which looks to be a dead project)
19367	lt_prog_compiler_wl='-Wl,'
19368	lt_prog_compiler_pic='-fpic'
19369	lt_prog_compiler_static='-Bstatic'
19370        ;;
19371      ccc*)
19372        lt_prog_compiler_wl='-Wl,'
19373        # All Alpha code is PIC.
19374        lt_prog_compiler_static='-non_shared'
19375        ;;
19376      xl* | bgxl* | bgf* | mpixl*)
19377	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
19378	lt_prog_compiler_wl='-Wl,'
19379	lt_prog_compiler_pic='-qpic'
19380	lt_prog_compiler_static='-qstaticlink'
19381	;;
19382      *)
19383	case `$CC -V 2>&1 | sed 5q` in
19384	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
19385	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
19386	  lt_prog_compiler_pic='-KPIC'
19387	  lt_prog_compiler_static='-Bstatic'
19388	  lt_prog_compiler_wl=''
19389	  ;;
19390	*Sun\ F* | *Sun*Fortran*)
19391	  lt_prog_compiler_pic='-KPIC'
19392	  lt_prog_compiler_static='-Bstatic'
19393	  lt_prog_compiler_wl='-Qoption ld '
19394	  ;;
19395	*Sun\ C*)
19396	  # Sun C 5.9
19397	  lt_prog_compiler_pic='-KPIC'
19398	  lt_prog_compiler_static='-Bstatic'
19399	  lt_prog_compiler_wl='-Wl,'
19400	  ;;
19401        *Intel*\ [CF]*Compiler*)
19402	  lt_prog_compiler_wl='-Wl,'
19403	  lt_prog_compiler_pic='-fPIC'
19404	  lt_prog_compiler_static='-static'
19405	  ;;
19406	*Portland\ Group*)
19407	  lt_prog_compiler_wl='-Wl,'
19408	  lt_prog_compiler_pic='-fpic'
19409	  lt_prog_compiler_static='-Bstatic'
19410	  ;;
19411	esac
19412	;;
19413      esac
19414      ;;
19415
19416    newsos6)
19417      lt_prog_compiler_pic='-KPIC'
19418      lt_prog_compiler_static='-Bstatic'
19419      ;;
19420
19421    *nto* | *qnx*)
19422      # QNX uses GNU C++, but need to define -shared option too, otherwise
19423      # it will coredump.
19424      lt_prog_compiler_pic='-fPIC -shared'
19425      ;;
19426
19427    osf3* | osf4* | osf5*)
19428      lt_prog_compiler_wl='-Wl,'
19429      # All OSF/1 code is PIC.
19430      lt_prog_compiler_static='-non_shared'
19431      ;;
19432
19433    rdos*)
19434      lt_prog_compiler_static='-non_shared'
19435      ;;
19436
19437    solaris*)
19438      lt_prog_compiler_pic='-KPIC'
19439      lt_prog_compiler_static='-Bstatic'
19440      case $cc_basename in
19441      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
19442	lt_prog_compiler_wl='-Qoption ld ';;
19443      *)
19444	lt_prog_compiler_wl='-Wl,';;
19445      esac
19446      ;;
19447
19448    sunos4*)
19449      lt_prog_compiler_wl='-Qoption ld '
19450      lt_prog_compiler_pic='-PIC'
19451      lt_prog_compiler_static='-Bstatic'
19452      ;;
19453
19454    sysv4 | sysv4.2uw2* | sysv4.3*)
19455      lt_prog_compiler_wl='-Wl,'
19456      lt_prog_compiler_pic='-KPIC'
19457      lt_prog_compiler_static='-Bstatic'
19458      ;;
19459
19460    sysv4*MP*)
19461      if test -d /usr/nec; then
19462	lt_prog_compiler_pic='-Kconform_pic'
19463	lt_prog_compiler_static='-Bstatic'
19464      fi
19465      ;;
19466
19467    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
19468      lt_prog_compiler_wl='-Wl,'
19469      lt_prog_compiler_pic='-KPIC'
19470      lt_prog_compiler_static='-Bstatic'
19471      ;;
19472
19473    unicos*)
19474      lt_prog_compiler_wl='-Wl,'
19475      lt_prog_compiler_can_build_shared=no
19476      ;;
19477
19478    uts4*)
19479      lt_prog_compiler_pic='-pic'
19480      lt_prog_compiler_static='-Bstatic'
19481      ;;
19482
19483    *)
19484      lt_prog_compiler_can_build_shared=no
19485      ;;
19486    esac
19487  fi
19488
19489case $host_os in
19490  # For platforms that do not support PIC, -DPIC is meaningless:
19491  *djgpp*)
19492    lt_prog_compiler_pic=
19493    ;;
19494  *)
19495    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
19496    ;;
19497esac
19498
19499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
19500$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
19501if ${lt_cv_prog_compiler_pic+:} false; then :
19502  $as_echo_n "(cached) " >&6
19503else
19504  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
19505fi
19506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
19507$as_echo "$lt_cv_prog_compiler_pic" >&6; }
19508lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
19509
19510#
19511# Check to make sure the PIC flag actually works.
19512#
19513if test -n "$lt_prog_compiler_pic"; then
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
19515$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
19516if ${lt_cv_prog_compiler_pic_works+:} false; then :
19517  $as_echo_n "(cached) " >&6
19518else
19519  lt_cv_prog_compiler_pic_works=no
19520   ac_outfile=conftest.$ac_objext
19521   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19522   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
19523   # Insert the option either (1) after the last *FLAGS variable, or
19524   # (2) before a word containing "conftest.", or (3) at the end.
19525   # Note that $ac_compile itself does not contain backslashes and begins
19526   # with a dollar sign (not a hyphen), so the echo should work correctly.
19527   # The option is referenced via a variable to avoid confusing sed.
19528   lt_compile=`echo "$ac_compile" | $SED \
19529   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19530   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19531   -e 's:$: $lt_compiler_flag:'`
19532   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19533   (eval "$lt_compile" 2>conftest.err)
19534   ac_status=$?
19535   cat conftest.err >&5
19536   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19537   if (exit $ac_status) && test -s "$ac_outfile"; then
19538     # The compiler can only warn and ignore the option if not recognized
19539     # So say no if there are warnings other than the usual output.
19540     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
19541     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19542     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
19543       lt_cv_prog_compiler_pic_works=yes
19544     fi
19545   fi
19546   $RM conftest*
19547
19548fi
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
19550$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
19551
19552if test yes = "$lt_cv_prog_compiler_pic_works"; then
19553    case $lt_prog_compiler_pic in
19554     "" | " "*) ;;
19555     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
19556     esac
19557else
19558    lt_prog_compiler_pic=
19559     lt_prog_compiler_can_build_shared=no
19560fi
19561
19562fi
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574#
19575# Check to make sure the static flag actually works.
19576#
19577wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
19578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
19579$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
19580if ${lt_cv_prog_compiler_static_works+:} false; then :
19581  $as_echo_n "(cached) " >&6
19582else
19583  lt_cv_prog_compiler_static_works=no
19584   save_LDFLAGS=$LDFLAGS
19585   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
19586   echo "$lt_simple_link_test_code" > conftest.$ac_ext
19587   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
19588     # The linker can only warn and ignore the option if not recognized
19589     # So say no if there are warnings
19590     if test -s conftest.err; then
19591       # Append any errors to the config.log.
19592       cat conftest.err 1>&5
19593       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
19594       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
19595       if diff conftest.exp conftest.er2 >/dev/null; then
19596         lt_cv_prog_compiler_static_works=yes
19597       fi
19598     else
19599       lt_cv_prog_compiler_static_works=yes
19600     fi
19601   fi
19602   $RM -r conftest*
19603   LDFLAGS=$save_LDFLAGS
19604
19605fi
19606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
19607$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
19608
19609if test yes = "$lt_cv_prog_compiler_static_works"; then
19610    :
19611else
19612    lt_prog_compiler_static=
19613fi
19614
19615
19616
19617
19618
19619
19620
19621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19622$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19623if ${lt_cv_prog_compiler_c_o+:} false; then :
19624  $as_echo_n "(cached) " >&6
19625else
19626  lt_cv_prog_compiler_c_o=no
19627   $RM -r conftest 2>/dev/null
19628   mkdir conftest
19629   cd conftest
19630   mkdir out
19631   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19632
19633   lt_compiler_flag="-o out/conftest2.$ac_objext"
19634   # Insert the option either (1) after the last *FLAGS variable, or
19635   # (2) before a word containing "conftest.", or (3) at the end.
19636   # Note that $ac_compile itself does not contain backslashes and begins
19637   # with a dollar sign (not a hyphen), so the echo should work correctly.
19638   lt_compile=`echo "$ac_compile" | $SED \
19639   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19640   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19641   -e 's:$: $lt_compiler_flag:'`
19642   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19643   (eval "$lt_compile" 2>out/conftest.err)
19644   ac_status=$?
19645   cat out/conftest.err >&5
19646   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19647   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19648   then
19649     # The compiler can only warn and ignore the option if not recognized
19650     # So say no if there are warnings
19651     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19652     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19653     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19654       lt_cv_prog_compiler_c_o=yes
19655     fi
19656   fi
19657   chmod u+w . 2>&5
19658   $RM conftest*
19659   # SGI C++ compiler will create directory out/ii_files/ for
19660   # template instantiation
19661   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19662   $RM out/* && rmdir out
19663   cd ..
19664   $RM -r conftest
19665   $RM conftest*
19666
19667fi
19668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19669$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19670
19671
19672
19673
19674
19675
19676  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
19677$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
19678if ${lt_cv_prog_compiler_c_o+:} false; then :
19679  $as_echo_n "(cached) " >&6
19680else
19681  lt_cv_prog_compiler_c_o=no
19682   $RM -r conftest 2>/dev/null
19683   mkdir conftest
19684   cd conftest
19685   mkdir out
19686   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
19687
19688   lt_compiler_flag="-o out/conftest2.$ac_objext"
19689   # Insert the option either (1) after the last *FLAGS variable, or
19690   # (2) before a word containing "conftest.", or (3) at the end.
19691   # Note that $ac_compile itself does not contain backslashes and begins
19692   # with a dollar sign (not a hyphen), so the echo should work correctly.
19693   lt_compile=`echo "$ac_compile" | $SED \
19694   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
19695   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
19696   -e 's:$: $lt_compiler_flag:'`
19697   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
19698   (eval "$lt_compile" 2>out/conftest.err)
19699   ac_status=$?
19700   cat out/conftest.err >&5
19701   echo "$as_me:$LINENO: \$? = $ac_status" >&5
19702   if (exit $ac_status) && test -s out/conftest2.$ac_objext
19703   then
19704     # The compiler can only warn and ignore the option if not recognized
19705     # So say no if there are warnings
19706     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
19707     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
19708     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
19709       lt_cv_prog_compiler_c_o=yes
19710     fi
19711   fi
19712   chmod u+w . 2>&5
19713   $RM conftest*
19714   # SGI C++ compiler will create directory out/ii_files/ for
19715   # template instantiation
19716   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
19717   $RM out/* && rmdir out
19718   cd ..
19719   $RM -r conftest
19720   $RM conftest*
19721
19722fi
19723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
19724$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
19725
19726
19727
19728
19729hard_links=nottested
19730if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
19731  # do not overwrite the value of need_locks provided by the user
19732  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
19733$as_echo_n "checking if we can lock with hard links... " >&6; }
19734  hard_links=yes
19735  $RM conftest*
19736  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19737  touch conftest.a
19738  ln conftest.a conftest.b 2>&5 || hard_links=no
19739  ln conftest.a conftest.b 2>/dev/null && hard_links=no
19740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
19741$as_echo "$hard_links" >&6; }
19742  if test no = "$hard_links"; then
19743    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
19744$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
19745    need_locks=warn
19746  fi
19747else
19748  need_locks=no
19749fi
19750
19751
19752
19753
19754
19755
19756  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
19757$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
19758
19759  runpath_var=
19760  allow_undefined_flag=
19761  always_export_symbols=no
19762  archive_cmds=
19763  archive_expsym_cmds=
19764  compiler_needs_object=no
19765  enable_shared_with_static_runtimes=no
19766  export_dynamic_flag_spec=
19767  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
19768  hardcode_automatic=no
19769  hardcode_direct=no
19770  hardcode_direct_absolute=no
19771  hardcode_libdir_flag_spec=
19772  hardcode_libdir_separator=
19773  hardcode_minus_L=no
19774  hardcode_shlibpath_var=unsupported
19775  inherit_rpath=no
19776  link_all_deplibs=unknown
19777  module_cmds=
19778  module_expsym_cmds=
19779  old_archive_from_new_cmds=
19780  old_archive_from_expsyms_cmds=
19781  thread_safe_flag_spec=
19782  whole_archive_flag_spec=
19783  # include_expsyms should be a list of space-separated symbols to be *always*
19784  # included in the symbol list
19785  include_expsyms=
19786  # exclude_expsyms can be an extended regexp of symbols to exclude
19787  # it will be wrapped by ' (' and ')$', so one must not match beginning or
19788  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
19789  # as well as any symbol that contains 'd'.
19790  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
19791  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
19792  # platforms (ab)use it in PIC code, but their linkers get confused if
19793  # the symbol is explicitly referenced.  Since portable code cannot
19794  # rely on this symbol name, it's probably fine to never include it in
19795  # preloaded symbol tables.
19796  # Exclude shared library initialization/finalization symbols.
19797  extract_expsyms_cmds=
19798
19799  case $host_os in
19800  cygwin* | mingw* | pw32* | cegcc*)
19801    # FIXME: the MSVC++ port hasn't been tested in a loooong time
19802    # When not using gcc, we currently assume that we are using
19803    # Microsoft Visual C++.
19804    if test yes != "$GCC"; then
19805      with_gnu_ld=no
19806    fi
19807    ;;
19808  interix*)
19809    # we just hope/assume this is gcc and not c89 (= MSVC++)
19810    with_gnu_ld=yes
19811    ;;
19812  openbsd* | bitrig*)
19813    with_gnu_ld=no
19814    ;;
19815  esac
19816
19817  ld_shlibs=yes
19818
19819  # On some targets, GNU ld is compatible enough with the native linker
19820  # that we're better off using the native interface for both.
19821  lt_use_gnu_ld_interface=no
19822  if test yes = "$with_gnu_ld"; then
19823    case $host_os in
19824      aix*)
19825	# The AIX port of GNU ld has always aspired to compatibility
19826	# with the native linker.  However, as the warning in the GNU ld
19827	# block says, versions before 2.19.5* couldn't really create working
19828	# shared libraries, regardless of the interface used.
19829	case `$LD -v 2>&1` in
19830	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
19831	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
19832	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
19833	  *)
19834	    lt_use_gnu_ld_interface=yes
19835	    ;;
19836	esac
19837	;;
19838      *)
19839	lt_use_gnu_ld_interface=yes
19840	;;
19841    esac
19842  fi
19843
19844  if test yes = "$lt_use_gnu_ld_interface"; then
19845    # If archive_cmds runs LD, not CC, wlarc should be empty
19846    wlarc='$wl'
19847
19848    # Set some defaults for GNU ld with shared library support. These
19849    # are reset later if shared libraries are not supported. Putting them
19850    # here allows them to be overridden if necessary.
19851    runpath_var=LD_RUN_PATH
19852    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
19853    export_dynamic_flag_spec='$wl--export-dynamic'
19854    # ancient GNU ld didn't support --whole-archive et. al.
19855    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
19856      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
19857    else
19858      whole_archive_flag_spec=
19859    fi
19860    supports_anon_versioning=no
19861    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
19862      *GNU\ gold*) supports_anon_versioning=yes ;;
19863      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
19864      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
19865      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
19866      *\ 2.11.*) ;; # other 2.11 versions
19867      *) supports_anon_versioning=yes ;;
19868    esac
19869
19870    # See if GNU ld supports shared libraries.
19871    case $host_os in
19872    aix[3-9]*)
19873      # On AIX/PPC, the GNU linker is very broken
19874      if test ia64 != "$host_cpu"; then
19875	ld_shlibs=no
19876	cat <<_LT_EOF 1>&2
19877
19878*** Warning: the GNU linker, at least up to release 2.19, is reported
19879*** to be unable to reliably create shared libraries on AIX.
19880*** Therefore, libtool is disabling shared libraries support.  If you
19881*** really care for shared libraries, you may want to install binutils
19882*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
19883*** You will then need to restart the configuration process.
19884
19885_LT_EOF
19886      fi
19887      ;;
19888
19889    amigaos*)
19890      case $host_cpu in
19891      powerpc)
19892            # see comment about AmigaOS4 .so support
19893            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19894            archive_expsym_cmds=''
19895        ;;
19896      m68k)
19897            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)'
19898            hardcode_libdir_flag_spec='-L$libdir'
19899            hardcode_minus_L=yes
19900        ;;
19901      esac
19902      ;;
19903
19904    beos*)
19905      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
19906	allow_undefined_flag=unsupported
19907	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
19908	# support --undefined.  This deserves some investigation.  FIXME
19909	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19910      else
19911	ld_shlibs=no
19912      fi
19913      ;;
19914
19915    cygwin* | mingw* | pw32* | cegcc*)
19916      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
19917      # as there is no search path for DLLs.
19918      hardcode_libdir_flag_spec='-L$libdir'
19919      export_dynamic_flag_spec='$wl--export-all-symbols'
19920      allow_undefined_flag=unsupported
19921      always_export_symbols=no
19922      enable_shared_with_static_runtimes=yes
19923      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'
19924      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
19925
19926      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
19927        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19928	# If the export-symbols file already is a .def file, use it as
19929	# is; otherwise, prepend EXPORTS...
19930	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
19931          cp $export_symbols $output_objdir/$soname.def;
19932        else
19933          echo EXPORTS > $output_objdir/$soname.def;
19934          cat $export_symbols >> $output_objdir/$soname.def;
19935        fi~
19936        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
19937      else
19938	ld_shlibs=no
19939      fi
19940      ;;
19941
19942    haiku*)
19943      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
19944      link_all_deplibs=yes
19945      ;;
19946
19947    os2*)
19948      hardcode_libdir_flag_spec='-L$libdir'
19949      hardcode_minus_L=yes
19950      allow_undefined_flag=unsupported
19951      shrext_cmds=.dll
19952      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19953	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19954	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19955	$ECHO EXPORTS >> $output_objdir/$libname.def~
19956	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
19957	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19958	emximp -o $lib $output_objdir/$libname.def'
19959      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
19960	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
19961	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
19962	$ECHO EXPORTS >> $output_objdir/$libname.def~
19963	prefix_cmds="$SED"~
19964	if test EXPORTS = "`$SED 1q $export_symbols`"; then
19965	  prefix_cmds="$prefix_cmds -e 1d";
19966	fi~
19967	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
19968	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
19969	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
19970	emximp -o $lib $output_objdir/$libname.def'
19971      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
19972      enable_shared_with_static_runtimes=yes
19973      ;;
19974
19975    interix[3-9]*)
19976      hardcode_direct=no
19977      hardcode_shlibpath_var=no
19978      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
19979      export_dynamic_flag_spec='$wl-E'
19980      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
19981      # Instead, shared libraries are loaded at an image base (0x10000000 by
19982      # default) and relocated if they conflict, which is a slow very memory
19983      # consuming and fragmenting process.  To avoid this, we pick a random,
19984      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
19985      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
19986      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
19987      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'
19988      ;;
19989
19990    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
19991      tmp_diet=no
19992      if test linux-dietlibc = "$host_os"; then
19993	case $cc_basename in
19994	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
19995	esac
19996      fi
19997      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
19998	 && test no = "$tmp_diet"
19999      then
20000	tmp_addflag=' $pic_flag'
20001	tmp_sharedflag='-shared'
20002	case $cc_basename,$host_cpu in
20003        pgcc*)				# Portland Group C compiler
20004	  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'
20005	  tmp_addflag=' $pic_flag'
20006	  ;;
20007	pgf77* | pgf90* | pgf95* | pgfortran*)
20008					# Portland Group f77 and f90 compilers
20009	  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'
20010	  tmp_addflag=' $pic_flag -Mnomain' ;;
20011	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
20012	  tmp_addflag=' -i_dynamic' ;;
20013	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
20014	  tmp_addflag=' -i_dynamic -nofor_main' ;;
20015	ifc* | ifort*)			# Intel Fortran compiler
20016	  tmp_addflag=' -nofor_main' ;;
20017	lf95*)				# Lahey Fortran 8.1
20018	  whole_archive_flag_spec=
20019	  tmp_sharedflag='--shared' ;;
20020        nagfor*)                        # NAGFOR 5.3
20021          tmp_sharedflag='-Wl,-shared' ;;
20022	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
20023	  tmp_sharedflag='-qmkshrobj'
20024	  tmp_addflag= ;;
20025	nvcc*)	# Cuda Compiler Driver 2.2
20026	  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'
20027	  compiler_needs_object=yes
20028	  ;;
20029	esac
20030	case `$CC -V 2>&1 | sed 5q` in
20031	*Sun\ C*)			# Sun C 5.9
20032	  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'
20033	  compiler_needs_object=yes
20034	  tmp_sharedflag='-G' ;;
20035	*Sun\ F*)			# Sun Fortran 8.3
20036	  tmp_sharedflag='-G' ;;
20037	esac
20038	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20039
20040        if test yes = "$supports_anon_versioning"; then
20041          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20042            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20043            echo "local: *; };" >> $output_objdir/$libname.ver~
20044            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
20045        fi
20046
20047	case $cc_basename in
20048	tcc*)
20049	  export_dynamic_flag_spec='-rdynamic'
20050	  ;;
20051	xlf* | bgf* | bgxlf* | mpixlf*)
20052	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
20053	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
20054	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20055	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
20056	  if test yes = "$supports_anon_versioning"; then
20057	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
20058              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
20059              echo "local: *; };" >> $output_objdir/$libname.ver~
20060              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
20061	  fi
20062	  ;;
20063	esac
20064      else
20065        ld_shlibs=no
20066      fi
20067      ;;
20068
20069    netbsd*)
20070      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20071	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
20072	wlarc=
20073      else
20074	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20075	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20076      fi
20077      ;;
20078
20079    solaris*)
20080      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
20081	ld_shlibs=no
20082	cat <<_LT_EOF 1>&2
20083
20084*** Warning: The releases 2.8.* of the GNU linker cannot reliably
20085*** create shared libraries on Solaris systems.  Therefore, libtool
20086*** is disabling shared libraries support.  We urge you to upgrade GNU
20087*** binutils to release 2.9.1 or newer.  Another option is to modify
20088*** your PATH or compiler configuration so that the native linker is
20089*** used, and then restart.
20090
20091_LT_EOF
20092      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20093	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20094	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20095      else
20096	ld_shlibs=no
20097      fi
20098      ;;
20099
20100    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
20101      case `$LD -v 2>&1` in
20102        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
20103	ld_shlibs=no
20104	cat <<_LT_EOF 1>&2
20105
20106*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
20107*** reliably create shared libraries on SCO systems.  Therefore, libtool
20108*** is disabling shared libraries support.  We urge you to upgrade GNU
20109*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
20110*** your PATH or compiler configuration so that the native linker is
20111*** used, and then restart.
20112
20113_LT_EOF
20114	;;
20115	*)
20116	  # For security reasons, it is highly recommended that you always
20117	  # use absolute paths for naming shared libraries, and exclude the
20118	  # DT_RUNPATH tag from executables and libraries.  But doing so
20119	  # requires that you compile everything twice, which is a pain.
20120	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20121	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20122	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20123	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20124	  else
20125	    ld_shlibs=no
20126	  fi
20127	;;
20128      esac
20129      ;;
20130
20131    sunos4*)
20132      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20133      wlarc=
20134      hardcode_direct=yes
20135      hardcode_shlibpath_var=no
20136      ;;
20137
20138    *)
20139      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
20140	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20141	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
20142      else
20143	ld_shlibs=no
20144      fi
20145      ;;
20146    esac
20147
20148    if test no = "$ld_shlibs"; then
20149      runpath_var=
20150      hardcode_libdir_flag_spec=
20151      export_dynamic_flag_spec=
20152      whole_archive_flag_spec=
20153    fi
20154  else
20155    # PORTME fill in a description of your system's linker (not GNU ld)
20156    case $host_os in
20157    aix3*)
20158      allow_undefined_flag=unsupported
20159      always_export_symbols=yes
20160      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'
20161      # Note: this linker hardcodes the directories in LIBPATH if there
20162      # are no directories specified by -L.
20163      hardcode_minus_L=yes
20164      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
20165	# Neither direct hardcoding nor static linking is supported with a
20166	# broken collect2.
20167	hardcode_direct=unsupported
20168      fi
20169      ;;
20170
20171    aix[4-9]*)
20172      if test ia64 = "$host_cpu"; then
20173	# On IA64, the linker does run time linking by default, so we don't
20174	# have to do anything special.
20175	aix_use_runtimelinking=no
20176	exp_sym_flag='-Bexport'
20177	no_entry_flag=
20178      else
20179	# If we're using GNU nm, then we don't want the "-C" option.
20180	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
20181	# Without the "-l" option, or with the "-B" option, AIX nm treats
20182	# weak defined symbols like other global defined symbols, whereas
20183	# GNU nm marks them as "W".
20184	# While the 'weak' keyword is ignored in the Export File, we need
20185	# it in the Import File for the 'aix-soname' feature, so we have
20186	# to replace the "-B" option with "-P" for AIX nm.
20187	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
20188	  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'
20189	else
20190	  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'
20191	fi
20192	aix_use_runtimelinking=no
20193
20194	# Test if we are trying to use run time linking or normal
20195	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
20196	# have runtime linking enabled, and use it for executables.
20197	# For shared libraries, we enable/disable runtime linking
20198	# depending on the kind of the shared library created -
20199	# when "with_aix_soname,aix_use_runtimelinking" is:
20200	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
20201	# "aix,yes"  lib.so          shared, rtl:yes, for executables
20202	#            lib.a           static archive
20203	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
20204	#            lib.a(lib.so.V) shared, rtl:no,  for executables
20205	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
20206	#            lib.a(lib.so.V) shared, rtl:no
20207	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
20208	#            lib.a           static archive
20209	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
20210	  for ld_flag in $LDFLAGS; do
20211	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
20212	    aix_use_runtimelinking=yes
20213	    break
20214	  fi
20215	  done
20216	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
20217	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
20218	    # so we don't have lib.a shared libs to link our executables.
20219	    # We have to force runtime linking in this case.
20220	    aix_use_runtimelinking=yes
20221	    LDFLAGS="$LDFLAGS -Wl,-brtl"
20222	  fi
20223	  ;;
20224	esac
20225
20226	exp_sym_flag='-bexport'
20227	no_entry_flag='-bnoentry'
20228      fi
20229
20230      # When large executables or shared objects are built, AIX ld can
20231      # have problems creating the table of contents.  If linking a library
20232      # or program results in "error TOC overflow" add -mminimal-toc to
20233      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
20234      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
20235
20236      archive_cmds=''
20237      hardcode_direct=yes
20238      hardcode_direct_absolute=yes
20239      hardcode_libdir_separator=':'
20240      link_all_deplibs=yes
20241      file_list_spec='$wl-f,'
20242      case $with_aix_soname,$aix_use_runtimelinking in
20243      aix,*) ;; # traditional, no import file
20244      svr4,* | *,yes) # use import file
20245	# The Import File defines what to hardcode.
20246	hardcode_direct=no
20247	hardcode_direct_absolute=no
20248	;;
20249      esac
20250
20251      if test yes = "$GCC"; then
20252	case $host_os in aix4.[012]|aix4.[012].*)
20253	# We only want to do this on AIX 4.2 and lower, the check
20254	# below for broken collect2 doesn't work under 4.3+
20255	  collect2name=`$CC -print-prog-name=collect2`
20256	  if test -f "$collect2name" &&
20257	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
20258	  then
20259	  # We have reworked collect2
20260	  :
20261	  else
20262	  # We have old collect2
20263	  hardcode_direct=unsupported
20264	  # It fails to find uninstalled libraries when the uninstalled
20265	  # path is not listed in the libpath.  Setting hardcode_minus_L
20266	  # to unsupported forces relinking
20267	  hardcode_minus_L=yes
20268	  hardcode_libdir_flag_spec='-L$libdir'
20269	  hardcode_libdir_separator=
20270	  fi
20271	  ;;
20272	esac
20273	shared_flag='-shared'
20274	if test yes = "$aix_use_runtimelinking"; then
20275	  shared_flag="$shared_flag "'$wl-G'
20276	fi
20277	# Need to ensure runtime linking is disabled for the traditional
20278	# shared library, or the linker may eventually find shared libraries
20279	# /with/ Import File - we do not want to mix them.
20280	shared_flag_aix='-shared'
20281	shared_flag_svr4='-shared $wl-G'
20282      else
20283	# not using gcc
20284	if test ia64 = "$host_cpu"; then
20285	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
20286	# chokes on -Wl,-G. The following line is correct:
20287	  shared_flag='-G'
20288	else
20289	  if test yes = "$aix_use_runtimelinking"; then
20290	    shared_flag='$wl-G'
20291	  else
20292	    shared_flag='$wl-bM:SRE'
20293	  fi
20294	  shared_flag_aix='$wl-bM:SRE'
20295	  shared_flag_svr4='$wl-G'
20296	fi
20297      fi
20298
20299      export_dynamic_flag_spec='$wl-bexpall'
20300      # It seems that -bexpall does not export symbols beginning with
20301      # underscore (_), so it is better to generate a list of symbols to export.
20302      always_export_symbols=yes
20303      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
20304	# Warning - without using the other runtime loading flags (-brtl),
20305	# -berok will link without error, but may produce a broken library.
20306	allow_undefined_flag='-berok'
20307        # Determine the default libpath from the value encoded in an
20308        # empty executable.
20309        if test set = "${lt_cv_aix_libpath+set}"; then
20310  aix_libpath=$lt_cv_aix_libpath
20311else
20312  if ${lt_cv_aix_libpath_+:} false; then :
20313  $as_echo_n "(cached) " >&6
20314else
20315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20316/* end confdefs.h.  */
20317
20318int
20319main ()
20320{
20321
20322  ;
20323  return 0;
20324}
20325_ACEOF
20326if ac_fn_c_try_link "$LINENO"; then :
20327
20328  lt_aix_libpath_sed='
20329      /Import File Strings/,/^$/ {
20330	  /^0/ {
20331	      s/^0  *\([^ ]*\) *$/\1/
20332	      p
20333	  }
20334      }'
20335  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20336  # Check for a 64-bit object if we didn't find anything.
20337  if test -z "$lt_cv_aix_libpath_"; then
20338    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20339  fi
20340fi
20341rm -f core conftest.err conftest.$ac_objext \
20342    conftest$ac_exeext conftest.$ac_ext
20343  if test -z "$lt_cv_aix_libpath_"; then
20344    lt_cv_aix_libpath_=/usr/lib:/lib
20345  fi
20346
20347fi
20348
20349  aix_libpath=$lt_cv_aix_libpath_
20350fi
20351
20352        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20353        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
20354      else
20355	if test ia64 = "$host_cpu"; then
20356	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
20357	  allow_undefined_flag="-z nodefs"
20358	  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"
20359	else
20360	 # Determine the default libpath from the value encoded in an
20361	 # empty executable.
20362	 if test set = "${lt_cv_aix_libpath+set}"; then
20363  aix_libpath=$lt_cv_aix_libpath
20364else
20365  if ${lt_cv_aix_libpath_+:} false; then :
20366  $as_echo_n "(cached) " >&6
20367else
20368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20369/* end confdefs.h.  */
20370
20371int
20372main ()
20373{
20374
20375  ;
20376  return 0;
20377}
20378_ACEOF
20379if ac_fn_c_try_link "$LINENO"; then :
20380
20381  lt_aix_libpath_sed='
20382      /Import File Strings/,/^$/ {
20383	  /^0/ {
20384	      s/^0  *\([^ ]*\) *$/\1/
20385	      p
20386	  }
20387      }'
20388  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20389  # Check for a 64-bit object if we didn't find anything.
20390  if test -z "$lt_cv_aix_libpath_"; then
20391    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
20392  fi
20393fi
20394rm -f core conftest.err conftest.$ac_objext \
20395    conftest$ac_exeext conftest.$ac_ext
20396  if test -z "$lt_cv_aix_libpath_"; then
20397    lt_cv_aix_libpath_=/usr/lib:/lib
20398  fi
20399
20400fi
20401
20402  aix_libpath=$lt_cv_aix_libpath_
20403fi
20404
20405	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
20406	  # Warning - without using the other run time loading flags,
20407	  # -berok will link without error, but may produce a broken library.
20408	  no_undefined_flag=' $wl-bernotok'
20409	  allow_undefined_flag=' $wl-berok'
20410	  if test yes = "$with_gnu_ld"; then
20411	    # We only use this code for GNU lds that support --whole-archive.
20412	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
20413	  else
20414	    # Exported symbols can be pulled into shared objects from archives
20415	    whole_archive_flag_spec='$convenience'
20416	  fi
20417	  archive_cmds_need_lc=yes
20418	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
20419	  # -brtl affects multiple linker settings, -berok does not and is overridden later
20420	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
20421	  if test svr4 != "$with_aix_soname"; then
20422	    # This is similar to how AIX traditionally builds its shared libraries.
20423	    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'
20424	  fi
20425	  if test aix != "$with_aix_soname"; then
20426	    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'
20427	  else
20428	    # used by -dlpreopen to get the symbols
20429	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
20430	  fi
20431	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
20432	fi
20433      fi
20434      ;;
20435
20436    amigaos*)
20437      case $host_cpu in
20438      powerpc)
20439            # see comment about AmigaOS4 .so support
20440            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
20441            archive_expsym_cmds=''
20442        ;;
20443      m68k)
20444            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)'
20445            hardcode_libdir_flag_spec='-L$libdir'
20446            hardcode_minus_L=yes
20447        ;;
20448      esac
20449      ;;
20450
20451    bsdi[45]*)
20452      export_dynamic_flag_spec=-rdynamic
20453      ;;
20454
20455    cygwin* | mingw* | pw32* | cegcc*)
20456      # When not using gcc, we currently assume that we are using
20457      # Microsoft Visual C++.
20458      # hardcode_libdir_flag_spec is actually meaningless, as there is
20459      # no search path for DLLs.
20460      case $cc_basename in
20461      cl*)
20462	# Native MSVC
20463	hardcode_libdir_flag_spec=' '
20464	allow_undefined_flag=unsupported
20465	always_export_symbols=yes
20466	file_list_spec='@'
20467	# Tell ltmain to make .lib files, not .a files.
20468	libext=lib
20469	# Tell ltmain to make .dll files, not .so files.
20470	shrext_cmds=.dll
20471	# FIXME: Setting linknames here is a bad hack.
20472	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
20473	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
20474            cp "$export_symbols" "$output_objdir/$soname.def";
20475            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
20476          else
20477            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
20478          fi~
20479          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
20480          linknames='
20481	# The linker will not automatically build a static lib if we build a DLL.
20482	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
20483	enable_shared_with_static_runtimes=yes
20484	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
20485	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
20486	# Don't use ranlib
20487	old_postinstall_cmds='chmod 644 $oldlib'
20488	postlink_cmds='lt_outputfile="@OUTPUT@"~
20489          lt_tool_outputfile="@TOOL_OUTPUT@"~
20490          case $lt_outputfile in
20491            *.exe|*.EXE) ;;
20492            *)
20493              lt_outputfile=$lt_outputfile.exe
20494              lt_tool_outputfile=$lt_tool_outputfile.exe
20495              ;;
20496          esac~
20497          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
20498            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
20499            $RM "$lt_outputfile.manifest";
20500          fi'
20501	;;
20502      *)
20503	# Assume MSVC wrapper
20504	hardcode_libdir_flag_spec=' '
20505	allow_undefined_flag=unsupported
20506	# Tell ltmain to make .lib files, not .a files.
20507	libext=lib
20508	# Tell ltmain to make .dll files, not .so files.
20509	shrext_cmds=.dll
20510	# FIXME: Setting linknames here is a bad hack.
20511	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
20512	# The linker will automatically build a .lib file if we build a DLL.
20513	old_archive_from_new_cmds='true'
20514	# FIXME: Should let the user specify the lib program.
20515	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
20516	enable_shared_with_static_runtimes=yes
20517	;;
20518      esac
20519      ;;
20520
20521    darwin* | rhapsody*)
20522
20523
20524  archive_cmds_need_lc=no
20525  hardcode_direct=no
20526  hardcode_automatic=yes
20527  hardcode_shlibpath_var=unsupported
20528  if test yes = "$lt_cv_ld_force_load"; then
20529    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\"`'
20530
20531  else
20532    whole_archive_flag_spec=''
20533  fi
20534  link_all_deplibs=yes
20535  allow_undefined_flag=$_lt_dar_allow_undefined
20536  case $cc_basename in
20537     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
20538     *) _lt_dar_can_shared=$GCC ;;
20539  esac
20540  if test yes = "$_lt_dar_can_shared"; then
20541    output_verbose_link_cmd=func_echo_all
20542    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
20543    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
20544    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"
20545    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"
20546
20547  else
20548  ld_shlibs=no
20549  fi
20550
20551      ;;
20552
20553    dgux*)
20554      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20555      hardcode_libdir_flag_spec='-L$libdir'
20556      hardcode_shlibpath_var=no
20557      ;;
20558
20559    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
20560    # support.  Future versions do this automatically, but an explicit c++rt0.o
20561    # does not break anything, and helps significantly (at the cost of a little
20562    # extra space).
20563    freebsd2.2*)
20564      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
20565      hardcode_libdir_flag_spec='-R$libdir'
20566      hardcode_direct=yes
20567      hardcode_shlibpath_var=no
20568      ;;
20569
20570    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
20571    freebsd2.*)
20572      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
20573      hardcode_direct=yes
20574      hardcode_minus_L=yes
20575      hardcode_shlibpath_var=no
20576      ;;
20577
20578    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
20579    freebsd* | dragonfly*)
20580      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20581      hardcode_libdir_flag_spec='-R$libdir'
20582      hardcode_direct=yes
20583      hardcode_shlibpath_var=no
20584      ;;
20585
20586    hpux9*)
20587      if test yes = "$GCC"; then
20588	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'
20589      else
20590	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'
20591      fi
20592      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20593      hardcode_libdir_separator=:
20594      hardcode_direct=yes
20595
20596      # hardcode_minus_L: Not really in the search PATH,
20597      # but as the default location of the library.
20598      hardcode_minus_L=yes
20599      export_dynamic_flag_spec='$wl-E'
20600      ;;
20601
20602    hpux10*)
20603      if test yes,no = "$GCC,$with_gnu_ld"; then
20604	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20605      else
20606	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20607      fi
20608      if test no = "$with_gnu_ld"; then
20609	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20610	hardcode_libdir_separator=:
20611	hardcode_direct=yes
20612	hardcode_direct_absolute=yes
20613	export_dynamic_flag_spec='$wl-E'
20614	# hardcode_minus_L: Not really in the search PATH,
20615	# but as the default location of the library.
20616	hardcode_minus_L=yes
20617      fi
20618      ;;
20619
20620    hpux11*)
20621      if test yes,no = "$GCC,$with_gnu_ld"; then
20622	case $host_cpu in
20623	hppa*64*)
20624	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20625	  ;;
20626	ia64*)
20627	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20628	  ;;
20629	*)
20630	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20631	  ;;
20632	esac
20633      else
20634	case $host_cpu in
20635	hppa*64*)
20636	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20637	  ;;
20638	ia64*)
20639	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
20640	  ;;
20641	*)
20642
20643	  # Older versions of the 11.00 compiler do not understand -b yet
20644	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
20645	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
20646$as_echo_n "checking if $CC understands -b... " >&6; }
20647if ${lt_cv_prog_compiler__b+:} false; then :
20648  $as_echo_n "(cached) " >&6
20649else
20650  lt_cv_prog_compiler__b=no
20651   save_LDFLAGS=$LDFLAGS
20652   LDFLAGS="$LDFLAGS -b"
20653   echo "$lt_simple_link_test_code" > conftest.$ac_ext
20654   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
20655     # The linker can only warn and ignore the option if not recognized
20656     # So say no if there are warnings
20657     if test -s conftest.err; then
20658       # Append any errors to the config.log.
20659       cat conftest.err 1>&5
20660       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
20661       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
20662       if diff conftest.exp conftest.er2 >/dev/null; then
20663         lt_cv_prog_compiler__b=yes
20664       fi
20665     else
20666       lt_cv_prog_compiler__b=yes
20667     fi
20668   fi
20669   $RM -r conftest*
20670   LDFLAGS=$save_LDFLAGS
20671
20672fi
20673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
20674$as_echo "$lt_cv_prog_compiler__b" >&6; }
20675
20676if test yes = "$lt_cv_prog_compiler__b"; then
20677    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
20678else
20679    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
20680fi
20681
20682	  ;;
20683	esac
20684      fi
20685      if test no = "$with_gnu_ld"; then
20686	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
20687	hardcode_libdir_separator=:
20688
20689	case $host_cpu in
20690	hppa*64*|ia64*)
20691	  hardcode_direct=no
20692	  hardcode_shlibpath_var=no
20693	  ;;
20694	*)
20695	  hardcode_direct=yes
20696	  hardcode_direct_absolute=yes
20697	  export_dynamic_flag_spec='$wl-E'
20698
20699	  # hardcode_minus_L: Not really in the search PATH,
20700	  # but as the default location of the library.
20701	  hardcode_minus_L=yes
20702	  ;;
20703	esac
20704      fi
20705      ;;
20706
20707    irix5* | irix6* | nonstopux*)
20708      if test yes = "$GCC"; then
20709	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'
20710	# Try to use the -exported_symbol ld option, if it does not
20711	# work, assume that -exports_file does not work either and
20712	# implicitly export all symbols.
20713	# This should be the same for all languages, so no per-tag cache variable.
20714	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
20715$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
20716if ${lt_cv_irix_exported_symbol+:} false; then :
20717  $as_echo_n "(cached) " >&6
20718else
20719  save_LDFLAGS=$LDFLAGS
20720	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
20721	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20722/* end confdefs.h.  */
20723int foo (void) { return 0; }
20724_ACEOF
20725if ac_fn_c_try_link "$LINENO"; then :
20726  lt_cv_irix_exported_symbol=yes
20727else
20728  lt_cv_irix_exported_symbol=no
20729fi
20730rm -f core conftest.err conftest.$ac_objext \
20731    conftest$ac_exeext conftest.$ac_ext
20732           LDFLAGS=$save_LDFLAGS
20733fi
20734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
20735$as_echo "$lt_cv_irix_exported_symbol" >&6; }
20736	if test yes = "$lt_cv_irix_exported_symbol"; then
20737          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'
20738	fi
20739      else
20740	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'
20741	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'
20742      fi
20743      archive_cmds_need_lc='no'
20744      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20745      hardcode_libdir_separator=:
20746      inherit_rpath=yes
20747      link_all_deplibs=yes
20748      ;;
20749
20750    linux*)
20751      case $cc_basename in
20752      tcc*)
20753	# Fabrice Bellard et al's Tiny C Compiler
20754	ld_shlibs=yes
20755	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20756	;;
20757      esac
20758      ;;
20759
20760    netbsd*)
20761      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
20762	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
20763      else
20764	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
20765      fi
20766      hardcode_libdir_flag_spec='-R$libdir'
20767      hardcode_direct=yes
20768      hardcode_shlibpath_var=no
20769      ;;
20770
20771    newsos6)
20772      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20773      hardcode_direct=yes
20774      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20775      hardcode_libdir_separator=:
20776      hardcode_shlibpath_var=no
20777      ;;
20778
20779    *nto* | *qnx*)
20780      ;;
20781
20782    openbsd* | bitrig*)
20783      if test -f /usr/libexec/ld.so; then
20784	hardcode_direct=yes
20785	hardcode_shlibpath_var=no
20786	hardcode_direct_absolute=yes
20787	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
20788	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20789	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
20790	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20791	  export_dynamic_flag_spec='$wl-E'
20792	else
20793	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
20794	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
20795	fi
20796      else
20797	ld_shlibs=no
20798      fi
20799      ;;
20800
20801    os2*)
20802      hardcode_libdir_flag_spec='-L$libdir'
20803      hardcode_minus_L=yes
20804      allow_undefined_flag=unsupported
20805      shrext_cmds=.dll
20806      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20807	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20808	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20809	$ECHO EXPORTS >> $output_objdir/$libname.def~
20810	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
20811	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20812	emximp -o $lib $output_objdir/$libname.def'
20813      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
20814	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
20815	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
20816	$ECHO EXPORTS >> $output_objdir/$libname.def~
20817	prefix_cmds="$SED"~
20818	if test EXPORTS = "`$SED 1q $export_symbols`"; then
20819	  prefix_cmds="$prefix_cmds -e 1d";
20820	fi~
20821	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
20822	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
20823	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
20824	emximp -o $lib $output_objdir/$libname.def'
20825      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
20826      enable_shared_with_static_runtimes=yes
20827      ;;
20828
20829    osf3*)
20830      if test yes = "$GCC"; then
20831	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20832	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'
20833      else
20834	allow_undefined_flag=' -expect_unresolved \*'
20835	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'
20836      fi
20837      archive_cmds_need_lc='no'
20838      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20839      hardcode_libdir_separator=:
20840      ;;
20841
20842    osf4* | osf5*)	# as osf3* with the addition of -msym flag
20843      if test yes = "$GCC"; then
20844	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
20845	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'
20846	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
20847      else
20848	allow_undefined_flag=' -expect_unresolved \*'
20849	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'
20850	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~
20851          $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'
20852
20853	# Both c and cxx compiler support -rpath directly
20854	hardcode_libdir_flag_spec='-rpath $libdir'
20855      fi
20856      archive_cmds_need_lc='no'
20857      hardcode_libdir_separator=:
20858      ;;
20859
20860    solaris*)
20861      no_undefined_flag=' -z defs'
20862      if test yes = "$GCC"; then
20863	wlarc='$wl'
20864	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
20865	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20866          $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'
20867      else
20868	case `$CC -V 2>&1` in
20869	*"Compilers 5.0"*)
20870	  wlarc=''
20871	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
20872	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20873            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
20874	  ;;
20875	*)
20876	  wlarc='$wl'
20877	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
20878	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
20879            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
20880	  ;;
20881	esac
20882      fi
20883      hardcode_libdir_flag_spec='-R$libdir'
20884      hardcode_shlibpath_var=no
20885      case $host_os in
20886      solaris2.[0-5] | solaris2.[0-5].*) ;;
20887      *)
20888	# The compiler driver will combine and reorder linker options,
20889	# but understands '-z linker_flag'.  GCC discards it without '$wl',
20890	# but is careful enough not to reorder.
20891	# Supported since Solaris 2.6 (maybe 2.5.1?)
20892	if test yes = "$GCC"; then
20893	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
20894	else
20895	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
20896	fi
20897	;;
20898      esac
20899      link_all_deplibs=yes
20900      ;;
20901
20902    sunos4*)
20903      if test sequent = "$host_vendor"; then
20904	# Use $CC to link under sequent, because it throws in some extra .o
20905	# files that make .init and .fini sections work.
20906	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
20907      else
20908	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
20909      fi
20910      hardcode_libdir_flag_spec='-L$libdir'
20911      hardcode_direct=yes
20912      hardcode_minus_L=yes
20913      hardcode_shlibpath_var=no
20914      ;;
20915
20916    sysv4)
20917      case $host_vendor in
20918	sni)
20919	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20920	  hardcode_direct=yes # is this really true???
20921	;;
20922	siemens)
20923	  ## LD is ld it makes a PLAMLIB
20924	  ## CC just makes a GrossModule.
20925	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
20926	  reload_cmds='$CC -r -o $output$reload_objs'
20927	  hardcode_direct=no
20928        ;;
20929	motorola)
20930	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20931	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
20932	;;
20933      esac
20934      runpath_var='LD_RUN_PATH'
20935      hardcode_shlibpath_var=no
20936      ;;
20937
20938    sysv4.3*)
20939      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20940      hardcode_shlibpath_var=no
20941      export_dynamic_flag_spec='-Bexport'
20942      ;;
20943
20944    sysv4*MP*)
20945      if test -d /usr/nec; then
20946	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20947	hardcode_shlibpath_var=no
20948	runpath_var=LD_RUN_PATH
20949	hardcode_runpath_var=yes
20950	ld_shlibs=yes
20951      fi
20952      ;;
20953
20954    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
20955      no_undefined_flag='$wl-z,text'
20956      archive_cmds_need_lc=no
20957      hardcode_shlibpath_var=no
20958      runpath_var='LD_RUN_PATH'
20959
20960      if test yes = "$GCC"; then
20961	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20962	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20963      else
20964	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20965	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20966      fi
20967      ;;
20968
20969    sysv5* | sco3.2v5* | sco5v6*)
20970      # Note: We CANNOT use -z defs as we might desire, because we do not
20971      # link with -lc, and that would cause any symbols used from libc to
20972      # always be unresolved, which means just about no library would
20973      # ever link correctly.  If we're not using GNU ld we use -z text
20974      # though, which does catch some bad symbols but isn't as heavy-handed
20975      # as -z defs.
20976      no_undefined_flag='$wl-z,text'
20977      allow_undefined_flag='$wl-z,nodefs'
20978      archive_cmds_need_lc=no
20979      hardcode_shlibpath_var=no
20980      hardcode_libdir_flag_spec='$wl-R,$libdir'
20981      hardcode_libdir_separator=':'
20982      link_all_deplibs=yes
20983      export_dynamic_flag_spec='$wl-Bexport'
20984      runpath_var='LD_RUN_PATH'
20985
20986      if test yes = "$GCC"; then
20987	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20988	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20989      else
20990	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20991	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
20992      fi
20993      ;;
20994
20995    uts4*)
20996      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
20997      hardcode_libdir_flag_spec='-L$libdir'
20998      hardcode_shlibpath_var=no
20999      ;;
21000
21001    *)
21002      ld_shlibs=no
21003      ;;
21004    esac
21005
21006    if test sni = "$host_vendor"; then
21007      case $host in
21008      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
21009	export_dynamic_flag_spec='$wl-Blargedynsym'
21010	;;
21011      esac
21012    fi
21013  fi
21014
21015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
21016$as_echo "$ld_shlibs" >&6; }
21017test no = "$ld_shlibs" && can_build_shared=no
21018
21019with_gnu_ld=$with_gnu_ld
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035#
21036# Do we need to explicitly link libc?
21037#
21038case "x$archive_cmds_need_lc" in
21039x|xyes)
21040  # Assume -lc should be added
21041  archive_cmds_need_lc=yes
21042
21043  if test yes,yes = "$GCC,$enable_shared"; then
21044    case $archive_cmds in
21045    *'~'*)
21046      # FIXME: we may have to deal with multi-command sequences.
21047      ;;
21048    '$CC '*)
21049      # Test whether the compiler implicitly links with -lc since on some
21050      # systems, -lgcc has to come before -lc. If gcc already passes -lc
21051      # to ld, don't add -lc before -lgcc.
21052      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
21053$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
21054if ${lt_cv_archive_cmds_need_lc+:} false; then :
21055  $as_echo_n "(cached) " >&6
21056else
21057  $RM conftest*
21058	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
21059
21060	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
21061  (eval $ac_compile) 2>&5
21062  ac_status=$?
21063  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21064  test $ac_status = 0; } 2>conftest.err; then
21065	  soname=conftest
21066	  lib=conftest
21067	  libobjs=conftest.$ac_objext
21068	  deplibs=
21069	  wl=$lt_prog_compiler_wl
21070	  pic_flag=$lt_prog_compiler_pic
21071	  compiler_flags=-v
21072	  linker_flags=-v
21073	  verstring=
21074	  output_objdir=.
21075	  libname=conftest
21076	  lt_save_allow_undefined_flag=$allow_undefined_flag
21077	  allow_undefined_flag=
21078	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
21079  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
21080  ac_status=$?
21081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21082  test $ac_status = 0; }
21083	  then
21084	    lt_cv_archive_cmds_need_lc=no
21085	  else
21086	    lt_cv_archive_cmds_need_lc=yes
21087	  fi
21088	  allow_undefined_flag=$lt_save_allow_undefined_flag
21089	else
21090	  cat conftest.err 1>&5
21091	fi
21092	$RM conftest*
21093
21094fi
21095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
21096$as_echo "$lt_cv_archive_cmds_need_lc" >&6; }
21097      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
21098      ;;
21099    esac
21100  fi
21101  ;;
21102esac
21103
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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
21256$as_echo_n "checking dynamic linker characteristics... " >&6; }
21257
21258if test yes = "$GCC"; then
21259  case $host_os in
21260    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
21261    *) lt_awk_arg='/^libraries:/' ;;
21262  esac
21263  case $host_os in
21264    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
21265    *) lt_sed_strip_eq='s|=/|/|g' ;;
21266  esac
21267  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
21268  case $lt_search_path_spec in
21269  *\;*)
21270    # if the path contains ";" then we assume it to be the separator
21271    # otherwise default to the standard path separator (i.e. ":") - it is
21272    # assumed that no part of a normal pathname contains ";" but that should
21273    # okay in the real world where ";" in dirpaths is itself problematic.
21274    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
21275    ;;
21276  *)
21277    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
21278    ;;
21279  esac
21280  # Ok, now we have the path, separated by spaces, we can step through it
21281  # and add multilib dir if necessary...
21282  lt_tmp_lt_search_path_spec=
21283  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
21284  # ...but if some path component already ends with the multilib dir we assume
21285  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
21286  case "$lt_multi_os_dir; $lt_search_path_spec " in
21287  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
21288    lt_multi_os_dir=
21289    ;;
21290  esac
21291  for lt_sys_path in $lt_search_path_spec; do
21292    if test -d "$lt_sys_path$lt_multi_os_dir"; then
21293      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
21294    elif test -n "$lt_multi_os_dir"; then
21295      test -d "$lt_sys_path" && \
21296	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
21297    fi
21298  done
21299  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
21300BEGIN {RS = " "; FS = "/|\n";} {
21301  lt_foo = "";
21302  lt_count = 0;
21303  for (lt_i = NF; lt_i > 0; lt_i--) {
21304    if ($lt_i != "" && $lt_i != ".") {
21305      if ($lt_i == "..") {
21306        lt_count++;
21307      } else {
21308        if (lt_count == 0) {
21309          lt_foo = "/" $lt_i lt_foo;
21310        } else {
21311          lt_count--;
21312        }
21313      }
21314    }
21315  }
21316  if (lt_foo != "") { lt_freq[lt_foo]++; }
21317  if (lt_freq[lt_foo] == 1) { print lt_foo; }
21318}'`
21319  # AWK program above erroneously prepends '/' to C:/dos/paths
21320  # for these hosts.
21321  case $host_os in
21322    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
21323      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
21324  esac
21325  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
21326else
21327  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21328fi
21329library_names_spec=
21330libname_spec='lib$name'
21331soname_spec=
21332shrext_cmds=.so
21333postinstall_cmds=
21334postuninstall_cmds=
21335finish_cmds=
21336finish_eval=
21337shlibpath_var=
21338shlibpath_overrides_runpath=unknown
21339version_type=none
21340dynamic_linker="$host_os ld.so"
21341sys_lib_dlsearch_path_spec="/lib /usr/lib"
21342need_lib_prefix=unknown
21343hardcode_into_libs=no
21344
21345# when you set need_version to no, make sure it does not cause -set_version
21346# flags to be left without arguments
21347need_version=unknown
21348
21349
21350
21351case $host_os in
21352aix3*)
21353  version_type=linux # correct to gnu/linux during the next big refactor
21354  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
21355  shlibpath_var=LIBPATH
21356
21357  # AIX 3 has no versioning support, so we append a major version to the name.
21358  soname_spec='$libname$release$shared_ext$major'
21359  ;;
21360
21361aix[4-9]*)
21362  version_type=linux # correct to gnu/linux during the next big refactor
21363  need_lib_prefix=no
21364  need_version=no
21365  hardcode_into_libs=yes
21366  if test ia64 = "$host_cpu"; then
21367    # AIX 5 supports IA64
21368    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
21369    shlibpath_var=LD_LIBRARY_PATH
21370  else
21371    # With GCC up to 2.95.x, collect2 would create an import file
21372    # for dependence libraries.  The import file would start with
21373    # the line '#! .'.  This would cause the generated library to
21374    # depend on '.', always an invalid library.  This was fixed in
21375    # development snapshots of GCC prior to 3.0.
21376    case $host_os in
21377      aix4 | aix4.[01] | aix4.[01].*)
21378      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
21379	   echo ' yes '
21380	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
21381	:
21382      else
21383	can_build_shared=no
21384      fi
21385      ;;
21386    esac
21387    # Using Import Files as archive members, it is possible to support
21388    # filename-based versioning of shared library archives on AIX. While
21389    # this would work for both with and without runtime linking, it will
21390    # prevent static linking of such archives. So we do filename-based
21391    # shared library versioning with .so extension only, which is used
21392    # when both runtime linking and shared linking is enabled.
21393    # Unfortunately, runtime linking may impact performance, so we do
21394    # not want this to be the default eventually. Also, we use the
21395    # versioned .so libs for executables only if there is the -brtl
21396    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
21397    # To allow for filename-based versioning support, we need to create
21398    # libNAME.so.V as an archive file, containing:
21399    # *) an Import File, referring to the versioned filename of the
21400    #    archive as well as the shared archive member, telling the
21401    #    bitwidth (32 or 64) of that shared object, and providing the
21402    #    list of exported symbols of that shared object, eventually
21403    #    decorated with the 'weak' keyword
21404    # *) the shared object with the F_LOADONLY flag set, to really avoid
21405    #    it being seen by the linker.
21406    # At run time we better use the real file rather than another symlink,
21407    # but for link time we create the symlink libNAME.so -> libNAME.so.V
21408
21409    case $with_aix_soname,$aix_use_runtimelinking in
21410    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
21411    # soname into executable. Probably we can add versioning support to
21412    # collect2, so additional links can be useful in future.
21413    aix,yes) # traditional libtool
21414      dynamic_linker='AIX unversionable lib.so'
21415      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
21416      # instead of lib<name>.a to let people know that these are not
21417      # typical AIX shared libraries.
21418      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21419      ;;
21420    aix,no) # traditional AIX only
21421      dynamic_linker='AIX lib.a(lib.so.V)'
21422      # We preserve .a as extension for shared libraries through AIX4.2
21423      # and later when we are not doing run time linking.
21424      library_names_spec='$libname$release.a $libname.a'
21425      soname_spec='$libname$release$shared_ext$major'
21426      ;;
21427    svr4,*) # full svr4 only
21428      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
21429      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21430      # We do not specify a path in Import Files, so LIBPATH fires.
21431      shlibpath_overrides_runpath=yes
21432      ;;
21433    *,yes) # both, prefer svr4
21434      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
21435      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
21436      # unpreferred sharedlib libNAME.a needs extra handling
21437      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"'
21438      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"'
21439      # We do not specify a path in Import Files, so LIBPATH fires.
21440      shlibpath_overrides_runpath=yes
21441      ;;
21442    *,no) # both, prefer aix
21443      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
21444      library_names_spec='$libname$release.a $libname.a'
21445      soname_spec='$libname$release$shared_ext$major'
21446      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
21447      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)'
21448      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"'
21449      ;;
21450    esac
21451    shlibpath_var=LIBPATH
21452  fi
21453  ;;
21454
21455amigaos*)
21456  case $host_cpu in
21457  powerpc)
21458    # Since July 2007 AmigaOS4 officially supports .so libraries.
21459    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
21460    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21461    ;;
21462  m68k)
21463    library_names_spec='$libname.ixlibrary $libname.a'
21464    # Create ${libname}_ixlibrary.a entries in /sys/libs.
21465    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'
21466    ;;
21467  esac
21468  ;;
21469
21470beos*)
21471  library_names_spec='$libname$shared_ext'
21472  dynamic_linker="$host_os ld.so"
21473  shlibpath_var=LIBRARY_PATH
21474  ;;
21475
21476bsdi[45]*)
21477  version_type=linux # correct to gnu/linux during the next big refactor
21478  need_version=no
21479  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21480  soname_spec='$libname$release$shared_ext$major'
21481  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
21482  shlibpath_var=LD_LIBRARY_PATH
21483  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
21484  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
21485  # the default ld.so.conf also contains /usr/contrib/lib and
21486  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
21487  # libtool to hard-code these into programs
21488  ;;
21489
21490cygwin* | mingw* | pw32* | cegcc*)
21491  version_type=windows
21492  shrext_cmds=.dll
21493  need_version=no
21494  need_lib_prefix=no
21495
21496  case $GCC,$cc_basename in
21497  yes,*)
21498    # gcc
21499    library_names_spec='$libname.dll.a'
21500    # DLL is installed to $(libdir)/../bin by postinstall_cmds
21501    postinstall_cmds='base_file=`basename \$file`~
21502      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21503      dldir=$destdir/`dirname \$dlpath`~
21504      test -d \$dldir || mkdir -p \$dldir~
21505      $install_prog $dir/$dlname \$dldir/$dlname~
21506      chmod a+x \$dldir/$dlname~
21507      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21508        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21509      fi'
21510    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21511      dlpath=$dir/\$dldll~
21512       $RM \$dlpath'
21513    shlibpath_overrides_runpath=yes
21514
21515    case $host_os in
21516    cygwin*)
21517      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
21518      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21519
21520      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
21521      ;;
21522    mingw* | cegcc*)
21523      # MinGW DLLs use traditional 'lib' prefix
21524      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21525      ;;
21526    pw32*)
21527      # pw32 DLLs use 'pw' prefix rather than 'lib'
21528      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21529      ;;
21530    esac
21531    dynamic_linker='Win32 ld.exe'
21532    ;;
21533
21534  *,cl*)
21535    # Native MSVC
21536    libname_spec='$name'
21537    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
21538    library_names_spec='$libname.dll.lib'
21539
21540    case $build_os in
21541    mingw*)
21542      sys_lib_search_path_spec=
21543      lt_save_ifs=$IFS
21544      IFS=';'
21545      for lt_path in $LIB
21546      do
21547        IFS=$lt_save_ifs
21548        # Let DOS variable expansion print the short 8.3 style file name.
21549        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
21550        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
21551      done
21552      IFS=$lt_save_ifs
21553      # Convert to MSYS style.
21554      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
21555      ;;
21556    cygwin*)
21557      # Convert to unix form, then to dos form, then back to unix form
21558      # but this time dos style (no spaces!) so that the unix form looks
21559      # like /cygdrive/c/PROGRA~1:/cygdr...
21560      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
21561      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
21562      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21563      ;;
21564    *)
21565      sys_lib_search_path_spec=$LIB
21566      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
21567        # It is most probably a Windows format PATH.
21568        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
21569      else
21570        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
21571      fi
21572      # FIXME: find the short name or the path components, as spaces are
21573      # common. (e.g. "Program Files" -> "PROGRA~1")
21574      ;;
21575    esac
21576
21577    # DLL is installed to $(libdir)/../bin by postinstall_cmds
21578    postinstall_cmds='base_file=`basename \$file`~
21579      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
21580      dldir=$destdir/`dirname \$dlpath`~
21581      test -d \$dldir || mkdir -p \$dldir~
21582      $install_prog $dir/$dlname \$dldir/$dlname'
21583    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
21584      dlpath=$dir/\$dldll~
21585       $RM \$dlpath'
21586    shlibpath_overrides_runpath=yes
21587    dynamic_linker='Win32 link.exe'
21588    ;;
21589
21590  *)
21591    # Assume MSVC wrapper
21592    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
21593    dynamic_linker='Win32 ld.exe'
21594    ;;
21595  esac
21596  # FIXME: first we should search . and the directory the executable is in
21597  shlibpath_var=PATH
21598  ;;
21599
21600darwin* | rhapsody*)
21601  dynamic_linker="$host_os dyld"
21602  version_type=darwin
21603  need_lib_prefix=no
21604  need_version=no
21605  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
21606  soname_spec='$libname$release$major$shared_ext'
21607  shlibpath_overrides_runpath=yes
21608  shlibpath_var=DYLD_LIBRARY_PATH
21609  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
21610
21611  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
21612  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
21613  ;;
21614
21615dgux*)
21616  version_type=linux # correct to gnu/linux during the next big refactor
21617  need_lib_prefix=no
21618  need_version=no
21619  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21620  soname_spec='$libname$release$shared_ext$major'
21621  shlibpath_var=LD_LIBRARY_PATH
21622  ;;
21623
21624freebsd* | dragonfly*)
21625  # DragonFly does not have aout.  When/if they implement a new
21626  # versioning mechanism, adjust this.
21627  if test -x /usr/bin/objformat; then
21628    objformat=`/usr/bin/objformat`
21629  else
21630    case $host_os in
21631    freebsd[23].*) objformat=aout ;;
21632    *) objformat=elf ;;
21633    esac
21634  fi
21635  version_type=freebsd-$objformat
21636  case $version_type in
21637    freebsd-elf*)
21638      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21639      soname_spec='$libname$release$shared_ext$major'
21640      need_version=no
21641      need_lib_prefix=no
21642      ;;
21643    freebsd-*)
21644      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21645      need_version=yes
21646      ;;
21647  esac
21648  shlibpath_var=LD_LIBRARY_PATH
21649  case $host_os in
21650  freebsd2.*)
21651    shlibpath_overrides_runpath=yes
21652    ;;
21653  freebsd3.[01]* | freebsdelf3.[01]*)
21654    shlibpath_overrides_runpath=yes
21655    hardcode_into_libs=yes
21656    ;;
21657  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
21658  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
21659    shlibpath_overrides_runpath=no
21660    hardcode_into_libs=yes
21661    ;;
21662  *) # from 4.6 on, and DragonFly
21663    shlibpath_overrides_runpath=yes
21664    hardcode_into_libs=yes
21665    ;;
21666  esac
21667  ;;
21668
21669haiku*)
21670  version_type=linux # correct to gnu/linux during the next big refactor
21671  need_lib_prefix=no
21672  need_version=no
21673  dynamic_linker="$host_os runtime_loader"
21674  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21675  soname_spec='$libname$release$shared_ext$major'
21676  shlibpath_var=LIBRARY_PATH
21677  shlibpath_overrides_runpath=no
21678  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
21679  hardcode_into_libs=yes
21680  ;;
21681
21682hpux9* | hpux10* | hpux11*)
21683  # Give a soname corresponding to the major version so that dld.sl refuses to
21684  # link against other versions.
21685  version_type=sunos
21686  need_lib_prefix=no
21687  need_version=no
21688  case $host_cpu in
21689  ia64*)
21690    shrext_cmds='.so'
21691    hardcode_into_libs=yes
21692    dynamic_linker="$host_os dld.so"
21693    shlibpath_var=LD_LIBRARY_PATH
21694    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21695    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21696    soname_spec='$libname$release$shared_ext$major'
21697    if test 32 = "$HPUX_IA64_MODE"; then
21698      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
21699      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
21700    else
21701      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
21702      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
21703    fi
21704    ;;
21705  hppa*64*)
21706    shrext_cmds='.sl'
21707    hardcode_into_libs=yes
21708    dynamic_linker="$host_os dld.sl"
21709    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
21710    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
21711    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21712    soname_spec='$libname$release$shared_ext$major'
21713    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
21714    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21715    ;;
21716  *)
21717    shrext_cmds='.sl'
21718    dynamic_linker="$host_os dld.sl"
21719    shlibpath_var=SHLIB_PATH
21720    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
21721    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21722    soname_spec='$libname$release$shared_ext$major'
21723    ;;
21724  esac
21725  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
21726  postinstall_cmds='chmod 555 $lib'
21727  # or fails outright, so override atomically:
21728  install_override_mode=555
21729  ;;
21730
21731interix[3-9]*)
21732  version_type=linux # correct to gnu/linux during the next big refactor
21733  need_lib_prefix=no
21734  need_version=no
21735  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21736  soname_spec='$libname$release$shared_ext$major'
21737  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
21738  shlibpath_var=LD_LIBRARY_PATH
21739  shlibpath_overrides_runpath=no
21740  hardcode_into_libs=yes
21741  ;;
21742
21743irix5* | irix6* | nonstopux*)
21744  case $host_os in
21745    nonstopux*) version_type=nonstopux ;;
21746    *)
21747	if test yes = "$lt_cv_prog_gnu_ld"; then
21748		version_type=linux # correct to gnu/linux during the next big refactor
21749	else
21750		version_type=irix
21751	fi ;;
21752  esac
21753  need_lib_prefix=no
21754  need_version=no
21755  soname_spec='$libname$release$shared_ext$major'
21756  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
21757  case $host_os in
21758  irix5* | nonstopux*)
21759    libsuff= shlibsuff=
21760    ;;
21761  *)
21762    case $LD in # libtool.m4 will add one of these switches to LD
21763    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
21764      libsuff= shlibsuff= libmagic=32-bit;;
21765    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
21766      libsuff=32 shlibsuff=N32 libmagic=N32;;
21767    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
21768      libsuff=64 shlibsuff=64 libmagic=64-bit;;
21769    *) libsuff= shlibsuff= libmagic=never-match;;
21770    esac
21771    ;;
21772  esac
21773  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
21774  shlibpath_overrides_runpath=no
21775  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
21776  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
21777  hardcode_into_libs=yes
21778  ;;
21779
21780# No shared lib support for Linux oldld, aout, or coff.
21781linux*oldld* | linux*aout* | linux*coff*)
21782  dynamic_linker=no
21783  ;;
21784
21785linux*android*)
21786  version_type=none # Android doesn't support versioned libraries.
21787  need_lib_prefix=no
21788  need_version=no
21789  library_names_spec='$libname$release$shared_ext'
21790  soname_spec='$libname$release$shared_ext'
21791  finish_cmds=
21792  shlibpath_var=LD_LIBRARY_PATH
21793  shlibpath_overrides_runpath=yes
21794
21795  # This implies no fast_install, which is unacceptable.
21796  # Some rework will be needed to allow for fast_install
21797  # before this can be enabled.
21798  hardcode_into_libs=yes
21799
21800  dynamic_linker='Android linker'
21801  # Don't embed -rpath directories since the linker doesn't support them.
21802  hardcode_libdir_flag_spec='-L$libdir'
21803  ;;
21804
21805# This must be glibc/ELF.
21806linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
21807  version_type=linux # correct to gnu/linux during the next big refactor
21808  need_lib_prefix=no
21809  need_version=no
21810  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21811  soname_spec='$libname$release$shared_ext$major'
21812  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
21813  shlibpath_var=LD_LIBRARY_PATH
21814  shlibpath_overrides_runpath=no
21815
21816  # Some binutils ld are patched to set DT_RUNPATH
21817  if ${lt_cv_shlibpath_overrides_runpath+:} false; then :
21818  $as_echo_n "(cached) " >&6
21819else
21820  lt_cv_shlibpath_overrides_runpath=no
21821    save_LDFLAGS=$LDFLAGS
21822    save_libdir=$libdir
21823    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
21824	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
21825    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21826/* end confdefs.h.  */
21827
21828int
21829main ()
21830{
21831
21832  ;
21833  return 0;
21834}
21835_ACEOF
21836if ac_fn_c_try_link "$LINENO"; then :
21837  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
21838  lt_cv_shlibpath_overrides_runpath=yes
21839fi
21840fi
21841rm -f core conftest.err conftest.$ac_objext \
21842    conftest$ac_exeext conftest.$ac_ext
21843    LDFLAGS=$save_LDFLAGS
21844    libdir=$save_libdir
21845
21846fi
21847
21848  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
21849
21850  # This implies no fast_install, which is unacceptable.
21851  # Some rework will be needed to allow for fast_install
21852  # before this can be enabled.
21853  hardcode_into_libs=yes
21854
21855  # Ideally, we could use ldconfig to report *all* directores which are
21856  # searched for libraries, however this is still not possible.  Aside from not
21857  # being certain /sbin/ldconfig is available, command
21858  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
21859  # even though it is searched at run-time.  Try to do the best guess by
21860  # appending ld.so.conf contents (and includes) to the search path.
21861  if test -f /etc/ld.so.conf; then
21862    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' ' '`
21863    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
21864  fi
21865
21866  # We used to test for /lib/ld.so.1 and disable shared libraries on
21867  # powerpc, because MkLinux only supported shared libraries with the
21868  # GNU dynamic linker.  Since this was broken with cross compilers,
21869  # most powerpc-linux boxes support dynamic linking these days and
21870  # people can always --disable-shared, the test was removed, and we
21871  # assume the GNU/Linux dynamic linker is in use.
21872  dynamic_linker='GNU/Linux ld.so'
21873  ;;
21874
21875netbsd*)
21876  version_type=sunos
21877  need_lib_prefix=no
21878  need_version=no
21879  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
21880    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21881    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21882    dynamic_linker='NetBSD (a.out) ld.so'
21883  else
21884    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21885    soname_spec='$libname$release$shared_ext$major'
21886    dynamic_linker='NetBSD ld.elf_so'
21887  fi
21888  shlibpath_var=LD_LIBRARY_PATH
21889  shlibpath_overrides_runpath=yes
21890  hardcode_into_libs=yes
21891  ;;
21892
21893newsos6)
21894  version_type=linux # correct to gnu/linux during the next big refactor
21895  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21896  shlibpath_var=LD_LIBRARY_PATH
21897  shlibpath_overrides_runpath=yes
21898  ;;
21899
21900*nto* | *qnx*)
21901  version_type=qnx
21902  need_lib_prefix=no
21903  need_version=no
21904  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21905  soname_spec='$libname$release$shared_ext$major'
21906  shlibpath_var=LD_LIBRARY_PATH
21907  shlibpath_overrides_runpath=no
21908  hardcode_into_libs=yes
21909  dynamic_linker='ldqnx.so'
21910  ;;
21911
21912openbsd* | bitrig*)
21913  version_type=sunos
21914  sys_lib_dlsearch_path_spec=/usr/lib
21915  need_lib_prefix=no
21916  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
21917    need_version=no
21918  else
21919    need_version=yes
21920  fi
21921  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21922  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
21923  shlibpath_var=LD_LIBRARY_PATH
21924  shlibpath_overrides_runpath=yes
21925  ;;
21926
21927os2*)
21928  libname_spec='$name'
21929  version_type=windows
21930  shrext_cmds=.dll
21931  need_version=no
21932  need_lib_prefix=no
21933  # OS/2 can only load a DLL with a base name of 8 characters or less.
21934  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
21935    v=$($ECHO $release$versuffix | tr -d .-);
21936    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
21937    $ECHO $n$v`$shared_ext'
21938  library_names_spec='${libname}_dll.$libext'
21939  dynamic_linker='OS/2 ld.exe'
21940  shlibpath_var=BEGINLIBPATH
21941  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
21942  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21943  postinstall_cmds='base_file=`basename \$file`~
21944    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
21945    dldir=$destdir/`dirname \$dlpath`~
21946    test -d \$dldir || mkdir -p \$dldir~
21947    $install_prog $dir/$dlname \$dldir/$dlname~
21948    chmod a+x \$dldir/$dlname~
21949    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
21950      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
21951    fi'
21952  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
21953    dlpath=$dir/\$dldll~
21954    $RM \$dlpath'
21955  ;;
21956
21957osf3* | osf4* | osf5*)
21958  version_type=osf
21959  need_lib_prefix=no
21960  need_version=no
21961  soname_spec='$libname$release$shared_ext$major'
21962  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21963  shlibpath_var=LD_LIBRARY_PATH
21964  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
21965  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
21966  ;;
21967
21968rdos*)
21969  dynamic_linker=no
21970  ;;
21971
21972solaris*)
21973  version_type=linux # correct to gnu/linux during the next big refactor
21974  need_lib_prefix=no
21975  need_version=no
21976  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
21977  soname_spec='$libname$release$shared_ext$major'
21978  shlibpath_var=LD_LIBRARY_PATH
21979  shlibpath_overrides_runpath=yes
21980  hardcode_into_libs=yes
21981  # ldd complains unless libraries are executable
21982  postinstall_cmds='chmod +x $lib'
21983  ;;
21984
21985sunos4*)
21986  version_type=sunos
21987  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
21988  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
21989  shlibpath_var=LD_LIBRARY_PATH
21990  shlibpath_overrides_runpath=yes
21991  if test yes = "$with_gnu_ld"; then
21992    need_lib_prefix=no
21993  fi
21994  need_version=yes
21995  ;;
21996
21997sysv4 | sysv4.3*)
21998  version_type=linux # correct to gnu/linux during the next big refactor
21999  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22000  soname_spec='$libname$release$shared_ext$major'
22001  shlibpath_var=LD_LIBRARY_PATH
22002  case $host_vendor in
22003    sni)
22004      shlibpath_overrides_runpath=no
22005      need_lib_prefix=no
22006      runpath_var=LD_RUN_PATH
22007      ;;
22008    siemens)
22009      need_lib_prefix=no
22010      ;;
22011    motorola)
22012      need_lib_prefix=no
22013      need_version=no
22014      shlibpath_overrides_runpath=no
22015      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
22016      ;;
22017  esac
22018  ;;
22019
22020sysv4*MP*)
22021  if test -d /usr/nec; then
22022    version_type=linux # correct to gnu/linux during the next big refactor
22023    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
22024    soname_spec='$libname$shared_ext.$major'
22025    shlibpath_var=LD_LIBRARY_PATH
22026  fi
22027  ;;
22028
22029sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
22030  version_type=sco
22031  need_lib_prefix=no
22032  need_version=no
22033  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
22034  soname_spec='$libname$release$shared_ext$major'
22035  shlibpath_var=LD_LIBRARY_PATH
22036  shlibpath_overrides_runpath=yes
22037  hardcode_into_libs=yes
22038  if test yes = "$with_gnu_ld"; then
22039    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
22040  else
22041    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
22042    case $host_os in
22043      sco3.2v5*)
22044        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
22045	;;
22046    esac
22047  fi
22048  sys_lib_dlsearch_path_spec='/usr/lib'
22049  ;;
22050
22051tpf*)
22052  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
22053  version_type=linux # correct to gnu/linux during the next big refactor
22054  need_lib_prefix=no
22055  need_version=no
22056  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22057  shlibpath_var=LD_LIBRARY_PATH
22058  shlibpath_overrides_runpath=no
22059  hardcode_into_libs=yes
22060  ;;
22061
22062uts4*)
22063  version_type=linux # correct to gnu/linux during the next big refactor
22064  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
22065  soname_spec='$libname$release$shared_ext$major'
22066  shlibpath_var=LD_LIBRARY_PATH
22067  ;;
22068
22069*)
22070  dynamic_linker=no
22071  ;;
22072esac
22073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
22074$as_echo "$dynamic_linker" >&6; }
22075test no = "$dynamic_linker" && can_build_shared=no
22076
22077variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
22078if test yes = "$GCC"; then
22079  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
22080fi
22081
22082if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
22083  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
22084fi
22085
22086if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
22087  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
22088fi
22089
22090# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
22091configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
22092
22093# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
22094func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
22095
22096# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
22097configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
22098
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  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
22196$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
22197hardcode_action=
22198if test -n "$hardcode_libdir_flag_spec" ||
22199   test -n "$runpath_var" ||
22200   test yes = "$hardcode_automatic"; then
22201
22202  # We can hardcode non-existent directories.
22203  if test no != "$hardcode_direct" &&
22204     # If the only mechanism to avoid hardcoding is shlibpath_var, we
22205     # have to relink, otherwise we might link with an installed library
22206     # when we should be linking with a yet-to-be-installed one
22207     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
22208     test no != "$hardcode_minus_L"; then
22209    # Linking always hardcodes the temporary library directory.
22210    hardcode_action=relink
22211  else
22212    # We can link without hardcoding, and we can hardcode nonexisting dirs.
22213    hardcode_action=immediate
22214  fi
22215else
22216  # We cannot hardcode anything, or else we can only hardcode existing
22217  # directories.
22218  hardcode_action=unsupported
22219fi
22220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
22221$as_echo "$hardcode_action" >&6; }
22222
22223if test relink = "$hardcode_action" ||
22224   test yes = "$inherit_rpath"; then
22225  # Fast installation is not supported
22226  enable_fast_install=no
22227elif test yes = "$shlibpath_overrides_runpath" ||
22228     test no = "$enable_shared"; then
22229  # Fast installation is not necessary
22230  enable_fast_install=needless
22231fi
22232
22233
22234
22235
22236
22237
22238  if test yes != "$enable_dlopen"; then
22239  enable_dlopen=unknown
22240  enable_dlopen_self=unknown
22241  enable_dlopen_self_static=unknown
22242else
22243  lt_cv_dlopen=no
22244  lt_cv_dlopen_libs=
22245
22246  case $host_os in
22247  beos*)
22248    lt_cv_dlopen=load_add_on
22249    lt_cv_dlopen_libs=
22250    lt_cv_dlopen_self=yes
22251    ;;
22252
22253  mingw* | pw32* | cegcc*)
22254    lt_cv_dlopen=LoadLibrary
22255    lt_cv_dlopen_libs=
22256    ;;
22257
22258  cygwin*)
22259    lt_cv_dlopen=dlopen
22260    lt_cv_dlopen_libs=
22261    ;;
22262
22263  darwin*)
22264    # if libdl is installed we need to link against it
22265    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22266$as_echo_n "checking for dlopen in -ldl... " >&6; }
22267if ${ac_cv_lib_dl_dlopen+:} false; then :
22268  $as_echo_n "(cached) " >&6
22269else
22270  ac_check_lib_save_LIBS=$LIBS
22271LIBS="-ldl  $LIBS"
22272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22273/* end confdefs.h.  */
22274
22275/* Override any GCC internal prototype to avoid an error.
22276   Use char because int might match the return type of a GCC
22277   builtin and then its argument prototype would still apply.  */
22278#ifdef __cplusplus
22279extern "C"
22280#endif
22281char dlopen ();
22282int
22283main ()
22284{
22285return dlopen ();
22286  ;
22287  return 0;
22288}
22289_ACEOF
22290if ac_fn_c_try_link "$LINENO"; then :
22291  ac_cv_lib_dl_dlopen=yes
22292else
22293  ac_cv_lib_dl_dlopen=no
22294fi
22295rm -f core conftest.err conftest.$ac_objext \
22296    conftest$ac_exeext conftest.$ac_ext
22297LIBS=$ac_check_lib_save_LIBS
22298fi
22299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22300$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22301if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22302  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22303else
22304
22305    lt_cv_dlopen=dyld
22306    lt_cv_dlopen_libs=
22307    lt_cv_dlopen_self=yes
22308
22309fi
22310
22311    ;;
22312
22313  tpf*)
22314    # Don't try to run any link tests for TPF.  We know it's impossible
22315    # because TPF is a cross-compiler, and we know how we open DSOs.
22316    lt_cv_dlopen=dlopen
22317    lt_cv_dlopen_libs=
22318    lt_cv_dlopen_self=no
22319    ;;
22320
22321  *)
22322    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
22323if test "x$ac_cv_func_shl_load" = xyes; then :
22324  lt_cv_dlopen=shl_load
22325else
22326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
22327$as_echo_n "checking for shl_load in -ldld... " >&6; }
22328if ${ac_cv_lib_dld_shl_load+:} false; then :
22329  $as_echo_n "(cached) " >&6
22330else
22331  ac_check_lib_save_LIBS=$LIBS
22332LIBS="-ldld  $LIBS"
22333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22334/* end confdefs.h.  */
22335
22336/* Override any GCC internal prototype to avoid an error.
22337   Use char because int might match the return type of a GCC
22338   builtin and then its argument prototype would still apply.  */
22339#ifdef __cplusplus
22340extern "C"
22341#endif
22342char shl_load ();
22343int
22344main ()
22345{
22346return shl_load ();
22347  ;
22348  return 0;
22349}
22350_ACEOF
22351if ac_fn_c_try_link "$LINENO"; then :
22352  ac_cv_lib_dld_shl_load=yes
22353else
22354  ac_cv_lib_dld_shl_load=no
22355fi
22356rm -f core conftest.err conftest.$ac_objext \
22357    conftest$ac_exeext conftest.$ac_ext
22358LIBS=$ac_check_lib_save_LIBS
22359fi
22360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
22361$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
22362if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
22363  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
22364else
22365  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
22366if test "x$ac_cv_func_dlopen" = xyes; then :
22367  lt_cv_dlopen=dlopen
22368else
22369  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
22370$as_echo_n "checking for dlopen in -ldl... " >&6; }
22371if ${ac_cv_lib_dl_dlopen+:} false; then :
22372  $as_echo_n "(cached) " >&6
22373else
22374  ac_check_lib_save_LIBS=$LIBS
22375LIBS="-ldl  $LIBS"
22376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22377/* end confdefs.h.  */
22378
22379/* Override any GCC internal prototype to avoid an error.
22380   Use char because int might match the return type of a GCC
22381   builtin and then its argument prototype would still apply.  */
22382#ifdef __cplusplus
22383extern "C"
22384#endif
22385char dlopen ();
22386int
22387main ()
22388{
22389return dlopen ();
22390  ;
22391  return 0;
22392}
22393_ACEOF
22394if ac_fn_c_try_link "$LINENO"; then :
22395  ac_cv_lib_dl_dlopen=yes
22396else
22397  ac_cv_lib_dl_dlopen=no
22398fi
22399rm -f core conftest.err conftest.$ac_objext \
22400    conftest$ac_exeext conftest.$ac_ext
22401LIBS=$ac_check_lib_save_LIBS
22402fi
22403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
22404$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
22405if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
22406  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
22407else
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
22409$as_echo_n "checking for dlopen in -lsvld... " >&6; }
22410if ${ac_cv_lib_svld_dlopen+:} false; then :
22411  $as_echo_n "(cached) " >&6
22412else
22413  ac_check_lib_save_LIBS=$LIBS
22414LIBS="-lsvld  $LIBS"
22415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22416/* end confdefs.h.  */
22417
22418/* Override any GCC internal prototype to avoid an error.
22419   Use char because int might match the return type of a GCC
22420   builtin and then its argument prototype would still apply.  */
22421#ifdef __cplusplus
22422extern "C"
22423#endif
22424char dlopen ();
22425int
22426main ()
22427{
22428return dlopen ();
22429  ;
22430  return 0;
22431}
22432_ACEOF
22433if ac_fn_c_try_link "$LINENO"; then :
22434  ac_cv_lib_svld_dlopen=yes
22435else
22436  ac_cv_lib_svld_dlopen=no
22437fi
22438rm -f core conftest.err conftest.$ac_objext \
22439    conftest$ac_exeext conftest.$ac_ext
22440LIBS=$ac_check_lib_save_LIBS
22441fi
22442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
22443$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
22444if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
22445  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
22446else
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
22448$as_echo_n "checking for dld_link in -ldld... " >&6; }
22449if ${ac_cv_lib_dld_dld_link+:} false; then :
22450  $as_echo_n "(cached) " >&6
22451else
22452  ac_check_lib_save_LIBS=$LIBS
22453LIBS="-ldld  $LIBS"
22454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22455/* end confdefs.h.  */
22456
22457/* Override any GCC internal prototype to avoid an error.
22458   Use char because int might match the return type of a GCC
22459   builtin and then its argument prototype would still apply.  */
22460#ifdef __cplusplus
22461extern "C"
22462#endif
22463char dld_link ();
22464int
22465main ()
22466{
22467return dld_link ();
22468  ;
22469  return 0;
22470}
22471_ACEOF
22472if ac_fn_c_try_link "$LINENO"; then :
22473  ac_cv_lib_dld_dld_link=yes
22474else
22475  ac_cv_lib_dld_dld_link=no
22476fi
22477rm -f core conftest.err conftest.$ac_objext \
22478    conftest$ac_exeext conftest.$ac_ext
22479LIBS=$ac_check_lib_save_LIBS
22480fi
22481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
22482$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
22483if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
22484  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
22485fi
22486
22487
22488fi
22489
22490
22491fi
22492
22493
22494fi
22495
22496
22497fi
22498
22499
22500fi
22501
22502    ;;
22503  esac
22504
22505  if test no = "$lt_cv_dlopen"; then
22506    enable_dlopen=no
22507  else
22508    enable_dlopen=yes
22509  fi
22510
22511  case $lt_cv_dlopen in
22512  dlopen)
22513    save_CPPFLAGS=$CPPFLAGS
22514    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
22515
22516    save_LDFLAGS=$LDFLAGS
22517    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
22518
22519    save_LIBS=$LIBS
22520    LIBS="$lt_cv_dlopen_libs $LIBS"
22521
22522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
22523$as_echo_n "checking whether a program can dlopen itself... " >&6; }
22524if ${lt_cv_dlopen_self+:} false; then :
22525  $as_echo_n "(cached) " >&6
22526else
22527  	  if test yes = "$cross_compiling"; then :
22528  lt_cv_dlopen_self=cross
22529else
22530  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22531  lt_status=$lt_dlunknown
22532  cat > conftest.$ac_ext <<_LT_EOF
22533#line $LINENO "configure"
22534#include "confdefs.h"
22535
22536#if HAVE_DLFCN_H
22537#include <dlfcn.h>
22538#endif
22539
22540#include <stdio.h>
22541
22542#ifdef RTLD_GLOBAL
22543#  define LT_DLGLOBAL		RTLD_GLOBAL
22544#else
22545#  ifdef DL_GLOBAL
22546#    define LT_DLGLOBAL		DL_GLOBAL
22547#  else
22548#    define LT_DLGLOBAL		0
22549#  endif
22550#endif
22551
22552/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22553   find out it does not work in some platform. */
22554#ifndef LT_DLLAZY_OR_NOW
22555#  ifdef RTLD_LAZY
22556#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
22557#  else
22558#    ifdef DL_LAZY
22559#      define LT_DLLAZY_OR_NOW		DL_LAZY
22560#    else
22561#      ifdef RTLD_NOW
22562#        define LT_DLLAZY_OR_NOW	RTLD_NOW
22563#      else
22564#        ifdef DL_NOW
22565#          define LT_DLLAZY_OR_NOW	DL_NOW
22566#        else
22567#          define LT_DLLAZY_OR_NOW	0
22568#        endif
22569#      endif
22570#    endif
22571#  endif
22572#endif
22573
22574/* When -fvisibility=hidden is used, assume the code has been annotated
22575   correspondingly for the symbols needed.  */
22576#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22577int fnord () __attribute__((visibility("default")));
22578#endif
22579
22580int fnord () { return 42; }
22581int main ()
22582{
22583  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22584  int status = $lt_dlunknown;
22585
22586  if (self)
22587    {
22588      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22589      else
22590        {
22591	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22592          else puts (dlerror ());
22593	}
22594      /* dlclose (self); */
22595    }
22596  else
22597    puts (dlerror ());
22598
22599  return status;
22600}
22601_LT_EOF
22602  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22603  (eval $ac_link) 2>&5
22604  ac_status=$?
22605  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22606  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22607    (./conftest; exit; ) >&5 2>/dev/null
22608    lt_status=$?
22609    case x$lt_status in
22610      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
22611      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
22612      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
22613    esac
22614  else :
22615    # compilation failed
22616    lt_cv_dlopen_self=no
22617  fi
22618fi
22619rm -fr conftest*
22620
22621
22622fi
22623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
22624$as_echo "$lt_cv_dlopen_self" >&6; }
22625
22626    if test yes = "$lt_cv_dlopen_self"; then
22627      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
22628      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
22629$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
22630if ${lt_cv_dlopen_self_static+:} false; then :
22631  $as_echo_n "(cached) " >&6
22632else
22633  	  if test yes = "$cross_compiling"; then :
22634  lt_cv_dlopen_self_static=cross
22635else
22636  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
22637  lt_status=$lt_dlunknown
22638  cat > conftest.$ac_ext <<_LT_EOF
22639#line $LINENO "configure"
22640#include "confdefs.h"
22641
22642#if HAVE_DLFCN_H
22643#include <dlfcn.h>
22644#endif
22645
22646#include <stdio.h>
22647
22648#ifdef RTLD_GLOBAL
22649#  define LT_DLGLOBAL		RTLD_GLOBAL
22650#else
22651#  ifdef DL_GLOBAL
22652#    define LT_DLGLOBAL		DL_GLOBAL
22653#  else
22654#    define LT_DLGLOBAL		0
22655#  endif
22656#endif
22657
22658/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
22659   find out it does not work in some platform. */
22660#ifndef LT_DLLAZY_OR_NOW
22661#  ifdef RTLD_LAZY
22662#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
22663#  else
22664#    ifdef DL_LAZY
22665#      define LT_DLLAZY_OR_NOW		DL_LAZY
22666#    else
22667#      ifdef RTLD_NOW
22668#        define LT_DLLAZY_OR_NOW	RTLD_NOW
22669#      else
22670#        ifdef DL_NOW
22671#          define LT_DLLAZY_OR_NOW	DL_NOW
22672#        else
22673#          define LT_DLLAZY_OR_NOW	0
22674#        endif
22675#      endif
22676#    endif
22677#  endif
22678#endif
22679
22680/* When -fvisibility=hidden is used, assume the code has been annotated
22681   correspondingly for the symbols needed.  */
22682#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
22683int fnord () __attribute__((visibility("default")));
22684#endif
22685
22686int fnord () { return 42; }
22687int main ()
22688{
22689  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
22690  int status = $lt_dlunknown;
22691
22692  if (self)
22693    {
22694      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
22695      else
22696        {
22697	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
22698          else puts (dlerror ());
22699	}
22700      /* dlclose (self); */
22701    }
22702  else
22703    puts (dlerror ());
22704
22705  return status;
22706}
22707_LT_EOF
22708  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
22709  (eval $ac_link) 2>&5
22710  ac_status=$?
22711  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
22712  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
22713    (./conftest; exit; ) >&5 2>/dev/null
22714    lt_status=$?
22715    case x$lt_status in
22716      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
22717      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
22718      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
22719    esac
22720  else :
22721    # compilation failed
22722    lt_cv_dlopen_self_static=no
22723  fi
22724fi
22725rm -fr conftest*
22726
22727
22728fi
22729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
22730$as_echo "$lt_cv_dlopen_self_static" >&6; }
22731    fi
22732
22733    CPPFLAGS=$save_CPPFLAGS
22734    LDFLAGS=$save_LDFLAGS
22735    LIBS=$save_LIBS
22736    ;;
22737  esac
22738
22739  case $lt_cv_dlopen_self in
22740  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
22741  *) enable_dlopen_self=unknown ;;
22742  esac
22743
22744  case $lt_cv_dlopen_self_static in
22745  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
22746  *) enable_dlopen_self_static=unknown ;;
22747  esac
22748fi
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766striplib=
22767old_striplib=
22768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
22769$as_echo_n "checking whether stripping libraries is possible... " >&6; }
22770if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
22771  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
22772  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
22773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22774$as_echo "yes" >&6; }
22775else
22776# FIXME - insert some real tests, host_os isn't really good enough
22777  case $host_os in
22778  darwin*)
22779    if test -n "$STRIP"; then
22780      striplib="$STRIP -x"
22781      old_striplib="$STRIP -S"
22782      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22783$as_echo "yes" >&6; }
22784    else
22785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22786$as_echo "no" >&6; }
22787    fi
22788    ;;
22789  *)
22790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22791$as_echo "no" >&6; }
22792    ;;
22793  esac
22794fi
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807  # Report what library types will actually be built
22808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
22809$as_echo_n "checking if libtool supports shared libraries... " >&6; }
22810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
22811$as_echo "$can_build_shared" >&6; }
22812
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
22814$as_echo_n "checking whether to build shared libraries... " >&6; }
22815  test no = "$can_build_shared" && enable_shared=no
22816
22817  # On AIX, shared libraries and static libraries use the same namespace, and
22818  # are all built from PIC.
22819  case $host_os in
22820  aix3*)
22821    test yes = "$enable_shared" && enable_static=no
22822    if test -n "$RANLIB"; then
22823      archive_cmds="$archive_cmds~\$RANLIB \$lib"
22824      postinstall_cmds='$RANLIB $lib'
22825    fi
22826    ;;
22827
22828  aix[4-9]*)
22829    if test ia64 != "$host_cpu"; then
22830      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
22831      yes,aix,yes) ;;			# shared object as lib.so file only
22832      yes,svr4,*) ;;			# shared object as lib.so archive member only
22833      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
22834      esac
22835    fi
22836    ;;
22837  esac
22838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
22839$as_echo "$enable_shared" >&6; }
22840
22841  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
22842$as_echo_n "checking whether to build static libraries... " >&6; }
22843  # Make sure either enable_shared or enable_static is yes.
22844  test yes = "$enable_shared" || enable_static=yes
22845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
22846$as_echo "$enable_static" >&6; }
22847
22848
22849
22850
22851fi
22852ac_ext=c
22853ac_cpp='$CPP $CPPFLAGS'
22854ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22855ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22856ac_compiler_gnu=$ac_cv_c_compiler_gnu
22857
22858CC=$lt_save_CC
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874        ac_config_commands="$ac_config_commands libtool"
22875
22876
22877
22878
22879# Only expand once:
22880
22881
22882
22883
22884
22885
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
22887$as_echo_n "checking if sntp will be built... " >&6; }
22888
22889# Check whether --with-sntp was given.
22890if test "${with_sntp+set}" = set; then :
22891  withval=$with_sntp;
22892else
22893  with_sntp="${withsntp=yes}"
22894
22895fi
22896
22897case "$with_sntp" in
22898 no)
22899    SNTP=
22900    ;;
22901 *)
22902    SNTP=sntp
22903    ;;
22904esac
22905
22906 if test -n "$SNTP"; then
22907  BUILD_SNTP_TRUE=
22908  BUILD_SNTP_FALSE='#'
22909else
22910  BUILD_SNTP_TRUE='#'
22911  BUILD_SNTP_FALSE=
22912fi
22913
22914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
22915$as_echo "$with_sntp" >&6; }
22916
22917
22918
22919case "$SNTP" in
22920 '')
22921    SNTP_DB=
22922    SNTP_DL=
22923    SNTP_DS=
22924    ;;
22925esac
22926
22927###
22928
22929# NTP has (so far) been relying on leading-edge autogen.
22930# Therefore, by default:
22931# - use the version we ship with
22932# - do not install it
22933# - build a static copy (AC_DISABLE_SHARED - done earlier)
22934case "${enable_local_libopts+set}" in
22935 set) ;;
22936 *) enable_local_libopts=yes ;;
22937esac
22938case "${enable_libopts_install+set}" in
22939 set) ;;
22940 *) enable_libopts_install=no ;;
22941esac
22942enable_nls=no
22943
22944
22945  ac_header_dirent=no
22946for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
22947  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
22948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
22949$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
22950if eval \${$as_ac_Header+:} false; then :
22951  $as_echo_n "(cached) " >&6
22952else
22953  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22954/* end confdefs.h.  */
22955#include <sys/types.h>
22956#include <$ac_hdr>
22957
22958int
22959main ()
22960{
22961if ((DIR *) 0)
22962return 0;
22963  ;
22964  return 0;
22965}
22966_ACEOF
22967if ac_fn_c_try_compile "$LINENO"; then :
22968  eval "$as_ac_Header=yes"
22969else
22970  eval "$as_ac_Header=no"
22971fi
22972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22973fi
22974eval ac_res=\$$as_ac_Header
22975	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22976$as_echo "$ac_res" >&6; }
22977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
22978  cat >>confdefs.h <<_ACEOF
22979#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
22980_ACEOF
22981
22982ac_header_dirent=$ac_hdr; break
22983fi
22984
22985done
22986# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
22987if test $ac_header_dirent = dirent.h; then
22988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
22989$as_echo_n "checking for library containing opendir... " >&6; }
22990if ${ac_cv_search_opendir+:} false; then :
22991  $as_echo_n "(cached) " >&6
22992else
22993  ac_func_search_save_LIBS=$LIBS
22994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22995/* end confdefs.h.  */
22996
22997/* Override any GCC internal prototype to avoid an error.
22998   Use char because int might match the return type of a GCC
22999   builtin and then its argument prototype would still apply.  */
23000#ifdef __cplusplus
23001extern "C"
23002#endif
23003char opendir ();
23004int
23005main ()
23006{
23007return opendir ();
23008  ;
23009  return 0;
23010}
23011_ACEOF
23012for ac_lib in '' dir; do
23013  if test -z "$ac_lib"; then
23014    ac_res="none required"
23015  else
23016    ac_res=-l$ac_lib
23017    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23018  fi
23019  if ac_fn_c_try_link "$LINENO"; then :
23020  ac_cv_search_opendir=$ac_res
23021fi
23022rm -f core conftest.err conftest.$ac_objext \
23023    conftest$ac_exeext
23024  if ${ac_cv_search_opendir+:} false; then :
23025  break
23026fi
23027done
23028if ${ac_cv_search_opendir+:} false; then :
23029
23030else
23031  ac_cv_search_opendir=no
23032fi
23033rm conftest.$ac_ext
23034LIBS=$ac_func_search_save_LIBS
23035fi
23036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23037$as_echo "$ac_cv_search_opendir" >&6; }
23038ac_res=$ac_cv_search_opendir
23039if test "$ac_res" != no; then :
23040  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23041
23042fi
23043
23044else
23045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
23046$as_echo_n "checking for library containing opendir... " >&6; }
23047if ${ac_cv_search_opendir+:} false; then :
23048  $as_echo_n "(cached) " >&6
23049else
23050  ac_func_search_save_LIBS=$LIBS
23051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23052/* end confdefs.h.  */
23053
23054/* Override any GCC internal prototype to avoid an error.
23055   Use char because int might match the return type of a GCC
23056   builtin and then its argument prototype would still apply.  */
23057#ifdef __cplusplus
23058extern "C"
23059#endif
23060char opendir ();
23061int
23062main ()
23063{
23064return opendir ();
23065  ;
23066  return 0;
23067}
23068_ACEOF
23069for ac_lib in '' x; do
23070  if test -z "$ac_lib"; then
23071    ac_res="none required"
23072  else
23073    ac_res=-l$ac_lib
23074    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
23075  fi
23076  if ac_fn_c_try_link "$LINENO"; then :
23077  ac_cv_search_opendir=$ac_res
23078fi
23079rm -f core conftest.err conftest.$ac_objext \
23080    conftest$ac_exeext
23081  if ${ac_cv_search_opendir+:} false; then :
23082  break
23083fi
23084done
23085if ${ac_cv_search_opendir+:} false; then :
23086
23087else
23088  ac_cv_search_opendir=no
23089fi
23090rm conftest.$ac_ext
23091LIBS=$ac_func_search_save_LIBS
23092fi
23093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
23094$as_echo "$ac_cv_search_opendir" >&6; }
23095ac_res=$ac_cv_search_opendir
23096if test "$ac_res" != no; then :
23097  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
23098
23099fi
23100
23101fi
23102
23103
23104  # =================
23105  # AC_CHECK_HEADERS
23106  # =================
23107  for ac_header in  \
23108      sys/mman.h    sys/param.h   sys/poll.h    sys/procset.h \
23109      sys/select.h  sys/socket.h  sys/stropts.h sys/time.h \
23110      sys/un.h      sys/wait.h    dlfcn.h       errno.h \
23111      fcntl.h       libgen.h      libintl.h     memory.h \
23112      netinet/in.h  setjmp.h      stdbool.h     sysexits.h \
23113      unistd.h      utime.h
23114do :
23115  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23116ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23117if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23118  cat >>confdefs.h <<_ACEOF
23119#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23120_ACEOF
23121
23122fi
23123
23124done
23125
23126
23127  for ac_header in stdarg.h     varargs.h
23128do :
23129  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23130ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23131if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23132  cat >>confdefs.h <<_ACEOF
23133#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23134_ACEOF
23135 lo_have_arg_hdr=true;break
23136else
23137  lo_have_arg_hdr=false
23138fi
23139
23140done
23141
23142
23143  for ac_header in string.h     strings.h
23144do :
23145  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23146ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23147if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23148  cat >>confdefs.h <<_ACEOF
23149#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23150_ACEOF
23151 lo_have_str_hdr=true;break
23152else
23153  lo_have_str_hdr=false
23154fi
23155
23156done
23157
23158
23159  for ac_header in limits.h     sys/limits.h  values.h
23160do :
23161  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23162ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23163if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23164  cat >>confdefs.h <<_ACEOF
23165#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23166_ACEOF
23167 lo_have_lim_hdr=true;break
23168else
23169  lo_have_lim_hdr=false
23170fi
23171
23172done
23173
23174
23175  for ac_header in inttypes.h   stdint.h
23176do :
23177  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23178ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
23179if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23180  cat >>confdefs.h <<_ACEOF
23181#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23182_ACEOF
23183 lo_have_typ_hdr=true;break
23184else
23185  lo_have_typ_hdr=false
23186fi
23187
23188done
23189
23190
23191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
23192$as_echo_n "checking for working stdnoreturn.h... " >&6; }
23193if ${gl_cv_header_working_stdnoreturn_h+:} false; then :
23194  $as_echo_n "(cached) " >&6
23195else
23196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23197/* end confdefs.h.  */
23198#include <stdlib.h>
23199            #include <stdnoreturn.h>
23200            /* Do not check for 'noreturn' after the return type.
23201               C11 allows it, but it's rarely done that way
23202               and circa-2012 bleeding-edge GCC rejects it when given
23203               -Werror=old-style-declaration.  */
23204            noreturn void foo1 (void) { exit (0); }
23205            _Noreturn void foo2 (void) { exit (0); }
23206            int testit (int argc, char **argv) {
23207              if (argc & 1)
23208                return 0;
23209              (argv[0][0] ? foo1 : foo2) ();
23210            }
23211
23212int
23213main ()
23214{
23215
23216  ;
23217  return 0;
23218}
23219_ACEOF
23220if ac_fn_c_try_compile "$LINENO"; then :
23221  gl_cv_header_working_stdnoreturn_h=yes
23222else
23223  gl_cv_header_working_stdnoreturn_h=no
23224fi
23225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23226fi
23227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
23228$as_echo "$gl_cv_header_working_stdnoreturn_h" >&6; }
23229
23230  if test $gl_cv_header_working_stdnoreturn_h = yes; then
23231    STDNORETURN_H=''
23232  else
23233    STDNORETURN_H='stdnoreturn.h'
23234  fi
23235
23236
23237   if test -n "$STDNORETURN_H"; then
23238  GL_GENERATE_STDNORETURN_H_TRUE=
23239  GL_GENERATE_STDNORETURN_H_FALSE='#'
23240else
23241  GL_GENERATE_STDNORETURN_H_TRUE='#'
23242  GL_GENERATE_STDNORETURN_H_FALSE=
23243fi
23244
23245
23246
23247  # ----------------------------------------------------------------------
23248  # check for various programs used during the build.
23249  # On OS/X, "wchar.h" needs "runetype.h" to work properly.
23250  # ----------------------------------------------------------------------
23251  for ac_header in runetype.h wchar.h
23252do :
23253  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
23254ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
23255  $ac_includes_default
23256  #if HAVE_RUNETYPE_H
23257  # include <runetype.h>
23258  #endif
23259
23260"
23261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
23262  cat >>confdefs.h <<_ACEOF
23263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
23264_ACEOF
23265
23266fi
23267
23268done
23269
23270
23271  # Check whether --enable-nls was given.
23272if test "${enable_nls+set}" = set; then :
23273  enableval=$enable_nls;
23274fi
23275
23276  if test "x$enable_nls" != "xno" && \
23277  test "X${ac_cv_header_libintl_h}" = Xyes; then :
23278
23279
23280$as_echo "#define ENABLE_NLS 1" >>confdefs.h
23281
23282fi
23283
23284  # --------------------------------------------
23285  # Verify certain entries from AC_CHECK_HEADERS
23286  # --------------------------------------------
23287  ${lo_have_arg_hdr} || \
23288    as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
23289
23290  ${lo_have_str_hdr} || \
23291    as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
23292
23293  ${lo_have_lim_hdr} || \
23294    as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
23295
23296  ${lo_have_typ_hdr} || \
23297    as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
23298
23299  for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
23300  do eval as_ac_var=\${ac_cv_header_${f}_h}
23301     test "X${as_ac_var}" = Xyes || {
23302       as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
23303     }
23304  done
23305  test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
23306    echo '#include <stdint.h>' > inttypes.h
23307
23308  # ----------------------------------------------------------------------
23309  # Checks for typedefs
23310  # ----------------------------------------------------------------------
23311  ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
23312if test "x$ac_cv_type_wchar_t" = xyes; then :
23313
23314cat >>confdefs.h <<_ACEOF
23315#define HAVE_WCHAR_T 1
23316_ACEOF
23317
23318
23319fi
23320
23321  ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
23322    $ac_includes_default
23323    #if HAVE_RUNETYPE_H
23324    # include <runetype.h>
23325    #endif
23326    #if HAVE_WCHAR_H
23327    # include <wchar.h>
23328    #endif
23329
23330"
23331if test "x$ac_cv_type_wint_t" = xyes; then :
23332
23333cat >>confdefs.h <<_ACEOF
23334#define HAVE_WINT_T 1
23335_ACEOF
23336
23337
23338fi
23339
23340  ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
23341if test "x$ac_cv_type_int8_t" = xyes; then :
23342
23343cat >>confdefs.h <<_ACEOF
23344#define HAVE_INT8_T 1
23345_ACEOF
23346
23347
23348fi
23349ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
23350if test "x$ac_cv_type_uint8_t" = xyes; then :
23351
23352cat >>confdefs.h <<_ACEOF
23353#define HAVE_UINT8_T 1
23354_ACEOF
23355
23356
23357fi
23358ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
23359if test "x$ac_cv_type_int16_t" = xyes; then :
23360
23361cat >>confdefs.h <<_ACEOF
23362#define HAVE_INT16_T 1
23363_ACEOF
23364
23365
23366fi
23367ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
23368if test "x$ac_cv_type_uint16_t" = xyes; then :
23369
23370cat >>confdefs.h <<_ACEOF
23371#define HAVE_UINT16_T 1
23372_ACEOF
23373
23374
23375fi
23376ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
23377if test "x$ac_cv_type_int32_t" = xyes; then :
23378
23379cat >>confdefs.h <<_ACEOF
23380#define HAVE_INT32_T 1
23381_ACEOF
23382
23383
23384fi
23385ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
23386if test "x$ac_cv_type_uint32_t" = xyes; then :
23387
23388cat >>confdefs.h <<_ACEOF
23389#define HAVE_UINT32_T 1
23390_ACEOF
23391
23392
23393fi
23394ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
23395if test "x$ac_cv_type_intptr_t" = xyes; then :
23396
23397cat >>confdefs.h <<_ACEOF
23398#define HAVE_INTPTR_T 1
23399_ACEOF
23400
23401
23402fi
23403ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
23404if test "x$ac_cv_type_uintptr_t" = xyes; then :
23405
23406cat >>confdefs.h <<_ACEOF
23407#define HAVE_UINTPTR_T 1
23408_ACEOF
23409
23410
23411fi
23412ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
23413if test "x$ac_cv_type_uint_t" = xyes; then :
23414
23415cat >>confdefs.h <<_ACEOF
23416#define HAVE_UINT_T 1
23417_ACEOF
23418
23419
23420fi
23421ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
23422if test "x$ac_cv_type_pid_t" = xyes; then :
23423
23424cat >>confdefs.h <<_ACEOF
23425#define HAVE_PID_T 1
23426_ACEOF
23427
23428
23429fi
23430ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
23431if test "x$ac_cv_type_size_t" = xyes; then :
23432
23433cat >>confdefs.h <<_ACEOF
23434#define HAVE_SIZE_T 1
23435_ACEOF
23436
23437
23438fi
23439ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
23440if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
23441
23442cat >>confdefs.h <<_ACEOF
23443#define HAVE_PTRDIFF_T 1
23444_ACEOF
23445
23446
23447fi
23448
23449  # The cast to long int works around a bug in the HP C Compiler
23450# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23451# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23452# This bug is HP SR number 8606223364.
23453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
23454$as_echo_n "checking size of char *... " >&6; }
23455if ${ac_cv_sizeof_char_p+:} false; then :
23456  $as_echo_n "(cached) " >&6
23457else
23458  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"; then :
23459
23460else
23461  if test "$ac_cv_type_char_p" = yes; then
23462     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23463$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23464as_fn_error 77 "cannot compute sizeof (char *)
23465See \`config.log' for more details" "$LINENO" 5; }
23466   else
23467     ac_cv_sizeof_char_p=0
23468   fi
23469fi
23470
23471fi
23472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
23473$as_echo "$ac_cv_sizeof_char_p" >&6; }
23474
23475
23476
23477cat >>confdefs.h <<_ACEOF
23478#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
23479_ACEOF
23480
23481
23482  # The cast to long int works around a bug in the HP C Compiler
23483# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23484# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23485# This bug is HP SR number 8606223364.
23486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
23487$as_echo_n "checking size of int... " >&6; }
23488if ${ac_cv_sizeof_int+:} false; then :
23489  $as_echo_n "(cached) " >&6
23490else
23491  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
23492
23493else
23494  if test "$ac_cv_type_int" = yes; then
23495     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23496$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23497as_fn_error 77 "cannot compute sizeof (int)
23498See \`config.log' for more details" "$LINENO" 5; }
23499   else
23500     ac_cv_sizeof_int=0
23501   fi
23502fi
23503
23504fi
23505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
23506$as_echo "$ac_cv_sizeof_int" >&6; }
23507
23508
23509
23510cat >>confdefs.h <<_ACEOF
23511#define SIZEOF_INT $ac_cv_sizeof_int
23512_ACEOF
23513
23514
23515  # The cast to long int works around a bug in the HP C Compiler
23516# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23517# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23518# This bug is HP SR number 8606223364.
23519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
23520$as_echo_n "checking size of long... " >&6; }
23521if ${ac_cv_sizeof_long+:} false; then :
23522  $as_echo_n "(cached) " >&6
23523else
23524  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"; then :
23525
23526else
23527  if test "$ac_cv_type_long" = yes; then
23528     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23530as_fn_error 77 "cannot compute sizeof (long)
23531See \`config.log' for more details" "$LINENO" 5; }
23532   else
23533     ac_cv_sizeof_long=0
23534   fi
23535fi
23536
23537fi
23538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
23539$as_echo "$ac_cv_sizeof_long" >&6; }
23540
23541
23542
23543cat >>confdefs.h <<_ACEOF
23544#define SIZEOF_LONG $ac_cv_sizeof_long
23545_ACEOF
23546
23547
23548  # The cast to long int works around a bug in the HP C Compiler
23549# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23550# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23551# This bug is HP SR number 8606223364.
23552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
23553$as_echo_n "checking size of short... " >&6; }
23554if ${ac_cv_sizeof_short+:} false; then :
23555  $as_echo_n "(cached) " >&6
23556else
23557  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"; then :
23558
23559else
23560  if test "$ac_cv_type_short" = yes; then
23561     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23563as_fn_error 77 "cannot compute sizeof (short)
23564See \`config.log' for more details" "$LINENO" 5; }
23565   else
23566     ac_cv_sizeof_short=0
23567   fi
23568fi
23569
23570fi
23571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
23572$as_echo "$ac_cv_sizeof_short" >&6; }
23573
23574
23575
23576cat >>confdefs.h <<_ACEOF
23577#define SIZEOF_SHORT $ac_cv_sizeof_short
23578_ACEOF
23579
23580
23581
23582  # ------------
23583  # AC_CHECK_LIB
23584  # ------------
23585  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
23586$as_echo_n "checking for pathfind in -lgen... " >&6; }
23587if ${ac_cv_lib_gen_pathfind+:} false; then :
23588  $as_echo_n "(cached) " >&6
23589else
23590  ac_check_lib_save_LIBS=$LIBS
23591LIBS="-lgen  $LIBS"
23592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23593/* end confdefs.h.  */
23594
23595/* Override any GCC internal prototype to avoid an error.
23596   Use char because int might match the return type of a GCC
23597   builtin and then its argument prototype would still apply.  */
23598#ifdef __cplusplus
23599extern "C"
23600#endif
23601char pathfind ();
23602int
23603main ()
23604{
23605return pathfind ();
23606  ;
23607  return 0;
23608}
23609_ACEOF
23610if ac_fn_c_try_link "$LINENO"; then :
23611  ac_cv_lib_gen_pathfind=yes
23612else
23613  ac_cv_lib_gen_pathfind=no
23614fi
23615rm -f core conftest.err conftest.$ac_objext \
23616    conftest$ac_exeext conftest.$ac_ext
23617LIBS=$ac_check_lib_save_LIBS
23618fi
23619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
23620$as_echo "$ac_cv_lib_gen_pathfind" >&6; }
23621if test "x$ac_cv_lib_gen_pathfind" = xyes; then :
23622  cat >>confdefs.h <<_ACEOF
23623#define HAVE_LIBGEN 1
23624_ACEOF
23625
23626  LIBS="-lgen $LIBS"
23627
23628fi
23629
23630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
23631$as_echo_n "checking for gettext in -lintl... " >&6; }
23632if ${ac_cv_lib_intl_gettext+:} false; then :
23633  $as_echo_n "(cached) " >&6
23634else
23635  ac_check_lib_save_LIBS=$LIBS
23636LIBS="-lintl  $LIBS"
23637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23638/* end confdefs.h.  */
23639
23640/* Override any GCC internal prototype to avoid an error.
23641   Use char because int might match the return type of a GCC
23642   builtin and then its argument prototype would still apply.  */
23643#ifdef __cplusplus
23644extern "C"
23645#endif
23646char gettext ();
23647int
23648main ()
23649{
23650return gettext ();
23651  ;
23652  return 0;
23653}
23654_ACEOF
23655if ac_fn_c_try_link "$LINENO"; then :
23656  ac_cv_lib_intl_gettext=yes
23657else
23658  ac_cv_lib_intl_gettext=no
23659fi
23660rm -f core conftest.err conftest.$ac_objext \
23661    conftest$ac_exeext conftest.$ac_ext
23662LIBS=$ac_check_lib_save_LIBS
23663fi
23664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
23665$as_echo "$ac_cv_lib_intl_gettext" >&6; }
23666if test "x$ac_cv_lib_intl_gettext" = xyes; then :
23667  cat >>confdefs.h <<_ACEOF
23668#define HAVE_LIBINTL 1
23669_ACEOF
23670
23671  LIBS="-lintl $LIBS"
23672
23673fi
23674
23675  for ac_func in vprintf
23676do :
23677  ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf"
23678if test "x$ac_cv_func_vprintf" = xyes; then :
23679  cat >>confdefs.h <<_ACEOF
23680#define HAVE_VPRINTF 1
23681_ACEOF
23682
23683ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
23684if test "x$ac_cv_func__doprnt" = xyes; then :
23685
23686$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h
23687
23688fi
23689
23690fi
23691done
23692
23693
23694  for ac_header in vfork.h
23695do :
23696  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
23697if test "x$ac_cv_header_vfork_h" = xyes; then :
23698  cat >>confdefs.h <<_ACEOF
23699#define HAVE_VFORK_H 1
23700_ACEOF
23701
23702fi
23703
23704done
23705
23706for ac_func in fork vfork
23707do :
23708  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23709ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23710if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23711  cat >>confdefs.h <<_ACEOF
23712#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23713_ACEOF
23714
23715fi
23716done
23717
23718if test "x$ac_cv_func_fork" = xyes; then
23719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
23720$as_echo_n "checking for working fork... " >&6; }
23721if ${ac_cv_func_fork_works+:} false; then :
23722  $as_echo_n "(cached) " >&6
23723else
23724  if test "$cross_compiling" = yes; then :
23725  ac_cv_func_fork_works=cross
23726else
23727  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23728/* end confdefs.h.  */
23729$ac_includes_default
23730int
23731main ()
23732{
23733
23734	  /* By Ruediger Kuhlmann. */
23735	  return fork () < 0;
23736
23737  ;
23738  return 0;
23739}
23740_ACEOF
23741if ac_fn_c_try_run "$LINENO"; then :
23742  ac_cv_func_fork_works=yes
23743else
23744  ac_cv_func_fork_works=no
23745fi
23746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23747  conftest.$ac_objext conftest.beam conftest.$ac_ext
23748fi
23749
23750fi
23751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
23752$as_echo "$ac_cv_func_fork_works" >&6; }
23753
23754else
23755  ac_cv_func_fork_works=$ac_cv_func_fork
23756fi
23757if test "x$ac_cv_func_fork_works" = xcross; then
23758  case $host in
23759    *-*-amigaos* | *-*-msdosdjgpp*)
23760      # Override, as these systems have only a dummy fork() stub
23761      ac_cv_func_fork_works=no
23762      ;;
23763    *)
23764      ac_cv_func_fork_works=yes
23765      ;;
23766  esac
23767  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23768$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
23769fi
23770ac_cv_func_vfork_works=$ac_cv_func_vfork
23771if test "x$ac_cv_func_vfork" = xyes; then
23772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
23773$as_echo_n "checking for working vfork... " >&6; }
23774if ${ac_cv_func_vfork_works+:} false; then :
23775  $as_echo_n "(cached) " >&6
23776else
23777  if test "$cross_compiling" = yes; then :
23778  ac_cv_func_vfork_works=cross
23779else
23780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23781/* end confdefs.h.  */
23782/* Thanks to Paul Eggert for this test.  */
23783$ac_includes_default
23784#include <sys/wait.h>
23785#ifdef HAVE_VFORK_H
23786# include <vfork.h>
23787#endif
23788/* On some sparc systems, changes by the child to local and incoming
23789   argument registers are propagated back to the parent.  The compiler
23790   is told about this with #include <vfork.h>, but some compilers
23791   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23792   static variable whose address is put into a register that is
23793   clobbered by the vfork.  */
23794static void
23795#ifdef __cplusplus
23796sparc_address_test (int arg)
23797# else
23798sparc_address_test (arg) int arg;
23799#endif
23800{
23801  static pid_t child;
23802  if (!child) {
23803    child = vfork ();
23804    if (child < 0) {
23805      perror ("vfork");
23806      _exit(2);
23807    }
23808    if (!child) {
23809      arg = getpid();
23810      write(-1, "", 0);
23811      _exit (arg);
23812    }
23813  }
23814}
23815
23816int
23817main ()
23818{
23819  pid_t parent = getpid ();
23820  pid_t child;
23821
23822  sparc_address_test (0);
23823
23824  child = vfork ();
23825
23826  if (child == 0) {
23827    /* Here is another test for sparc vfork register problems.  This
23828       test uses lots of local variables, at least as many local
23829       variables as main has allocated so far including compiler
23830       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23831       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23832       reuse the register of parent for one of the local variables,
23833       since it will think that parent can't possibly be used any more
23834       in this routine.  Assigning to the local variable will thus
23835       munge parent in the parent process.  */
23836    pid_t
23837      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23838      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23839    /* Convince the compiler that p..p7 are live; otherwise, it might
23840       use the same hardware register for all 8 local variables.  */
23841    if (p != p1 || p != p2 || p != p3 || p != p4
23842	|| p != p5 || p != p6 || p != p7)
23843      _exit(1);
23844
23845    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23846       from child file descriptors.  If the child closes a descriptor
23847       before it execs or exits, this munges the parent's descriptor
23848       as well.  Test for this by closing stdout in the child.  */
23849    _exit(close(fileno(stdout)) != 0);
23850  } else {
23851    int status;
23852    struct stat st;
23853
23854    while (wait(&status) != child)
23855      ;
23856    return (
23857	 /* Was there some problem with vforking?  */
23858	 child < 0
23859
23860	 /* Did the child fail?  (This shouldn't happen.)  */
23861	 || status
23862
23863	 /* Did the vfork/compiler bug occur?  */
23864	 || parent != getpid()
23865
23866	 /* Did the file descriptor bug occur?  */
23867	 || fstat(fileno(stdout), &st) != 0
23868	 );
23869  }
23870}
23871_ACEOF
23872if ac_fn_c_try_run "$LINENO"; then :
23873  ac_cv_func_vfork_works=yes
23874else
23875  ac_cv_func_vfork_works=no
23876fi
23877rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23878  conftest.$ac_objext conftest.beam conftest.$ac_ext
23879fi
23880
23881fi
23882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
23883$as_echo "$ac_cv_func_vfork_works" >&6; }
23884
23885fi;
23886if test "x$ac_cv_func_fork_works" = xcross; then
23887  ac_cv_func_vfork_works=$ac_cv_func_vfork
23888  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23889$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
23890fi
23891
23892if test "x$ac_cv_func_vfork_works" = xyes; then
23893
23894$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
23895
23896else
23897
23898$as_echo "#define vfork fork" >>confdefs.h
23899
23900fi
23901if test "x$ac_cv_func_fork_works" = xyes; then
23902
23903$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
23904
23905fi
23906
23907  for ac_func in mmap canonicalize_file_name snprintf strdup strchr \
23908                 strrchr strsignal fchmod fstat chmod
23909do :
23910  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23911ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
23912if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
23913  cat >>confdefs.h <<_ACEOF
23914#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
23915_ACEOF
23916
23917fi
23918done
23919
23920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
23921$as_echo_n "checking for a sed that does not truncate output... " >&6; }
23922if ${ac_cv_path_SED+:} false; then :
23923  $as_echo_n "(cached) " >&6
23924else
23925            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
23926     for ac_i in 1 2 3 4 5 6 7; do
23927       ac_script="$ac_script$as_nl$ac_script"
23928     done
23929     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
23930     { ac_script=; unset ac_script;}
23931     if test -z "$SED"; then
23932  ac_path_SED_found=false
23933  # Loop through the user's path and test for each of PROGNAME-LIST
23934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23935for as_dir in $PATH
23936do
23937  IFS=$as_save_IFS
23938  test -z "$as_dir" && as_dir=.
23939    for ac_prog in sed gsed; do
23940    for ac_exec_ext in '' $ac_executable_extensions; do
23941      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
23942      as_fn_executable_p "$ac_path_SED" || continue
23943# Check for GNU ac_path_SED and select it if it is found.
23944  # Check for GNU $ac_path_SED
23945case `"$ac_path_SED" --version 2>&1` in
23946*GNU*)
23947  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
23948*)
23949  ac_count=0
23950  $as_echo_n 0123456789 >"conftest.in"
23951  while :
23952  do
23953    cat "conftest.in" "conftest.in" >"conftest.tmp"
23954    mv "conftest.tmp" "conftest.in"
23955    cp "conftest.in" "conftest.nl"
23956    $as_echo '' >> "conftest.nl"
23957    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
23958    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
23959    as_fn_arith $ac_count + 1 && ac_count=$as_val
23960    if test $ac_count -gt ${ac_path_SED_max-0}; then
23961      # Best one so far, save it but keep looking for a better one
23962      ac_cv_path_SED="$ac_path_SED"
23963      ac_path_SED_max=$ac_count
23964    fi
23965    # 10*(2^10) chars as input seems more than enough
23966    test $ac_count -gt 10 && break
23967  done
23968  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
23969esac
23970
23971      $ac_path_SED_found && break 3
23972    done
23973  done
23974  done
23975IFS=$as_save_IFS
23976  if test -z "$ac_cv_path_SED"; then
23977    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
23978  fi
23979else
23980  ac_cv_path_SED=$SED
23981fi
23982
23983fi
23984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
23985$as_echo "$ac_cv_path_SED" >&6; }
23986 SED="$ac_cv_path_SED"
23987  rm -f conftest.sed
23988
23989  while :
23990  do
23991      POSIX_SHELL=`which bash`
23992      test -x "$POSIX_SHELL" && break
23993      POSIX_SHELL=`which dash`
23994      test -x "$POSIX_SHELL" && break
23995      POSIX_SHELL=/usr/xpg4/bin/sh
23996      test -x "$POSIX_SHELL" && break
23997      POSIX_SHELL=`/bin/sh -c '
23998          exec 2>/dev/null
23999          if ! true ; then exit 1 ; fi
24000          echo /bin/sh'`
24001      test -x "$POSIX_SHELL" && break
24002      as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
24003  done
24004
24005cat >>confdefs.h <<_ACEOF
24006#define POSIX_SHELL "${POSIX_SHELL}"
24007_ACEOF
24008
24009
24010
24011
24012
24013  LIBOPTS_BUILD_BLOCKED=''
24014
24015
24016  NEED_LIBOPTS_DIR=''
24017
24018  # Check whether --enable-local-libopts was given.
24019if test "${enable_local_libopts+set}" = set; then :
24020  enableval=$enable_local_libopts;
24021    if test x$enableval = xyes ; then
24022       { $as_echo "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
24023$as_echo "$as_me: Using supplied libopts tearoff" >&6;}
24024       LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24025       NEED_LIBOPTS_DIR=true
24026       LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24027    fi
24028fi
24029
24030
24031  # Check whether --enable-libopts-install was given.
24032if test "${enable_libopts_install+set}" = set; then :
24033  enableval=$enable_libopts_install;
24034fi
24035
24036   if test "X${enable_libopts_install}" = Xyes; then
24037  INSTALL_LIBOPTS_TRUE=
24038  INSTALL_LIBOPTS_FALSE='#'
24039else
24040  INSTALL_LIBOPTS_TRUE='#'
24041  INSTALL_LIBOPTS_FALSE=
24042fi
24043
24044
24045  if test -z "${NEED_LIBOPTS_DIR}" ; then
24046     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
24047$as_echo_n "checking whether autoopts-config can be found... " >&6; }
24048
24049# Check whether --with-autoopts-config was given.
24050if test "${with_autoopts_config+set}" = set; then :
24051  withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
24052else
24053  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
24054$as_echo_n "checking whether autoopts-config is specified... " >&6; }
24055if ${lo_cv_with_autoopts_config+:} false; then :
24056  $as_echo_n "(cached) " >&6
24057else
24058  if autoopts-config --help 2>/dev/null 1>&2
24059        then lo_cv_with_autoopts_config=autoopts-config
24060        elif libopts-config --help 2>/dev/null 1>&2
24061        then lo_cv_with_autoopts_config=libopts-config
24062        else lo_cv_with_autoopts_config=no ; fi
24063fi
24064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
24065$as_echo "$lo_cv_with_autoopts_config" >&6; }
24066
24067fi
24068 # end of AC_ARG_WITH
24069
24070     if ${lo_cv_test_autoopts+:} false; then :
24071  $as_echo_n "(cached) " >&6
24072else
24073
24074        if test -z "${lo_cv_with_autoopts_config}" \
24075                -o X"${lo_cv_with_autoopts_config}" = Xno
24076        then
24077           if autoopts-config --help 2>/dev/null 1>&2
24078           then lo_cv_with_autoopts_config=autoopts-config
24079           elif libopts-config --help 2>/dev/null 1>&2
24080           then lo_cv_with_autoopts_config=libopts-config
24081           else lo_cv_with_autoopts_config=false ; fi
24082        fi
24083        lo_cv_test_autoopts=`
24084            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
24085        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
24086        then lo_cv_test_autoopts=no ; fi
24087
24088fi
24089 # end of CACHE_VAL
24090     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
24091$as_echo "${lo_cv_test_autoopts}" >&6; }
24092
24093     if test "X${lo_cv_test_autoopts}" != Xno
24094     then
24095        LIBOPTS_LDADD="${lo_cv_test_autoopts}"
24096        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
24097     else
24098        LIBOPTS_LDADD='$(top_builddir)/libopts/libopts.la'
24099        LIBOPTS_CFLAGS='-I$(top_srcdir)/libopts'
24100        NEED_LIBOPTS_DIR=true
24101     fi
24102  fi # end of if test -z "${NEED_LIBOPTS_DIR}"
24103  if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
24104    NEED_LIBOPTS_DIR=''
24105  fi
24106   if test -n "${NEED_LIBOPTS_DIR}"; then
24107  NEED_LIBOPTS_TRUE=
24108  NEED_LIBOPTS_FALSE='#'
24109else
24110  NEED_LIBOPTS_TRUE='#'
24111  NEED_LIBOPTS_FALSE=
24112fi
24113
24114
24115
24116  LIBOPTS_DIR=libopts
24117
24118
24119# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
24120
24121
24122    if test -z "$NEED_LIBOPTS_TRUE"; then :
24123
24124
24125
24126  # Check to see if a reg expr header is specified.
24127
24128
24129# Check whether --with-regex-header was given.
24130if test "${with_regex_header+set}" = set; then :
24131  withval=$with_regex_header; libopts_cv_with_regex_header=${with_regex_header}
24132else
24133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a reg expr header is specified" >&5
24134$as_echo_n "checking whether a reg expr header is specified... " >&6; }
24135if ${libopts_cv_with_regex_header+:} false; then :
24136  $as_echo_n "(cached) " >&6
24137else
24138  libopts_cv_with_regex_header=no
24139fi
24140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_regex_header" >&5
24141$as_echo "$libopts_cv_with_regex_header" >&6; }
24142
24143fi
24144 # end of AC_ARG_WITH
24145  if test "X${libopts_cv_with_regex_header}" != Xno
24146  then
24147    cat >>confdefs.h <<_ACEOF
24148#define REGEX_HEADER <${libopts_cv_with_regex_header}>
24149_ACEOF
24150
24151  else
24152
24153$as_echo "#define REGEX_HEADER <regex.h>" >>confdefs.h
24154
24155  fi
24156
24157
24158
24159  # Check to see if a working libregex can be found.
24160
24161
24162# Check whether --with-libregex was given.
24163if test "${with_libregex+set}" = set; then :
24164  withval=$with_libregex; libopts_cv_with_libregex_root=${with_libregex}
24165else
24166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex was specified" >&5
24167$as_echo_n "checking whether with-libregex was specified... " >&6; }
24168if ${libopts_cv_with_libregex_root+:} false; then :
24169  $as_echo_n "(cached) " >&6
24170else
24171  libopts_cv_with_libregex_root=no
24172fi
24173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_root" >&5
24174$as_echo "$libopts_cv_with_libregex_root" >&6; }
24175
24176fi
24177 # end of AC_ARG_WITH libregex
24178
24179  if test "${with_libregex+set}" = set && \
24180     test "X${withval}" = Xno
24181  then ## disabled by request
24182    libopts_cv_with_libregex_root=no
24183    libopts_cv_with_libregex_cflags=no
24184    libopts_cv_with_libregex_libs=no
24185  else
24186
24187
24188# Check whether --with-libregex-cflags was given.
24189if test "${with_libregex_cflags+set}" = set; then :
24190  withval=$with_libregex_cflags; libopts_cv_with_libregex_cflags=${with_libregex_cflags}
24191else
24192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-cflags was specified" >&5
24193$as_echo_n "checking whether with-libregex-cflags was specified... " >&6; }
24194if ${libopts_cv_with_libregex_cflags+:} false; then :
24195  $as_echo_n "(cached) " >&6
24196else
24197  libopts_cv_with_libregex_cflags=no
24198fi
24199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_cflags" >&5
24200$as_echo "$libopts_cv_with_libregex_cflags" >&6; }
24201
24202fi
24203 # end of AC_ARG_WITH libregex-cflags
24204
24205
24206# Check whether --with-libregex-libs was given.
24207if test "${with_libregex_libs+set}" = set; then :
24208  withval=$with_libregex_libs; libopts_cv_with_libregex_libs=${with_libregex_libs}
24209else
24210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether with-libregex-libs was specified" >&5
24211$as_echo_n "checking whether with-libregex-libs was specified... " >&6; }
24212if ${libopts_cv_with_libregex_libs+:} false; then :
24213  $as_echo_n "(cached) " >&6
24214else
24215  libopts_cv_with_libregex_libs=no
24216fi
24217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_with_libregex_libs" >&5
24218$as_echo "$libopts_cv_with_libregex_libs" >&6; }
24219
24220fi
24221 # end of AC_ARG_WITH libregex-libs
24222
24223  case "X${libopts_cv_with_libregex_cflags}" in
24224  Xyes|Xno|X )
24225    case "X${libopts_cv_with_libregex_root}" in
24226    Xyes|Xno|X ) libopts_cv_with_libregex_cflags=no ;;
24227    * ) libopts_cv_with_libregex_cflags=-I${libopts_cv_with_libregex_root}/include ;;
24228    esac
24229  esac
24230  case "X${libopts_cv_with_libregex_libs}" in
24231  Xyes|Xno|X )
24232    case "X${libopts_cv_with_libregex_root}" in
24233    Xyes|Xno|X ) libopts_cv_with_libregex_libs=no ;;
24234    * )        libopts_cv_with_libregex_libs="-L${libopts_cv_with_libregex_root}/lib -lregex" ;;
24235    esac
24236  esac
24237  libopts_save_CPPFLAGS="${CPPFLAGS}"
24238  libopts_save_LIBS="${LIBS}"
24239  case "X${libopts_cv_with_libregex_cflags}" in
24240  Xyes|Xno|X )
24241    libopts_cv_with_libregex_cflags="" ;;
24242  * ) CPPFLAGS="${CPPFLAGS} ${libopts_cv_with_libregex_cflags}" ;;
24243  esac
24244  case "X${libopts_cv_with_libregex_libs}" in
24245  Xyes|Xno|X )
24246    libopts_cv_with_libregex_libs="" ;;
24247  * )
24248    LIBS="${LIBS} ${libopts_cv_with_libregex_libs}" ;;
24249  esac
24250  LIBREGEX_CFLAGS=""
24251  LIBREGEX_LIBS=""
24252  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libregex functions properly" >&5
24253$as_echo_n "checking whether libregex functions properly... " >&6; }
24254  if ${libopts_cv_with_libregex+:} false; then :
24255  $as_echo_n "(cached) " >&6
24256else
24257
24258  if test "$cross_compiling" = yes; then :
24259  libopts_cv_with_libregex=no
24260else
24261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24262/* end confdefs.h.  */
24263#include <stdio.h>
24264#include <stdlib.h>
24265#include <sys/types.h>
24266#include REGEX_HEADER
24267static regex_t re;
24268void comp_re(char const * pzPat) {
24269  int res = regcomp( &re, pzPat, REG_EXTENDED|REG_ICASE|REG_NEWLINE );
24270  if (res == 0) return;
24271  exit( res ); }
24272int main() {
24273  regmatch_t m[2];
24274  comp_re( "^.*\$"   );
24275  comp_re( "()|no.*" );
24276  comp_re( "."       );
24277  if (regexec( &re, "X", 2, m, 0 ) != 0)  return 1;
24278  if ((m[0].rm_so != 0) || (m[0].rm_eo != 1)) {
24279    fputs( "error: regex -->.<-- did not match\n", stderr );
24280    return 1;
24281  }
24282  return 0; }
24283_ACEOF
24284if ac_fn_c_try_run "$LINENO"; then :
24285  libopts_cv_with_libregex=yes
24286else
24287  libopts_cv_with_libregex=no
24288fi
24289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24290  conftest.$ac_objext conftest.beam conftest.$ac_ext
24291fi
24292 # end of AC_RUN_IFELSE
24293
24294fi
24295 # end of AC_CACHE_VAL for libopts_cv_with_libregex
24296  fi ## disabled by request
24297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_with_libregex}" >&5
24298$as_echo "${libopts_cv_with_libregex}" >&6; }
24299  if test "X${libopts_cv_with_libregex}" != Xno
24300  then
24301
24302$as_echo "#define WITH_LIBREGEX 1" >>confdefs.h
24303
24304  else
24305    CPPFLAGS="${libopts_save_CPPFLAGS}"
24306    LIBS="${libopts_save_LIBS}"
24307    libopts_cv_with_libregex_root=no
24308libopts_cv_with_libregex_cflags=no
24309libopts_cv_with_libregex_libs=no
24310libopts_cv_with_libregex=no
24311  fi
24312
24313
24314
24315  # Check to see if pathfind(3) works.
24316
24317  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pathfind(3) works" >&5
24318$as_echo_n "checking whether pathfind(3) works... " >&6; }
24319  if ${libopts_cv_run_pathfind+:} false; then :
24320  $as_echo_n "(cached) " >&6
24321else
24322
24323  if test "$cross_compiling" = yes; then :
24324  libopts_cv_run_pathfind=no
24325
24326else
24327  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24328/* end confdefs.h.  */
24329#include <string.h>
24330#include <stdlib.h>
24331int main (int argc, char ** argv) {
24332   char * pz = pathfind( getenv( "PATH" ), "sh", "x" );
24333   return (pz == 0) ? 1 : 0;
24334}
24335_ACEOF
24336if ac_fn_c_try_run "$LINENO"; then :
24337  libopts_cv_run_pathfind=yes
24338else
24339  libopts_cv_run_pathfind=no
24340fi
24341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24342  conftest.$ac_objext conftest.beam conftest.$ac_ext
24343fi
24344 # end of RUN_IFELSE
24345
24346fi
24347 # end of AC_CACHE_VAL for libopts_cv_run_pathfind
24348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_pathfind}" >&5
24349$as_echo "${libopts_cv_run_pathfind}" >&6; }
24350  if test "X${libopts_cv_run_pathfind}" != Xno
24351  then
24352
24353$as_echo "#define HAVE_PATHFIND 1" >>confdefs.h
24354
24355  fi
24356
24357
24358
24359  # Check to see if /dev/zero is readable device.
24360
24361  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether /dev/zero is readable device" >&5
24362$as_echo_n "checking whether /dev/zero is readable device... " >&6; }
24363  if ${libopts_cv_test_dev_zero+:} false; then :
24364  $as_echo_n "(cached) " >&6
24365else
24366
24367    libopts_cv_test_dev_zero=`exec 2> /dev/null
24368dzero=\`ls -lL /dev/zero | egrep ^c......r\`
24369test -z "${dzero}" && exit 1
24370echo ${dzero}`
24371    if test $? -ne 0 || test -z "$libopts_cv_test_dev_zero"
24372    then libopts_cv_test_dev_zero=no
24373    fi
24374
24375fi
24376 # end of CACHE_VAL of libopts_cv_test_dev_zero
24377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_test_dev_zero}" >&5
24378$as_echo "${libopts_cv_test_dev_zero}" >&6; }
24379  if test "X${libopts_cv_test_dev_zero}" != Xno
24380  then
24381
24382$as_echo "#define HAVE_DEV_ZERO 1" >>confdefs.h
24383
24384  fi
24385
24386
24387
24388  # Check to see if we have a functional realpath(3C).
24389
24390  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a functional realpath(3C)" >&5
24391$as_echo_n "checking whether we have a functional realpath(3C)... " >&6; }
24392  if ${libopts_cv_run_realpath+:} false; then :
24393  $as_echo_n "(cached) " >&6
24394else
24395
24396  if test "$cross_compiling" = yes; then :
24397  libopts_cv_run_realpath=no
24398
24399else
24400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24401/* end confdefs.h.  */
24402#include <limits.h>
24403#include <stdlib.h>
24404int main (int argc, char ** argv) {
24405#ifndef PATH_MAX
24406choke me!!
24407#else
24408   char zPath[PATH_MAX+1];
24409#endif
24410   char *pz = realpath(argv[0], zPath);
24411   return (pz == zPath) ? 0 : 1;
24412}
24413_ACEOF
24414if ac_fn_c_try_run "$LINENO"; then :
24415  libopts_cv_run_realpath=yes
24416else
24417  libopts_cv_run_realpath=no
24418fi
24419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24420  conftest.$ac_objext conftest.beam conftest.$ac_ext
24421fi
24422 # end of RUN_IFELSE
24423
24424fi
24425 # end of AC_CACHE_VAL for libopts_cv_run_realpath
24426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_realpath}" >&5
24427$as_echo "${libopts_cv_run_realpath}" >&6; }
24428  if test "X${libopts_cv_run_realpath}" != Xno
24429  then
24430
24431$as_echo "#define HAVE_REALPATH 1" >>confdefs.h
24432
24433  fi
24434
24435
24436
24437  # Check to see if strftime() works.
24438
24439  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strftime() works" >&5
24440$as_echo_n "checking whether strftime() works... " >&6; }
24441  if ${libopts_cv_run_strftime+:} false; then :
24442  $as_echo_n "(cached) " >&6
24443else
24444
24445  if test "$cross_compiling" = yes; then :
24446  libopts_cv_run_strftime=no
24447
24448else
24449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24450/* end confdefs.h.  */
24451#include <time.h>
24452#include <string.h>
24453char t_buf[ 64 ];
24454int main() {
24455  static char const z[] = "Thursday Aug 28 240";
24456  struct tm tm;
24457  tm.tm_sec   = 36;  /* seconds after the minute [0, 61]  */
24458  tm.tm_min   = 44;  /* minutes after the hour [0, 59] */
24459  tm.tm_hour  = 12;  /* hour since midnight [0, 23] */
24460  tm.tm_mday  = 28;  /* day of the month [1, 31] */
24461  tm.tm_mon   =  7;  /* months since January [0, 11] */
24462  tm.tm_year  = 86;  /* years since 1900 */
24463  tm.tm_wday  =  4;  /* days since Sunday [0, 6] */
24464  tm.tm_yday  = 239; /* days since January 1 [0, 365] */
24465  tm.tm_isdst =  1;  /* flag for daylight savings time */
24466  strftime( t_buf, sizeof( t_buf ), "%A %b %d %j", &tm );
24467  return (strcmp( t_buf, z ) != 0); }
24468_ACEOF
24469if ac_fn_c_try_run "$LINENO"; then :
24470  libopts_cv_run_strftime=yes
24471else
24472  libopts_cv_run_strftime=no
24473fi
24474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24475  conftest.$ac_objext conftest.beam conftest.$ac_ext
24476fi
24477 # end of RUN_IFELSE
24478
24479fi
24480 # end of AC_CACHE_VAL for libopts_cv_run_strftime
24481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_strftime}" >&5
24482$as_echo "${libopts_cv_run_strftime}" >&6; }
24483  if test "X${libopts_cv_run_strftime}" != Xno
24484  then
24485
24486$as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
24487
24488  fi
24489
24490
24491
24492  # Check to see if fopen accepts "b" mode.
24493
24494  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"b\" mode" >&5
24495$as_echo_n "checking whether fopen accepts \"b\" mode... " >&6; }
24496  if ${libopts_cv_run_fopen_binary+:} false; then :
24497  $as_echo_n "(cached) " >&6
24498else
24499
24500  if test "$cross_compiling" = yes; then :
24501  libopts_cv_run_fopen_binary=no
24502
24503else
24504  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24505/* end confdefs.h.  */
24506#include <stdio.h>
24507int main (int argc, char ** argv) {
24508FILE * fp = fopen("conftest.$ac_ext", "rb");
24509return (fp == NULL) ? 1 : fclose(fp); }
24510_ACEOF
24511if ac_fn_c_try_run "$LINENO"; then :
24512  libopts_cv_run_fopen_binary=yes
24513else
24514  libopts_cv_run_fopen_binary=no
24515fi
24516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24517  conftest.$ac_objext conftest.beam conftest.$ac_ext
24518fi
24519 # end of RUN_IFELSE
24520
24521fi
24522 # end of AC_CACHE_VAL for libopts_cv_run_fopen_binary
24523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_binary}" >&5
24524$as_echo "${libopts_cv_run_fopen_binary}" >&6; }
24525  if test "X${libopts_cv_run_fopen_binary}" != Xno
24526  then
24527
24528$as_echo "#define FOPEN_BINARY_FLAG \"b\"" >>confdefs.h
24529
24530  else
24531
24532$as_echo "#define FOPEN_BINARY_FLAG \"\"" >>confdefs.h
24533
24534  fi
24535
24536
24537
24538  # Check to see if fopen accepts "t" mode.
24539
24540  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen accepts \"t\" mode" >&5
24541$as_echo_n "checking whether fopen accepts \"t\" mode... " >&6; }
24542  if ${libopts_cv_run_fopen_text+:} false; then :
24543  $as_echo_n "(cached) " >&6
24544else
24545
24546  if test "$cross_compiling" = yes; then :
24547  libopts_cv_run_fopen_text=no
24548
24549else
24550  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24551/* end confdefs.h.  */
24552#include <stdio.h>
24553int main (int argc, char ** argv) {
24554FILE * fp = fopen("conftest.$ac_ext", "rt");
24555return (fp == NULL) ? 1 : fclose(fp); }
24556_ACEOF
24557if ac_fn_c_try_run "$LINENO"; then :
24558  libopts_cv_run_fopen_text=yes
24559else
24560  libopts_cv_run_fopen_text=no
24561fi
24562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24563  conftest.$ac_objext conftest.beam conftest.$ac_ext
24564fi
24565 # end of RUN_IFELSE
24566
24567fi
24568 # end of AC_CACHE_VAL for libopts_cv_run_fopen_text
24569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${libopts_cv_run_fopen_text}" >&5
24570$as_echo "${libopts_cv_run_fopen_text}" >&6; }
24571  if test "X${libopts_cv_run_fopen_text}" != Xno
24572  then
24573
24574$as_echo "#define FOPEN_TEXT_FLAG \"t\"" >>confdefs.h
24575
24576  else
24577
24578$as_echo "#define FOPEN_TEXT_FLAG \"\"" >>confdefs.h
24579
24580  fi
24581
24582
24583
24584  # Check to see if not wanting optional option args.
24585
24586  # Check whether --enable-optional-args was given.
24587if test "${enable_optional_args+set}" = set; then :
24588  enableval=$enable_optional_args; libopts_cv_enable_optional_args=${enable_optional_args}
24589else
24590  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether not wanting optional option args" >&5
24591$as_echo_n "checking whether not wanting optional option args... " >&6; }
24592if ${libopts_cv_enable_optional_args+:} false; then :
24593  $as_echo_n "(cached) " >&6
24594else
24595  libopts_cv_enable_optional_args=yes
24596fi
24597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libopts_cv_enable_optional_args" >&5
24598$as_echo "$libopts_cv_enable_optional_args" >&6; }
24599
24600fi
24601 # end of AC_ARG_ENABLE
24602  if test "X${libopts_cv_enable_optional_args}" = Xno
24603  then
24604
24605$as_echo "#define NO_OPTIONAL_OPT_ARGS 1" >>confdefs.h
24606
24607  fi
24608
24609
24610
24611
24612
24613          fi
24614  ac_config_files="$ac_config_files libopts/Makefile"
24615
24616  # end of AC_DEFUN of LIBOPTS_CHECK
24617
24618
24619# From when we only used libevent for sntp:
24620#AM_COND_IF(
24621#    [BUILD_SNTP],
24622#    [NTP_LIBEVENT_CHECK],
24623#    [NTP_LIBEVENT_CHECK_NOBUILD]
24624#)
24625
24626
24627
24628ntp_pkgconfig_min_version='0.15.0'
24629if test -n "$ac_tool_prefix"; then
24630  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24631set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24633$as_echo_n "checking for $ac_word... " >&6; }
24634if ${ac_cv_path_PKG_CONFIG+:} false; then :
24635  $as_echo_n "(cached) " >&6
24636else
24637  case $PKG_CONFIG in
24638  [\\/]* | ?:[\\/]*)
24639  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24640  ;;
24641  *)
24642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24643for as_dir in $PATH
24644do
24645  IFS=$as_save_IFS
24646  test -z "$as_dir" && as_dir=.
24647    for ac_exec_ext in '' $ac_executable_extensions; do
24648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24649    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24651    break 2
24652  fi
24653done
24654  done
24655IFS=$as_save_IFS
24656
24657  ;;
24658esac
24659fi
24660PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24661if test -n "$PKG_CONFIG"; then
24662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24663$as_echo "$PKG_CONFIG" >&6; }
24664else
24665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24666$as_echo "no" >&6; }
24667fi
24668
24669
24670fi
24671if test -z "$ac_cv_path_PKG_CONFIG"; then
24672  ac_pt_PKG_CONFIG=$PKG_CONFIG
24673  # Extract the first word of "pkg-config", so it can be a program name with args.
24674set dummy pkg-config; ac_word=$2
24675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24676$as_echo_n "checking for $ac_word... " >&6; }
24677if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24678  $as_echo_n "(cached) " >&6
24679else
24680  case $ac_pt_PKG_CONFIG in
24681  [\\/]* | ?:[\\/]*)
24682  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24683  ;;
24684  *)
24685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24686for as_dir in $PATH
24687do
24688  IFS=$as_save_IFS
24689  test -z "$as_dir" && as_dir=.
24690    for ac_exec_ext in '' $ac_executable_extensions; do
24691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24692    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24694    break 2
24695  fi
24696done
24697  done
24698IFS=$as_save_IFS
24699
24700  ;;
24701esac
24702fi
24703ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24704if test -n "$ac_pt_PKG_CONFIG"; then
24705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24706$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24707else
24708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24709$as_echo "no" >&6; }
24710fi
24711
24712  if test "x$ac_pt_PKG_CONFIG" = x; then
24713    PKG_CONFIG=""
24714  else
24715    case $cross_compiling:$ac_tool_warned in
24716yes:)
24717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24719ac_tool_warned=yes ;;
24720esac
24721    PKG_CONFIG=$ac_pt_PKG_CONFIG
24722  fi
24723else
24724  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24725fi
24726
24727{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
24728{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
24729
24730case "$PKG_CONFIG" in
24731 /*)
24732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
24733$as_echo_n "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
24734    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
24735	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24736$as_echo "yes" >&6; }
24737    else
24738	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24739$as_echo "no" >&6; }
24740	PKG_CONFIG=""
24741    fi
24742    ;;
24743esac
24744
24745
24746
24747
24748# Check whether --enable-local-libevent was given.
24749if test "${enable_local_libevent+set}" = set; then :
24750  enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
24751else
24752  ntp_use_local_libevent=${ntp_use_local_libevent-detect}
24753
24754fi
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765ntp_libevent_min_version=2
24766ntp_libevent_tearoff=libevent
24767
24768
24769
24770
24771
24772case "$ntp_use_local_libevent" in
24773 yes)
24774    ;;
24775 *) # If we have (a good enough) pkg-config, see if it can find libevent
24776    case "$PKG_CONFIG" in
24777     /*)
24778	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
24779$as_echo_n "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
24780	if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
24781	then
24782	    ntp_use_local_libevent=no
24783	    ntp_libevent_version="`$PKG_CONFIG --modversion libevent`"
24784	    case "$ntp_libevent_version" in
24785	     *.*) ;;
24786	     *) ntp_libevent_version='(unknown)' ;;
24787	    esac
24788	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
24789$as_echo "yes, version $ntp_libevent_version" >&6; }
24790	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24791	    CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
24792	    # HMS: I hope the following is accurate.
24793	    # We don't need -levent, we only need  -levent_core.
24794	    # While we could grab only the -L stuff, there *might* be
24795	    # other flags there we want.  Originally we just removed -levent
24796	    # but then somebody decided to install -levent-2.0
24797	    # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
24798	    # So now we dance...
24799	    LDADD_LIBEVENT=
24800	    for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
24801	    do
24802		case "$i" in
24803		 -D*) ;;
24804		 -levent*) ;;
24805		 *) case "$LDADD_LIBEVENT" in
24806		     '') LDADD_LIBEVENT="$i" ;;
24807		     *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
24808		    esac
24809		    ;;
24810		esac
24811	    done
24812	    case "$LIBISC_PTHREADS_NOTHREADS" in
24813	     pthreads)
24814		LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
24815	    esac
24816	    LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
24817	else
24818	    ntp_use_local_libevent=yes
24819	    # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
24820	    # is "pthreads"?
24821	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
24822	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24823$as_echo "no" >&6; }
24824	fi
24825	;;
24826     *)
24827	ntp_use_local_libevent=yes
24828	;;
24829    esac
24830    ;;
24831esac
24832
24833case "$ntp_use_local_libevent" in
24834 yes)
24835    { $as_echo "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
24836$as_echo "$as_me: Using libevent tearoff" >&6;}
24837    CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
24838    case "$LIBISC_PTHREADS_NOTHREADS" in
24839     pthreads)
24840	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24841	;;
24842     *)
24843	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
24844    esac
24845esac
24846
24847
24848 if test "x$ntp_use_local_libevent" = "xyes"; then
24849  BUILD_LIBEVENT_TRUE=
24850  BUILD_LIBEVENT_FALSE='#'
24851else
24852  BUILD_LIBEVENT_TRUE='#'
24853  BUILD_LIBEVENT_FALSE=
24854fi
24855
24856
24857
24858
24859case "$ntp_libevent_tearoff" in
24860 libevent)
24861    ;;
24862 *)
24863    as_fn_error $? "ntp_libevent.m4 dir must be libevent, not $ntp_libevent_tearoff" "$LINENO" 5
24864    ;;
24865esac
24866
24867case "$ntp_use_local_libevent" in
24868 yes)
24869                        ac_configure_args=" --disable-openssl${ac_configure_args}"
24870    ac_configure_args=" --disable-shared${ac_configure_args}"
24871    ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
24872    ac_configure_args=" --disable-libevent-install${ac_configure_args}"
24873    ac_configure_args=" --enable-silent-rules${ac_configure_args}"
24874    ac_configure_args=" --enable-function-sections${ac_configure_args}"
24875    ac_configure_args=" LEP_CFLAGS='${NTP_HARD_CFLAGS}'${ac_configure_args}"
24876    ac_configure_args=" LEP_CPPFLAGS='${NTP_HARD_CPPFLAGS}'${ac_configure_args}"
24877    ac_configure_args=" LEP_LDFLAGS='${NTP_HARD_LDFLAGS}'${ac_configure_args}"
24878    subdirs="$subdirs libevent"
24879
24880    ;;
24881 *)
24882    NTP_FORCE_LIBEVENT_DIST=libevent
24883    ;;
24884esac
24885
24886
24887
24888# Checks for libraries.
24889
24890
24891LIB_SYSLOG=''
24892
24893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
24894$as_echo_n "checking for library containing openlog... " >&6; }
24895if ${ac_cv_search_openlog+:} false; then :
24896  $as_echo_n "(cached) " >&6
24897else
24898  ac_func_search_save_LIBS=$LIBS
24899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24900/* end confdefs.h.  */
24901
24902/* Override any GCC internal prototype to avoid an error.
24903   Use char because int might match the return type of a GCC
24904   builtin and then its argument prototype would still apply.  */
24905#ifdef __cplusplus
24906extern "C"
24907#endif
24908char openlog ();
24909int
24910main ()
24911{
24912return openlog ();
24913  ;
24914  return 0;
24915}
24916_ACEOF
24917for ac_lib in '' gen syslog; do
24918  if test -z "$ac_lib"; then
24919    ac_res="none required"
24920  else
24921    ac_res=-l$ac_lib
24922    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24923  fi
24924  if ac_fn_c_try_link "$LINENO"; then :
24925  ac_cv_search_openlog=$ac_res
24926fi
24927rm -f core conftest.err conftest.$ac_objext \
24928    conftest$ac_exeext
24929  if ${ac_cv_search_openlog+:} false; then :
24930  break
24931fi
24932done
24933if ${ac_cv_search_openlog+:} false; then :
24934
24935else
24936  ac_cv_search_openlog=no
24937fi
24938rm conftest.$ac_ext
24939LIBS=$ac_func_search_save_LIBS
24940fi
24941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
24942$as_echo "$ac_cv_search_openlog" >&6; }
24943ac_res=$ac_cv_search_openlog
24944if test "$ac_res" != no; then :
24945  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24946  case "$ac_cv_search_openlog" in
24947 'none required') ;;
24948 no) ;;
24949 *) LIB_SYSLOG="$ac_cv_search_openlog $LIB_SYSLOG" ;;
24950 esac
24951
24952fi
24953
24954
24955# Checks for header files.
24956for ac_header in netdb.h string.h strings.h syslog.h
24957do :
24958  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
24959ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
24960if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
24961  cat >>confdefs.h <<_ACEOF
24962#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
24963_ACEOF
24964
24965fi
24966
24967done
24968
24969
24970
24971for ac_header in sysexits.h
24972do :
24973  ac_fn_c_check_header_mongrel "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
24974if test "x$ac_cv_header_sysexits_h" = xyes; then :
24975  cat >>confdefs.h <<_ACEOF
24976#define HAVE_SYSEXITS_H 1
24977_ACEOF
24978
24979else
24980
24981
24982$as_echo "#define EX_OK 0" >>confdefs.h
24983
24984
24985$as_echo "#define EX_SOFTWARE 70" >>confdefs.h
24986
24987
24988fi
24989
24990done
24991
24992
24993
24994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
24995$as_echo_n "checking for facilitynames in syslog.h... " >&6; }
24996if ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+:} false; then :
24997  $as_echo_n "(cached) " >&6
24998else
24999
25000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25001/* end confdefs.h.  */
25002
25003#define SYSLOG_NAMES
25004#include <stdlib.h>
25005#include <syslog.h>
25006
25007int
25008main ()
25009{
25010 void *fnames; fnames = facilitynames;
25011  ;
25012  return 0;
25013}
25014_ACEOF
25015if ac_fn_c_try_compile "$LINENO"; then :
25016  ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
25017else
25018  ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
25019fi
25020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25021fi
25022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
25023$as_echo "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
25024case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
25025 yes)
25026
25027$as_echo "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
25028
25029    ;;
25030 no)
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
25032$as_echo "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
25033    ;;
25034 cross)
25035    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
25036$as_echo "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
25037    ;;
25038esac
25039
25040
25041# Checks for typedefs, structures, and compiler characteristics.
25042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
25043$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
25044if ${ac_cv_header_stdbool_h+:} false; then :
25045  $as_echo_n "(cached) " >&6
25046else
25047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25048/* end confdefs.h.  */
25049
25050             #include <stdbool.h>
25051             #ifndef bool
25052              "error: bool is not defined"
25053             #endif
25054             #ifndef false
25055              "error: false is not defined"
25056             #endif
25057             #if false
25058              "error: false is not 0"
25059             #endif
25060             #ifndef true
25061              "error: true is not defined"
25062             #endif
25063             #if true != 1
25064              "error: true is not 1"
25065             #endif
25066             #ifndef __bool_true_false_are_defined
25067              "error: __bool_true_false_are_defined is not defined"
25068             #endif
25069
25070             struct s { _Bool s: 1; _Bool t; } s;
25071
25072             char a[true == 1 ? 1 : -1];
25073             char b[false == 0 ? 1 : -1];
25074             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
25075             char d[(bool) 0.5 == true ? 1 : -1];
25076             /* See body of main program for 'e'.  */
25077             char f[(_Bool) 0.0 == false ? 1 : -1];
25078             char g[true];
25079             char h[sizeof (_Bool)];
25080             char i[sizeof s.t];
25081             enum { j = false, k = true, l = false * true, m = true * 256 };
25082             /* The following fails for
25083                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
25084             _Bool n[m];
25085             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
25086             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
25087             /* Catch a bug in an HP-UX C compiler.  See
25088                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
25089                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
25090              */
25091             _Bool q = true;
25092             _Bool *pq = &q;
25093
25094int
25095main ()
25096{
25097
25098             bool e = &s;
25099             *pq |= q;
25100             *pq |= ! q;
25101             /* Refer to every declared value, to avoid compiler optimizations.  */
25102             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
25103                     + !m + !n + !o + !p + !q + !pq);
25104
25105  ;
25106  return 0;
25107}
25108_ACEOF
25109if ac_fn_c_try_compile "$LINENO"; then :
25110  ac_cv_header_stdbool_h=yes
25111else
25112  ac_cv_header_stdbool_h=no
25113fi
25114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25115fi
25116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
25117$as_echo "$ac_cv_header_stdbool_h" >&6; }
25118   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
25119if test "x$ac_cv_type__Bool" = xyes; then :
25120
25121cat >>confdefs.h <<_ACEOF
25122#define HAVE__BOOL 1
25123_ACEOF
25124
25125
25126fi
25127
25128
25129if test $ac_cv_header_stdbool_h = yes; then
25130
25131$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
25132
25133fi
25134
25135
25136
25137
25138
25139VER_SUFFIX=
25140
25141
25142
25143
25144# Check whether --with-crypto was given.
25145if test "${with_crypto+set}" = set; then :
25146  withval=$with_crypto;
25147fi
25148
25149
25150# Check whether --with-openssl-libdir was given.
25151if test "${with_openssl_libdir+set}" = set; then :
25152  withval=$with_openssl_libdir;
25153fi
25154
25155
25156# Check whether --with-openssl-incdir was given.
25157if test "${with_openssl_incdir+set}" = set; then :
25158  withval=$with_openssl_incdir;
25159fi
25160
25161
25162# Check whether --with-rpath was given.
25163if test "${with_rpath+set}" = set; then :
25164  withval=$with_rpath;
25165fi
25166
25167
25168ntp_openssl=no
25169ntp_openssl_from_pkg_config=no
25170
25171with_crypto=${with_crypto:-openssl,libcrypto}
25172case "$with_crypto" in
25173 yes)
25174    with_crypto=openssl,libcrypto
25175esac
25176
25177
25178case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25179 no:*) ;;
25180 *:notempty:notgiven:notgiven)
25181    for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
25182	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25183$as_echo_n "checking pkg-config for $pkg... " >&6; }
25184	if $PKG_CONFIG --exists $pkg ; then
25185	    CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
25186	    CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
25187	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
25188	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
25189	    LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
25190	    VER_SUFFIX=o
25191	    ntp_openssl=yes
25192	    ntp_openssl_from_pkg_config=yes
25193	    ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
25194	    case "$ntp_openssl_version" in
25195	     *.*) ;;
25196	     *) ntp_openssl_version='(unknown)' ;;
25197	    esac
25198	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
25199$as_echo "yes, version $ntp_openssl_version" >&6; }
25200
25201	    break
25202	fi
25203	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25204$as_echo "no" >&6; }
25205    done
25206esac
25207case "$with_crypto:$ntp_openssl" in
25208 no:*) ;;
25209 *:no)
25210    need_dash_r=
25211    need_dash_Wlrpath=
25212    case "${with_rpath-notgiven}" in
25213     yes)
25214	# Lame - what to do if we need -Wl... but not -R?
25215	need_dash_r=1
25216	;;
25217     notgiven)
25218	case "$host" in
25219	 *-*-linux*)
25220	    # This may really only be true for gcc
25221	    need_dash_Wlrpath=1
25222	    ;;
25223	 *-*-netbsd*)
25224	    need_dash_r=1
25225	    ;;
25226	 *-*-solaris*)
25227	    need_dash_r=1
25228	    ;;
25229	esac
25230	;;
25231    esac
25232
25233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
25234$as_echo_n "checking for openssl library directory... " >&6; }
25235    with_openssl_libdir=${with_openssl_libdir-notgiven}
25236    case "$with_openssl_libdir" in
25237     notgiven)
25238	case "$build" in
25239	 $host)
25240	    with_openssl_libdir=default
25241	    ;;
25242	 *)
25243	    with_openssl_libdir=no
25244	    ;;
25245	esac
25246    esac
25247    case "$with_openssl_libdir" in
25248     default)
25249	# Look in:
25250	with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25251	with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
25252	with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
25253    esac
25254    case "$with_openssl_libdir" in
25255     no)
25256	;;
25257     *) # Look for libcrypto.a and libssl.a:
25258	for i in $with_openssl_libdir no
25259	do
25260	    case "$host" in
25261	     *-*-darwin*)
25262		test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
25263		;;
25264	     *)
25265		test -f $i/libcrypto.so -a -f $i/libssl.so && break
25266		test -f $i/libcrypto.a -a -f $i/libssl.a && break
25267		;;
25268	    esac
25269	done
25270	openssl_libdir=$i
25271	;;
25272    esac
25273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
25274$as_echo "$openssl_libdir" >&6; }
25275    case "$openssl_libdir" in
25276     no)
25277	openssl_libdir=
25278	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
25279$as_echo "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
25280    esac
25281
25282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
25283$as_echo_n "checking for openssl include directory... " >&6; }
25284    with_openssl_incdir=${with_openssl_incdir-notgiven}
25285    case "$with_openssl_incdir" in
25286     notgiven)
25287	# Look in:
25288	with_openssl_incdir="/usr/include /usr/sfw/include"
25289	with_openssl_incdir="$with_openssl_incdir /usr/local/include"
25290	with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
25291    esac
25292    case "$with_openssl_incdir" in
25293     no)
25294	;;
25295     *) # look for openssl/evp.h:
25296	for i in $with_openssl_incdir no
25297	do
25298	    test -f $i/openssl/evp.h && break
25299	done
25300	openssl_incdir=$i
25301	;;
25302    esac
25303    { i=; unset i;}
25304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
25305$as_echo "$openssl_incdir" >&6; }
25306    case "$openssl_incdir" in
25307     no)
25308	openssl_incdir=
25309	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
25310$as_echo "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
25311    esac
25312    if test -z "$openssl_libdir" -o -z "$openssl_incdir"
25313    then
25314	ntp_openssl=no
25315    else
25316	ntp_openssl=yes
25317	VER_SUFFIX=o
25318    fi
25319    case "$ntp_openssl" in
25320     yes)
25321	# We have OpenSSL inc/lib dirs - use them.
25322	case "$openssl_incdir" in
25323	 /usr/include)
25324	    ;;
25325	 *)
25326	    CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
25327	    ;;
25328	esac
25329	case "$openssl_libdir" in
25330	 /usr/lib)
25331	    ;;
25332	 *)
25333	    LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
25334	    case "$need_dash_r" in
25335	     1)
25336		LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
25337	    esac
25338	    case "$need_dash_Wlrpath" in
25339	     1)
25340		LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
25341	    esac
25342	    ;;
25343	esac
25344	LDADD_NTP="$LDADD_NTP -lcrypto"
25345    esac
25346esac
25347
25348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
25349$as_echo_n "checking if we will use crypto... " >&6; }
25350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
25351$as_echo "$ntp_openssl" >&6; }
25352
25353case "$ntp_openssl" in
25354 yes)
25355    for ac_header in openssl/cmac.h openssl/hmac.h
25356do :
25357  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
25358ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
25359if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
25360  cat >>confdefs.h <<_ACEOF
25361#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
25362_ACEOF
25363
25364fi
25365
25366done
25367
25368
25369$as_echo "#define OPENSSL /**/" >>confdefs.h
25370
25371    case "$VER_SUFFIX" in
25372     *o*) ;;
25373     *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
25374    esac
25375    ;;
25376esac
25377
25378NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
25379CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
25380NTPO_SAVED_LIBS="$LIBS"
25381
25382#
25383# check for linking with -lcrypto failure, and try -lcrypto -lz.
25384# Helps m68k-atari-mint
25385#
25386case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
25387 yes:no)
25388    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25389    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
25390$as_echo_n "checking if linking with -lcrypto alone works... " >&6; }
25391if ${ntp_cv_bare_lcrypto+:} false; then :
25392  $as_echo_n "(cached) " >&6
25393else
25394  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25395/* end confdefs.h.  */
25396
25397		    #include "openssl/err.h"
25398		    #include "openssl/evp.h"
25399
25400int
25401main ()
25402{
25403
25404		    ERR_load_crypto_strings();
25405		    OpenSSL_add_all_algorithms();
25406
25407
25408  ;
25409  return 0;
25410}
25411_ACEOF
25412if ac_fn_c_try_link "$LINENO"; then :
25413  ntp_cv_bare_lcrypto=yes
25414else
25415  ntp_cv_bare_lcrypto=no
25416
25417fi
25418rm -f core conftest.err conftest.$ac_objext \
25419    conftest$ac_exeext conftest.$ac_ext
25420
25421fi
25422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
25423$as_echo "$ntp_cv_bare_lcrypto" >&6; }
25424    case "$ntp_cv_bare_lcrypto" in
25425     no)
25426	LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
25427	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
25428$as_echo_n "checking if linking with -lcrypto -lz works... " >&6; }
25429if ${ntp_cv_lcrypto_lz+:} false; then :
25430  $as_echo_n "(cached) " >&6
25431else
25432  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25433/* end confdefs.h.  */
25434
25435			#include "openssl/err.h"
25436			#include "openssl/evp.h"
25437
25438int
25439main ()
25440{
25441
25442			ERR_load_crypto_strings();
25443			OpenSSL_add_all_algorithms();
25444
25445
25446  ;
25447  return 0;
25448}
25449_ACEOF
25450if ac_fn_c_try_link "$LINENO"; then :
25451  ntp_cv_lcrypto_lz=yes
25452else
25453  ntp_cv_lcrypto_lz=no
25454
25455fi
25456rm -f core conftest.err conftest.$ac_objext \
25457    conftest$ac_exeext conftest.$ac_ext
25458
25459fi
25460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
25461$as_echo "$ntp_cv_lcrypto_lz" >&6; }
25462	case "$ntp_cv_lcrypto_lz" in
25463	 yes)
25464	     LDADD_NTP="$LDADD_NTP -lz"
25465	esac
25466    esac
25467esac
25468
25469#
25470# Older OpenSSL headers have a number of callback prototypes inside
25471# other function prototypes which trigger copious warnings with gcc's
25472# -Wstrict-prototypes, which is included in -Wall.
25473#
25474# An example:
25475#
25476# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
25477#		  int (*cb)(), int sgckey);
25478#		  ^^^^^^^^^^^
25479#
25480#
25481#
25482openssl_triggers_warnings=unknown
25483NTPO_SAVED_CFLAGS="$CFLAGS"
25484
25485case "$ntp_openssl:$GCC" in
25486 yes:yes)
25487    CFLAGS="$CFLAGS -Werror"
25488    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25489/* end confdefs.h.  */
25490
25491
25492int
25493main ()
25494{
25495
25496		/* see if -Werror breaks gcc */
25497
25498
25499  ;
25500  return 0;
25501}
25502_ACEOF
25503if ac_fn_c_try_compile "$LINENO"; then :
25504  gcc_handles_Werror=yes
25505else
25506  gcc_handles_Werror=no
25507
25508fi
25509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25510    case "$gcc_handles_Werror" in
25511     no)
25512	# if this gcc doesn't do -Werror go ahead and use
25513	# -Wstrict-prototypes.
25514	openssl_triggers_warnings=yes
25515	;;
25516     yes)
25517	CFLAGS="$CFLAGS -Wstrict-prototypes"
25518	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25519/* end confdefs.h.  */
25520
25521		    #include "openssl/asn1_mac.h"
25522		    #include "openssl/bn.h"
25523		    #include "openssl/err.h"
25524		    #include "openssl/evp.h"
25525		    #include "openssl/pem.h"
25526		    #include "openssl/rand.h"
25527		    #include "openssl/x509v3.h"
25528
25529int
25530main ()
25531{
25532
25533		    /* empty body */
25534
25535
25536  ;
25537  return 0;
25538}
25539_ACEOF
25540if ac_fn_c_try_compile "$LINENO"; then :
25541  openssl_triggers_warnings=no
25542else
25543  openssl_triggers_warnings=yes
25544
25545fi
25546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25547    esac
25548    case "$openssl_triggers_warnings" in
25549     yes)
25550	CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
25551	;;
25552     *)
25553	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25554    esac
25555    ;;
25556 no:yes)
25557    # gcc without OpenSSL
25558    CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
25559esac
25560
25561# Because we don't want -Werror for the EVP_MD_do_all_sorted check
25562CFLAGS="$NTPO_SAVED_CFLAGS"
25563
25564case "$ntp_openssl" in
25565 yes)
25566    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
25567    for ac_func in EVP_MD_do_all_sorted
25568do :
25569  ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
25570if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes; then :
25571  cat >>confdefs.h <<_ACEOF
25572#define HAVE_EVP_MD_DO_ALL_SORTED 1
25573_ACEOF
25574
25575fi
25576done
25577
25578    ;;
25579esac
25580
25581
25582CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
25583LIBS="$NTPO_SAVED_LIBS"
25584{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
25585{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
25586{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
25587{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
25588{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
25589
25590
25591
25592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
25593$as_echo_n "checking for struct sockaddr_storage... " >&6; }
25594if ${ntp_cv_sockaddr_storage+:} false; then :
25595  $as_echo_n "(cached) " >&6
25596else
25597  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25598/* end confdefs.h.  */
25599
25600		#ifdef HAVE_SYS_TYPES_H
25601		# include <sys/types.h>
25602		#endif
25603		#ifdef HAVE_SYS_SOCKET_H
25604		# include <sys/socket.h>
25605		#endif
25606		#ifdef HAVE_NETINET_IN_H
25607		# include <netinet/in.h>
25608		#endif
25609
25610int
25611main ()
25612{
25613
25614		struct sockaddr_storage n;
25615
25616
25617  ;
25618  return 0;
25619}
25620_ACEOF
25621if ac_fn_c_try_compile "$LINENO"; then :
25622  ntp_cv_sockaddr_storage=yes
25623else
25624  ntp_cv_sockaddr_storage=no
25625
25626fi
25627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25628
25629fi
25630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
25631$as_echo "$ntp_cv_sockaddr_storage" >&6; }
25632case "$ntp_cv_sockaddr_storage" in
25633 yes)
25634
25635$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
25636
25637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
25638$as_echo_n "checking for sockaddr_storage.__ss_family... " >&6; }
25639if ${ntp_cv_have___ss_family+:} false; then :
25640  $as_echo_n "(cached) " >&6
25641else
25642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25643/* end confdefs.h.  */
25644
25645		    #ifdef HAVE_SYS_TYPES_H
25646		    # include <sys/types.h>
25647		    #endif
25648		    #ifdef HAVE_SYS_SOCKET_H
25649		    # include <sys/socket.h>
25650		    #endif
25651		    #ifdef HAVE_NETINET_IN_H
25652		    # include <netinet/in.h>
25653		    #endif
25654
25655int
25656main ()
25657{
25658
25659		    struct sockaddr_storage s;
25660		    s.__ss_family = 1;
25661
25662
25663  ;
25664  return 0;
25665}
25666_ACEOF
25667if ac_fn_c_try_compile "$LINENO"; then :
25668  ntp_cv_have___ss_family=yes
25669else
25670  ntp_cv_have___ss_family=no
25671
25672fi
25673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25674
25675fi
25676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
25677$as_echo "$ntp_cv_have___ss_family" >&6; }
25678    case "$ntp_cv_have___ss_family" in
25679     yes)
25680
25681$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
25682
25683    esac
25684
25685esac
25686
25687
25688#
25689# Look for in_port_t.
25690#
25691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
25692$as_echo_n "checking for in_port_t... " >&6; }
25693if ${isc_cv_have_in_port_t+:} false; then :
25694  $as_echo_n "(cached) " >&6
25695else
25696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25697/* end confdefs.h.  */
25698
25699		#include <sys/types.h>
25700		#include <netinet/in.h>
25701
25702int
25703main ()
25704{
25705
25706		in_port_t port = 25;
25707		return (0);
25708
25709
25710  ;
25711  return 0;
25712}
25713_ACEOF
25714if ac_fn_c_try_compile "$LINENO"; then :
25715  isc_cv_have_in_port_t=yes
25716else
25717  isc_cv_have_in_port_t=no
25718
25719fi
25720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25721
25722fi
25723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
25724$as_echo "$isc_cv_have_in_port_t" >&6; }
25725case "$isc_cv_have_in_port_t" in
25726 no)
25727
25728$as_echo "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
25729
25730esac
25731
25732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
25733$as_echo_n "checking type of socklen arg for getsockname()... " >&6; }
25734if ${ntp_cv_getsockname_socklen_type+:} false; then :
25735  $as_echo_n "(cached) " >&6
25736else
25737
25738    getsockname_socklen_type_found=no
25739    for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
25740	for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
25741	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25742/* end confdefs.h.  */
25743
25744			#ifdef HAVE_SYS_TYPES_H
25745			# include <sys/types.h>
25746			#endif
25747			#ifdef HAVE_SYS_SOCKET_H
25748			# include <sys/socket.h>
25749			#endif
25750
25751int
25752main ()
25753{
25754
25755			extern
25756			getsockname(int, $getsockname_arg2,
25757				$ntp_cv_getsockname_socklen_type *);
25758
25759
25760  ;
25761  return 0;
25762}
25763_ACEOF
25764if ac_fn_c_try_compile "$LINENO"; then :
25765  getsockname_socklen_type_found=yes ; break 2
25766fi
25767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25768	done
25769    done
25770    case "$getsockname_socklen_type_found" in
25771     no)
25772	ntp_cv_getsockname_socklen_type='socklen_t'
25773    esac
25774    { getsockname_arg2=; unset getsockname_arg2;}
25775    { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
25776
25777
25778fi
25779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
25780$as_echo "$ntp_cv_getsockname_socklen_type" >&6; }
25781
25782cat >>confdefs.h <<_ACEOF
25783#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type
25784_ACEOF
25785
25786
25787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
25788$as_echo_n "checking struct sockaddr for sa_len... " >&6; }
25789if ${isc_cv_platform_havesalen+:} false; then :
25790  $as_echo_n "(cached) " >&6
25791else
25792  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25793/* end confdefs.h.  */
25794
25795		#include <sys/types.h>
25796		#include <sys/socket.h>
25797
25798int
25799main ()
25800{
25801
25802		extern struct sockaddr *ps;
25803		return ps->sa_len;
25804
25805
25806  ;
25807  return 0;
25808}
25809_ACEOF
25810if ac_fn_c_try_compile "$LINENO"; then :
25811  isc_cv_platform_havesalen=yes
25812else
25813  isc_cv_platform_havesalen=no
25814
25815fi
25816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25817
25818fi
25819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
25820$as_echo "$isc_cv_platform_havesalen" >&6; }
25821case "$isc_cv_platform_havesalen" in
25822 yes)
25823
25824$as_echo "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
25825
25826esac
25827
25828# Check whether --enable-ipv6 was given.
25829if test "${enable_ipv6+set}" = set; then :
25830  enableval=$enable_ipv6;
25831fi
25832
25833
25834case "$enable_ipv6" in
25835 yes|''|autodetect)
25836    case "$host" in
25837     powerpc-ibm-aix4*)
25838	;;
25839     *)
25840
25841$as_echo "#define WANT_IPV6 1" >>confdefs.h
25842
25843	;;
25844    esac
25845    ;;
25846 no)
25847    ;;
25848esac
25849
25850
25851case "$host" in
25852 *-*-darwin*)
25853
25854$as_echo "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
25855
25856esac
25857
25858
25859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
25860$as_echo_n "checking for IPv6 structures... " >&6; }
25861if ${isc_cv_found_ipv6+:} false; then :
25862  $as_echo_n "(cached) " >&6
25863else
25864  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25865/* end confdefs.h.  */
25866
25867		#include <sys/types.h>
25868		#include <sys/socket.h>
25869		#include <netinet/in.h>
25870
25871int
25872main ()
25873{
25874
25875		struct sockaddr_in6 sin6;
25876
25877
25878  ;
25879  return 0;
25880}
25881_ACEOF
25882if ac_fn_c_try_compile "$LINENO"; then :
25883  isc_cv_found_ipv6=yes
25884else
25885  isc_cv_found_ipv6=no
25886
25887fi
25888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25889
25890fi
25891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
25892$as_echo "$isc_cv_found_ipv6" >&6; }
25893
25894#
25895# See whether IPv6 support is provided via a Kame add-on.
25896# This is done before other IPv6 linking tests so LIBS is properly set.
25897#
25898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
25899$as_echo_n "checking for Kame IPv6 support... " >&6; }
25900
25901# Check whether --with-kame was given.
25902if test "${with_kame+set}" = set; then :
25903  withval=$with_kame; use_kame="$withval"
25904else
25905  use_kame="no"
25906
25907fi
25908
25909case "$use_kame" in
25910 no)
25911    ;;
25912 yes)
25913    kame_path=/usr/local/v6
25914    ;;
25915 *)
25916    kame_path="$use_kame"
25917    ;;
25918esac
25919case "$use_kame" in
25920 no)
25921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25922$as_echo "no" >&6; }
25923    ;;
25924 *)
25925    if test -f $kame_path/lib/libinet6.a; then
25926	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
25927$as_echo "$kame_path/lib/libinet6.a" >&6; }
25928	LIBS="-L$kame_path/lib -linet6 $LIBS"
25929    else
25930	as_fn_error $? "$kame_path/lib/libinet6.a not found.
25931
25932Please choose the proper path with the following command:
25933
25934    configure --with-kame=PATH
25935" "$LINENO" 5
25936    fi
25937    ;;
25938esac
25939
25940#
25941# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
25942# Including it on Kame-using platforms is very bad, though, because
25943# Kame uses #error against direct inclusion.   So include it on only
25944# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
25945# This is done before the in6_pktinfo check because that's what
25946# netinet6/in6.h is needed for.
25947#
25948case "$host" in
25949 *-bsdi4.[01]*)
25950
25951$as_echo "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
25952
25953    isc_netinet6in6_hack="#include <netinet6/in6.h>"
25954    ;;
25955 *)
25956    isc_netinet6in6_hack=""
25957    ;;
25958esac
25959
25960#
25961# This is similar to the netinet6/in6.h issue.
25962#
25963case "$host" in
25964 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
25965
25966$as_echo "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
25967
25968    isc_netinetin6_hack="#include <netinet/in6.h>"
25969    ;;
25970 *)
25971    isc_netinetin6_hack=""
25972    ;;
25973esac
25974
25975
25976case "$isc_cv_found_ipv6" in
25977 yes)
25978
25979$as_echo "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
25980
25981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
25982$as_echo_n "checking for in6_pktinfo... " >&6; }
25983if ${isc_cv_have_in6_pktinfo+:} false; then :
25984  $as_echo_n "(cached) " >&6
25985else
25986  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25987/* end confdefs.h.  */
25988
25989		    #include <sys/types.h>
25990		    #include <sys/socket.h>
25991		    #include <netinet/in.h>
25992		    $isc_netinetin6_hack
25993		    $isc_netinet6in6_hack
25994
25995int
25996main ()
25997{
25998
25999		    struct in6_pktinfo xyzzy;
26000
26001
26002  ;
26003  return 0;
26004}
26005_ACEOF
26006if ac_fn_c_try_compile "$LINENO"; then :
26007  isc_cv_have_in6_pktinfo=yes
26008else
26009  isc_cv_have_in6_pktinfo=no
26010
26011fi
26012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26013
26014fi
26015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
26016$as_echo "$isc_cv_have_in6_pktinfo" >&6; }
26017    case "$isc_cv_have_in6_pktinfo" in
26018     yes)
26019
26020$as_echo "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
26021
26022    esac
26023
26024
26025    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
26026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
26027$as_echo_n "checking for sockaddr_in6.sin6_scope_id... " >&6; }
26028if ${isc_cv_have_sin6_scope_id+:} false; then :
26029  $as_echo_n "(cached) " >&6
26030else
26031  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26032/* end confdefs.h.  */
26033
26034		    #include <sys/types.h>
26035		    #include <sys/socket.h>
26036		    #include <netinet/in.h>
26037		    $isc_netinetin6_hack
26038		    $isc_netinet6in6_hack
26039
26040int
26041main ()
26042{
26043
26044		    struct sockaddr_in6 xyzzy;
26045		    xyzzy.sin6_scope_id = 0;
26046
26047
26048  ;
26049  return 0;
26050}
26051_ACEOF
26052if ac_fn_c_try_compile "$LINENO"; then :
26053  isc_cv_have_sin6_scope_id=yes
26054else
26055  isc_cv_have_sin6_scope_id=no
26056
26057fi
26058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26059
26060fi
26061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
26062$as_echo "$isc_cv_have_sin6_scope_id" >&6; }
26063
26064    case "$isc_cv_have_sin6_scope_id" in
26065     yes)
26066
26067$as_echo "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
26068
26069    esac
26070esac
26071
26072
26073# We need this check run even without isc_cv_found_ipv6=yes
26074
26075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
26076$as_echo_n "checking for in6addr_any... " >&6; }
26077if ${isc_cv_in6addr_any_links+:} false; then :
26078  $as_echo_n "(cached) " >&6
26079else
26080
26081	SAVED_LIBS="$LIBS"
26082	LIBS="$LDADD_LIBNTP $LIBS"
26083	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26084/* end confdefs.h.  */
26085$ac_includes_default
26086		    #include <sys/socket.h>
26087		    #include <netinet/in.h>
26088		    $isc_netinetin6_hack
26089		    $isc_netinet6in6_hack
26090
26091int
26092main ()
26093{
26094
26095		    printf("%x", in6addr_any.s6_addr[15]);
26096
26097
26098  ;
26099  return 0;
26100}
26101_ACEOF
26102if ac_fn_c_try_link "$LINENO"; then :
26103  isc_cv_in6addr_any_links=yes
26104else
26105  isc_cv_in6addr_any_links=no
26106
26107fi
26108rm -f core conftest.err conftest.$ac_objext \
26109    conftest$ac_exeext conftest.$ac_ext
26110	LIBS="$SAVED_LIBS"
26111	{ SAVED_LIBS=; unset SAVED_LIBS;}
26112
26113
26114fi
26115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
26116$as_echo "$isc_cv_in6addr_any_links" >&6; }
26117
26118case "$isc_cv_in6addr_any_links" in
26119 no)
26120
26121$as_echo "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
26122
26123esac
26124
26125
26126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
26127$as_echo_n "checking for struct if_laddrconf... " >&6; }
26128if ${isc_cv_struct_if_laddrconf+:} false; then :
26129  $as_echo_n "(cached) " >&6
26130else
26131  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26132/* end confdefs.h.  */
26133
26134		#include <sys/types.h>
26135		#include <net/if6.h>
26136
26137int
26138main ()
26139{
26140
26141		struct if_laddrconf a;
26142
26143
26144  ;
26145  return 0;
26146}
26147_ACEOF
26148if ac_fn_c_try_compile "$LINENO"; then :
26149  isc_cv_struct_if_laddrconf=yes
26150else
26151  isc_cv_struct_if_laddrconf=no
26152
26153fi
26154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26155
26156fi
26157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
26158$as_echo "$isc_cv_struct_if_laddrconf" >&6; }
26159
26160case "$isc_cv_struct_if_laddrconf" in
26161 yes)
26162
26163$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
26164
26165esac
26166
26167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
26168$as_echo_n "checking for struct if_laddrreq... " >&6; }
26169if ${isc_cv_struct_if_laddrreq+:} false; then :
26170  $as_echo_n "(cached) " >&6
26171else
26172  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26173/* end confdefs.h.  */
26174
26175		#include <sys/types.h>
26176		#include <net/if6.h>
26177
26178int
26179main ()
26180{
26181
26182		struct if_laddrreq a;
26183
26184
26185  ;
26186  return 0;
26187}
26188_ACEOF
26189if ac_fn_c_try_compile "$LINENO"; then :
26190  isc_cv_struct_if_laddrreq=yes
26191else
26192  isc_cv_struct_if_laddrreq=no
26193
26194fi
26195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26196
26197fi
26198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
26199$as_echo "$isc_cv_struct_if_laddrreq" >&6; }
26200
26201case "$isc_cv_struct_if_laddrreq" in
26202 yes)
26203
26204$as_echo "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
26205
26206esac
26207
26208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
26209$as_echo_n "checking for multicast IP support... " >&6; }
26210if ${ntp_cv_multicast+:} false; then :
26211  $as_echo_n "(cached) " >&6
26212else
26213
26214	ntp_cv_multicast=no
26215	case "$host" in
26216	 i386-sequent-sysv4)
26217	    ;;
26218	 *)
26219	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26220/* end confdefs.h.  */
26221
26222			#ifdef HAVE_NETINET_IN_H
26223			# include <netinet/in.h>
26224			#endif
26225
26226int
26227main ()
26228{
26229
26230			struct ip_mreq ipmr;
26231			ipmr.imr_interface.s_addr = 0;
26232
26233
26234  ;
26235  return 0;
26236}
26237_ACEOF
26238if ac_fn_c_try_compile "$LINENO"; then :
26239  ntp_cv_multicast=yes
26240fi
26241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26242	    ;;
26243	esac
26244
26245
26246fi
26247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
26248$as_echo "$ntp_cv_multicast" >&6; }
26249case "$ntp_cv_multicast" in
26250 yes)
26251
26252$as_echo "#define MCAST 1" >>confdefs.h
26253
26254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
26255$as_echo_n "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
26256if ${ntp_cv_typeof_ip_multicast_loop+:} false; then :
26257  $as_echo_n "(cached) " >&6
26258else
26259
26260	    case "$host" in
26261	     *-*-netbsd*|*-*-*linux*)
26262		ntp_cv_typeof_ip_multicast_loop=u_int
26263		;;
26264	     *)
26265		ntp_cv_typeof_ip_multicast_loop=u_char
26266		;;
26267	    esac
26268
26269
26270fi
26271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
26272$as_echo "$ntp_cv_typeof_ip_multicast_loop" >&6; }
26273
26274cat >>confdefs.h <<_ACEOF
26275#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop
26276_ACEOF
26277
26278esac
26279
26280# Check whether --enable-getifaddrs was given.
26281if test "${enable_getifaddrs+set}" = set; then :
26282  enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
26283else
26284  want_getifaddrs="yes"
26285
26286fi
26287
26288
26289case $want_getifaddrs in
26290 glibc)
26291    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
26292$as_echo "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
26293esac
26294case $want_getifaddrs in
26295 no)
26296    ;;
26297 *)
26298    SAVED_LIBS="$LIBS"
26299    LIBS="$LDADD_LIBNTP $LIBS"
26300    for ac_func in getifaddrs
26301do :
26302  ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
26303if test "x$ac_cv_func_getifaddrs" = xyes; then :
26304  cat >>confdefs.h <<_ACEOF
26305#define HAVE_GETIFADDRS 1
26306_ACEOF
26307
26308fi
26309done
26310
26311    LIBS="$SAVED_LIBS"
26312    { SAVED_LIBS=; unset SAVED_LIBS;}
26313    ;;
26314esac
26315
26316#
26317# Check for if_nametoindex() for IPv6 scoped addresses support
26318#
26319case "$host" in
26320 *-hp-hpux*)
26321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
26322$as_echo_n "checking for library containing if_nametoindex... " >&6; }
26323if ${ac_cv_search_if_nametoindex+:} false; then :
26324  $as_echo_n "(cached) " >&6
26325else
26326  ac_func_search_save_LIBS=$LIBS
26327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26328/* end confdefs.h.  */
26329
26330/* Override any GCC internal prototype to avoid an error.
26331   Use char because int might match the return type of a GCC
26332   builtin and then its argument prototype would still apply.  */
26333#ifdef __cplusplus
26334extern "C"
26335#endif
26336char if_nametoindex ();
26337int
26338main ()
26339{
26340return if_nametoindex ();
26341  ;
26342  return 0;
26343}
26344_ACEOF
26345for ac_lib in '' ipv6; do
26346  if test -z "$ac_lib"; then
26347    ac_res="none required"
26348  else
26349    ac_res=-l$ac_lib
26350    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26351  fi
26352  if ac_fn_c_try_link "$LINENO"; then :
26353  ac_cv_search_if_nametoindex=$ac_res
26354fi
26355rm -f core conftest.err conftest.$ac_objext \
26356    conftest$ac_exeext
26357  if ${ac_cv_search_if_nametoindex+:} false; then :
26358  break
26359fi
26360done
26361if ${ac_cv_search_if_nametoindex+:} false; then :
26362
26363else
26364  ac_cv_search_if_nametoindex=no
26365fi
26366rm conftest.$ac_ext
26367LIBS=$ac_func_search_save_LIBS
26368fi
26369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
26370$as_echo "$ac_cv_search_if_nametoindex" >&6; }
26371ac_res=$ac_cv_search_if_nametoindex
26372if test "$ac_res" != no; then :
26373  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26374
26375fi
26376
26377esac
26378SAVED_LIBS="$LIBS"
26379LIBS="$LDADD_LIBNTP $LIBS"
26380for ac_func in if_nametoindex
26381do :
26382  ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
26383if test "x$ac_cv_func_if_nametoindex" = xyes; then :
26384  cat >>confdefs.h <<_ACEOF
26385#define HAVE_IF_NAMETOINDEX 1
26386_ACEOF
26387
26388fi
26389done
26390
26391LIBS="$SAVED_LIBS"
26392{ SAVED_LIBS=; unset SAVED_LIBS;}
26393case "$ac_cv_func_if_nametoindex" in
26394 yes)
26395
26396$as_echo "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
26397
26398esac
26399
26400
26401
26402###
26403
26404# Hacks
26405# these need work if we're to move libntp under sntp
26406
26407$as_echo "#define HAVE_NO_NICE 1" >>confdefs.h
26408
26409
26410$as_echo "#define HAVE_TERMIOS 1" >>confdefs.h
26411
26412
26413# Checks for library functions.
26414for ac_func in socket
26415do :
26416  ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
26417if test "x$ac_cv_func_socket" = xyes; then :
26418  cat >>confdefs.h <<_ACEOF
26419#define HAVE_SOCKET 1
26420_ACEOF
26421
26422fi
26423done
26424
26425
26426
26427# We may not need have_unity
26428have_unity=false
26429# Extract the first word of "ruby", so it can be a program name with args.
26430set dummy ruby; ac_word=$2
26431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26432$as_echo_n "checking for $ac_word... " >&6; }
26433if ${ac_cv_path_PATH_RUBY+:} false; then :
26434  $as_echo_n "(cached) " >&6
26435else
26436  case $PATH_RUBY in
26437  [\\/]* | ?:[\\/]*)
26438  ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
26439  ;;
26440  *)
26441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26442for as_dir in $PATH
26443do
26444  IFS=$as_save_IFS
26445  test -z "$as_dir" && as_dir=.
26446    for ac_exec_ext in '' $ac_executable_extensions; do
26447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26448    ac_cv_path_PATH_RUBY="$as_dir/$ac_word$ac_exec_ext"
26449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26450    break 2
26451  fi
26452done
26453  done
26454IFS=$as_save_IFS
26455
26456  ;;
26457esac
26458fi
26459PATH_RUBY=$ac_cv_path_PATH_RUBY
26460if test -n "$PATH_RUBY"; then
26461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
26462$as_echo "$PATH_RUBY" >&6; }
26463else
26464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26465$as_echo "no" >&6; }
26466fi
26467
26468
26469case "$PATH_RUBY" in
26470 /*)
26471    have_unity=true
26472    ;;
26473 *) PATH_RUBY="false"
26474    ;;
26475esac
26476# We may not need UNITYBUILD_AVAILABLE
26477 if $have_unity; then
26478  UNITYBUILD_AVAILABLE_TRUE=
26479  UNITYBUILD_AVAILABLE_FALSE='#'
26480else
26481  UNITYBUILD_AVAILABLE_TRUE='#'
26482  UNITYBUILD_AVAILABLE_FALSE=
26483fi
26484
26485
26486
26487## HMS: if we don't find c++ we should not look for gtest.
26488#AC_PROG_CXX
26489#NTP_GOOGLETEST
26490
26491
26492case "$build" in
26493 $host)	cross=0 ;;
26494 *)	cross=1 ;;
26495esac
26496
26497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
26498$as_echo_n "checking if we want to enable tests with undiagnosed problems... " >&6; }
26499# Check whether --enable-problem-tests was given.
26500if test "${enable_problem_tests+set}" = set; then :
26501  enableval=$enable_problem_tests; sntp_ept=$enableval
26502else
26503  sntp_ept=yes
26504
26505fi
26506
26507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_ept" >&5
26508$as_echo "$sntp_ept" >&6; }
26509
26510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodDatabase" >&5
26511$as_echo_n "checking if we can run test-kodDatabase... " >&6; }
26512sntp_test_kodDatabase="no"
26513case "$sntp_ept:$cross:$host" in
26514 no:0:*-apple-darwin12.6.0) ;;
26515 *) sntp_test_kodDatabase="yes" ;;
26516esac
26517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodDatabase" >&5
26518$as_echo "$sntp_test_kodDatabase" >&6; }
26519 if test x$sntp_test_kodDatabase = xyes; then
26520  BUILD_TEST_KODDATABASE_TRUE=
26521  BUILD_TEST_KODDATABASE_FALSE='#'
26522else
26523  BUILD_TEST_KODDATABASE_TRUE='#'
26524  BUILD_TEST_KODDATABASE_FALSE=
26525fi
26526
26527
26528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can run test-kodFile" >&5
26529$as_echo_n "checking if we can run test-kodFile... " >&6; }
26530sntp_test_kodFile="no"
26531case "$sntp_ept:$cross:$host" in
26532 no:0:*-apple-darwin12.6.0) ;;
26533 *) sntp_test_kodFile="yes" ;;
26534esac
26535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sntp_test_kodFile" >&5
26536$as_echo "$sntp_test_kodFile" >&6; }
26537 if test x$sntp_test_kodFile = xyes; then
26538  BUILD_TEST_KODFILE_TRUE=
26539  BUILD_TEST_KODFILE_FALSE='#'
26540else
26541  BUILD_TEST_KODFILE_TRUE='#'
26542  BUILD_TEST_KODFILE_FALSE=
26543fi
26544
26545
26546
26547
26548# All libraries should be in various LIB_* variables now.
26549#LIBS=
26550# Sadly not.  There is a gettext() check somewhere, and on Solaris this pulls
26551# in -lintl -lgen, outside our "scope".
26552
26553ac_config_files="$ac_config_files Makefile"
26554
26555ac_config_files="$ac_config_files include/Makefile"
26556
26557ac_config_files="$ac_config_files scripts/Makefile"
26558
26559ac_config_files="$ac_config_files tests/Makefile"
26560
26561ac_config_files="$ac_config_files tests/fileHandlingTest.h"
26562
26563ac_config_files="$ac_config_files unity/Makefile"
26564
26565
26566cat >confcache <<\_ACEOF
26567# This file is a shell script that caches the results of configure
26568# tests run on this system so they can be shared between configure
26569# scripts and configure runs, see configure's option --config-cache.
26570# It is not useful on other systems.  If it contains results you don't
26571# want to keep, you may remove or edit it.
26572#
26573# config.status only pays attention to the cache file if you give it
26574# the --recheck option to rerun configure.
26575#
26576# `ac_cv_env_foo' variables (set or unset) will be overridden when
26577# loading this file, other *unset* `ac_cv_foo' will be assigned the
26578# following values.
26579
26580_ACEOF
26581
26582# The following way of writing the cache mishandles newlines in values,
26583# but we know of no workaround that is simple, portable, and efficient.
26584# So, we kill variables containing newlines.
26585# Ultrix sh set writes to stderr and can't be redirected directly,
26586# and sets the high bit in the cache file unless we assign to the vars.
26587(
26588  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26589    eval ac_val=\$$ac_var
26590    case $ac_val in #(
26591    *${as_nl}*)
26592      case $ac_var in #(
26593      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
26594$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
26595      esac
26596      case $ac_var in #(
26597      _ | IFS | as_nl) ;; #(
26598      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
26599      *) { eval $ac_var=; unset $ac_var;} ;;
26600      esac ;;
26601    esac
26602  done
26603
26604  (set) 2>&1 |
26605    case $as_nl`(ac_space=' '; set) 2>&1` in #(
26606    *${as_nl}ac_space=\ *)
26607      # `set' does not quote correctly, so add quotes: double-quote
26608      # substitution turns \\\\ into \\, and sed turns \\ into \.
26609      sed -n \
26610	"s/'/'\\\\''/g;
26611	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26612      ;; #(
26613    *)
26614      # `set' quotes correctly as required by POSIX, so do not add quotes.
26615      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
26616      ;;
26617    esac |
26618    sort
26619) |
26620  sed '
26621     /^ac_cv_env_/b end
26622     t clear
26623     :clear
26624     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26625     t end
26626     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26627     :end' >>confcache
26628if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26629  if test -w "$cache_file"; then
26630    if test "x$cache_file" != "x/dev/null"; then
26631      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
26632$as_echo "$as_me: updating cache $cache_file" >&6;}
26633      if test ! -f "$cache_file" || test -h "$cache_file"; then
26634	cat confcache >"$cache_file"
26635      else
26636        case $cache_file in #(
26637        */* | ?:*)
26638	  mv -f confcache "$cache_file"$$ &&
26639	  mv -f "$cache_file"$$ "$cache_file" ;; #(
26640        *)
26641	  mv -f confcache "$cache_file" ;;
26642	esac
26643      fi
26644    fi
26645  else
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
26647$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
26648  fi
26649fi
26650rm -f confcache
26651
26652test "x$prefix" = xNONE && prefix=$ac_default_prefix
26653# Let make expand exec_prefix.
26654test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26655
26656DEFS=-DHAVE_CONFIG_H
26657
26658ac_libobjs=
26659ac_ltlibobjs=
26660U=
26661for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26662  # 1. Remove the extension, and $U if already installed.
26663  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
26664  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
26665  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
26666  #    will be set to the directory where LIBOBJS objects are built.
26667  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26668  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
26669done
26670LIBOBJS=$ac_libobjs
26671
26672LTLIBOBJS=$ac_ltlibobjs
26673
26674
26675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
26676$as_echo_n "checking that generated files are newer than configure... " >&6; }
26677   if test -n "$am_sleep_pid"; then
26678     # Hide warnings about reused PIDs.
26679     wait $am_sleep_pid 2>/dev/null
26680   fi
26681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
26682$as_echo "done" >&6; }
26683 if test -n "$EXEEXT"; then
26684  am__EXEEXT_TRUE=
26685  am__EXEEXT_FALSE='#'
26686else
26687  am__EXEEXT_TRUE='#'
26688  am__EXEEXT_FALSE=
26689fi
26690
26691if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
26692  as_fn_error $? "conditional \"AMDEP\" was never defined.
26693Usually this means the macro was only invoked conditionally." "$LINENO" 5
26694fi
26695if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
26696  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
26697Usually this means the macro was only invoked conditionally." "$LINENO" 5
26698fi
26699
26700if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
26701  as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
26702Usually this means the macro was only invoked conditionally." "$LINENO" 5
26703fi
26704if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
26705  as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
26706Usually this means the macro was only invoked conditionally." "$LINENO" 5
26707fi
26708if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
26709  as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
26710Usually this means the macro was only invoked conditionally." "$LINENO" 5
26711fi
26712if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
26713  as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
26714Usually this means the macro was only invoked conditionally." "$LINENO" 5
26715fi
26716if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
26717  as_fn_error $? "conditional \"PTHREADS\" was never defined.
26718Usually this means the macro was only invoked conditionally." "$LINENO" 5
26719fi
26720if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
26721  as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
26722Usually this means the macro was only invoked conditionally." "$LINENO" 5
26723fi
26724if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
26725  as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
26726Usually this means the macro was only invoked conditionally." "$LINENO" 5
26727fi
26728if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
26729  as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
26730Usually this means the macro was only invoked conditionally." "$LINENO" 5
26731fi
26732if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
26733  as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
26734Usually this means the macro was only invoked conditionally." "$LINENO" 5
26735fi
26736if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
26737  as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
26738Usually this means the macro was only invoked conditionally." "$LINENO" 5
26739fi
26740if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
26741  as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
26742Usually this means the macro was only invoked conditionally." "$LINENO" 5
26743fi
26744if test -z "${BUILD_TEST_KODDATABASE_TRUE}" && test -z "${BUILD_TEST_KODDATABASE_FALSE}"; then
26745  as_fn_error $? "conditional \"BUILD_TEST_KODDATABASE\" was never defined.
26746Usually this means the macro was only invoked conditionally." "$LINENO" 5
26747fi
26748if test -z "${BUILD_TEST_KODFILE_TRUE}" && test -z "${BUILD_TEST_KODFILE_FALSE}"; then
26749  as_fn_error $? "conditional \"BUILD_TEST_KODFILE\" was never defined.
26750Usually this means the macro was only invoked conditionally." "$LINENO" 5
26751fi
26752
26753: "${CONFIG_STATUS=./config.status}"
26754ac_write_fail=0
26755ac_clean_files_save=$ac_clean_files
26756ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26757{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
26758$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26759as_write_fail=0
26760cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
26761#! $SHELL
26762# Generated by $as_me.
26763# Run this file to recreate the current configuration.
26764# Compiler output produced by configure, useful for debugging
26765# configure, is in config.log if it exists.
26766
26767debug=false
26768ac_cs_recheck=false
26769ac_cs_silent=false
26770
26771SHELL=\${CONFIG_SHELL-$SHELL}
26772export SHELL
26773_ASEOF
26774cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
26775## -------------------- ##
26776## M4sh Initialization. ##
26777## -------------------- ##
26778
26779# Be more Bourne compatible
26780DUALCASE=1; export DUALCASE # for MKS sh
26781if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26782  emulate sh
26783  NULLCMD=:
26784  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26785  # is contrary to our usage.  Disable this feature.
26786  alias -g '${1+"$@"}'='"$@"'
26787  setopt NO_GLOB_SUBST
26788else
26789  case `(set -o) 2>/dev/null` in #(
26790  *posix*) :
26791    set -o posix ;; #(
26792  *) :
26793     ;;
26794esac
26795fi
26796
26797
26798as_nl='
26799'
26800export as_nl
26801# Printing a long string crashes Solaris 7 /usr/bin/printf.
26802as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26803as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26804as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26805# Prefer a ksh shell builtin over an external printf program on Solaris,
26806# but without wasting forks for bash or zsh.
26807if test -z "$BASH_VERSION$ZSH_VERSION" \
26808    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
26809  as_echo='print -r --'
26810  as_echo_n='print -rn --'
26811elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26812  as_echo='printf %s\n'
26813  as_echo_n='printf %s'
26814else
26815  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26816    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26817    as_echo_n='/usr/ucb/echo -n'
26818  else
26819    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26820    as_echo_n_body='eval
26821      arg=$1;
26822      case $arg in #(
26823      *"$as_nl"*)
26824	expr "X$arg" : "X\\(.*\\)$as_nl";
26825	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26826      esac;
26827      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26828    '
26829    export as_echo_n_body
26830    as_echo_n='sh -c $as_echo_n_body as_echo'
26831  fi
26832  export as_echo_body
26833  as_echo='sh -c $as_echo_body as_echo'
26834fi
26835
26836# The user is always right.
26837if test "${PATH_SEPARATOR+set}" != set; then
26838  PATH_SEPARATOR=:
26839  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26840    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26841      PATH_SEPARATOR=';'
26842  }
26843fi
26844
26845
26846# IFS
26847# We need space, tab and new line, in precisely that order.  Quoting is
26848# there to prevent editors from complaining about space-tab.
26849# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26850# splitting by setting IFS to empty value.)
26851IFS=" ""	$as_nl"
26852
26853# Find who we are.  Look in the path if we contain no directory separator.
26854as_myself=
26855case $0 in #((
26856  *[\\/]* ) as_myself=$0 ;;
26857  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26858for as_dir in $PATH
26859do
26860  IFS=$as_save_IFS
26861  test -z "$as_dir" && as_dir=.
26862    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26863  done
26864IFS=$as_save_IFS
26865
26866     ;;
26867esac
26868# We did not find ourselves, most probably we were run as `sh COMMAND'
26869# in which case we are not to be found in the path.
26870if test "x$as_myself" = x; then
26871  as_myself=$0
26872fi
26873if test ! -f "$as_myself"; then
26874  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
26875  exit 1
26876fi
26877
26878# Unset variables that we do not need and which cause bugs (e.g. in
26879# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
26880# suppresses any "Segmentation fault" message there.  '((' could
26881# trigger a bug in pdksh 5.2.14.
26882for as_var in BASH_ENV ENV MAIL MAILPATH
26883do eval test x\${$as_var+set} = xset \
26884  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
26885done
26886PS1='$ '
26887PS2='> '
26888PS4='+ '
26889
26890# NLS nuisances.
26891LC_ALL=C
26892export LC_ALL
26893LANGUAGE=C
26894export LANGUAGE
26895
26896# CDPATH.
26897(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
26898
26899
26900# as_fn_error STATUS ERROR [LINENO LOG_FD]
26901# ----------------------------------------
26902# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
26903# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
26904# script with STATUS, using 1 if that was 0.
26905as_fn_error ()
26906{
26907  as_status=$1; test $as_status -eq 0 && as_status=1
26908  if test "$4"; then
26909    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
26910    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
26911  fi
26912  $as_echo "$as_me: error: $2" >&2
26913  as_fn_exit $as_status
26914} # as_fn_error
26915
26916
26917# as_fn_set_status STATUS
26918# -----------------------
26919# Set $? to STATUS, without forking.
26920as_fn_set_status ()
26921{
26922  return $1
26923} # as_fn_set_status
26924
26925# as_fn_exit STATUS
26926# -----------------
26927# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
26928as_fn_exit ()
26929{
26930  set +e
26931  as_fn_set_status $1
26932  exit $1
26933} # as_fn_exit
26934
26935# as_fn_unset VAR
26936# ---------------
26937# Portably unset VAR.
26938as_fn_unset ()
26939{
26940  { eval $1=; unset $1;}
26941}
26942as_unset=as_fn_unset
26943# as_fn_append VAR VALUE
26944# ----------------------
26945# Append the text in VALUE to the end of the definition contained in VAR. Take
26946# advantage of any shell optimizations that allow amortized linear growth over
26947# repeated appends, instead of the typical quadratic growth present in naive
26948# implementations.
26949if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
26950  eval 'as_fn_append ()
26951  {
26952    eval $1+=\$2
26953  }'
26954else
26955  as_fn_append ()
26956  {
26957    eval $1=\$$1\$2
26958  }
26959fi # as_fn_append
26960
26961# as_fn_arith ARG...
26962# ------------------
26963# Perform arithmetic evaluation on the ARGs, and store the result in the
26964# global $as_val. Take advantage of shells that can avoid forks. The arguments
26965# must be portable across $(()) and expr.
26966if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
26967  eval 'as_fn_arith ()
26968  {
26969    as_val=$(( $* ))
26970  }'
26971else
26972  as_fn_arith ()
26973  {
26974    as_val=`expr "$@" || test $? -eq 1`
26975  }
26976fi # as_fn_arith
26977
26978
26979if expr a : '\(a\)' >/dev/null 2>&1 &&
26980   test "X`expr 00001 : '.*\(...\)'`" = X001; then
26981  as_expr=expr
26982else
26983  as_expr=false
26984fi
26985
26986if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26987  as_basename=basename
26988else
26989  as_basename=false
26990fi
26991
26992if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26993  as_dirname=dirname
26994else
26995  as_dirname=false
26996fi
26997
26998as_me=`$as_basename -- "$0" ||
26999$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27000	 X"$0" : 'X\(//\)$' \| \
27001	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
27002$as_echo X/"$0" |
27003    sed '/^.*\/\([^/][^/]*\)\/*$/{
27004	    s//\1/
27005	    q
27006	  }
27007	  /^X\/\(\/\/\)$/{
27008	    s//\1/
27009	    q
27010	  }
27011	  /^X\/\(\/\).*/{
27012	    s//\1/
27013	    q
27014	  }
27015	  s/.*/./; q'`
27016
27017# Avoid depending upon Character Ranges.
27018as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27019as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27020as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27021as_cr_digits='0123456789'
27022as_cr_alnum=$as_cr_Letters$as_cr_digits
27023
27024ECHO_C= ECHO_N= ECHO_T=
27025case `echo -n x` in #(((((
27026-n*)
27027  case `echo 'xy\c'` in
27028  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
27029  xy)  ECHO_C='\c';;
27030  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
27031       ECHO_T='	';;
27032  esac;;
27033*)
27034  ECHO_N='-n';;
27035esac
27036
27037rm -f conf$$ conf$$.exe conf$$.file
27038if test -d conf$$.dir; then
27039  rm -f conf$$.dir/conf$$.file
27040else
27041  rm -f conf$$.dir
27042  mkdir conf$$.dir 2>/dev/null
27043fi
27044if (echo >conf$$.file) 2>/dev/null; then
27045  if ln -s conf$$.file conf$$ 2>/dev/null; then
27046    as_ln_s='ln -s'
27047    # ... but there are two gotchas:
27048    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27049    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27050    # In both cases, we have to default to `cp -pR'.
27051    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27052      as_ln_s='cp -pR'
27053  elif ln conf$$.file conf$$ 2>/dev/null; then
27054    as_ln_s=ln
27055  else
27056    as_ln_s='cp -pR'
27057  fi
27058else
27059  as_ln_s='cp -pR'
27060fi
27061rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27062rmdir conf$$.dir 2>/dev/null
27063
27064
27065# as_fn_mkdir_p
27066# -------------
27067# Create "$as_dir" as a directory, including parents if necessary.
27068as_fn_mkdir_p ()
27069{
27070
27071  case $as_dir in #(
27072  -*) as_dir=./$as_dir;;
27073  esac
27074  test -d "$as_dir" || eval $as_mkdir_p || {
27075    as_dirs=
27076    while :; do
27077      case $as_dir in #(
27078      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
27079      *) as_qdir=$as_dir;;
27080      esac
27081      as_dirs="'$as_qdir' $as_dirs"
27082      as_dir=`$as_dirname -- "$as_dir" ||
27083$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27084	 X"$as_dir" : 'X\(//\)[^/]' \| \
27085	 X"$as_dir" : 'X\(//\)$' \| \
27086	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
27087$as_echo X"$as_dir" |
27088    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27089	    s//\1/
27090	    q
27091	  }
27092	  /^X\(\/\/\)[^/].*/{
27093	    s//\1/
27094	    q
27095	  }
27096	  /^X\(\/\/\)$/{
27097	    s//\1/
27098	    q
27099	  }
27100	  /^X\(\/\).*/{
27101	    s//\1/
27102	    q
27103	  }
27104	  s/.*/./; q'`
27105      test -d "$as_dir" && break
27106    done
27107    test -z "$as_dirs" || eval "mkdir $as_dirs"
27108  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
27109
27110
27111} # as_fn_mkdir_p
27112if mkdir -p . 2>/dev/null; then
27113  as_mkdir_p='mkdir -p "$as_dir"'
27114else
27115  test -d ./-p && rmdir ./-p
27116  as_mkdir_p=false
27117fi
27118
27119
27120# as_fn_executable_p FILE
27121# -----------------------
27122# Test if FILE is an executable regular file.
27123as_fn_executable_p ()
27124{
27125  test -f "$1" && test -x "$1"
27126} # as_fn_executable_p
27127as_test_x='test -x'
27128as_executable_p=as_fn_executable_p
27129
27130# Sed expression to map a string onto a valid CPP name.
27131as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
27132
27133# Sed expression to map a string onto a valid variable name.
27134as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
27135
27136
27137exec 6>&1
27138## ----------------------------------- ##
27139## Main body of $CONFIG_STATUS script. ##
27140## ----------------------------------- ##
27141_ASEOF
27142test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
27143
27144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27145# Save the log message, to keep $0 and so on meaningful, and to
27146# report actual input values of CONFIG_FILES etc. instead of their
27147# values after options handling.
27148ac_log="
27149This file was extended by sntp $as_me 4.2.8p13, which was
27150generated by GNU Autoconf 2.69.  Invocation command line was
27151
27152  CONFIG_FILES    = $CONFIG_FILES
27153  CONFIG_HEADERS  = $CONFIG_HEADERS
27154  CONFIG_LINKS    = $CONFIG_LINKS
27155  CONFIG_COMMANDS = $CONFIG_COMMANDS
27156  $ $0 $@
27157
27158on `(hostname || uname -n) 2>/dev/null | sed 1q`
27159"
27160
27161_ACEOF
27162
27163case $ac_config_files in *"
27164"*) set x $ac_config_files; shift; ac_config_files=$*;;
27165esac
27166
27167case $ac_config_headers in *"
27168"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27169esac
27170
27171
27172cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27173# Files that config.status was made for.
27174config_files="$ac_config_files"
27175config_headers="$ac_config_headers"
27176config_commands="$ac_config_commands"
27177
27178_ACEOF
27179
27180cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27181ac_cs_usage="\
27182\`$as_me' instantiates files and other configuration actions
27183from templates according to the current configuration.  Unless the files
27184and actions are specified as TAGs, all are instantiated by default.
27185
27186Usage: $0 [OPTION]... [TAG]...
27187
27188  -h, --help       print this help, then exit
27189  -V, --version    print version number and configuration settings, then exit
27190      --config     print configuration, then exit
27191  -q, --quiet, --silent
27192                   do not print progress messages
27193  -d, --debug      don't remove temporary files
27194      --recheck    update $as_me by reconfiguring in the same conditions
27195      --file=FILE[:TEMPLATE]
27196                   instantiate the configuration file FILE
27197      --header=FILE[:TEMPLATE]
27198                   instantiate the configuration header FILE
27199
27200Configuration files:
27201$config_files
27202
27203Configuration headers:
27204$config_headers
27205
27206Configuration commands:
27207$config_commands
27208
27209Report bugs to <http://bugs.ntp.org./>.
27210sntp home page: <http://www.ntp.org./>."
27211
27212_ACEOF
27213cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27214ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
27215ac_cs_version="\\
27216sntp config.status 4.2.8p13
27217configured by $0, generated by GNU Autoconf 2.69,
27218  with options \\"\$ac_cs_config\\"
27219
27220Copyright (C) 2012 Free Software Foundation, Inc.
27221This config.status script is free software; the Free Software Foundation
27222gives unlimited permission to copy, distribute and modify it."
27223
27224ac_pwd='$ac_pwd'
27225srcdir='$srcdir'
27226INSTALL='$INSTALL'
27227MKDIR_P='$MKDIR_P'
27228AWK='$AWK'
27229test -n "\$AWK" || AWK=awk
27230_ACEOF
27231
27232cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27233# The default lists apply if the user does not specify any file.
27234ac_need_defaults=:
27235while test $# != 0
27236do
27237  case $1 in
27238  --*=?*)
27239    ac_option=`expr "X$1" : 'X\([^=]*\)='`
27240    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
27241    ac_shift=:
27242    ;;
27243  --*=)
27244    ac_option=`expr "X$1" : 'X\([^=]*\)='`
27245    ac_optarg=
27246    ac_shift=:
27247    ;;
27248  *)
27249    ac_option=$1
27250    ac_optarg=$2
27251    ac_shift=shift
27252    ;;
27253  esac
27254
27255  case $ac_option in
27256  # Handling of the options.
27257  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27258    ac_cs_recheck=: ;;
27259  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
27260    $as_echo "$ac_cs_version"; exit ;;
27261  --config | --confi | --conf | --con | --co | --c )
27262    $as_echo "$ac_cs_config"; exit ;;
27263  --debug | --debu | --deb | --de | --d | -d )
27264    debug=: ;;
27265  --file | --fil | --fi | --f )
27266    $ac_shift
27267    case $ac_optarg in
27268    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27269    '') as_fn_error $? "missing file argument" ;;
27270    esac
27271    as_fn_append CONFIG_FILES " '$ac_optarg'"
27272    ac_need_defaults=false;;
27273  --header | --heade | --head | --hea )
27274    $ac_shift
27275    case $ac_optarg in
27276    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27277    esac
27278    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
27279    ac_need_defaults=false;;
27280  --he | --h)
27281    # Conflict between --help and --header
27282    as_fn_error $? "ambiguous option: \`$1'
27283Try \`$0 --help' for more information.";;
27284  --help | --hel | -h )
27285    $as_echo "$ac_cs_usage"; exit ;;
27286  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27287  | -silent | --silent | --silen | --sile | --sil | --si | --s)
27288    ac_cs_silent=: ;;
27289
27290  # This is an error.
27291  -*) as_fn_error $? "unrecognized option: \`$1'
27292Try \`$0 --help' for more information." ;;
27293
27294  *) as_fn_append ac_config_targets " $1"
27295     ac_need_defaults=false ;;
27296
27297  esac
27298  shift
27299done
27300
27301ac_configure_extra_args=
27302
27303if $ac_cs_silent; then
27304  exec 6>/dev/null
27305  ac_configure_extra_args="$ac_configure_extra_args --silent"
27306fi
27307
27308_ACEOF
27309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27310if \$ac_cs_recheck; then
27311  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27312  shift
27313  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27314  CONFIG_SHELL='$SHELL'
27315  export CONFIG_SHELL
27316  exec "\$@"
27317fi
27318
27319_ACEOF
27320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27321exec 5>>config.log
27322{
27323  echo
27324  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27325## Running $as_me. ##
27326_ASBOX
27327  $as_echo "$ac_log"
27328} >&5
27329
27330_ACEOF
27331cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27332#
27333# INIT-COMMANDS
27334#
27335AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
27336
27337
27338# The HP-UX ksh and POSIX shell print the target directory to stdout
27339# if CDPATH is set.
27340(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
27341
27342sed_quote_subst='$sed_quote_subst'
27343double_quote_subst='$double_quote_subst'
27344delay_variable_subst='$delay_variable_subst'
27345SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
27346Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
27347GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
27348EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
27349FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
27350SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
27351ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
27352LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
27353enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
27354macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
27355macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
27356enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
27357pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
27358enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
27359shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
27360PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
27361host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
27362host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
27363host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
27364build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
27365build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
27366build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
27367NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
27368LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
27369max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
27370ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
27371exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
27372lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
27373lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
27374lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
27375lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
27376lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
27377reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
27378reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
27379OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
27380deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
27381file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
27382file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
27383want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
27384DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
27385sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
27386AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
27387AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
27388archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
27389STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
27390RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
27391old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27392old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27393old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
27394lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
27395CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
27396CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
27397compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
27398GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
27399lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
27400lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
27401lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
27402lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
27403lt_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"`'
27404lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
27405nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
27406lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
27407lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
27408objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
27409MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
27410lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
27411lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
27412lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
27413lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
27414lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
27415need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
27416MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
27417DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
27418NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
27419LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
27420OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
27421OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
27422libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
27423shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
27424extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27425archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
27426enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
27427export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
27428whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
27429compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
27430old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
27431old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
27432archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
27433archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27434module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
27435module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
27436with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
27437allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
27438no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
27439hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
27440hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
27441hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
27442hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
27443hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
27444hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
27445hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
27446inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
27447link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
27448always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
27449export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
27450exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
27451include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
27452prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
27453postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
27454file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
27455variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
27456need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
27457need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
27458version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
27459runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
27460shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
27461shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
27462libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
27463library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
27464soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
27465install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
27466postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
27467postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
27468finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
27469finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
27470hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
27471sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
27472configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
27473configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
27474hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
27475enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
27476enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
27477enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
27478old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
27479striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
27480
27481LTCC='$LTCC'
27482LTCFLAGS='$LTCFLAGS'
27483compiler='$compiler_DEFAULT'
27484
27485# A function that is used when there is no print builtin or printf.
27486func_fallback_echo ()
27487{
27488  eval 'cat <<_LTECHO_EOF
27489\$1
27490_LTECHO_EOF'
27491}
27492
27493# Quote evaled strings.
27494for var in SED \
27495GREP \
27496EGREP \
27497FGREP \
27498SHELL \
27499ECHO \
27500LD \
27501PATH_SEPARATOR \
27502NM \
27503LN_S \
27504lt_SP2NL \
27505lt_NL2SP \
27506reload_flag \
27507OBJDUMP \
27508deplibs_check_method \
27509file_magic_cmd \
27510file_magic_glob \
27511want_nocaseglob \
27512DLLTOOL \
27513sharedlib_from_linklib_cmd \
27514AR \
27515AR_FLAGS \
27516archiver_list_spec \
27517STRIP \
27518RANLIB \
27519CC \
27520CFLAGS \
27521compiler \
27522lt_cv_sys_global_symbol_pipe \
27523lt_cv_sys_global_symbol_to_cdecl \
27524lt_cv_sys_global_symbol_to_import \
27525lt_cv_sys_global_symbol_to_c_name_address \
27526lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
27527lt_cv_nm_interface \
27528nm_file_list_spec \
27529lt_cv_truncate_bin \
27530lt_prog_compiler_no_builtin_flag \
27531lt_prog_compiler_pic \
27532lt_prog_compiler_wl \
27533lt_prog_compiler_static \
27534lt_cv_prog_compiler_c_o \
27535need_locks \
27536MANIFEST_TOOL \
27537DSYMUTIL \
27538NMEDIT \
27539LIPO \
27540OTOOL \
27541OTOOL64 \
27542shrext_cmds \
27543export_dynamic_flag_spec \
27544whole_archive_flag_spec \
27545compiler_needs_object \
27546with_gnu_ld \
27547allow_undefined_flag \
27548no_undefined_flag \
27549hardcode_libdir_flag_spec \
27550hardcode_libdir_separator \
27551exclude_expsyms \
27552include_expsyms \
27553file_list_spec \
27554variables_saved_for_relink \
27555libname_spec \
27556library_names_spec \
27557soname_spec \
27558install_override_mode \
27559finish_eval \
27560old_striplib \
27561striplib; do
27562    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27563    *[\\\\\\\`\\"\\\$]*)
27564      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27565      ;;
27566    *)
27567      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27568      ;;
27569    esac
27570done
27571
27572# Double-quote double-evaled strings.
27573for var in reload_cmds \
27574old_postinstall_cmds \
27575old_postuninstall_cmds \
27576old_archive_cmds \
27577extract_expsyms_cmds \
27578old_archive_from_new_cmds \
27579old_archive_from_expsyms_cmds \
27580archive_cmds \
27581archive_expsym_cmds \
27582module_cmds \
27583module_expsym_cmds \
27584export_symbols_cmds \
27585prelink_cmds \
27586postlink_cmds \
27587postinstall_cmds \
27588postuninstall_cmds \
27589finish_cmds \
27590sys_lib_search_path_spec \
27591configure_time_dlsearch_path \
27592configure_time_lt_sys_library_path; do
27593    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
27594    *[\\\\\\\`\\"\\\$]*)
27595      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
27596      ;;
27597    *)
27598      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
27599      ;;
27600    esac
27601done
27602
27603ac_aux_dir='$ac_aux_dir'
27604
27605# See if we are running on zsh, and set the options that allow our
27606# commands through without removal of \ escapes INIT.
27607if test -n "\${ZSH_VERSION+set}"; then
27608   setopt NO_GLOB_SUBST
27609fi
27610
27611
27612    PACKAGE='$PACKAGE'
27613    VERSION='$VERSION'
27614    RM='$RM'
27615    ofile='$ofile'
27616
27617
27618
27619
27620_ACEOF
27621
27622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27623
27624# Handling of arguments.
27625for ac_config_target in $ac_config_targets
27626do
27627  case $ac_config_target in
27628    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
27629    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
27630    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
27631    "libopts/Makefile") CONFIG_FILES="$CONFIG_FILES libopts/Makefile" ;;
27632    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27633    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
27634    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
27635    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
27636    "tests/fileHandlingTest.h") CONFIG_FILES="$CONFIG_FILES tests/fileHandlingTest.h" ;;
27637    "unity/Makefile") CONFIG_FILES="$CONFIG_FILES unity/Makefile" ;;
27638
27639  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
27640  esac
27641done
27642
27643
27644# If the user did not use the arguments to specify the items to instantiate,
27645# then the envvar interface is used.  Set only those that are not.
27646# We use the long form for the default assignment because of an extremely
27647# bizarre bug on SunOS 4.1.3.
27648if $ac_need_defaults; then
27649  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27650  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27651  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27652fi
27653
27654# Have a temporary directory for convenience.  Make it in the build tree
27655# simply because there is no reason against having it here, and in addition,
27656# creating and moving files from /tmp can sometimes cause problems.
27657# Hook for its removal unless debugging.
27658# Note that there is a small window in which the directory will not be cleaned:
27659# after its creation but before its name has been assigned to `$tmp'.
27660$debug ||
27661{
27662  tmp= ac_tmp=
27663  trap 'exit_status=$?
27664  : "${ac_tmp:=$tmp}"
27665  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
27666' 0
27667  trap 'as_fn_exit 1' 1 2 13 15
27668}
27669# Create a (secure) tmp directory for tmp files.
27670
27671{
27672  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
27673  test -d "$tmp"
27674}  ||
27675{
27676  tmp=./conf$$-$RANDOM
27677  (umask 077 && mkdir "$tmp")
27678} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
27679ac_tmp=$tmp
27680
27681# Set up the scripts for CONFIG_FILES section.
27682# No need to generate them if there are no CONFIG_FILES.
27683# This happens for instance with `./config.status config.h'.
27684if test -n "$CONFIG_FILES"; then
27685
27686
27687ac_cr=`echo X | tr X '\015'`
27688# On cygwin, bash can eat \r inside `` if the user requested igncr.
27689# But we know of no other shell where ac_cr would be empty at this
27690# point, so we can use a bashism as a fallback.
27691if test "x$ac_cr" = x; then
27692  eval ac_cr=\$\'\\r\'
27693fi
27694ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27695if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27696  ac_cs_awk_cr='\\r'
27697else
27698  ac_cs_awk_cr=$ac_cr
27699fi
27700
27701echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
27702_ACEOF
27703
27704
27705{
27706  echo "cat >conf$$subs.awk <<_ACEOF" &&
27707  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27708  echo "_ACEOF"
27709} >conf$$subs.sh ||
27710  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27711ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
27712ac_delim='%!_!# '
27713for ac_last_try in false false false false false :; do
27714  . ./conf$$subs.sh ||
27715    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27716
27717  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27718  if test $ac_delim_n = $ac_delim_num; then
27719    break
27720  elif $ac_last_try; then
27721    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
27722  else
27723    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27724  fi
27725done
27726rm -f conf$$subs.sh
27727
27728cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27729cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
27730_ACEOF
27731sed -n '
27732h
27733s/^/S["/; s/!.*/"]=/
27734p
27735g
27736s/^[^!]*!//
27737:repl
27738t repl
27739s/'"$ac_delim"'$//
27740t delim
27741:nl
27742h
27743s/\(.\{148\}\)..*/\1/
27744t more1
27745s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27746p
27747n
27748b repl
27749:more1
27750s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27751p
27752g
27753s/.\{148\}//
27754t nl
27755:delim
27756h
27757s/\(.\{148\}\)..*/\1/
27758t more2
27759s/["\\]/\\&/g; s/^/"/; s/$/"/
27760p
27761b
27762:more2
27763s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27764p
27765g
27766s/.\{148\}//
27767t delim
27768' <conf$$subs.awk | sed '
27769/^[^""]/{
27770  N
27771  s/\n//
27772}
27773' >>$CONFIG_STATUS || ac_write_fail=1
27774rm -f conf$$subs.awk
27775cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27776_ACAWK
27777cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
27778  for (key in S) S_is_set[key] = 1
27779  FS = ""
27780
27781}
27782{
27783  line = $ 0
27784  nfields = split(line, field, "@")
27785  substed = 0
27786  len = length(field[1])
27787  for (i = 2; i < nfields; i++) {
27788    key = field[i]
27789    keylen = length(key)
27790    if (S_is_set[key]) {
27791      value = S[key]
27792      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27793      len += length(value) + length(field[++i])
27794      substed = 1
27795    } else
27796      len += 1 + keylen
27797  }
27798
27799  print line
27800}
27801
27802_ACAWK
27803_ACEOF
27804cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27805if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27806  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27807else
27808  cat
27809fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
27810  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
27811_ACEOF
27812
27813# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
27814# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
27815# trailing colons and then remove the whole line if VPATH becomes empty
27816# (actually we leave an empty line to preserve line numbers).
27817if test "x$srcdir" = x.; then
27818  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
27819h
27820s///
27821s/^/:/
27822s/[	 ]*$/:/
27823s/:\$(srcdir):/:/g
27824s/:\${srcdir}:/:/g
27825s/:@srcdir@:/:/g
27826s/^:*//
27827s/:*$//
27828x
27829s/\(=[	 ]*\).*/\1/
27830G
27831s/\n//
27832s/^[^=]*=[	 ]*$//
27833}'
27834fi
27835
27836cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27837fi # test -n "$CONFIG_FILES"
27838
27839# Set up the scripts for CONFIG_HEADERS section.
27840# No need to generate them if there are no CONFIG_HEADERS.
27841# This happens for instance with `./config.status Makefile'.
27842if test -n "$CONFIG_HEADERS"; then
27843cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
27844BEGIN {
27845_ACEOF
27846
27847# Transform confdefs.h into an awk script `defines.awk', embedded as
27848# here-document in config.status, that substitutes the proper values into
27849# config.h.in to produce config.h.
27850
27851# Create a delimiter string that does not exist in confdefs.h, to ease
27852# handling of long lines.
27853ac_delim='%!_!# '
27854for ac_last_try in false false :; do
27855  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
27856  if test -z "$ac_tt"; then
27857    break
27858  elif $ac_last_try; then
27859    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
27860  else
27861    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27862  fi
27863done
27864
27865# For the awk script, D is an array of macro values keyed by name,
27866# likewise P contains macro parameters if any.  Preserve backslash
27867# newline sequences.
27868
27869ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27870sed -n '
27871s/.\{148\}/&'"$ac_delim"'/g
27872t rset
27873:rset
27874s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
27875t def
27876d
27877:def
27878s/\\$//
27879t bsnl
27880s/["\\]/\\&/g
27881s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27882D["\1"]=" \3"/p
27883s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
27884d
27885:bsnl
27886s/["\\]/\\&/g
27887s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
27888D["\1"]=" \3\\\\\\n"\\/p
27889t cont
27890s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27891t cont
27892d
27893:cont
27894n
27895s/.\{148\}/&'"$ac_delim"'/g
27896t clear
27897:clear
27898s/\\$//
27899t bsnlc
27900s/["\\]/\\&/g; s/^/"/; s/$/"/p
27901d
27902:bsnlc
27903s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27904b cont
27905' <confdefs.h | sed '
27906s/'"$ac_delim"'/"\\\
27907"/g' >>$CONFIG_STATUS || ac_write_fail=1
27908
27909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27910  for (key in D) D_is_set[key] = 1
27911  FS = ""
27912}
27913/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27914  line = \$ 0
27915  split(line, arg, " ")
27916  if (arg[1] == "#") {
27917    defundef = arg[2]
27918    mac1 = arg[3]
27919  } else {
27920    defundef = substr(arg[1], 2)
27921    mac1 = arg[2]
27922  }
27923  split(mac1, mac2, "(") #)
27924  macro = mac2[1]
27925  prefix = substr(line, 1, index(line, defundef) - 1)
27926  if (D_is_set[macro]) {
27927    # Preserve the white space surrounding the "#".
27928    print prefix "define", macro P[macro] D[macro]
27929    next
27930  } else {
27931    # Replace #undef with comments.  This is necessary, for example,
27932    # in the case of _POSIX_SOURCE, which is predefined and required
27933    # on some systems where configure will not decide to define it.
27934    if (defundef == "undef") {
27935      print "/*", prefix defundef, macro, "*/"
27936      next
27937    }
27938  }
27939}
27940{ print }
27941_ACAWK
27942_ACEOF
27943cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27944  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
27945fi # test -n "$CONFIG_HEADERS"
27946
27947
27948eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
27949shift
27950for ac_tag
27951do
27952  case $ac_tag in
27953  :[FHLC]) ac_mode=$ac_tag; continue;;
27954  esac
27955  case $ac_mode$ac_tag in
27956  :[FHL]*:*);;
27957  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
27958  :[FH]-) ac_tag=-:-;;
27959  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27960  esac
27961  ac_save_IFS=$IFS
27962  IFS=:
27963  set x $ac_tag
27964  IFS=$ac_save_IFS
27965  shift
27966  ac_file=$1
27967  shift
27968
27969  case $ac_mode in
27970  :L) ac_source=$1;;
27971  :[FH])
27972    ac_file_inputs=
27973    for ac_f
27974    do
27975      case $ac_f in
27976      -) ac_f="$ac_tmp/stdin";;
27977      *) # Look for the file first in the build tree, then in the source tree
27978	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
27979	 # because $ac_f cannot contain `:'.
27980	 test -f "$ac_f" ||
27981	   case $ac_f in
27982	   [\\/$]*) false;;
27983	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27984	   esac ||
27985	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
27986      esac
27987      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27988      as_fn_append ac_file_inputs " '$ac_f'"
27989    done
27990
27991    # Let's still pretend it is `configure' which instantiates (i.e., don't
27992    # use $as_me), people would be surprised to read:
27993    #    /* config.h.  Generated by config.status.  */
27994    configure_input='Generated from '`
27995	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27996	`' by configure.'
27997    if test x"$ac_file" != x-; then
27998      configure_input="$ac_file.  $configure_input"
27999      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
28000$as_echo "$as_me: creating $ac_file" >&6;}
28001    fi
28002    # Neutralize special characters interpreted by sed in replacement strings.
28003    case $configure_input in #(
28004    *\&* | *\|* | *\\* )
28005       ac_sed_conf_input=`$as_echo "$configure_input" |
28006       sed 's/[\\\\&|]/\\\\&/g'`;; #(
28007    *) ac_sed_conf_input=$configure_input;;
28008    esac
28009
28010    case $ac_tag in
28011    *:-:* | *:-) cat >"$ac_tmp/stdin" \
28012      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
28013    esac
28014    ;;
28015  esac
28016
28017  ac_dir=`$as_dirname -- "$ac_file" ||
28018$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28019	 X"$ac_file" : 'X\(//\)[^/]' \| \
28020	 X"$ac_file" : 'X\(//\)$' \| \
28021	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
28022$as_echo X"$ac_file" |
28023    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28024	    s//\1/
28025	    q
28026	  }
28027	  /^X\(\/\/\)[^/].*/{
28028	    s//\1/
28029	    q
28030	  }
28031	  /^X\(\/\/\)$/{
28032	    s//\1/
28033	    q
28034	  }
28035	  /^X\(\/\).*/{
28036	    s//\1/
28037	    q
28038	  }
28039	  s/.*/./; q'`
28040  as_dir="$ac_dir"; as_fn_mkdir_p
28041  ac_builddir=.
28042
28043case "$ac_dir" in
28044.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28045*)
28046  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28047  # A ".." for each directory in $ac_dir_suffix.
28048  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28049  case $ac_top_builddir_sub in
28050  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28051  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28052  esac ;;
28053esac
28054ac_abs_top_builddir=$ac_pwd
28055ac_abs_builddir=$ac_pwd$ac_dir_suffix
28056# for backward compatibility:
28057ac_top_builddir=$ac_top_build_prefix
28058
28059case $srcdir in
28060  .)  # We are building in place.
28061    ac_srcdir=.
28062    ac_top_srcdir=$ac_top_builddir_sub
28063    ac_abs_top_srcdir=$ac_pwd ;;
28064  [\\/]* | ?:[\\/]* )  # Absolute name.
28065    ac_srcdir=$srcdir$ac_dir_suffix;
28066    ac_top_srcdir=$srcdir
28067    ac_abs_top_srcdir=$srcdir ;;
28068  *) # Relative name.
28069    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28070    ac_top_srcdir=$ac_top_build_prefix$srcdir
28071    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
28072esac
28073ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
28074
28075
28076  case $ac_mode in
28077  :F)
28078  #
28079  # CONFIG_FILE
28080  #
28081
28082  case $INSTALL in
28083  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
28084  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
28085  esac
28086  ac_MKDIR_P=$MKDIR_P
28087  case $MKDIR_P in
28088  [\\/$]* | ?:[\\/]* ) ;;
28089  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
28090  esac
28091_ACEOF
28092
28093cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28094# If the template does not know about datarootdir, expand it.
28095# FIXME: This hack should be removed a few years after 2.60.
28096ac_datarootdir_hack=; ac_datarootdir_seen=
28097ac_sed_dataroot='
28098/datarootdir/ {
28099  p
28100  q
28101}
28102/@datadir@/p
28103/@docdir@/p
28104/@infodir@/p
28105/@localedir@/p
28106/@mandir@/p'
28107case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
28108*datarootdir*) ac_datarootdir_seen=yes;;
28109*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
28110  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28111$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
28112_ACEOF
28113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28114  ac_datarootdir_hack='
28115  s&@datadir@&$datadir&g
28116  s&@docdir@&$docdir&g
28117  s&@infodir@&$infodir&g
28118  s&@localedir@&$localedir&g
28119  s&@mandir@&$mandir&g
28120  s&\\\${datarootdir}&$datarootdir&g' ;;
28121esac
28122_ACEOF
28123
28124# Neutralize VPATH when `$srcdir' = `.'.
28125# Shell code in configure.ac might set extrasub.
28126# FIXME: do we really want to maintain this feature?
28127cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28128ac_sed_extra="$ac_vpsub
28129$extrasub
28130_ACEOF
28131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28132:t
28133/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
28134s|@configure_input@|$ac_sed_conf_input|;t t
28135s&@top_builddir@&$ac_top_builddir_sub&;t t
28136s&@top_build_prefix@&$ac_top_build_prefix&;t t
28137s&@srcdir@&$ac_srcdir&;t t
28138s&@abs_srcdir@&$ac_abs_srcdir&;t t
28139s&@top_srcdir@&$ac_top_srcdir&;t t
28140s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28141s&@builddir@&$ac_builddir&;t t
28142s&@abs_builddir@&$ac_abs_builddir&;t t
28143s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28144s&@INSTALL@&$ac_INSTALL&;t t
28145s&@MKDIR_P@&$ac_MKDIR_P&;t t
28146$ac_datarootdir_hack
28147"
28148eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
28149  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28150
28151test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28152  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
28153  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
28154      "$ac_tmp/out"`; test -z "$ac_out"; } &&
28155  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28156which seems to be undefined.  Please make sure it is defined" >&5
28157$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
28158which seems to be undefined.  Please make sure it is defined" >&2;}
28159
28160  rm -f "$ac_tmp/stdin"
28161  case $ac_file in
28162  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
28163  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
28164  esac \
28165  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28166 ;;
28167  :H)
28168  #
28169  # CONFIG_HEADER
28170  #
28171  if test x"$ac_file" != x-; then
28172    {
28173      $as_echo "/* $configure_input  */" \
28174      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
28175    } >"$ac_tmp/config.h" \
28176      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
28177    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
28178      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
28179$as_echo "$as_me: $ac_file is unchanged" >&6;}
28180    else
28181      rm -f "$ac_file"
28182      mv "$ac_tmp/config.h" "$ac_file" \
28183	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
28184    fi
28185  else
28186    $as_echo "/* $configure_input  */" \
28187      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
28188      || as_fn_error $? "could not create -" "$LINENO" 5
28189  fi
28190# Compute "$ac_file"'s index in $config_headers.
28191_am_arg="$ac_file"
28192_am_stamp_count=1
28193for _am_header in $config_headers :; do
28194  case $_am_header in
28195    $_am_arg | $_am_arg:* )
28196      break ;;
28197    * )
28198      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
28199  esac
28200done
28201echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
28202$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28203	 X"$_am_arg" : 'X\(//\)[^/]' \| \
28204	 X"$_am_arg" : 'X\(//\)$' \| \
28205	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
28206$as_echo X"$_am_arg" |
28207    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28208	    s//\1/
28209	    q
28210	  }
28211	  /^X\(\/\/\)[^/].*/{
28212	    s//\1/
28213	    q
28214	  }
28215	  /^X\(\/\/\)$/{
28216	    s//\1/
28217	    q
28218	  }
28219	  /^X\(\/\).*/{
28220	    s//\1/
28221	    q
28222	  }
28223	  s/.*/./; q'`/stamp-h$_am_stamp_count
28224 ;;
28225
28226  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
28227$as_echo "$as_me: executing $ac_file commands" >&6;}
28228 ;;
28229  esac
28230
28231
28232  case $ac_file$ac_mode in
28233    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
28234  # Older Autoconf quotes --file arguments for eval, but not when files
28235  # are listed without --file.  Let's play safe and only enable the eval
28236  # if we detect the quoting.
28237  case $CONFIG_FILES in
28238  *\'*) eval set x "$CONFIG_FILES" ;;
28239  *)   set x $CONFIG_FILES ;;
28240  esac
28241  shift
28242  for mf
28243  do
28244    # Strip MF so we end up with the name of the file.
28245    mf=`echo "$mf" | sed -e 's/:.*$//'`
28246    # Check whether this is an Automake generated Makefile or not.
28247    # We used to match only the files named 'Makefile.in', but
28248    # some people rename them; so instead we look at the file content.
28249    # Grep'ing the first line is not enough: some people post-process
28250    # each Makefile.in and add a new line on top of each file to say so.
28251    # Grep'ing the whole file is not good either: AIX grep has a line
28252    # limit of 2048, but all sed's we know have understand at least 4000.
28253    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
28254      dirpart=`$as_dirname -- "$mf" ||
28255$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28256	 X"$mf" : 'X\(//\)[^/]' \| \
28257	 X"$mf" : 'X\(//\)$' \| \
28258	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
28259$as_echo X"$mf" |
28260    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28261	    s//\1/
28262	    q
28263	  }
28264	  /^X\(\/\/\)[^/].*/{
28265	    s//\1/
28266	    q
28267	  }
28268	  /^X\(\/\/\)$/{
28269	    s//\1/
28270	    q
28271	  }
28272	  /^X\(\/\).*/{
28273	    s//\1/
28274	    q
28275	  }
28276	  s/.*/./; q'`
28277    else
28278      continue
28279    fi
28280    # Extract the definition of DEPDIR, am__include, and am__quote
28281    # from the Makefile without running 'make'.
28282    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
28283    test -z "$DEPDIR" && continue
28284    am__include=`sed -n 's/^am__include = //p' < "$mf"`
28285    test -z "$am__include" && continue
28286    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
28287    # Find all dependency output files, they are included files with
28288    # $(DEPDIR) in their names.  We invoke sed twice because it is the
28289    # simplest approach to changing $(DEPDIR) to its actual value in the
28290    # expansion.
28291    for file in `sed -n "
28292      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
28293	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
28294      # Make sure the directory exists.
28295      test -f "$dirpart/$file" && continue
28296      fdir=`$as_dirname -- "$file" ||
28297$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28298	 X"$file" : 'X\(//\)[^/]' \| \
28299	 X"$file" : 'X\(//\)$' \| \
28300	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
28301$as_echo X"$file" |
28302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28303	    s//\1/
28304	    q
28305	  }
28306	  /^X\(\/\/\)[^/].*/{
28307	    s//\1/
28308	    q
28309	  }
28310	  /^X\(\/\/\)$/{
28311	    s//\1/
28312	    q
28313	  }
28314	  /^X\(\/\).*/{
28315	    s//\1/
28316	    q
28317	  }
28318	  s/.*/./; q'`
28319      as_dir=$dirpart/$fdir; as_fn_mkdir_p
28320      # echo "creating $dirpart/$file"
28321      echo '# dummy' > "$dirpart/$file"
28322    done
28323  done
28324}
28325 ;;
28326    "libtool":C)
28327
28328    # See if we are running on zsh, and set the options that allow our
28329    # commands through without removal of \ escapes.
28330    if test -n "${ZSH_VERSION+set}"; then
28331      setopt NO_GLOB_SUBST
28332    fi
28333
28334    cfgfile=${ofile}T
28335    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
28336    $RM "$cfgfile"
28337
28338    cat <<_LT_EOF >> "$cfgfile"
28339#! $SHELL
28340# Generated automatically by $as_me ($PACKAGE) $VERSION
28341# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
28342# NOTE: Changes made to this file will be lost: look at ltmain.sh.
28343
28344# Provide generalized library-building support services.
28345# Written by Gordon Matzigkeit, 1996
28346
28347# Copyright (C) 2014 Free Software Foundation, Inc.
28348# This is free software; see the source for copying conditions.  There is NO
28349# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28350
28351# GNU Libtool is free software; you can redistribute it and/or modify
28352# it under the terms of the GNU General Public License as published by
28353# the Free Software Foundation; either version 2 of of the License, or
28354# (at your option) any later version.
28355#
28356# As a special exception to the GNU General Public License, if you
28357# distribute this file as part of a program or library that is built
28358# using GNU Libtool, you may include this file under the  same
28359# distribution terms that you use for the rest of that program.
28360#
28361# GNU Libtool is distributed in the hope that it will be useful, but
28362# WITHOUT ANY WARRANTY; without even the implied warranty of
28363# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28364# GNU General Public License for more details.
28365#
28366# You should have received a copy of the GNU General Public License
28367# along with this program.  If not, see <http://www.gnu.org/licenses/>.
28368
28369
28370# The names of the tagged configurations supported by this script.
28371available_tags=''
28372
28373# Configured defaults for sys_lib_dlsearch_path munging.
28374: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
28375
28376# ### BEGIN LIBTOOL CONFIG
28377
28378# A sed program that does not truncate output.
28379SED=$lt_SED
28380
28381# Sed that helps us avoid accidentally triggering echo(1) options like -n.
28382Xsed="\$SED -e 1s/^X//"
28383
28384# A grep program that handles long lines.
28385GREP=$lt_GREP
28386
28387# An ERE matcher.
28388EGREP=$lt_EGREP
28389
28390# A literal string matcher.
28391FGREP=$lt_FGREP
28392
28393# Shell to use when invoking shell scripts.
28394SHELL=$lt_SHELL
28395
28396# An echo program that protects backslashes.
28397ECHO=$lt_ECHO
28398
28399# Whether or not to build shared libraries.
28400build_libtool_libs=$enable_shared
28401
28402# Which release of libtool.m4 was used?
28403macro_version=$macro_version
28404macro_revision=$macro_revision
28405
28406# Whether or not to build static libraries.
28407build_old_libs=$enable_static
28408
28409# What type of objects to build.
28410pic_mode=$pic_mode
28411
28412# Whether or not to optimize for fast installation.
28413fast_install=$enable_fast_install
28414
28415# Shared archive member basename,for filename based shared library versioning on AIX.
28416shared_archive_member_spec=$shared_archive_member_spec
28417
28418# The PATH separator for the build system.
28419PATH_SEPARATOR=$lt_PATH_SEPARATOR
28420
28421# The host system.
28422host_alias=$host_alias
28423host=$host
28424host_os=$host_os
28425
28426# The build system.
28427build_alias=$build_alias
28428build=$build
28429build_os=$build_os
28430
28431# A BSD- or MS-compatible name lister.
28432NM=$lt_NM
28433
28434# Whether we need soft or hard links.
28435LN_S=$lt_LN_S
28436
28437# What is the maximum length of a command?
28438max_cmd_len=$max_cmd_len
28439
28440# Object file suffix (normally "o").
28441objext=$ac_objext
28442
28443# Executable file suffix (normally "").
28444exeext=$exeext
28445
28446# whether the shell understands "unset".
28447lt_unset=$lt_unset
28448
28449# turn spaces into newlines.
28450SP2NL=$lt_lt_SP2NL
28451
28452# turn newlines into spaces.
28453NL2SP=$lt_lt_NL2SP
28454
28455# convert \$build file names to \$host format.
28456to_host_file_cmd=$lt_cv_to_host_file_cmd
28457
28458# convert \$build files to toolchain format.
28459to_tool_file_cmd=$lt_cv_to_tool_file_cmd
28460
28461# An object symbol dumper.
28462OBJDUMP=$lt_OBJDUMP
28463
28464# Method to check whether dependent libraries are shared objects.
28465deplibs_check_method=$lt_deplibs_check_method
28466
28467# Command to use when deplibs_check_method = "file_magic".
28468file_magic_cmd=$lt_file_magic_cmd
28469
28470# How to find potential files when deplibs_check_method = "file_magic".
28471file_magic_glob=$lt_file_magic_glob
28472
28473# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
28474want_nocaseglob=$lt_want_nocaseglob
28475
28476# DLL creation program.
28477DLLTOOL=$lt_DLLTOOL
28478
28479# Command to associate shared and link libraries.
28480sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
28481
28482# The archiver.
28483AR=$lt_AR
28484
28485# Flags to create an archive.
28486AR_FLAGS=$lt_AR_FLAGS
28487
28488# How to feed a file listing to the archiver.
28489archiver_list_spec=$lt_archiver_list_spec
28490
28491# A symbol stripping program.
28492STRIP=$lt_STRIP
28493
28494# Commands used to install an old-style archive.
28495RANLIB=$lt_RANLIB
28496old_postinstall_cmds=$lt_old_postinstall_cmds
28497old_postuninstall_cmds=$lt_old_postuninstall_cmds
28498
28499# Whether to use a lock for old archive extraction.
28500lock_old_archive_extraction=$lock_old_archive_extraction
28501
28502# A C compiler.
28503LTCC=$lt_CC
28504
28505# LTCC compiler flags.
28506LTCFLAGS=$lt_CFLAGS
28507
28508# Take the output of nm and produce a listing of raw symbols and C names.
28509global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
28510
28511# Transform the output of nm in a proper C declaration.
28512global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
28513
28514# Transform the output of nm into a list of symbols to manually relocate.
28515global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
28516
28517# Transform the output of nm in a C name address pair.
28518global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
28519
28520# Transform the output of nm in a C name address pair when lib prefix is needed.
28521global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
28522
28523# The name lister interface.
28524nm_interface=$lt_lt_cv_nm_interface
28525
28526# Specify filename containing input files for \$NM.
28527nm_file_list_spec=$lt_nm_file_list_spec
28528
28529# The root where to search for dependent libraries,and where our libraries should be installed.
28530lt_sysroot=$lt_sysroot
28531
28532# Command to truncate a binary pipe.
28533lt_truncate_bin=$lt_lt_cv_truncate_bin
28534
28535# The name of the directory that contains temporary libtool files.
28536objdir=$objdir
28537
28538# Used to examine libraries when file_magic_cmd begins with "file".
28539MAGIC_CMD=$MAGIC_CMD
28540
28541# Must we lock files when doing compilation?
28542need_locks=$lt_need_locks
28543
28544# Manifest tool.
28545MANIFEST_TOOL=$lt_MANIFEST_TOOL
28546
28547# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
28548DSYMUTIL=$lt_DSYMUTIL
28549
28550# Tool to change global to local symbols on Mac OS X.
28551NMEDIT=$lt_NMEDIT
28552
28553# Tool to manipulate fat objects and archives on Mac OS X.
28554LIPO=$lt_LIPO
28555
28556# ldd/readelf like tool for Mach-O binaries on Mac OS X.
28557OTOOL=$lt_OTOOL
28558
28559# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
28560OTOOL64=$lt_OTOOL64
28561
28562# Old archive suffix (normally "a").
28563libext=$libext
28564
28565# Shared library suffix (normally ".so").
28566shrext_cmds=$lt_shrext_cmds
28567
28568# The commands to extract the exported symbol list from a shared archive.
28569extract_expsyms_cmds=$lt_extract_expsyms_cmds
28570
28571# Variables whose values should be saved in libtool wrapper scripts and
28572# restored at link time.
28573variables_saved_for_relink=$lt_variables_saved_for_relink
28574
28575# Do we need the "lib" prefix for modules?
28576need_lib_prefix=$need_lib_prefix
28577
28578# Do we need a version for libraries?
28579need_version=$need_version
28580
28581# Library versioning type.
28582version_type=$version_type
28583
28584# Shared library runtime path variable.
28585runpath_var=$runpath_var
28586
28587# Shared library path variable.
28588shlibpath_var=$shlibpath_var
28589
28590# Is shlibpath searched before the hard-coded library search path?
28591shlibpath_overrides_runpath=$shlibpath_overrides_runpath
28592
28593# Format of library name prefix.
28594libname_spec=$lt_libname_spec
28595
28596# List of archive names.  First name is the real one, the rest are links.
28597# The last name is the one that the linker finds with -lNAME
28598library_names_spec=$lt_library_names_spec
28599
28600# The coded name of the library, if different from the real name.
28601soname_spec=$lt_soname_spec
28602
28603# Permission mode override for installation of shared libraries.
28604install_override_mode=$lt_install_override_mode
28605
28606# Command to use after installation of a shared archive.
28607postinstall_cmds=$lt_postinstall_cmds
28608
28609# Command to use after uninstallation of a shared archive.
28610postuninstall_cmds=$lt_postuninstall_cmds
28611
28612# Commands used to finish a libtool library installation in a directory.
28613finish_cmds=$lt_finish_cmds
28614
28615# As "finish_cmds", except a single script fragment to be evaled but
28616# not shown.
28617finish_eval=$lt_finish_eval
28618
28619# Whether we should hardcode library paths into libraries.
28620hardcode_into_libs=$hardcode_into_libs
28621
28622# Compile-time system search path for libraries.
28623sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
28624
28625# Detected run-time system search path for libraries.
28626sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
28627
28628# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
28629configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
28630
28631# Whether dlopen is supported.
28632dlopen_support=$enable_dlopen
28633
28634# Whether dlopen of programs is supported.
28635dlopen_self=$enable_dlopen_self
28636
28637# Whether dlopen of statically linked programs is supported.
28638dlopen_self_static=$enable_dlopen_self_static
28639
28640# Commands to strip libraries.
28641old_striplib=$lt_old_striplib
28642striplib=$lt_striplib
28643
28644
28645# The linker used to build libraries.
28646LD=$lt_LD
28647
28648# How to create reloadable object files.
28649reload_flag=$lt_reload_flag
28650reload_cmds=$lt_reload_cmds
28651
28652# Commands used to build an old-style archive.
28653old_archive_cmds=$lt_old_archive_cmds
28654
28655# A language specific compiler.
28656CC=$lt_compiler
28657
28658# Is the compiler the GNU compiler?
28659with_gcc=$GCC
28660
28661# Compiler flag to turn off builtin functions.
28662no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
28663
28664# Additional compiler flags for building library objects.
28665pic_flag=$lt_lt_prog_compiler_pic
28666
28667# How to pass a linker flag through the compiler.
28668wl=$lt_lt_prog_compiler_wl
28669
28670# Compiler flag to prevent dynamic linking.
28671link_static_flag=$lt_lt_prog_compiler_static
28672
28673# Does compiler simultaneously support -c and -o options?
28674compiler_c_o=$lt_lt_cv_prog_compiler_c_o
28675
28676# Whether or not to add -lc for building shared libraries.
28677build_libtool_need_lc=$archive_cmds_need_lc
28678
28679# Whether or not to disallow shared libs when runtime libs are static.
28680allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
28681
28682# Compiler flag to allow reflexive dlopens.
28683export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
28684
28685# Compiler flag to generate shared objects directly from archives.
28686whole_archive_flag_spec=$lt_whole_archive_flag_spec
28687
28688# Whether the compiler copes with passing no objects directly.
28689compiler_needs_object=$lt_compiler_needs_object
28690
28691# Create an old-style archive from a shared archive.
28692old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
28693
28694# Create a temporary old-style archive to link instead of a shared archive.
28695old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
28696
28697# Commands used to build a shared archive.
28698archive_cmds=$lt_archive_cmds
28699archive_expsym_cmds=$lt_archive_expsym_cmds
28700
28701# Commands used to build a loadable module if different from building
28702# a shared archive.
28703module_cmds=$lt_module_cmds
28704module_expsym_cmds=$lt_module_expsym_cmds
28705
28706# Whether we are building with GNU ld or not.
28707with_gnu_ld=$lt_with_gnu_ld
28708
28709# Flag that allows shared libraries with undefined symbols to be built.
28710allow_undefined_flag=$lt_allow_undefined_flag
28711
28712# Flag that enforces no undefined symbols.
28713no_undefined_flag=$lt_no_undefined_flag
28714
28715# Flag to hardcode \$libdir into a binary during linking.
28716# This must work even if \$libdir does not exist
28717hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
28718
28719# Whether we need a single "-rpath" flag with a separated argument.
28720hardcode_libdir_separator=$lt_hardcode_libdir_separator
28721
28722# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28723# DIR into the resulting binary.
28724hardcode_direct=$hardcode_direct
28725
28726# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
28727# DIR into the resulting binary and the resulting library dependency is
28728# "absolute",i.e impossible to change by setting \$shlibpath_var if the
28729# library is relocated.
28730hardcode_direct_absolute=$hardcode_direct_absolute
28731
28732# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
28733# into the resulting binary.
28734hardcode_minus_L=$hardcode_minus_L
28735
28736# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
28737# into the resulting binary.
28738hardcode_shlibpath_var=$hardcode_shlibpath_var
28739
28740# Set to "yes" if building a shared library automatically hardcodes DIR
28741# into the library and all subsequent libraries and executables linked
28742# against it.
28743hardcode_automatic=$hardcode_automatic
28744
28745# Set to yes if linker adds runtime paths of dependent libraries
28746# to runtime path list.
28747inherit_rpath=$inherit_rpath
28748
28749# Whether libtool must link a program against all its dependency libraries.
28750link_all_deplibs=$link_all_deplibs
28751
28752# Set to "yes" if exported symbols are required.
28753always_export_symbols=$always_export_symbols
28754
28755# The commands to list exported symbols.
28756export_symbols_cmds=$lt_export_symbols_cmds
28757
28758# Symbols that should not be listed in the preloaded symbols.
28759exclude_expsyms=$lt_exclude_expsyms
28760
28761# Symbols that must always be exported.
28762include_expsyms=$lt_include_expsyms
28763
28764# Commands necessary for linking programs (against libraries) with templates.
28765prelink_cmds=$lt_prelink_cmds
28766
28767# Commands necessary for finishing linking programs.
28768postlink_cmds=$lt_postlink_cmds
28769
28770# Specify filename containing input files.
28771file_list_spec=$lt_file_list_spec
28772
28773# How to hardcode a shared library path into an executable.
28774hardcode_action=$hardcode_action
28775
28776# ### END LIBTOOL CONFIG
28777
28778_LT_EOF
28779
28780    cat <<'_LT_EOF' >> "$cfgfile"
28781
28782# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
28783
28784# func_munge_path_list VARIABLE PATH
28785# -----------------------------------
28786# VARIABLE is name of variable containing _space_ separated list of
28787# directories to be munged by the contents of PATH, which is string
28788# having a format:
28789# "DIR[:DIR]:"
28790#       string "DIR[ DIR]" will be prepended to VARIABLE
28791# ":DIR[:DIR]"
28792#       string "DIR[ DIR]" will be appended to VARIABLE
28793# "DIRP[:DIRP]::[DIRA:]DIRA"
28794#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
28795#       "DIRA[ DIRA]" will be appended to VARIABLE
28796# "DIR[:DIR]"
28797#       VARIABLE will be replaced by "DIR[ DIR]"
28798func_munge_path_list ()
28799{
28800    case x$2 in
28801    x)
28802        ;;
28803    *:)
28804        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
28805        ;;
28806    x:*)
28807        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
28808        ;;
28809    *::*)
28810        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
28811        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
28812        ;;
28813    *)
28814        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
28815        ;;
28816    esac
28817}
28818
28819
28820# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
28821func_cc_basename ()
28822{
28823    for cc_temp in $*""; do
28824      case $cc_temp in
28825        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
28826        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
28827        \-*) ;;
28828        *) break;;
28829      esac
28830    done
28831    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
28832}
28833
28834
28835# ### END FUNCTIONS SHARED WITH CONFIGURE
28836
28837_LT_EOF
28838
28839  case $host_os in
28840  aix3*)
28841    cat <<\_LT_EOF >> "$cfgfile"
28842# AIX sometimes has problems with the GCC collect2 program.  For some
28843# reason, if we set the COLLECT_NAMES environment variable, the problems
28844# vanish in a puff of smoke.
28845if test set != "${COLLECT_NAMES+set}"; then
28846  COLLECT_NAMES=
28847  export COLLECT_NAMES
28848fi
28849_LT_EOF
28850    ;;
28851  esac
28852
28853
28854ltmain=$ac_aux_dir/ltmain.sh
28855
28856
28857  # We use sed instead of cat because bash on DJGPP gets confused if
28858  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
28859  # text mode, it properly converts lines to CR/LF.  This bash problem
28860  # is reportedly fixed, but why not run on old versions too?
28861  sed '$q' "$ltmain" >> "$cfgfile" \
28862     || (rm -f "$cfgfile"; exit 1)
28863
28864   mv -f "$cfgfile" "$ofile" ||
28865    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
28866  chmod +x "$ofile"
28867
28868 ;;
28869
28870  esac
28871done # for ac_tag
28872
28873
28874as_fn_exit 0
28875_ACEOF
28876ac_clean_files=$ac_clean_files_save
28877
28878test $ac_write_fail = 0 ||
28879  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
28880
28881
28882# configure is writing to config.log, and then calls config.status.
28883# config.status does its own redirection, appending to config.log.
28884# Unfortunately, on DOS this fails, as config.log is still kept open
28885# by configure, so config.status won't be able to write to it; its
28886# output is simply discarded.  So we exec the FD to /dev/null,
28887# effectively closing config.log, so it can be properly (re)opened and
28888# appended to by config.status.  When coming back to configure, we
28889# need to make the FD available again.
28890if test "$no_create" != yes; then
28891  ac_cs_success=:
28892  ac_config_status_args=
28893  test "$silent" = yes &&
28894    ac_config_status_args="$ac_config_status_args --quiet"
28895  exec 5>/dev/null
28896  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
28897  exec 5>>config.log
28898  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28899  # would make configure fail if this is the last instruction.
28900  $ac_cs_success || as_fn_exit 1
28901fi
28902
28903#
28904# CONFIG_SUBDIRS section.
28905#
28906if test "$no_recursion" != yes; then
28907
28908  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
28909  # so they do not pile up.
28910  ac_sub_configure_args=
28911  ac_prev=
28912  eval "set x $ac_configure_args"
28913  shift
28914  for ac_arg
28915  do
28916    if test -n "$ac_prev"; then
28917      ac_prev=
28918      continue
28919    fi
28920    case $ac_arg in
28921    -cache-file | --cache-file | --cache-fil | --cache-fi \
28922    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
28923      ac_prev=cache_file ;;
28924    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
28925    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
28926    | --c=*)
28927      ;;
28928    --config-cache | -C)
28929      ;;
28930    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
28931      ac_prev=srcdir ;;
28932    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
28933      ;;
28934    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
28935      ac_prev=prefix ;;
28936    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
28937      ;;
28938    --disable-option-checking)
28939      ;;
28940    *)
28941      case $ac_arg in
28942      *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28943      esac
28944      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
28945    esac
28946  done
28947
28948  # Always prepend --prefix to ensure using the same prefix
28949  # in subdir configurations.
28950  ac_arg="--prefix=$prefix"
28951  case $ac_arg in
28952  *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
28953  esac
28954  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
28955
28956  # Pass --silent
28957  if test "$silent" = yes; then
28958    ac_sub_configure_args="--silent $ac_sub_configure_args"
28959  fi
28960
28961  # Always prepend --disable-option-checking to silence warnings, since
28962  # different subdirs can have different --enable and --with options.
28963  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
28964
28965  ac_popdir=`pwd`
28966  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
28967
28968    # Do not complain, so a configure script can configure whichever
28969    # parts of a large source tree are present.
28970    test -d "$srcdir/$ac_dir" || continue
28971
28972    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
28973    $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
28974    $as_echo "$ac_msg" >&6
28975    as_dir="$ac_dir"; as_fn_mkdir_p
28976    ac_builddir=.
28977
28978case "$ac_dir" in
28979.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28980*)
28981  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
28982  # A ".." for each directory in $ac_dir_suffix.
28983  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
28984  case $ac_top_builddir_sub in
28985  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28986  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28987  esac ;;
28988esac
28989ac_abs_top_builddir=$ac_pwd
28990ac_abs_builddir=$ac_pwd$ac_dir_suffix
28991# for backward compatibility:
28992ac_top_builddir=$ac_top_build_prefix
28993
28994case $srcdir in
28995  .)  # We are building in place.
28996    ac_srcdir=.
28997    ac_top_srcdir=$ac_top_builddir_sub
28998    ac_abs_top_srcdir=$ac_pwd ;;
28999  [\\/]* | ?:[\\/]* )  # Absolute name.
29000    ac_srcdir=$srcdir$ac_dir_suffix;
29001    ac_top_srcdir=$srcdir
29002    ac_abs_top_srcdir=$srcdir ;;
29003  *) # Relative name.
29004    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
29005    ac_top_srcdir=$ac_top_build_prefix$srcdir
29006    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
29007esac
29008ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
29009
29010
29011    cd "$ac_dir"
29012
29013    # Check for guested configure; otherwise get Cygnus style configure.
29014    if test -f "$ac_srcdir/configure.gnu"; then
29015      ac_sub_configure=$ac_srcdir/configure.gnu
29016    elif test -f "$ac_srcdir/configure"; then
29017      ac_sub_configure=$ac_srcdir/configure
29018    elif test -f "$ac_srcdir/configure.in"; then
29019      # This should be Cygnus configure.
29020      ac_sub_configure=$ac_aux_dir/configure
29021    else
29022      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
29023$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
29024      ac_sub_configure=
29025    fi
29026
29027    # The recursion is here.
29028    if test -n "$ac_sub_configure"; then
29029      # Make the cache file name correct relative to the subdirectory.
29030      case $cache_file in
29031      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
29032      *) # Relative name.
29033	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
29034      esac
29035
29036      { $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
29037$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
29038      # The eval makes quoting arguments work.
29039      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
29040	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
29041	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
29042    fi
29043
29044    cd "$ac_popdir"
29045  done
29046fi
29047if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
29048  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
29049$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
29050fi
29051
29052