xref: /freebsd/contrib/ntp/configure (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for ntp 4.2.8p18.
4#
5# Report bugs to <https://bugs.ntp.org/>.
6#
7#
8# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
9# Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20as_nop=:
21if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22then :
23  emulate sh
24  NULLCMD=:
25  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26  # is contrary to our usage.  Disable this feature.
27  alias -g '${1+"$@"}'='"$@"'
28  setopt NO_GLOB_SUBST
29else $as_nop
30  case `(set -o) 2>/dev/null` in #(
31  *posix*) :
32    set -o posix ;; #(
33  *) :
34     ;;
35esac
36fi
37
38
39
40# Reset variables that may have inherited troublesome values from
41# the environment.
42
43# IFS needs to be set, to space, tab, and newline, in precisely that order.
44# (If _AS_PATH_WALK were called with IFS unset, it would have the
45# side effect of setting IFS to empty, thus disabling word splitting.)
46# Quoting is to prevent editors from complaining about space-tab.
47as_nl='
48'
49export as_nl
50IFS=" ""	$as_nl"
51
52PS1='$ '
53PS2='> '
54PS4='+ '
55
56# Ensure predictable behavior from utilities with locale-dependent output.
57LC_ALL=C
58export LC_ALL
59LANGUAGE=C
60export LANGUAGE
61
62# We cannot yet rely on "unset" to work, but we need these variables
63# to be unset--not just set to an empty or harmless value--now, to
64# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
65# also avoids known problems related to "unset" and subshell syntax
66# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68do eval test \${$as_var+y} \
69  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70done
71
72# Ensure that fds 0, 1, and 2 are open.
73if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
76
77# The user is always right.
78if ${PATH_SEPARATOR+false} :; then
79  PATH_SEPARATOR=:
80  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82      PATH_SEPARATOR=';'
83  }
84fi
85
86
87# Find who we are.  Look in the path if we contain no directory separator.
88as_myself=
89case $0 in #((
90  *[\\/]* ) as_myself=$0 ;;
91  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92for as_dir in $PATH
93do
94  IFS=$as_save_IFS
95  case $as_dir in #(((
96    '') as_dir=./ ;;
97    */) ;;
98    *) as_dir=$as_dir/ ;;
99  esac
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  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113  exit 1
114fi
115
116
117# Use a proper internal environment variable to ensure we don't fall
118  # into an infinite loop, continuously re-executing ourselves.
119  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120    _as_can_reexec=no; export _as_can_reexec;
121    # We cannot yet assume a decent shell, so we have to provide a
122# neutralization value for shells without unset; and this also
123# works around shells that cannot unset nonexistent variables.
124# Preserve -v and -x to the replacement shell.
125BASH_ENV=/dev/null
126ENV=/dev/null
127(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128case $- in # ((((
129  *v*x* | *x*v* ) as_opts=-vx ;;
130  *v* ) as_opts=-v ;;
131  *x* ) as_opts=-x ;;
132  * ) as_opts= ;;
133esac
134exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135# Admittedly, this is quite paranoid, since all the known shells bail
136# out after a failed `exec'.
137printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138exit 255
139  fi
140  # We don't want this to propagate to other subprocesses.
141          { _as_can_reexec=; unset _as_can_reexec;}
142if test "x$CONFIG_SHELL" = x; then
143  as_bourne_compatible="as_nop=:
144if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145then :
146  emulate sh
147  NULLCMD=:
148  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149  # is contrary to our usage.  Disable this feature.
150  alias -g '\${1+\"\$@\"}'='\"\$@\"'
151  setopt NO_GLOB_SUBST
152else \$as_nop
153  case \`(set -o) 2>/dev/null\` in #(
154  *posix*) :
155    set -o posix ;; #(
156  *) :
157     ;;
158esac
159fi
160"
161  as_required="as_fn_return () { (exit \$1); }
162as_fn_success () { as_fn_return 0; }
163as_fn_failure () { as_fn_return 1; }
164as_fn_ret_success () { return 0; }
165as_fn_ret_failure () { return 1; }
166
167exitcode=0
168as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173then :
174
175else \$as_nop
176  exitcode=1; echo positional parameters were not saved.
177fi
178test x\$exitcode = x0 || exit 1
179blah=\$(echo \$(echo blah))
180test x\"\$blah\" = xblah || exit 1
181test -x / || exit 1"
182  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186
187  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
188    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
189    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    PATH=/empty FPATH=/empty; export PATH FPATH
192    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
193      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
194test \$(( 1 + 1 )) = 2 || exit 1"
195  if (eval "$as_required") 2>/dev/null
196then :
197  as_have_required=yes
198else $as_nop
199  as_have_required=no
200fi
201  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
202then :
203
204else $as_nop
205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
206as_found=false
207for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
208do
209  IFS=$as_save_IFS
210  case $as_dir in #(((
211    '') as_dir=./ ;;
212    */) ;;
213    *) as_dir=$as_dir/ ;;
214  esac
215  as_found=:
216  case $as_dir in #(
217	 /*)
218	   for as_base in sh bash ksh sh5; do
219	     # Try only shells that exist, to save several forks.
220	     as_shell=$as_dir$as_base
221	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
222		    as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
223then :
224  CONFIG_SHELL=$as_shell as_have_required=yes
225		   if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
226then :
227  break 2
228fi
229fi
230	   done;;
231       esac
232  as_found=false
233done
234IFS=$as_save_IFS
235if $as_found
236then :
237
238else $as_nop
239  if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
241then :
242  CONFIG_SHELL=$SHELL as_have_required=yes
243fi
244fi
245
246
247      if test "x$CONFIG_SHELL" != x
248then :
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'.
266printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
267exit 255
268fi
269
270    if test x$as_have_required = xno
271then :
272  printf "%s\n" "$0: This script requires a shell more modern than all"
273  printf "%s\n" "$0: the shells that I found on your system."
274  if test ${ZSH_VERSION+y} ; then
275    printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
276    printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
277  else
278    printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and
279$0: https://bugs.ntp.org/ about your system, including any
280$0: error possibly output before this message. Then install
281$0: a modern shell, or manually run the script under such a
282$0: shell if you do have one."
283  fi
284  exit 1
285fi
286fi
287fi
288SHELL=${CONFIG_SHELL-/bin/sh}
289export SHELL
290# Unset more variables known to interfere with behavior of common tools.
291CLICOLOR_FORCE= GREP_OPTIONS=
292unset CLICOLOR_FORCE GREP_OPTIONS
293
294## --------------------- ##
295## M4sh Shell Functions. ##
296## --------------------- ##
297# as_fn_unset VAR
298# ---------------
299# Portably unset VAR.
300as_fn_unset ()
301{
302  { eval $1=; unset $1;}
303}
304as_unset=as_fn_unset
305
306
307# as_fn_set_status STATUS
308# -----------------------
309# Set $? to STATUS, without forking.
310as_fn_set_status ()
311{
312  return $1
313} # as_fn_set_status
314
315# as_fn_exit STATUS
316# -----------------
317# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
318as_fn_exit ()
319{
320  set +e
321  as_fn_set_status $1
322  exit $1
323} # as_fn_exit
324# as_fn_nop
325# ---------
326# Do nothing but, unlike ":", preserve the value of $?.
327as_fn_nop ()
328{
329  return $?
330}
331as_nop=as_fn_nop
332
333# as_fn_mkdir_p
334# -------------
335# Create "$as_dir" as a directory, including parents if necessary.
336as_fn_mkdir_p ()
337{
338
339  case $as_dir in #(
340  -*) as_dir=./$as_dir;;
341  esac
342  test -d "$as_dir" || eval $as_mkdir_p || {
343    as_dirs=
344    while :; do
345      case $as_dir in #(
346      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
347      *) as_qdir=$as_dir;;
348      esac
349      as_dirs="'$as_qdir' $as_dirs"
350      as_dir=`$as_dirname -- "$as_dir" ||
351$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
352	 X"$as_dir" : 'X\(//\)[^/]' \| \
353	 X"$as_dir" : 'X\(//\)$' \| \
354	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
355printf "%s\n" X"$as_dir" |
356    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
357	    s//\1/
358	    q
359	  }
360	  /^X\(\/\/\)[^/].*/{
361	    s//\1/
362	    q
363	  }
364	  /^X\(\/\/\)$/{
365	    s//\1/
366	    q
367	  }
368	  /^X\(\/\).*/{
369	    s//\1/
370	    q
371	  }
372	  s/.*/./; q'`
373      test -d "$as_dir" && break
374    done
375    test -z "$as_dirs" || eval "mkdir $as_dirs"
376  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
377
378
379} # as_fn_mkdir_p
380
381# as_fn_executable_p FILE
382# -----------------------
383# Test if FILE is an executable regular file.
384as_fn_executable_p ()
385{
386  test -f "$1" && test -x "$1"
387} # as_fn_executable_p
388# as_fn_append VAR VALUE
389# ----------------------
390# Append the text in VALUE to the end of the definition contained in VAR. Take
391# advantage of any shell optimizations that allow amortized linear growth over
392# repeated appends, instead of the typical quadratic growth present in naive
393# implementations.
394if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
395then :
396  eval 'as_fn_append ()
397  {
398    eval $1+=\$2
399  }'
400else $as_nop
401  as_fn_append ()
402  {
403    eval $1=\$$1\$2
404  }
405fi # as_fn_append
406
407# as_fn_arith ARG...
408# ------------------
409# Perform arithmetic evaluation on the ARGs, and store the result in the
410# global $as_val. Take advantage of shells that can avoid forks. The arguments
411# must be portable across $(()) and expr.
412if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
413then :
414  eval 'as_fn_arith ()
415  {
416    as_val=$(( $* ))
417  }'
418else $as_nop
419  as_fn_arith ()
420  {
421    as_val=`expr "$@" || test $? -eq 1`
422  }
423fi # as_fn_arith
424
425# as_fn_nop
426# ---------
427# Do nothing but, unlike ":", preserve the value of $?.
428as_fn_nop ()
429{
430  return $?
431}
432as_nop=as_fn_nop
433
434# as_fn_error STATUS ERROR [LINENO LOG_FD]
435# ----------------------------------------
436# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
437# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
438# script with STATUS, using 1 if that was 0.
439as_fn_error ()
440{
441  as_status=$1; test $as_status -eq 0 && as_status=1
442  if test "$4"; then
443    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
444    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
445  fi
446  printf "%s\n" "$as_me: error: $2" >&2
447  as_fn_exit $as_status
448} # as_fn_error
449
450if expr a : '\(a\)' >/dev/null 2>&1 &&
451   test "X`expr 00001 : '.*\(...\)'`" = X001; then
452  as_expr=expr
453else
454  as_expr=false
455fi
456
457if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
458  as_basename=basename
459else
460  as_basename=false
461fi
462
463if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
464  as_dirname=dirname
465else
466  as_dirname=false
467fi
468
469as_me=`$as_basename -- "$0" ||
470$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
471	 X"$0" : 'X\(//\)$' \| \
472	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
473printf "%s\n" X/"$0" |
474    sed '/^.*\/\([^/][^/]*\)\/*$/{
475	    s//\1/
476	    q
477	  }
478	  /^X\/\(\/\/\)$/{
479	    s//\1/
480	    q
481	  }
482	  /^X\/\(\/\).*/{
483	    s//\1/
484	    q
485	  }
486	  s/.*/./; q'`
487
488# Avoid depending upon Character Ranges.
489as_cr_letters='abcdefghijklmnopqrstuvwxyz'
490as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
491as_cr_Letters=$as_cr_letters$as_cr_LETTERS
492as_cr_digits='0123456789'
493as_cr_alnum=$as_cr_Letters$as_cr_digits
494
495
496  as_lineno_1=$LINENO as_lineno_1a=$LINENO
497  as_lineno_2=$LINENO as_lineno_2a=$LINENO
498  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
499  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
500  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
501  sed -n '
502    p
503    /[$]LINENO/=
504  ' <$as_myself |
505    sed '
506      s/[$]LINENO.*/&-/
507      t lineno
508      b
509      :lineno
510      N
511      :loop
512      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
513      t loop
514      s/-\n.*//
515    ' >$as_me.lineno &&
516  chmod +x "$as_me.lineno" ||
517    { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
518
519  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
520  # already done that, so ensure we don't try to do so again and fall
521  # in an infinite loop.  This has already happened in practice.
522  _as_can_reexec=no; export _as_can_reexec
523  # Don't try to exec as it changes $[0], causing all sort of problems
524  # (the dirname of $[0] is not the place where we might find the
525  # original and so on.  Autoconf is especially sensitive to this).
526  . "./$as_me.lineno"
527  # Exit status is that of the last command.
528  exit
529}
530
531
532# Determine whether it's possible to make 'echo' print without a newline.
533# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
534# for compatibility with existing Makefiles.
535ECHO_C= ECHO_N= ECHO_T=
536case `echo -n x` in #(((((
537-n*)
538  case `echo 'xy\c'` in
539  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
540  xy)  ECHO_C='\c';;
541  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
542       ECHO_T='	';;
543  esac;;
544*)
545  ECHO_N='-n';;
546esac
547
548# For backward compatibility with old third-party macros, we provide
549# the shell variables $as_echo and $as_echo_n.  New code should use
550# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
551as_echo='printf %s\n'
552as_echo_n='printf %s'
553
554
555rm -f conf$$ conf$$.exe conf$$.file
556if test -d conf$$.dir; then
557  rm -f conf$$.dir/conf$$.file
558else
559  rm -f conf$$.dir
560  mkdir conf$$.dir 2>/dev/null
561fi
562if (echo >conf$$.file) 2>/dev/null; then
563  if ln -s conf$$.file conf$$ 2>/dev/null; then
564    as_ln_s='ln -s'
565    # ... but there are two gotchas:
566    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
567    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
568    # In both cases, we have to default to `cp -pR'.
569    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
570      as_ln_s='cp -pR'
571  elif ln conf$$.file conf$$ 2>/dev/null; then
572    as_ln_s=ln
573  else
574    as_ln_s='cp -pR'
575  fi
576else
577  as_ln_s='cp -pR'
578fi
579rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
580rmdir conf$$.dir 2>/dev/null
581
582if mkdir -p . 2>/dev/null; then
583  as_mkdir_p='mkdir -p "$as_dir"'
584else
585  test -d ./-p && rmdir ./-p
586  as_mkdir_p=false
587fi
588
589as_test_x='test -x'
590as_executable_p=as_fn_executable_p
591
592# Sed expression to map a string onto a valid CPP name.
593as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
594
595# Sed expression to map a string onto a valid variable name.
596as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
597
598SHELL=${CONFIG_SHELL-/bin/sh}
599
600
601test -n "$DJDIR" || exec 7<&0 </dev/null
602exec 6>&1
603
604# Name of the host.
605# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
606# so uname gets run too.
607ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
608
609#
610# Initializations.
611#
612ac_default_prefix=/usr/local
613ac_clean_files=
614ac_config_libobj_dir=.
615LIBOBJS=
616cross_compiling=no
617subdirs=
618MFLAGS=
619MAKEFLAGS=
620
621# Identity of this package.
622PACKAGE_NAME='ntp'
623PACKAGE_TARNAME='ntp'
624PACKAGE_VERSION='4.2.8p18'
625PACKAGE_STRING='ntp 4.2.8p18'
626PACKAGE_BUGREPORT='https://bugs.ntp.org/'
627PACKAGE_URL='https://www.ntp.org/'
628
629# Factoring default headers for most tests.
630ac_includes_default="\
631#include <stddef.h>
632#ifdef HAVE_STDIO_H
633# include <stdio.h>
634#endif
635#ifdef HAVE_STDLIB_H
636# include <stdlib.h>
637#endif
638#ifdef HAVE_STRING_H
639# include <string.h>
640#endif
641#ifdef HAVE_INTTYPES_H
642# include <inttypes.h>
643#endif
644#ifdef HAVE_STDINT_H
645# include <stdint.h>
646#endif
647#ifdef HAVE_STRINGS_H
648# include <strings.h>
649#endif
650#ifdef HAVE_SYS_TYPES_H
651# include <sys/types.h>
652#endif
653#ifdef HAVE_SYS_STAT_H
654# include <sys/stat.h>
655#endif
656#ifdef HAVE_UNISTD_H
657# include <unistd.h>
658#endif"
659
660ac_header_c_list=
661ac_func_c_list=
662enable_option_checking=no
663ac_subst_vars='am__EXEEXT_FALSE
664am__EXEEXT_TRUE
665LTLIBOBJS
666subdirs
667PERLLIBDIR
668NTP_KEYSDIR
669BUILD_TEST_NTP_SIGND_FALSE
670BUILD_TEST_NTP_SIGND_TRUE
671BUILD_TEST_NTP_SCANNER_FALSE
672BUILD_TEST_NTP_SCANNER_TRUE
673BUILD_TEST_NTP_RESTRICT_FALSE
674BUILD_TEST_NTP_RESTRICT_TRUE
675UNITYBUILD_AVAILABLE_FALSE
676UNITYBUILD_AVAILABLE_TRUE
677PATH_RUBY
678HAVE_LEAPSMEARINTERVAL
679SAVECONFIG_ENABLED_FALSE
680SAVECONFIG_ENABLED_TRUE
681LSCF
682MAKE_NTPSNMPD
683SNMP_CFLAGS
684SNMP_CPPFLAGS
685SNMP_LIBS
686BUILD_SNTP_FALSE
687BUILD_SNTP_TRUE
688SNTP
689MAKE_NTPDSIM
690MAKE_LIBNTPSIM
691MAKE_TIMETRIM
692MAKE_TICKADJ
693MAKE_NTPTIME
694MAKE_ADJTIMED
695CHUTEST
696PROPDELAY
697MAKE_PARSEKMODULE
698DCFD
699TESTDCF
700MAKE_CHECK_LAYOUT
701MAKE_CHECK_Y2K
702MAKE_LIBPARSE_KERNEL
703MAKE_LIBPARSE
704LIBPARSE
705HAVE_RLIMIT_STACK
706HAVE_RLIMIT_MEMLOCK
707LDADD_NLIST
708PATH_NET_SNMP_CONFIG
709CONFIG_SHELL
710PATH_TEST
711PATH_PERL
712PATH_OPENSSL
713VER_SUFFIX
714LIBNTP_SUBMAKES_FALSE
715LIBNTP_SUBMAKES_TRUE
716LIBOBJS
717PTHREADS_FALSE
718PTHREADS_TRUE
719LIBISC_PTHREADS_NOTHREADS
720PTHREAD_LIBS
721LTHREAD_LIBS
722BUILD_THREAD
723HAVE_INLINE
724LDADD_LIBUTIL
725ALLOCA
726LIBM
727EDITLINE_LIBS
728LDADD_LIBNTP
729NTP_CROSSCOMPILE_FALSE
730NTP_CROSSCOMPILE_TRUE
731BUILD_LIBEVENT_FALSE
732BUILD_LIBEVENT_TRUE
733LDADD_LIBEVENT
734CPPFLAGS_LIBEVENT
735CFLAGS_LIBEVENT
736PKG_CONFIG
737LIBOPTS_DIR
738LIBOPTS_CFLAGS
739LIBOPTS_LDADD
740NEED_LIBOPTS_FALSE
741NEED_LIBOPTS_TRUE
742INSTALL_LIBOPTS_FALSE
743INSTALL_LIBOPTS_TRUE
744POSIX_SHELL
745GL_GENERATE_STDNORETURN_H_FALSE
746GL_GENERATE_STDNORETURN_H_TRUE
747STDNORETURN_H
748LIBTOOL_DEPS
749LT_SYS_LIBRARY_PATH
750OTOOL64
751OTOOL
752LIPO
753NMEDIT
754DSYMUTIL
755MANIFEST_TOOL
756RANLIB
757DLLTOOL
758OBJDUMP
759LN_S
760NM
761ac_ct_DUMPBIN
762DUMPBIN
763LD
764FGREP
765EGREP
766GREP
767SED
768LIBTOOL
769ac_ct_AR
770AR
771INSTALL_UPDATE_LEAP_FALSE
772INSTALL_UPDATE_LEAP_TRUE
773UPDATE_LEAP_NI
774UPDATE_LEAP_MS
775UPDATE_LEAP_DS
776UPDATE_LEAP_DL
777UPDATE_LEAP_DB
778TIMETRIM_NI
779TIMETRIM_MS
780TIMETRIM_DS
781TIMETRIM_DL
782TIMETRIM_DB
783TICKADJ_NI
784TICKADJ_MS
785TICKADJ_DS
786TICKADJ_DL
787TICKADJ_DB
788SNTP_NI
789SNTP_MS
790SNTP_DS
791SNTP_DL
792SNTP_DB
793NTP_WAIT_NI
794NTP_WAIT_MS
795NTP_WAIT_DS
796NTP_WAIT_DL
797NTP_WAIT_DB
798NTP_KEYGEN_NI
799NTP_KEYGEN_MS
800NTP_KEYGEN_DS
801NTP_KEYGEN_DL
802NTP_KEYGEN_DB
803NTPTRACE_NI
804NTPTRACE_MS
805NTPTRACE_DS
806NTPTRACE_DL
807NTPTRACE_DB
808NTPTIME_NI
809NTPTIME_MS
810NTPTIME_DS
811NTPTIME_DL
812NTPTIME_DB
813INSTALL_NTPSWEEP_FALSE
814INSTALL_NTPSWEEP_TRUE
815NTPSWEEP_NI
816NTPSWEEP_MS
817NTPSWEEP_DS
818NTPSWEEP_DL
819NTPSWEEP_DB
820NTPSNMPD_NI
821NTPSNMPD_MS
822NTPSNMPD_DS
823NTPSNMPD_DL
824NTPSNMPD_DB
825NTPQ_NI
826NTPQ_MS
827NTPQ_DS
828NTPQ_DL
829NTPQ_DB
830NTPD_NI
831NTPD_MS
832NTPD_DS
833NTPD_DL
834NTPD_DB
835NTPDSIM_NI
836NTPDSIM_MS
837NTPDSIM_DS
838NTPDSIM_DL
839NTPDSIM_DB
840NTPDC_NI
841NTPDC_MS
842NTPDC_DS
843NTPDC_DL
844NTPDC_DB
845NTPDATE_NI
846NTPDATE_MS
847NTPDATE_DS
848NTPDATE_DL
849NTPDATE_DB
850MANTAGFMT
851CALC_TICKADJ_NI
852CALC_TICKADJ_MS
853CALC_TICKADJ_DS
854CALC_TICKADJ_DL
855CALC_TICKADJ_DB
856WANT_CALC_TICKADJ_MS_FALSE
857WANT_CALC_TICKADJ_MS_TRUE
858VPATH_HACK_FALSE
859VPATH_HACK_TRUE
860NTP_HARD_LDFLAGS
861NTP_HARD_CPPFLAGS
862NTP_HARD_CFLAGS
863YFLAGS
864YACC
865CPP
866LDFLAGS_NTP
867LDADD_NTP
868CPPFLAGS_NTP
869CFLAGS_NTP
870CC_NOFORMAT
871am__fastdepCC_FALSE
872am__fastdepCC_TRUE
873CCDEPMODE
874am__nodep
875AMDEPBACKSLASH
876AMDEP_FALSE
877AMDEP_TRUE
878am__include
879DEPDIR
880OBJEXT
881EXEEXT
882ac_ct_CC
883CPPFLAGS
884LDFLAGS
885CFLAGS
886CC
887host_os
888host_vendor
889host_cpu
890host
891build_os
892build_vendor
893build_cpu
894build
895AM_BACKSLASH
896AM_DEFAULT_VERBOSITY
897AM_DEFAULT_V
898AM_V
899CSCOPE
900ETAGS
901CTAGS
902am__untar
903am__tar
904AMTAR
905am__leading_dot
906SET_MAKE
907AWK
908mkdir_p
909MKDIR_P
910INSTALL_STRIP_PROGRAM
911STRIP
912install_sh
913MAKEINFO
914AUTOHEADER
915AUTOMAKE
916AUTOCONF
917ACLOCAL
918VERSION
919PACKAGE
920CYGPATH_W
921am__isrc
922INSTALL_DATA
923INSTALL_SCRIPT
924INSTALL_PROGRAM
925target_alias
926host_alias
927build_alias
928LIBS
929ECHO_T
930ECHO_N
931ECHO_C
932DEFS
933mandir
934localedir
935libdir
936psdir
937pdfdir
938dvidir
939htmldir
940infodir
941docdir
942oldincludedir
943includedir
944runstatedir
945localstatedir
946sharedstatedir
947sysconfdir
948datadir
949datarootdir
950libexecdir
951sbindir
952bindir
953program_transform_name
954prefix
955exec_prefix
956PACKAGE_URL
957PACKAGE_BUGREPORT
958PACKAGE_STRING
959PACKAGE_VERSION
960PACKAGE_TARNAME
961PACKAGE_NAME
962PATH_SEPARATOR
963SHELL
964am__quote'
965ac_subst_files='calc_tickadj_opts
966ntp_wait_opts
967ntpsweep_opts
968ntptrace_opts
969summary_opts
970plot_summary_opts'
971ac_user_opts='
972enable_option_checking
973enable_silent_rules
974enable_build_framework_help
975enable_dependency_tracking
976with_hardenfile
977with_locfile
978enable_shared
979enable_static
980with_pic
981enable_fast_install
982with_aix_soname
983with_gnu_ld
984with_sysroot
985enable_libtool_lock
986enable_nls
987enable_local_libopts
988enable_libopts_install
989with_autoopts_config
990enable_local_libevent
991with_lineeditlibs
992enable_debugging
993enable_thread_support
994with_threads
995with_yielding_select
996enable_c99_snprintf
997enable_clockctl
998enable_linuxcaps
999enable_solarisprivs
1000enable_trustedbsd_mac
1001enable_signalled_io
1002with_crypto
1003with_openssl_libdir
1004with_openssl_incdir
1005enable_verbose_ssl
1006enable_openssl_random
1007with_net_snmp_config
1008enable_libseccomp
1009with_stack_limit
1010with_memlock
1011enable_debug_timing
1012enable_dst_minutes
1013enable_ignore_dns_errors
1014enable_BANCOMM
1015enable_GPSVME
1016enable_all_clocks
1017enable_ACTS
1018enable_ARBITER
1019enable_ARCRON_MSF
1020enable_AS2201
1021enable_ATOM
1022enable_CHRONOLOG
1023enable_CHU
1024enable_AUDIO_CHU
1025enable_DATUM
1026enable_DUMBCLOCK
1027enable_FG
1028enable_HEATH
1029enable_HOPFSERIAL
1030enable_HOPFPCI
1031enable_HPGPS
1032enable_IRIG
1033enable_JJY
1034enable_JUPITER
1035enable_LEITCH
1036enable_LOCAL_CLOCK
1037enable_MX4200
1038enable_NEOCLOCK4X
1039enable_NMEA
1040enable_GPSD
1041enable_ONCORE
1042enable_PALISADE
1043enable_PCF
1044enable_PST
1045enable_RIPENCC
1046enable_SHM
1047enable_SPECTRACOM
1048enable_TPRO
1049enable_TRUETIME
1050enable_TT560
1051enable_ULINK
1052enable_TSYNCPCI
1053enable_WWV
1054enable_ZYFER
1055enable_parse_clocks
1056enable_COMPUTIME
1057enable_DCF7000
1058enable_HOPF6021
1059enable_MEINBERG
1060enable_RAWDCF
1061enable_RCC8000
1062enable_SCHMID
1063enable_TRIMTAIP
1064enable_TRIMTSIP
1065enable_WHARTON
1066enable_VARITEXT
1067enable_SEL240X
1068enable_autokey
1069enable_kmem
1070enable_accurate_adjtime
1071enable_tick
1072enable_tickadj
1073enable_simulator
1074with_sntp
1075with_ntpsnmpd
1076enable_slew_always
1077enable_step_slew
1078enable_ntpdate_step
1079enable_hourly_todr_sync
1080enable_kernel_fll_bug
1081enable_bug1243_fix
1082enable_bug3020_fix
1083enable_bug3527_fix
1084enable_bug3767_fix
1085enable_irig_sawtooth
1086enable_nist
1087enable_ntp_signd
1088enable_magicpps
1089enable_ipv6
1090with_kame
1091enable_getifaddrs
1092enable_saveconfig
1093enable_leap_smear
1094enable_dynamic_interleave
1095enable_problem_tests
1096'
1097      ac_precious_vars='build_alias
1098host_alias
1099target_alias
1100CC
1101CFLAGS
1102LDFLAGS
1103LIBS
1104CPPFLAGS
1105CPP
1106YACC
1107YFLAGS
1108LT_SYS_LIBRARY_PATH'
1109ac_subdirs_all='sntp'
1110
1111# Initialize some variables set by options.
1112ac_init_help=
1113ac_init_version=false
1114ac_unrecognized_opts=
1115ac_unrecognized_sep=
1116# The variables have the same names as the options, with
1117# dashes changed to underlines.
1118cache_file=/dev/null
1119exec_prefix=NONE
1120no_create=
1121no_recursion=
1122prefix=NONE
1123program_prefix=NONE
1124program_suffix=NONE
1125program_transform_name=s,x,x,
1126silent=
1127site=
1128srcdir=
1129verbose=
1130x_includes=NONE
1131x_libraries=NONE
1132
1133# Installation directory options.
1134# These are left unexpanded so users can "make install exec_prefix=/foo"
1135# and all the variables that are supposed to be based on exec_prefix
1136# by default will actually change.
1137# Use braces instead of parens because sh, perl, etc. also accept them.
1138# (The list follows the same order as the GNU Coding Standards.)
1139bindir='${exec_prefix}/bin'
1140sbindir='${exec_prefix}/sbin'
1141libexecdir='${exec_prefix}/libexec'
1142datarootdir='${prefix}/share'
1143datadir='${datarootdir}'
1144sysconfdir='${prefix}/etc'
1145sharedstatedir='${prefix}/com'
1146localstatedir='${prefix}/var'
1147runstatedir='${localstatedir}/run'
1148includedir='${prefix}/include'
1149oldincludedir='/usr/include'
1150docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1151infodir='${datarootdir}/info'
1152htmldir='${docdir}'
1153dvidir='${docdir}'
1154pdfdir='${docdir}'
1155psdir='${docdir}'
1156libdir='${exec_prefix}/lib'
1157localedir='${datarootdir}/locale'
1158mandir='${datarootdir}/man'
1159
1160ac_prev=
1161ac_dashdash=
1162for ac_option
1163do
1164  # If the previous option needs an argument, assign it.
1165  if test -n "$ac_prev"; then
1166    eval $ac_prev=\$ac_option
1167    ac_prev=
1168    continue
1169  fi
1170
1171  case $ac_option in
1172  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1173  *=)   ac_optarg= ;;
1174  *)    ac_optarg=yes ;;
1175  esac
1176
1177  case $ac_dashdash$ac_option in
1178  --)
1179    ac_dashdash=yes ;;
1180
1181  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1182    ac_prev=bindir ;;
1183  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1184    bindir=$ac_optarg ;;
1185
1186  -build | --build | --buil | --bui | --bu)
1187    ac_prev=build_alias ;;
1188  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1189    build_alias=$ac_optarg ;;
1190
1191  -cache-file | --cache-file | --cache-fil | --cache-fi \
1192  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1193    ac_prev=cache_file ;;
1194  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1195  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1196    cache_file=$ac_optarg ;;
1197
1198  --config-cache | -C)
1199    cache_file=config.cache ;;
1200
1201  -datadir | --datadir | --datadi | --datad)
1202    ac_prev=datadir ;;
1203  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1204    datadir=$ac_optarg ;;
1205
1206  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1207  | --dataroo | --dataro | --datar)
1208    ac_prev=datarootdir ;;
1209  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1210  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1211    datarootdir=$ac_optarg ;;
1212
1213  -disable-* | --disable-*)
1214    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1215    # Reject names that are not valid shell variable names.
1216    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1217      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1218    ac_useropt_orig=$ac_useropt
1219    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1220    case $ac_user_opts in
1221      *"
1222"enable_$ac_useropt"
1223"*) ;;
1224      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1225	 ac_unrecognized_sep=', ';;
1226    esac
1227    eval enable_$ac_useropt=no ;;
1228
1229  -docdir | --docdir | --docdi | --doc | --do)
1230    ac_prev=docdir ;;
1231  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1232    docdir=$ac_optarg ;;
1233
1234  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1235    ac_prev=dvidir ;;
1236  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1237    dvidir=$ac_optarg ;;
1238
1239  -enable-* | --enable-*)
1240    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1241    # Reject names that are not valid shell variable names.
1242    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1243      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1244    ac_useropt_orig=$ac_useropt
1245    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1246    case $ac_user_opts in
1247      *"
1248"enable_$ac_useropt"
1249"*) ;;
1250      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1251	 ac_unrecognized_sep=', ';;
1252    esac
1253    eval enable_$ac_useropt=\$ac_optarg ;;
1254
1255  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1256  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1257  | --exec | --exe | --ex)
1258    ac_prev=exec_prefix ;;
1259  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1260  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1261  | --exec=* | --exe=* | --ex=*)
1262    exec_prefix=$ac_optarg ;;
1263
1264  -gas | --gas | --ga | --g)
1265    # Obsolete; use --with-gas.
1266    with_gas=yes ;;
1267
1268  -help | --help | --hel | --he | -h)
1269    ac_init_help=long ;;
1270  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1271    ac_init_help=recursive ;;
1272  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1273    ac_init_help=short ;;
1274
1275  -host | --host | --hos | --ho)
1276    ac_prev=host_alias ;;
1277  -host=* | --host=* | --hos=* | --ho=*)
1278    host_alias=$ac_optarg ;;
1279
1280  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1281    ac_prev=htmldir ;;
1282  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1283  | --ht=*)
1284    htmldir=$ac_optarg ;;
1285
1286  -includedir | --includedir | --includedi | --included | --include \
1287  | --includ | --inclu | --incl | --inc)
1288    ac_prev=includedir ;;
1289  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1290  | --includ=* | --inclu=* | --incl=* | --inc=*)
1291    includedir=$ac_optarg ;;
1292
1293  -infodir | --infodir | --infodi | --infod | --info | --inf)
1294    ac_prev=infodir ;;
1295  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1296    infodir=$ac_optarg ;;
1297
1298  -libdir | --libdir | --libdi | --libd)
1299    ac_prev=libdir ;;
1300  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1301    libdir=$ac_optarg ;;
1302
1303  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1304  | --libexe | --libex | --libe)
1305    ac_prev=libexecdir ;;
1306  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1307  | --libexe=* | --libex=* | --libe=*)
1308    libexecdir=$ac_optarg ;;
1309
1310  -localedir | --localedir | --localedi | --localed | --locale)
1311    ac_prev=localedir ;;
1312  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1313    localedir=$ac_optarg ;;
1314
1315  -localstatedir | --localstatedir | --localstatedi | --localstated \
1316  | --localstate | --localstat | --localsta | --localst | --locals)
1317    ac_prev=localstatedir ;;
1318  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1319  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1320    localstatedir=$ac_optarg ;;
1321
1322  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1323    ac_prev=mandir ;;
1324  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1325    mandir=$ac_optarg ;;
1326
1327  -nfp | --nfp | --nf)
1328    # Obsolete; use --without-fp.
1329    with_fp=no ;;
1330
1331  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1332  | --no-cr | --no-c | -n)
1333    no_create=yes ;;
1334
1335  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1336  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1337    no_recursion=yes ;;
1338
1339  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1340  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1341  | --oldin | --oldi | --old | --ol | --o)
1342    ac_prev=oldincludedir ;;
1343  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1344  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1345  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1346    oldincludedir=$ac_optarg ;;
1347
1348  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1349    ac_prev=prefix ;;
1350  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1351    prefix=$ac_optarg ;;
1352
1353  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1354  | --program-pre | --program-pr | --program-p)
1355    ac_prev=program_prefix ;;
1356  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1357  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1358    program_prefix=$ac_optarg ;;
1359
1360  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1361  | --program-suf | --program-su | --program-s)
1362    ac_prev=program_suffix ;;
1363  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1364  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1365    program_suffix=$ac_optarg ;;
1366
1367  -program-transform-name | --program-transform-name \
1368  | --program-transform-nam | --program-transform-na \
1369  | --program-transform-n | --program-transform- \
1370  | --program-transform | --program-transfor \
1371  | --program-transfo | --program-transf \
1372  | --program-trans | --program-tran \
1373  | --progr-tra | --program-tr | --program-t)
1374    ac_prev=program_transform_name ;;
1375  -program-transform-name=* | --program-transform-name=* \
1376  | --program-transform-nam=* | --program-transform-na=* \
1377  | --program-transform-n=* | --program-transform-=* \
1378  | --program-transform=* | --program-transfor=* \
1379  | --program-transfo=* | --program-transf=* \
1380  | --program-trans=* | --program-tran=* \
1381  | --progr-tra=* | --program-tr=* | --program-t=*)
1382    program_transform_name=$ac_optarg ;;
1383
1384  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1385    ac_prev=pdfdir ;;
1386  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1387    pdfdir=$ac_optarg ;;
1388
1389  -psdir | --psdir | --psdi | --psd | --ps)
1390    ac_prev=psdir ;;
1391  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1392    psdir=$ac_optarg ;;
1393
1394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1395  | -silent | --silent | --silen | --sile | --sil)
1396    silent=yes ;;
1397
1398  -runstatedir | --runstatedir | --runstatedi | --runstated \
1399  | --runstate | --runstat | --runsta | --runst | --runs \
1400  | --run | --ru | --r)
1401    ac_prev=runstatedir ;;
1402  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1403  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1404  | --run=* | --ru=* | --r=*)
1405    runstatedir=$ac_optarg ;;
1406
1407  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1408    ac_prev=sbindir ;;
1409  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1410  | --sbi=* | --sb=*)
1411    sbindir=$ac_optarg ;;
1412
1413  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1414  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1415  | --sharedst | --shareds | --shared | --share | --shar \
1416  | --sha | --sh)
1417    ac_prev=sharedstatedir ;;
1418  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1419  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1420  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1421  | --sha=* | --sh=*)
1422    sharedstatedir=$ac_optarg ;;
1423
1424  -site | --site | --sit)
1425    ac_prev=site ;;
1426  -site=* | --site=* | --sit=*)
1427    site=$ac_optarg ;;
1428
1429  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1430    ac_prev=srcdir ;;
1431  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1432    srcdir=$ac_optarg ;;
1433
1434  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1435  | --syscon | --sysco | --sysc | --sys | --sy)
1436    ac_prev=sysconfdir ;;
1437  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1438  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1439    sysconfdir=$ac_optarg ;;
1440
1441  -target | --target | --targe | --targ | --tar | --ta | --t)
1442    ac_prev=target_alias ;;
1443  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1444    target_alias=$ac_optarg ;;
1445
1446  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1447    verbose=yes ;;
1448
1449  -version | --version | --versio | --versi | --vers | -V)
1450    ac_init_version=: ;;
1451
1452  -with-* | --with-*)
1453    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1454    # Reject names that are not valid shell variable names.
1455    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1456      as_fn_error $? "invalid package name: \`$ac_useropt'"
1457    ac_useropt_orig=$ac_useropt
1458    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1459    case $ac_user_opts in
1460      *"
1461"with_$ac_useropt"
1462"*) ;;
1463      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1464	 ac_unrecognized_sep=', ';;
1465    esac
1466    eval with_$ac_useropt=\$ac_optarg ;;
1467
1468  -without-* | --without-*)
1469    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1470    # Reject names that are not valid shell variable names.
1471    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1472      as_fn_error $? "invalid package name: \`$ac_useropt'"
1473    ac_useropt_orig=$ac_useropt
1474    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1475    case $ac_user_opts in
1476      *"
1477"with_$ac_useropt"
1478"*) ;;
1479      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1480	 ac_unrecognized_sep=', ';;
1481    esac
1482    eval with_$ac_useropt=no ;;
1483
1484  --x)
1485    # Obsolete; use --with-x.
1486    with_x=yes ;;
1487
1488  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1489  | --x-incl | --x-inc | --x-in | --x-i)
1490    ac_prev=x_includes ;;
1491  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1492  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1493    x_includes=$ac_optarg ;;
1494
1495  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1496  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1497    ac_prev=x_libraries ;;
1498  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1499  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1500    x_libraries=$ac_optarg ;;
1501
1502  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1503Try \`$0 --help' for more information"
1504    ;;
1505
1506  *=*)
1507    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1508    # Reject names that are not valid shell variable names.
1509    case $ac_envvar in #(
1510      '' | [0-9]* | *[!_$as_cr_alnum]* )
1511      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1512    esac
1513    eval $ac_envvar=\$ac_optarg
1514    export $ac_envvar ;;
1515
1516  *)
1517    # FIXME: should be removed in autoconf 3.0.
1518    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1519    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1520      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1521    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1522    ;;
1523
1524  esac
1525done
1526
1527if test -n "$ac_prev"; then
1528  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1529  as_fn_error $? "missing argument to $ac_option"
1530fi
1531
1532if test -n "$ac_unrecognized_opts"; then
1533  case $enable_option_checking in
1534    no) ;;
1535    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1536    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1537  esac
1538fi
1539
1540# Check all directory arguments for consistency.
1541for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1542		datadir sysconfdir sharedstatedir localstatedir includedir \
1543		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1544		libdir localedir mandir runstatedir
1545do
1546  eval ac_val=\$$ac_var
1547  # Remove trailing slashes.
1548  case $ac_val in
1549    */ )
1550      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1551      eval $ac_var=\$ac_val;;
1552  esac
1553  # Be sure to have absolute directory names.
1554  case $ac_val in
1555    [\\/$]* | ?:[\\/]* )  continue;;
1556    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1557  esac
1558  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1559done
1560
1561# There might be people who depend on the old broken behavior: `$host'
1562# used to hold the argument of --host etc.
1563# FIXME: To remove some day.
1564build=$build_alias
1565host=$host_alias
1566target=$target_alias
1567
1568# FIXME: To remove some day.
1569if test "x$host_alias" != x; then
1570  if test "x$build_alias" = x; then
1571    cross_compiling=maybe
1572  elif test "x$build_alias" != "x$host_alias"; then
1573    cross_compiling=yes
1574  fi
1575fi
1576
1577ac_tool_prefix=
1578test -n "$host_alias" && ac_tool_prefix=$host_alias-
1579
1580test "$silent" = yes && exec 6>/dev/null
1581
1582
1583ac_pwd=`pwd` && test -n "$ac_pwd" &&
1584ac_ls_di=`ls -di .` &&
1585ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1586  as_fn_error $? "working directory cannot be determined"
1587test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1588  as_fn_error $? "pwd does not report name of working directory"
1589
1590
1591# Find the source files, if location was not specified.
1592if test -z "$srcdir"; then
1593  ac_srcdir_defaulted=yes
1594  # Try the directory containing this script, then the parent directory.
1595  ac_confdir=`$as_dirname -- "$as_myself" ||
1596$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1597	 X"$as_myself" : 'X\(//\)[^/]' \| \
1598	 X"$as_myself" : 'X\(//\)$' \| \
1599	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1600printf "%s\n" X"$as_myself" |
1601    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1602	    s//\1/
1603	    q
1604	  }
1605	  /^X\(\/\/\)[^/].*/{
1606	    s//\1/
1607	    q
1608	  }
1609	  /^X\(\/\/\)$/{
1610	    s//\1/
1611	    q
1612	  }
1613	  /^X\(\/\).*/{
1614	    s//\1/
1615	    q
1616	  }
1617	  s/.*/./; q'`
1618  srcdir=$ac_confdir
1619  if test ! -r "$srcdir/$ac_unique_file"; then
1620    srcdir=..
1621  fi
1622else
1623  ac_srcdir_defaulted=no
1624fi
1625if test ! -r "$srcdir/$ac_unique_file"; then
1626  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1627  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1628fi
1629ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1630ac_abs_confdir=`(
1631	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1632	pwd)`
1633# When building in place, set srcdir=.
1634if test "$ac_abs_confdir" = "$ac_pwd"; then
1635  srcdir=.
1636fi
1637# Remove unnecessary trailing slashes from srcdir.
1638# Double slashes in file names in object file debugging info
1639# mess up M-x gdb in Emacs.
1640case $srcdir in
1641*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1642esac
1643for ac_var in $ac_precious_vars; do
1644  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1645  eval ac_env_${ac_var}_value=\$${ac_var}
1646  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1647  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1648done
1649
1650#
1651# Report the --help message.
1652#
1653if test "$ac_init_help" = "long"; then
1654  # Omit some internal or obsolete options to make the list less imposing.
1655  # This message is too long to be a string in the A/UX 3.1 sh.
1656  cat <<_ACEOF
1657\`configure' configures ntp 4.2.8p18 to adapt to many kinds of systems.
1658
1659Usage: $0 [OPTION]... [VAR=VALUE]...
1660
1661To assign environment variables (e.g., CC, CFLAGS...), specify them as
1662VAR=VALUE.  See below for descriptions of some of the useful variables.
1663
1664Defaults for the options are specified in brackets.
1665
1666Configuration:
1667  -h, --help              display this help and exit
1668      --help=short        display options specific to this package
1669      --help=recursive    display the short help of all the included packages
1670  -V, --version           display version information and exit
1671  -q, --quiet, --silent   do not print \`checking ...' messages
1672      --cache-file=FILE   cache test results in FILE [disabled]
1673  -C, --config-cache      alias for \`--cache-file=config.cache'
1674  -n, --no-create         do not create output files
1675      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1676
1677Installation directories:
1678  --prefix=PREFIX         install architecture-independent files in PREFIX
1679                          [$ac_default_prefix]
1680  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1681                          [PREFIX]
1682
1683By default, \`make install' will install all the files in
1684\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1685an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1686for instance \`--prefix=\$HOME'.
1687
1688For better control, use the options below.
1689
1690Fine tuning of the installation directories:
1691  --bindir=DIR            user executables [EPREFIX/bin]
1692  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1693  --libexecdir=DIR        program executables [EPREFIX/libexec]
1694  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1695  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1696  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1697  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1698  --libdir=DIR            object code libraries [EPREFIX/lib]
1699  --includedir=DIR        C header files [PREFIX/include]
1700  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1701  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1702  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1703  --infodir=DIR           info documentation [DATAROOTDIR/info]
1704  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1705  --mandir=DIR            man documentation [DATAROOTDIR/man]
1706  --docdir=DIR            documentation root [DATAROOTDIR/doc/ntp]
1707  --htmldir=DIR           html documentation [DOCDIR]
1708  --dvidir=DIR            dvi documentation [DOCDIR]
1709  --pdfdir=DIR            pdf documentation [DOCDIR]
1710  --psdir=DIR             ps documentation [DOCDIR]
1711_ACEOF
1712
1713  cat <<\_ACEOF
1714
1715Program names:
1716  --program-prefix=PREFIX            prepend PREFIX to installed program names
1717  --program-suffix=SUFFIX            append SUFFIX to installed program names
1718  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1719
1720System types:
1721  --build=BUILD     configure for building on BUILD [guessed]
1722  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1723_ACEOF
1724fi
1725
1726if test -n "$ac_init_help"; then
1727  case $ac_init_help in
1728     short | recursive ) echo "Configuration of ntp 4.2.8p18:";;
1729   esac
1730  cat <<\_ACEOF
1731
1732Optional Features and Packages:
1733  --disable-option-checking  ignore unrecognized --enable/--with options
1734  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1735  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1736  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1737  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1738  --enable-silent-rules   less verbose build output (undo: "make V=1")
1739  --disable-silent-rules  verbose build output (undo: "make V=0")
1740  --enable-build-framework-help
1741                          + enable build framework help
1742  --enable-dependency-tracking
1743                          do not reject slow dependency extractors
1744  --disable-dependency-tracking
1745                          speeds up one-time build
1746  --with-hardenfile=XXX   os-specific or "/dev/null"
1747  --with-locfile=XXX      os-specific or "legacy"
1748  --enable-shared[=PKGS]  build shared libraries [default=no]
1749  --enable-static[=PKGS]  build static libraries [default=yes]
1750  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1751                          both]
1752  --enable-fast-install[=PKGS]
1753                          optimize for fast installation [default=yes]
1754  --with-aix-soname=aix|svr4|both
1755                          shared library versioning (aka "SONAME") variant to
1756                          provide on AIX, [default=aix].
1757  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1758  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1759                          compiler's sysroot if not specified).
1760  --disable-libtool-lock  avoid locking (might break parallel builds)
1761  --disable-nls           disable nls support in libopts
1762  --enable-local-libopts  Use the supplied libopts tearoff code
1763  --enable-libopts-install
1764                          Install libopts with client installation
1765  --with-autoopts-config  specify the config-info script
1766  --enable-local-libevent Force using the supplied libevent tearoff code
1767  --with-lineeditlibs     edit,editline (readline may be specified if desired)
1768  defaults:               + yes, - no, s system-specific
1769  --enable-debugging      + include ntpd debugging code
1770  --enable-thread-support s use threads (+ if available)
1771  --with-threads	  with threads [auto]
1772  --with-yielding-select  with yielding select [auto]
1773  --enable-c99-snprintf   s use replacement printf family
1774  --enable-clockctl       s Use /dev/clockctl for non-root clock control
1775  --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1776  --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1777  --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
1778                          control
1779  --enable-signalled-io   s Use signalled IO if we can
1780  --with-crypto           + =openssl,libcrypto
1781  --with-openssl-libdir   + =/something/reasonable
1782
1783  --with-openssl-incdir   + =search likely dirs
1784
1785  --enable-verbose-ssl    - show crypto lib detection details
1786  --enable-openssl-random + Use SSL lib's secure random numbers
1787  --with-net-snmp-config  + =net-snmp-config
1788  --enable-libseccomp     EXPERIMENTAL: enable support for libseccomp
1789                          sandboxing (default is no)
1790  --with-stack-limit      ? =50 (200 for openbsd) 4k pages
1791  --with-memlock          ? =32 (-1 on linux) megabytes
1792  --enable-debug-timing   - include processing time debugging code (costs
1793                          performance)
1794  --enable-dst-minutes    =60 minutes per DST adjustment
1795  --enable-ignore-dns-errors
1796                          - retry DNS queries on any error
1797  --enable-BANCOMM        - Datum/Bancomm bc635/VME interface
1798  --enable-GPSVME         - TrueTime GPS receiver/VME interface
1799  --enable-all-clocks     + include all suitable non-PARSE clocks:
1800  --enable-ACTS           s ACTS modem service
1801  --enable-ARBITER        + Arbiter 1088A/B GPS receiver
1802  --enable-ARCRON-MSF     + Arcron MSF receiver
1803  --enable-AS2201         + Austron 2200A/2201A GPS receiver
1804  --enable-ATOM           s ATOM PPS interface
1805  --enable-CHRONOLOG      + Chrono-log K-series WWVB receiver
1806  --enable-CHU            + CHU modem/decoder
1807  --enable-AUDIO-CHU      s CHU audio/decoder
1808  --enable-DATUM          s Datum Programmable Time System
1809  --enable-DUMBCLOCK      + Dumb generic hh:mm:ss local clock
1810  --enable-FG             + Forum Graphic GPS
1811  --enable-HEATH          s Heath GC-1000 WWV/WWVH receiver
1812  --enable-HOPFSERIAL     + hopf serial clock device
1813  --enable-HOPFPCI        + hopf 6039 PCI board
1814  --enable-HPGPS          + HP 58503A GPS receiver
1815  --enable-IRIG           s IRIG audio decoder
1816  --enable-JJY            + JJY receiver
1817  --enable-JUPITER        s Rockwell Jupiter GPS receiver
1818  --enable-LEITCH         + Leitch CSD 5300 Master Clock System Driver
1819  --enable-LOCAL-CLOCK    + local clock reference
1820  --enable-MX4200         s Magnavox MX4200 GPS receiver
1821  --enable-NEOCLOCK4X     + NeoClock4X DCF77 / TDF receiver
1822  --enable-NMEA           + NMEA GPS receiver
1823  --enable-GPSD           + GPSD JSON receiver
1824  --enable-ONCORE         s Motorola VP/UT Oncore GPS receiver
1825  --enable-PALISADE       s Palisade clock
1826  --enable-PCF            + Conrad parallel port radio clock
1827  --enable-PST            + PST/Traconex 1020 WWV/WWVH receiver
1828  --enable-RIPENCC        - RIPENCC specific Trimble driver
1829  --enable-SHM            s SHM clock attached thru shared memory
1830  --enable-SPECTRACOM     + Spectracom 8170/Netclock/2 WWVB receiver
1831  --enable-TPRO           s KSI/Odetics TPRO/S GPS receiver/IRIG interface
1832  --enable-TRUETIME       s Kinemetrics/TrueTime receivers
1833  --enable-TT560          - TrueTime 560 IRIG-B decoder
1834  --enable-ULINK          + Ultralink WWVB receiver
1835  --enable-TSYNCPCI       s Spectracom TSYNC timing board
1836  --enable-WWV            s WWV Audio receiver
1837  --enable-ZYFER          + Zyfer GPStarplus receiver
1838  --enable-parse-clocks   - include all suitable PARSE clocks:
1839  --enable-COMPUTIME      s Diem Computime Radio Clock
1840  --enable-DCF7000        s ELV/DCF7000 clock
1841  --enable-HOPF6021       s HOPF 6021 clock
1842  --enable-MEINBERG       s Meinberg clocks
1843  --enable-RAWDCF         s DCF77 raw time code
1844  --enable-RCC8000        s RCC 8000 clock
1845  --enable-SCHMID         s Schmid DCF77 clock
1846  --enable-TRIMTAIP       s Trimble GPS receiver/TAIP protocol
1847  --enable-TRIMTSIP       s Trimble GPS receiver/TSIP protocol
1848  --enable-WHARTON        s WHARTON 400A Series clock
1849  --enable-VARITEXT       s VARITEXT clock
1850  --enable-SEL240X        s SEL240X clock
1851  --enable-autokey        + support NTP Autokey protocol
1852  --enable-kmem           s read /dev/kmem for tick and/or tickadj
1853  --enable-accurate-adjtime
1854                          s the adjtime() call is accurate
1855  --enable-tick=VALUE     s force a value for 'tick'
1856  --enable-tickadj=VALUE  s force a value for 'tickadj'
1857  --enable-simulator      - build/install the NTPD simulator?
1858  --without-sntp          - disable building sntp and sntp/tests
1859  --with-ntpsnmpd         s Build ntpsnmpd MIB agent?
1860  --enable-slew-always    s always slew the time
1861  --enable-step-slew      s step and slew the time
1862  --enable-ntpdate-step   s if ntpdate should step the time
1863  --enable-hourly-todr-sync
1864                          s if we should sync TODR hourly
1865  --enable-kernel-fll-bug s if we should avoid a kernel FLL bug
1866  --enable-bug1243-fix    + use unmodified autokey session keys
1867  --enable-bug3020-fix    + Provide the explicit 127.0.0.0/8 martian filter
1868  --enable-bug3527-fix    + provide correct mode7 fudgetime2 behavior
1869  --enable-bug3767-fix    + Disable debug assertion on OOB KoD RATE value
1870  --enable-irig-sawtooth  s if we should enable the IRIG sawtooth filter
1871  --enable-nist           - if we should enable the NIST lockclock scheme
1872  --enable-ntp-signd      - Provide support for Samba's signing daemon,
1873                          =/var/run/ntp_signd
1874  --enable-magicpps       + try to auto-instantiate PPS devices on Linux
1875  --enable-ipv6           s use IPv6?
1876
1877  --with-kame             - =/usr/local/v6
1878  --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1879  --enable-saveconfig     + saveconfig mechanism
1880  --enable-leap-smear     - experimental leap smear code
1881  --enable-dynamic-interleave
1882                          - dynamic interleave support
1883  --enable-problem-tests  + enable tests with undiagnosed problems
1884
1885Some influential environment variables:
1886  CC          C compiler command
1887  CFLAGS      C compiler flags
1888  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1889              nonstandard directory <lib dir>
1890  LIBS        libraries to pass to the linker, e.g. -l<library>
1891  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1892              you have headers in a nonstandard directory <include dir>
1893  CPP         C preprocessor
1894  YACC        The `Yet Another Compiler Compiler' implementation to use.
1895              Defaults to the first program found out of: `bison -y', `byacc',
1896              `yacc'.
1897  YFLAGS      The list of arguments that will be passed by default to $YACC.
1898              This script will default YFLAGS to the empty string to avoid a
1899              default value of `-d' given by some make applications.
1900  LT_SYS_LIBRARY_PATH
1901              User-defined run-time library search path.
1902
1903Use these variables to override the choices made by `configure' or to help
1904it to find libraries and programs with nonstandard names/locations.
1905
1906Report bugs to <https://bugs.ntp.org/>.
1907ntp home page: <https://www.ntp.org/>.
1908_ACEOF
1909ac_status=$?
1910fi
1911
1912if test "$ac_init_help" = "recursive"; then
1913  # If there are subdirs, report their specific --help.
1914  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1915    test -d "$ac_dir" ||
1916      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1917      continue
1918    ac_builddir=.
1919
1920case "$ac_dir" in
1921.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1922*)
1923  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1924  # A ".." for each directory in $ac_dir_suffix.
1925  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1926  case $ac_top_builddir_sub in
1927  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1928  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1929  esac ;;
1930esac
1931ac_abs_top_builddir=$ac_pwd
1932ac_abs_builddir=$ac_pwd$ac_dir_suffix
1933# for backward compatibility:
1934ac_top_builddir=$ac_top_build_prefix
1935
1936case $srcdir in
1937  .)  # We are building in place.
1938    ac_srcdir=.
1939    ac_top_srcdir=$ac_top_builddir_sub
1940    ac_abs_top_srcdir=$ac_pwd ;;
1941  [\\/]* | ?:[\\/]* )  # Absolute name.
1942    ac_srcdir=$srcdir$ac_dir_suffix;
1943    ac_top_srcdir=$srcdir
1944    ac_abs_top_srcdir=$srcdir ;;
1945  *) # Relative name.
1946    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1947    ac_top_srcdir=$ac_top_build_prefix$srcdir
1948    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1949esac
1950ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1951
1952    cd "$ac_dir" || { ac_status=$?; continue; }
1953    # Check for configure.gnu first; this name is used for a wrapper for
1954    # Metaconfig's "Configure" on case-insensitive file systems.
1955    if test -f "$ac_srcdir/configure.gnu"; then
1956      echo &&
1957      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1958    elif test -f "$ac_srcdir/configure"; then
1959      echo &&
1960      $SHELL "$ac_srcdir/configure" --help=recursive
1961    else
1962      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1963    fi || ac_status=$?
1964    cd "$ac_pwd" || { ac_status=$?; break; }
1965  done
1966fi
1967
1968test -n "$ac_init_help" && exit $ac_status
1969if $ac_init_version; then
1970  cat <<\_ACEOF
1971ntp configure 4.2.8p18
1972generated by GNU Autoconf 2.71
1973
1974Copyright (C) 2021 Free Software Foundation, Inc.
1975This configure script is free software; the Free Software Foundation
1976gives unlimited permission to copy, distribute and modify it.
1977_ACEOF
1978  exit
1979fi
1980
1981## ------------------------ ##
1982## Autoconf initialization. ##
1983## ------------------------ ##
1984
1985# ac_fn_c_try_compile LINENO
1986# --------------------------
1987# Try to compile conftest.$ac_ext, and return whether this succeeded.
1988ac_fn_c_try_compile ()
1989{
1990  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991  rm -f conftest.$ac_objext conftest.beam
1992  if { { ac_try="$ac_compile"
1993case "(($ac_try" in
1994  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1995  *) ac_try_echo=$ac_try;;
1996esac
1997eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1998printf "%s\n" "$ac_try_echo"; } >&5
1999  (eval "$ac_compile") 2>conftest.err
2000  ac_status=$?
2001  if test -s conftest.err; then
2002    grep -v '^ *+' conftest.err >conftest.er1
2003    cat conftest.er1 >&5
2004    mv -f conftest.er1 conftest.err
2005  fi
2006  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2007  test $ac_status = 0; } && {
2008	 test -z "$ac_c_werror_flag" ||
2009	 test ! -s conftest.err
2010       } && test -s conftest.$ac_objext
2011then :
2012  ac_retval=0
2013else $as_nop
2014  printf "%s\n" "$as_me: failed program was:" >&5
2015sed 's/^/| /' conftest.$ac_ext >&5
2016
2017	ac_retval=1
2018fi
2019  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2020  as_fn_set_status $ac_retval
2021
2022} # ac_fn_c_try_compile
2023
2024# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2025# -------------------------------------------------------
2026# Tests whether HEADER exists and can be compiled using the include files in
2027# INCLUDES, setting the cache variable VAR accordingly.
2028ac_fn_c_check_header_compile ()
2029{
2030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2032printf %s "checking for $2... " >&6; }
2033if eval test \${$3+y}
2034then :
2035  printf %s "(cached) " >&6
2036else $as_nop
2037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h.  */
2039$4
2040#include <$2>
2041_ACEOF
2042if ac_fn_c_try_compile "$LINENO"
2043then :
2044  eval "$3=yes"
2045else $as_nop
2046  eval "$3=no"
2047fi
2048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2049fi
2050eval ac_res=\$$3
2051	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2052printf "%s\n" "$ac_res" >&6; }
2053  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2054
2055} # ac_fn_c_check_header_compile
2056
2057# ac_fn_c_try_link LINENO
2058# -----------------------
2059# Try to link conftest.$ac_ext, and return whether this succeeded.
2060ac_fn_c_try_link ()
2061{
2062  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2063  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2064  if { { ac_try="$ac_link"
2065case "(($ac_try" in
2066  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2067  *) ac_try_echo=$ac_try;;
2068esac
2069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2070printf "%s\n" "$ac_try_echo"; } >&5
2071  (eval "$ac_link") 2>conftest.err
2072  ac_status=$?
2073  if test -s conftest.err; then
2074    grep -v '^ *+' conftest.err >conftest.er1
2075    cat conftest.er1 >&5
2076    mv -f conftest.er1 conftest.err
2077  fi
2078  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2079  test $ac_status = 0; } && {
2080	 test -z "$ac_c_werror_flag" ||
2081	 test ! -s conftest.err
2082       } && test -s conftest$ac_exeext && {
2083	 test "$cross_compiling" = yes ||
2084	 test -x conftest$ac_exeext
2085       }
2086then :
2087  ac_retval=0
2088else $as_nop
2089  printf "%s\n" "$as_me: failed program was:" >&5
2090sed 's/^/| /' conftest.$ac_ext >&5
2091
2092	ac_retval=1
2093fi
2094  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2095  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2096  # interfere with the next link command; also delete a directory that is
2097  # left behind by Apple's compiler.  We do this before executing the actions.
2098  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2099  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2100  as_fn_set_status $ac_retval
2101
2102} # ac_fn_c_try_link
2103
2104# ac_fn_c_try_run LINENO
2105# ----------------------
2106# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2107# executables *can* be run.
2108ac_fn_c_try_run ()
2109{
2110  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2111  if { { ac_try="$ac_link"
2112case "(($ac_try" in
2113  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2114  *) ac_try_echo=$ac_try;;
2115esac
2116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2117printf "%s\n" "$ac_try_echo"; } >&5
2118  (eval "$ac_link") 2>&5
2119  ac_status=$?
2120  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2121  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2122  { { case "(($ac_try" in
2123  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2124  *) ac_try_echo=$ac_try;;
2125esac
2126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2127printf "%s\n" "$ac_try_echo"; } >&5
2128  (eval "$ac_try") 2>&5
2129  ac_status=$?
2130  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2131  test $ac_status = 0; }; }
2132then :
2133  ac_retval=0
2134else $as_nop
2135  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2136       printf "%s\n" "$as_me: failed program was:" >&5
2137sed 's/^/| /' conftest.$ac_ext >&5
2138
2139       ac_retval=$ac_status
2140fi
2141  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2142  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2143  as_fn_set_status $ac_retval
2144
2145} # ac_fn_c_try_run
2146
2147# ac_fn_c_try_cpp LINENO
2148# ----------------------
2149# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2150ac_fn_c_try_cpp ()
2151{
2152  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2153  if { { ac_try="$ac_cpp conftest.$ac_ext"
2154case "(($ac_try" in
2155  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2156  *) ac_try_echo=$ac_try;;
2157esac
2158eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2159printf "%s\n" "$ac_try_echo"; } >&5
2160  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2161  ac_status=$?
2162  if test -s conftest.err; then
2163    grep -v '^ *+' conftest.err >conftest.er1
2164    cat conftest.er1 >&5
2165    mv -f conftest.er1 conftest.err
2166  fi
2167  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2168  test $ac_status = 0; } > conftest.i && {
2169	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2170	 test ! -s conftest.err
2171       }
2172then :
2173  ac_retval=0
2174else $as_nop
2175  printf "%s\n" "$as_me: failed program was:" >&5
2176sed 's/^/| /' conftest.$ac_ext >&5
2177
2178    ac_retval=1
2179fi
2180  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2181  as_fn_set_status $ac_retval
2182
2183} # ac_fn_c_try_cpp
2184
2185# ac_fn_c_check_func LINENO FUNC VAR
2186# ----------------------------------
2187# Tests whether FUNC exists, setting the cache variable VAR accordingly
2188ac_fn_c_check_func ()
2189{
2190  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2191  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2192printf %s "checking for $2... " >&6; }
2193if eval test \${$3+y}
2194then :
2195  printf %s "(cached) " >&6
2196else $as_nop
2197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2200   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2201#define $2 innocuous_$2
2202
2203/* System header to define __stub macros and hopefully few prototypes,
2204   which can conflict with char $2 (); below.  */
2205
2206#include <limits.h>
2207#undef $2
2208
2209/* Override any GCC internal prototype to avoid an error.
2210   Use char because int might match the return type of a GCC
2211   builtin and then its argument prototype would still apply.  */
2212#ifdef __cplusplus
2213extern "C"
2214#endif
2215char $2 ();
2216/* The GNU C library defines this for functions which it implements
2217    to always fail with ENOSYS.  Some functions are actually named
2218    something starting with __ and the normal name is an alias.  */
2219#if defined __stub_$2 || defined __stub___$2
2220choke me
2221#endif
2222
2223int
2224main (void)
2225{
2226return $2 ();
2227  ;
2228  return 0;
2229}
2230_ACEOF
2231if ac_fn_c_try_link "$LINENO"
2232then :
2233  eval "$3=yes"
2234else $as_nop
2235  eval "$3=no"
2236fi
2237rm -f core conftest.err conftest.$ac_objext conftest.beam \
2238    conftest$ac_exeext conftest.$ac_ext
2239fi
2240eval ac_res=\$$3
2241	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2242printf "%s\n" "$ac_res" >&6; }
2243  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2244
2245} # ac_fn_c_check_func
2246
2247# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2248# -------------------------------------------
2249# Tests whether TYPE exists after having included INCLUDES, setting cache
2250# variable VAR accordingly.
2251ac_fn_c_check_type ()
2252{
2253  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2254  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2255printf %s "checking for $2... " >&6; }
2256if eval test \${$3+y}
2257then :
2258  printf %s "(cached) " >&6
2259else $as_nop
2260  eval "$3=no"
2261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262/* end confdefs.h.  */
2263$4
2264int
2265main (void)
2266{
2267if (sizeof ($2))
2268	 return 0;
2269  ;
2270  return 0;
2271}
2272_ACEOF
2273if ac_fn_c_try_compile "$LINENO"
2274then :
2275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276/* end confdefs.h.  */
2277$4
2278int
2279main (void)
2280{
2281if (sizeof (($2)))
2282	    return 0;
2283  ;
2284  return 0;
2285}
2286_ACEOF
2287if ac_fn_c_try_compile "$LINENO"
2288then :
2289
2290else $as_nop
2291  eval "$3=yes"
2292fi
2293rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2294fi
2295rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2296fi
2297eval ac_res=\$$3
2298	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2299printf "%s\n" "$ac_res" >&6; }
2300  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2301
2302} # ac_fn_c_check_type
2303
2304# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2305# --------------------------------------------
2306# Tries to find the compile-time value of EXPR in a program that includes
2307# INCLUDES, setting VAR accordingly. Returns whether the value could be
2308# computed
2309ac_fn_c_compute_int ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  if test "$cross_compiling" = yes; then
2313    # Depending upon the size, compute the lo and hi bounds.
2314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main (void)
2319{
2320static int test_array [1 - 2 * !(($2) >= 0)];
2321test_array [0] = 0;
2322return test_array [0];
2323
2324  ;
2325  return 0;
2326}
2327_ACEOF
2328if ac_fn_c_try_compile "$LINENO"
2329then :
2330  ac_lo=0 ac_mid=0
2331  while :; do
2332    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335int
2336main (void)
2337{
2338static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2339test_array [0] = 0;
2340return test_array [0];
2341
2342  ;
2343  return 0;
2344}
2345_ACEOF
2346if ac_fn_c_try_compile "$LINENO"
2347then :
2348  ac_hi=$ac_mid; break
2349else $as_nop
2350  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2351			if test $ac_lo -le $ac_mid; then
2352			  ac_lo= ac_hi=
2353			  break
2354			fi
2355			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2356fi
2357rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2358  done
2359else $as_nop
2360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h.  */
2362$4
2363int
2364main (void)
2365{
2366static int test_array [1 - 2 * !(($2) < 0)];
2367test_array [0] = 0;
2368return test_array [0];
2369
2370  ;
2371  return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"
2375then :
2376  ac_hi=-1 ac_mid=-1
2377  while :; do
2378    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2379/* end confdefs.h.  */
2380$4
2381int
2382main (void)
2383{
2384static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2385test_array [0] = 0;
2386return test_array [0];
2387
2388  ;
2389  return 0;
2390}
2391_ACEOF
2392if ac_fn_c_try_compile "$LINENO"
2393then :
2394  ac_lo=$ac_mid; break
2395else $as_nop
2396  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2397			if test $ac_mid -le $ac_hi; then
2398			  ac_lo= ac_hi=
2399			  break
2400			fi
2401			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2402fi
2403rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2404  done
2405else $as_nop
2406  ac_lo= ac_hi=
2407fi
2408rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2409fi
2410rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2411# Binary search between lo and hi bounds.
2412while test "x$ac_lo" != "x$ac_hi"; do
2413  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2414  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2415/* end confdefs.h.  */
2416$4
2417int
2418main (void)
2419{
2420static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2421test_array [0] = 0;
2422return test_array [0];
2423
2424  ;
2425  return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"
2429then :
2430  ac_hi=$ac_mid
2431else $as_nop
2432  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2433fi
2434rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2435done
2436case $ac_lo in #((
2437?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2438'') ac_retval=1 ;;
2439esac
2440  else
2441    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2442/* end confdefs.h.  */
2443$4
2444static long int longval (void) { return $2; }
2445static unsigned long int ulongval (void) { return $2; }
2446#include <stdio.h>
2447#include <stdlib.h>
2448int
2449main (void)
2450{
2451
2452  FILE *f = fopen ("conftest.val", "w");
2453  if (! f)
2454    return 1;
2455  if (($2) < 0)
2456    {
2457      long int i = longval ();
2458      if (i != ($2))
2459	return 1;
2460      fprintf (f, "%ld", i);
2461    }
2462  else
2463    {
2464      unsigned long int i = ulongval ();
2465      if (i != ($2))
2466	return 1;
2467      fprintf (f, "%lu", i);
2468    }
2469  /* Do not output a trailing newline, as this causes \r\n confusion
2470     on some platforms.  */
2471  return ferror (f) || fclose (f) != 0;
2472
2473  ;
2474  return 0;
2475}
2476_ACEOF
2477if ac_fn_c_try_run "$LINENO"
2478then :
2479  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2480else $as_nop
2481  ac_retval=1
2482fi
2483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2484  conftest.$ac_objext conftest.beam conftest.$ac_ext
2485rm -f conftest.val
2486
2487  fi
2488  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2489  as_fn_set_status $ac_retval
2490
2491} # ac_fn_c_compute_int
2492
2493# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2494# ------------------------------------------------------------------
2495# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2496# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2497ac_fn_check_decl ()
2498{
2499  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500  as_decl_name=`echo $2|sed 's/ *(.*//'`
2501  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2502printf %s "checking whether $as_decl_name is declared... " >&6; }
2503if eval test \${$3+y}
2504then :
2505  printf %s "(cached) " >&6
2506else $as_nop
2507  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2508  eval ac_save_FLAGS=\$$6
2509  as_fn_append $6 " $5"
2510  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2511/* end confdefs.h.  */
2512$4
2513int
2514main (void)
2515{
2516#ifndef $as_decl_name
2517#ifdef __cplusplus
2518  (void) $as_decl_use;
2519#else
2520  (void) $as_decl_name;
2521#endif
2522#endif
2523
2524  ;
2525  return 0;
2526}
2527_ACEOF
2528if ac_fn_c_try_compile "$LINENO"
2529then :
2530  eval "$3=yes"
2531else $as_nop
2532  eval "$3=no"
2533fi
2534rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2535  eval $6=\$ac_save_FLAGS
2536
2537fi
2538eval ac_res=\$$3
2539	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2540printf "%s\n" "$ac_res" >&6; }
2541  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2542
2543} # ac_fn_check_decl
2544
2545# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2546# ----------------------------------------------------
2547# Tries to find if the field MEMBER exists in type AGGR, after including
2548# INCLUDES, setting cache variable VAR accordingly.
2549ac_fn_c_check_member ()
2550{
2551  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2552  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2553printf %s "checking for $2.$3... " >&6; }
2554if eval test \${$4+y}
2555then :
2556  printf %s "(cached) " >&6
2557else $as_nop
2558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2559/* end confdefs.h.  */
2560$5
2561int
2562main (void)
2563{
2564static $2 ac_aggr;
2565if (ac_aggr.$3)
2566return 0;
2567  ;
2568  return 0;
2569}
2570_ACEOF
2571if ac_fn_c_try_compile "$LINENO"
2572then :
2573  eval "$4=yes"
2574else $as_nop
2575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576/* end confdefs.h.  */
2577$5
2578int
2579main (void)
2580{
2581static $2 ac_aggr;
2582if (sizeof ac_aggr.$3)
2583return 0;
2584  ;
2585  return 0;
2586}
2587_ACEOF
2588if ac_fn_c_try_compile "$LINENO"
2589then :
2590  eval "$4=yes"
2591else $as_nop
2592  eval "$4=no"
2593fi
2594rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2595fi
2596rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2597fi
2598eval ac_res=\$$4
2599	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2600printf "%s\n" "$ac_res" >&6; }
2601  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2602
2603} # ac_fn_c_check_member
2604ac_configure_args_raw=
2605for ac_arg
2606do
2607  case $ac_arg in
2608  *\'*)
2609    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2610  esac
2611  as_fn_append ac_configure_args_raw " '$ac_arg'"
2612done
2613
2614case $ac_configure_args_raw in
2615  *$as_nl*)
2616    ac_safe_unquote= ;;
2617  *)
2618    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2619    ac_unsafe_a="$ac_unsafe_z#~"
2620    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2621    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2622esac
2623
2624cat >config.log <<_ACEOF
2625This file contains any messages produced by compilers while
2626running configure, to aid debugging if configure makes a mistake.
2627
2628It was created by ntp $as_me 4.2.8p18, which was
2629generated by GNU Autoconf 2.71.  Invocation command line was
2630
2631  $ $0$ac_configure_args_raw
2632
2633_ACEOF
2634exec 5>>config.log
2635{
2636cat <<_ASUNAME
2637## --------- ##
2638## Platform. ##
2639## --------- ##
2640
2641hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2642uname -m = `(uname -m) 2>/dev/null || echo unknown`
2643uname -r = `(uname -r) 2>/dev/null || echo unknown`
2644uname -s = `(uname -s) 2>/dev/null || echo unknown`
2645uname -v = `(uname -v) 2>/dev/null || echo unknown`
2646
2647/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2648/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2649
2650/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2651/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2652/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2653/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2654/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2655/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2656/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2657
2658_ASUNAME
2659
2660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2661for as_dir in $PATH
2662do
2663  IFS=$as_save_IFS
2664  case $as_dir in #(((
2665    '') as_dir=./ ;;
2666    */) ;;
2667    *) as_dir=$as_dir/ ;;
2668  esac
2669    printf "%s\n" "PATH: $as_dir"
2670  done
2671IFS=$as_save_IFS
2672
2673} >&5
2674
2675cat >&5 <<_ACEOF
2676
2677
2678## ----------- ##
2679## Core tests. ##
2680## ----------- ##
2681
2682_ACEOF
2683
2684
2685# Keep a trace of the command line.
2686# Strip out --no-create and --no-recursion so they do not pile up.
2687# Strip out --silent because we don't want to record it for future runs.
2688# Also quote any args containing shell meta-characters.
2689# Make two passes to allow for proper duplicate-argument suppression.
2690ac_configure_args=
2691ac_configure_args0=
2692ac_configure_args1=
2693ac_must_keep_next=false
2694for ac_pass in 1 2
2695do
2696  for ac_arg
2697  do
2698    case $ac_arg in
2699    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2700    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2701    | -silent | --silent | --silen | --sile | --sil)
2702      continue ;;
2703    *\'*)
2704      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2705    esac
2706    case $ac_pass in
2707    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2708    2)
2709      as_fn_append ac_configure_args1 " '$ac_arg'"
2710      if test $ac_must_keep_next = true; then
2711	ac_must_keep_next=false # Got value, back to normal.
2712      else
2713	case $ac_arg in
2714	  *=* | --config-cache | -C | -disable-* | --disable-* \
2715	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2716	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2717	  | -with-* | --with-* | -without-* | --without-* | --x)
2718	    case "$ac_configure_args0 " in
2719	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2720	    esac
2721	    ;;
2722	  -* ) ac_must_keep_next=true ;;
2723	esac
2724      fi
2725      as_fn_append ac_configure_args " '$ac_arg'"
2726      ;;
2727    esac
2728  done
2729done
2730{ ac_configure_args0=; unset ac_configure_args0;}
2731{ ac_configure_args1=; unset ac_configure_args1;}
2732
2733# When interrupted or exit'd, cleanup temporary files, and complete
2734# config.log.  We remove comments because anyway the quotes in there
2735# would cause problems or look ugly.
2736# WARNING: Use '\'' to represent an apostrophe within the trap.
2737# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2738trap 'exit_status=$?
2739  # Sanitize IFS.
2740  IFS=" ""	$as_nl"
2741  # Save into config.log some information that might help in debugging.
2742  {
2743    echo
2744
2745    printf "%s\n" "## ---------------- ##
2746## Cache variables. ##
2747## ---------------- ##"
2748    echo
2749    # The following way of writing the cache mishandles newlines in values,
2750(
2751  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2752    eval ac_val=\$$ac_var
2753    case $ac_val in #(
2754    *${as_nl}*)
2755      case $ac_var in #(
2756      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2757printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2758      esac
2759      case $ac_var in #(
2760      _ | IFS | as_nl) ;; #(
2761      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2762      *) { eval $ac_var=; unset $ac_var;} ;;
2763      esac ;;
2764    esac
2765  done
2766  (set) 2>&1 |
2767    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2768    *${as_nl}ac_space=\ *)
2769      sed -n \
2770	"s/'\''/'\''\\\\'\'''\''/g;
2771	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2772      ;; #(
2773    *)
2774      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2775      ;;
2776    esac |
2777    sort
2778)
2779    echo
2780
2781    printf "%s\n" "## ----------------- ##
2782## Output variables. ##
2783## ----------------- ##"
2784    echo
2785    for ac_var in $ac_subst_vars
2786    do
2787      eval ac_val=\$$ac_var
2788      case $ac_val in
2789      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2790      esac
2791      printf "%s\n" "$ac_var='\''$ac_val'\''"
2792    done | sort
2793    echo
2794
2795    if test -n "$ac_subst_files"; then
2796      printf "%s\n" "## ------------------- ##
2797## File substitutions. ##
2798## ------------------- ##"
2799      echo
2800      for ac_var in $ac_subst_files
2801      do
2802	eval ac_val=\$$ac_var
2803	case $ac_val in
2804	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2805	esac
2806	printf "%s\n" "$ac_var='\''$ac_val'\''"
2807      done | sort
2808      echo
2809    fi
2810
2811    if test -s confdefs.h; then
2812      printf "%s\n" "## ----------- ##
2813## confdefs.h. ##
2814## ----------- ##"
2815      echo
2816      cat confdefs.h
2817      echo
2818    fi
2819    test "$ac_signal" != 0 &&
2820      printf "%s\n" "$as_me: caught signal $ac_signal"
2821    printf "%s\n" "$as_me: exit $exit_status"
2822  } >&5
2823  rm -f core *.core core.conftest.* &&
2824    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2825    exit $exit_status
2826' 0
2827for ac_signal in 1 2 13 15; do
2828  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2829done
2830ac_signal=0
2831
2832# confdefs.h avoids OS command line length limits that DEFS can exceed.
2833rm -f -r conftest* confdefs.h
2834
2835printf "%s\n" "/* confdefs.h */" > confdefs.h
2836
2837# Predefined preprocessor variables.
2838
2839printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2840
2841printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2842
2843printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2844
2845printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2846
2847printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2848
2849printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2850
2851
2852# Let the site file select an alternate cache file if it wants to.
2853# Prefer an explicitly selected file to automatically selected ones.
2854if test -n "$CONFIG_SITE"; then
2855  ac_site_files="$CONFIG_SITE"
2856elif test "x$prefix" != xNONE; then
2857  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2858else
2859  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2860fi
2861
2862for ac_site_file in $ac_site_files
2863do
2864  case $ac_site_file in #(
2865  */*) :
2866     ;; #(
2867  *) :
2868    ac_site_file=./$ac_site_file ;;
2869esac
2870  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2871    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2872printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2873    sed 's/^/| /' "$ac_site_file" >&5
2874    . "$ac_site_file" \
2875      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2876printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2877as_fn_error $? "failed to load site script $ac_site_file
2878See \`config.log' for more details" "$LINENO" 5; }
2879  fi
2880done
2881
2882if test -r "$cache_file"; then
2883  # Some versions of bash will fail to source /dev/null (special files
2884  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2885  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2886    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2887printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2888    case $cache_file in
2889      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2890      *)                      . "./$cache_file";;
2891    esac
2892  fi
2893else
2894  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2895printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2896  >$cache_file
2897fi
2898
2899# Test code for whether the C compiler supports C89 (global declarations)
2900ac_c_conftest_c89_globals='
2901/* Does the compiler advertise C89 conformance?
2902   Do not test the value of __STDC__, because some compilers set it to 0
2903   while being otherwise adequately conformant. */
2904#if !defined __STDC__
2905# error "Compiler does not advertise C89 conformance"
2906#endif
2907
2908#include <stddef.h>
2909#include <stdarg.h>
2910struct stat;
2911/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2912struct buf { int x; };
2913struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2914static char *e (p, i)
2915     char **p;
2916     int i;
2917{
2918  return p[i];
2919}
2920static char *f (char * (*g) (char **, int), char **p, ...)
2921{
2922  char *s;
2923  va_list v;
2924  va_start (v,p);
2925  s = g (p, va_arg (v,int));
2926  va_end (v);
2927  return s;
2928}
2929
2930/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2931   function prototypes and stuff, but not \xHH hex character constants.
2932   These do not provoke an error unfortunately, instead are silently treated
2933   as an "x".  The following induces an error, until -std is added to get
2934   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2935   array size at least.  It is necessary to write \x00 == 0 to get something
2936   that is true only with -std.  */
2937int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2938
2939/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2940   inside strings and character constants.  */
2941#define FOO(x) '\''x'\''
2942int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2943
2944int test (int i, double x);
2945struct s1 {int (*f) (int a);};
2946struct s2 {int (*f) (double a);};
2947int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2948               int, int);'
2949
2950# Test code for whether the C compiler supports C89 (body of main).
2951ac_c_conftest_c89_main='
2952ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2953'
2954
2955# Test code for whether the C compiler supports C99 (global declarations)
2956ac_c_conftest_c99_globals='
2957// Does the compiler advertise C99 conformance?
2958#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2959# error "Compiler does not advertise C99 conformance"
2960#endif
2961
2962#include <stdbool.h>
2963extern int puts (const char *);
2964extern int printf (const char *, ...);
2965extern int dprintf (int, const char *, ...);
2966extern void *malloc (size_t);
2967
2968// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2969// dprintf is used instead of fprintf to avoid needing to declare
2970// FILE and stderr.
2971#define debug(...) dprintf (2, __VA_ARGS__)
2972#define showlist(...) puts (#__VA_ARGS__)
2973#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2974static void
2975test_varargs_macros (void)
2976{
2977  int x = 1234;
2978  int y = 5678;
2979  debug ("Flag");
2980  debug ("X = %d\n", x);
2981  showlist (The first, second, and third items.);
2982  report (x>y, "x is %d but y is %d", x, y);
2983}
2984
2985// Check long long types.
2986#define BIG64 18446744073709551615ull
2987#define BIG32 4294967295ul
2988#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2989#if !BIG_OK
2990  #error "your preprocessor is broken"
2991#endif
2992#if BIG_OK
2993#else
2994  #error "your preprocessor is broken"
2995#endif
2996static long long int bignum = -9223372036854775807LL;
2997static unsigned long long int ubignum = BIG64;
2998
2999struct incomplete_array
3000{
3001  int datasize;
3002  double data[];
3003};
3004
3005struct named_init {
3006  int number;
3007  const wchar_t *name;
3008  double average;
3009};
3010
3011typedef const char *ccp;
3012
3013static inline int
3014test_restrict (ccp restrict text)
3015{
3016  // See if C++-style comments work.
3017  // Iterate through items via the restricted pointer.
3018  // Also check for declarations in for loops.
3019  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3020    continue;
3021  return 0;
3022}
3023
3024// Check varargs and va_copy.
3025static bool
3026test_varargs (const char *format, ...)
3027{
3028  va_list args;
3029  va_start (args, format);
3030  va_list args_copy;
3031  va_copy (args_copy, args);
3032
3033  const char *str = "";
3034  int number = 0;
3035  float fnumber = 0;
3036
3037  while (*format)
3038    {
3039      switch (*format++)
3040	{
3041	case '\''s'\'': // string
3042	  str = va_arg (args_copy, const char *);
3043	  break;
3044	case '\''d'\'': // int
3045	  number = va_arg (args_copy, int);
3046	  break;
3047	case '\''f'\'': // float
3048	  fnumber = va_arg (args_copy, double);
3049	  break;
3050	default:
3051	  break;
3052	}
3053    }
3054  va_end (args_copy);
3055  va_end (args);
3056
3057  return *str && number && fnumber;
3058}
3059'
3060
3061# Test code for whether the C compiler supports C99 (body of main).
3062ac_c_conftest_c99_main='
3063  // Check bool.
3064  _Bool success = false;
3065  success |= (argc != 0);
3066
3067  // Check restrict.
3068  if (test_restrict ("String literal") == 0)
3069    success = true;
3070  char *restrict newvar = "Another string";
3071
3072  // Check varargs.
3073  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
3074  test_varargs_macros ();
3075
3076  // Check flexible array members.
3077  struct incomplete_array *ia =
3078    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3079  ia->datasize = 10;
3080  for (int i = 0; i < ia->datasize; ++i)
3081    ia->data[i] = i * 1.234;
3082
3083  // Check named initializers.
3084  struct named_init ni = {
3085    .number = 34,
3086    .name = L"Test wide string",
3087    .average = 543.34343,
3088  };
3089
3090  ni.number = 58;
3091
3092  int dynamic_array[ni.number];
3093  dynamic_array[0] = argv[0][0];
3094  dynamic_array[ni.number - 1] = 543;
3095
3096  // work around unused variable warnings
3097  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3098	 || dynamic_array[ni.number - 1] != 543);
3099'
3100
3101# Test code for whether the C compiler supports C11 (global declarations)
3102ac_c_conftest_c11_globals='
3103// Does the compiler advertise C11 conformance?
3104#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3105# error "Compiler does not advertise C11 conformance"
3106#endif
3107
3108// Check _Alignas.
3109char _Alignas (double) aligned_as_double;
3110char _Alignas (0) no_special_alignment;
3111extern char aligned_as_int;
3112char _Alignas (0) _Alignas (int) aligned_as_int;
3113
3114// Check _Alignof.
3115enum
3116{
3117  int_alignment = _Alignof (int),
3118  int_array_alignment = _Alignof (int[100]),
3119  char_alignment = _Alignof (char)
3120};
3121_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3122
3123// Check _Noreturn.
3124int _Noreturn does_not_return (void) { for (;;) continue; }
3125
3126// Check _Static_assert.
3127struct test_static_assert
3128{
3129  int x;
3130  _Static_assert (sizeof (int) <= sizeof (long int),
3131                  "_Static_assert does not work in struct");
3132  long int y;
3133};
3134
3135// Check UTF-8 literals.
3136#define u8 syntax error!
3137char const utf8_literal[] = u8"happens to be ASCII" "another string";
3138
3139// Check duplicate typedefs.
3140typedef long *long_ptr;
3141typedef long int *long_ptr;
3142typedef long_ptr long_ptr;
3143
3144// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3145struct anonymous
3146{
3147  union {
3148    struct { int i; int j; };
3149    struct { int k; long int l; } w;
3150  };
3151  int m;
3152} v1;
3153'
3154
3155# Test code for whether the C compiler supports C11 (body of main).
3156ac_c_conftest_c11_main='
3157  _Static_assert ((offsetof (struct anonymous, i)
3158		   == offsetof (struct anonymous, w.k)),
3159		  "Anonymous union alignment botch");
3160  v1.i = 2;
3161  v1.w.k = 5;
3162  ok |= v1.i != 5;
3163'
3164
3165# Test code for whether the C compiler supports C11 (complete).
3166ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3167${ac_c_conftest_c99_globals}
3168${ac_c_conftest_c11_globals}
3169
3170int
3171main (int argc, char **argv)
3172{
3173  int ok = 0;
3174  ${ac_c_conftest_c89_main}
3175  ${ac_c_conftest_c99_main}
3176  ${ac_c_conftest_c11_main}
3177  return ok;
3178}
3179"
3180
3181# Test code for whether the C compiler supports C99 (complete).
3182ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3183${ac_c_conftest_c99_globals}
3184
3185int
3186main (int argc, char **argv)
3187{
3188  int ok = 0;
3189  ${ac_c_conftest_c89_main}
3190  ${ac_c_conftest_c99_main}
3191  return ok;
3192}
3193"
3194
3195# Test code for whether the C compiler supports C89 (complete).
3196ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3197
3198int
3199main (int argc, char **argv)
3200{
3201  int ok = 0;
3202  ${ac_c_conftest_c89_main}
3203  return ok;
3204}
3205"
3206
3207as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3208as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3209as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3210as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3211as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3212as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3213as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3214as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3215as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3216as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3217as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3218as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
3219as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3220as_fn_append ac_func_c_list " fork HAVE_FORK"
3221as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3222as_fn_append ac_header_c_list " stdarg.h stdarg_h HAVE_STDARG_H"
3223
3224# Auxiliary files required by this configure script.
3225ac_aux_files="ltmain.sh ar-lib compile config.guess config.sub missing install-sh"
3226
3227# Locations in which to look for auxiliary files.
3228ac_aux_dir_candidates="${srcdir}/sntp/libevent/build-aux"
3229
3230# Search for a directory containing all of the required auxiliary files,
3231# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3232# If we don't find one directory that contains all the files we need,
3233# we report the set of missing files from the *first* directory in
3234# $ac_aux_dir_candidates and give up.
3235ac_missing_aux_files=""
3236ac_first_candidate=:
3237printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3238as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239as_found=false
3240for as_dir in $ac_aux_dir_candidates
3241do
3242  IFS=$as_save_IFS
3243  case $as_dir in #(((
3244    '') as_dir=./ ;;
3245    */) ;;
3246    *) as_dir=$as_dir/ ;;
3247  esac
3248  as_found=:
3249
3250  printf "%s\n" "$as_me:${as_lineno-$LINENO}:  trying $as_dir" >&5
3251  ac_aux_dir_found=yes
3252  ac_install_sh=
3253  for ac_aux in $ac_aux_files
3254  do
3255    # As a special case, if "install-sh" is required, that requirement
3256    # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3257    # and $ac_install_sh is set appropriately for whichever one is found.
3258    if test x"$ac_aux" = x"install-sh"
3259    then
3260      if test -f "${as_dir}install-sh"; then
3261        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install-sh found" >&5
3262        ac_install_sh="${as_dir}install-sh -c"
3263      elif test -f "${as_dir}install.sh"; then
3264        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}install.sh found" >&5
3265        ac_install_sh="${as_dir}install.sh -c"
3266      elif test -f "${as_dir}shtool"; then
3267        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}shtool found" >&5
3268        ac_install_sh="${as_dir}shtool install -c"
3269      else
3270        ac_aux_dir_found=no
3271        if $ac_first_candidate; then
3272          ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3273        else
3274          break
3275        fi
3276      fi
3277    else
3278      if test -f "${as_dir}${ac_aux}"; then
3279        printf "%s\n" "$as_me:${as_lineno-$LINENO}:   ${as_dir}${ac_aux} found" >&5
3280      else
3281        ac_aux_dir_found=no
3282        if $ac_first_candidate; then
3283          ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3284        else
3285          break
3286        fi
3287      fi
3288    fi
3289  done
3290  if test "$ac_aux_dir_found" = yes; then
3291    ac_aux_dir="$as_dir"
3292    break
3293  fi
3294  ac_first_candidate=false
3295
3296  as_found=false
3297done
3298IFS=$as_save_IFS
3299if $as_found
3300then :
3301
3302else $as_nop
3303  as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3304fi
3305
3306
3307# These three variables are undocumented and unsupported,
3308# and are intended to be withdrawn in a future Autoconf release.
3309# They can cause serious problems if a builder's source tree is in a directory
3310# whose full name contains unusual characters.
3311if test -f "${ac_aux_dir}config.guess"; then
3312  ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3313fi
3314if test -f "${ac_aux_dir}config.sub"; then
3315  ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3316fi
3317if test -f "$ac_aux_dir/configure"; then
3318  ac_configure="$SHELL ${ac_aux_dir}configure"
3319fi
3320
3321# Check that the precious variables saved in the cache have kept the same
3322# value.
3323ac_cache_corrupted=false
3324for ac_var in $ac_precious_vars; do
3325  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3326  eval ac_new_set=\$ac_env_${ac_var}_set
3327  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3328  eval ac_new_val=\$ac_env_${ac_var}_value
3329  case $ac_old_set,$ac_new_set in
3330    set,)
3331      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3332printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3333      ac_cache_corrupted=: ;;
3334    ,set)
3335      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3336printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3337      ac_cache_corrupted=: ;;
3338    ,);;
3339    *)
3340      if test "x$ac_old_val" != "x$ac_new_val"; then
3341	# differences in whitespace do not lead to failure.
3342	ac_old_val_w=`echo x $ac_old_val`
3343	ac_new_val_w=`echo x $ac_new_val`
3344	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3345	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3346printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3347	  ac_cache_corrupted=:
3348	else
3349	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3350printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3351	  eval $ac_var=\$ac_old_val
3352	fi
3353	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3354printf "%s\n" "$as_me:   former value:  \`$ac_old_val'" >&2;}
3355	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3356printf "%s\n" "$as_me:   current value: \`$ac_new_val'" >&2;}
3357      fi;;
3358  esac
3359  # Pass precious variables to config.status.
3360  if test "$ac_new_set" = set; then
3361    case $ac_new_val in
3362    *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3363    *) ac_arg=$ac_var=$ac_new_val ;;
3364    esac
3365    case " $ac_configure_args " in
3366      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3367      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3368    esac
3369  fi
3370done
3371if $ac_cache_corrupted; then
3372  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3373printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3374  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3375printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3376  as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3377	    and start over" "$LINENO" 5
3378fi
3379## -------------------- ##
3380## Main body of script. ##
3381## -------------------- ##
3382
3383ac_ext=c
3384ac_cpp='$CPP $CPPFLAGS'
3385ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3386ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3387ac_compiler_gnu=$ac_cv_c_compiler_gnu
3388
3389
3390
3391
3392ac_ext=c
3393ac_cpp='$CPP $CPPFLAGS'
3394ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3395ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3396ac_compiler_gnu=$ac_cv_c_compiler_gnu
3397
3398
3399
3400
3401
3402
3403# Bump ntp_configure_cache_version for each change to configure.ac or
3404# .m4 files which invalidates cached values from previous configure
3405# runs.
3406#
3407# If the change affects cache variables used only by the main NTP
3408# configure.ac, then only its version number should be bumped, while
3409# the subdir configure.ac version numbers should be unchanged.  The
3410# same is true for a test/variable that is used only by one subdir
3411# being changed incompatibly; only that subdir's cache version needs
3412# bumping.
3413#
3414# If a change affects variables shared by all NTP configure scripts,
3415# please bump the version numbers of each.  If you are not sure, the
3416# safe choice is to bump all on any cache-invalidating change.
3417#
3418# In order to avoid the risk of version stamp collision between -stable
3419# and -dev branches, do not simply increment the version, instead use
3420# the date YYYYMMDD optionally with -HHMM if there is more than one
3421# bump in a day.
3422
3423ntp_configure_cache_version=20240218
3424
3425# When the cache version of config.cache and configure do not
3426# match, NTP_CACHEVERSION will flush the cache.
3427
3428
3429
3430    ntp_cache_flush=1
3431
3432    case "$ntp_cv_main_cache_version" in
3433     $ntp_configure_cache_version)
3434	# same version, good
3435	ntp_cache_flush=0
3436	;;
3437     '')
3438	# No cache, predates ntp_cv_main_cache_version, or is empty.
3439	case "$cache_file" in
3440	 /dev/null)
3441	    ntp_cache_flush=0
3442	    ;;
3443	 *)
3444	    case "$NTP_CACHEVERSION_PARENT" in
3445	     '')
3446		# Do not clear the cache immediately after it is created
3447		# empty as it is noisy.  Differentiate a newly-created
3448		# config.cache from one predating the cache version
3449		# mechanism by looking for the first cached variable set
3450		# by Autoconf
3451		case "$ac_cv_path_install" in
3452		 '')
3453		    # empty config.cache file
3454		    ntp_cache_flush=0
3455		esac
3456		;;
3457	     *)
3458		# Parent configure just created cache from empty,
3459		# flushing would be counterproductive.
3460		ntp_cache_flush=0;
3461		;;
3462	    esac
3463	esac
3464	;;
3465     *)
3466	# configure cache version mismatches config.cache version
3467	;;
3468    esac
3469
3470    case "$ntp_cache_flush" in
3471     1)
3472	c_version="${ntp_cv_main_cache_version:-(no version found)}"
3473
3474	# Do we flush all variables or exclude others' version stamps?
3475
3476	case "$NTP_CACHEVERSION_PARENT" in
3477	 '')
3478	    # Clear all *_cv_* variables including our child subdirs'
3479	    # ntp_cv_*_cache_version variables.  This prevents subdir
3480	    # configure scripts from noticing a version mismatch just
3481	    # after the top configure in the invocation cleared and
3482	    # recreated the cache.
3483
3484	    c_varname_list=`set |
3485			    sed -n -e 's/=.*$//' \
3486				   -e '/_cv_/p'
3487			   `
3488	    ;;
3489	 *)
3490	    # This is not the top configure this particular invocation.
3491	    # Clear all *_cv_* variables sparing the version stamps
3492	    # of other configure scripts, so we don't trigger
3493	    # useless repeated clearings.
3494
3495	    c_varname_list=`set |
3496			    sed -n -e 's/=.*$//' \
3497				   -e '/ntp_cv_.*_cache_version/d' \
3498				   -e '/_cv_/p'
3499			   `
3500	esac
3501
3502	for c_varname in $c_varname_list
3503	do
3504	    { eval $c_varname=; unset $c_varname;}
3505	done
3506
3507	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file saved by another version, ignored." >&5
3508printf "%s\n" "$as_me: $cache_file saved by another version, ignored." >&6;}
3509	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: configure script cache version: $ntp_configure_cache_version" >&5
3510printf "%s\n" "$as_me: configure script cache version: $ntp_configure_cache_version" >&6;}
3511	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $cache_file version: $c_version" >&5
3512printf "%s\n" "$as_me: $cache_file version: $c_version" >&6;}
3513	{ c_varname=; unset c_varname;}
3514	{ c_varname_list=; unset c_varname_list;}
3515	{ c_version=; unset c_version;}
3516    esac
3517
3518    { ntp_cache_flush=; unset ntp_cache_flush;}
3519
3520    # save configure version in config.cache for next time
3521    ntp_cv_main_cache_version="$ntp_configure_cache_version"
3522
3523    # let any subdir configure.ac NTP_CACHEVERSION invocations
3524    # know they are not the top level.
3525    NTP_CACHEVERSION_PARENT='main' ; export NTP_CACHEVERSION_PARENT
3526
3527
3528am__api_version='1.16'
3529
3530
3531
3532  # Find a good install program.  We prefer a C program (faster),
3533# so one script is as good as another.  But avoid the broken or
3534# incompatible versions:
3535# SysV /etc/install, /usr/sbin/install
3536# SunOS /usr/etc/install
3537# IRIX /sbin/install
3538# AIX /bin/install
3539# AmigaOS /C/install, which installs bootblocks on floppy discs
3540# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3541# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3542# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3543# OS/2's system install, which has a completely different semantic
3544# ./install, which can be erroneously created by make from ./install.sh.
3545# Reject install programs that cannot install multiple files.
3546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3547printf %s "checking for a BSD-compatible install... " >&6; }
3548if test -z "$INSTALL"; then
3549if test ${ac_cv_path_install+y}
3550then :
3551  printf %s "(cached) " >&6
3552else $as_nop
3553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3554for as_dir in $PATH
3555do
3556  IFS=$as_save_IFS
3557  case $as_dir in #(((
3558    '') as_dir=./ ;;
3559    */) ;;
3560    *) as_dir=$as_dir/ ;;
3561  esac
3562    # Account for fact that we put trailing slashes in our PATH walk.
3563case $as_dir in #((
3564  ./ | /[cC]/* | \
3565  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3566  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3567  /usr/ucb/* ) ;;
3568  *)
3569    # OSF1 and SCO ODT 3.0 have their own names for install.
3570    # Don't use installbsd from OSF since it installs stuff as root
3571    # by default.
3572    for ac_prog in ginstall scoinst install; do
3573      for ac_exec_ext in '' $ac_executable_extensions; do
3574	if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
3575	  if test $ac_prog = install &&
3576	    grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3577	    # AIX install.  It has an incompatible calling convention.
3578	    :
3579	  elif test $ac_prog = install &&
3580	    grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3581	    # program-specific install script used by HP pwplus--don't use.
3582	    :
3583	  else
3584	    rm -rf conftest.one conftest.two conftest.dir
3585	    echo one > conftest.one
3586	    echo two > conftest.two
3587	    mkdir conftest.dir
3588	    if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
3589	      test -s conftest.one && test -s conftest.two &&
3590	      test -s conftest.dir/conftest.one &&
3591	      test -s conftest.dir/conftest.two
3592	    then
3593	      ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
3594	      break 3
3595	    fi
3596	  fi
3597	fi
3598      done
3599    done
3600    ;;
3601esac
3602
3603  done
3604IFS=$as_save_IFS
3605
3606rm -rf conftest.one conftest.two conftest.dir
3607
3608fi
3609  if test ${ac_cv_path_install+y}; then
3610    INSTALL=$ac_cv_path_install
3611  else
3612    # As a last resort, use the slow shell script.  Don't cache a
3613    # value for INSTALL within a source directory, because that will
3614    # break other packages using the cache if that directory is
3615    # removed, or if the value is a relative name.
3616    INSTALL=$ac_install_sh
3617  fi
3618fi
3619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3620printf "%s\n" "$INSTALL" >&6; }
3621
3622# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3623# It thinks the first close brace ends the variable substitution.
3624test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3625
3626test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3627
3628test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3629
3630{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3631printf %s "checking whether build environment is sane... " >&6; }
3632# Reject unsafe characters in $srcdir or the absolute working directory
3633# name.  Accept space and tab only in the latter.
3634am_lf='
3635'
3636case `pwd` in
3637  *[\\\"\#\$\&\'\`$am_lf]*)
3638    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3639esac
3640case $srcdir in
3641  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
3642    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3643esac
3644
3645# Do 'set' in a subshell so we don't clobber the current shell's
3646# arguments.  Must try -L first in case configure is actually a
3647# symlink; some systems play weird games with the mod time of symlinks
3648# (eg FreeBSD returns the mod time of the symlink's containing
3649# directory).
3650if (
3651   am_has_slept=no
3652   for am_try in 1 2; do
3653     echo "timestamp, slept: $am_has_slept" > conftest.file
3654     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3655     if test "$*" = "X"; then
3656	# -L didn't work.
3657	set X `ls -t "$srcdir/configure" conftest.file`
3658     fi
3659     if test "$*" != "X $srcdir/configure conftest.file" \
3660	&& test "$*" != "X conftest.file $srcdir/configure"; then
3661
3662	# If neither matched, then we have a broken ls.  This can happen
3663	# if, for instance, CONFIG_SHELL is bash and it inherits a
3664	# broken ls alias from the environment.  This has actually
3665	# happened.  Such a system could not be considered "sane".
3666	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
3667  alias in your environment" "$LINENO" 5
3668     fi
3669     if test "$2" = conftest.file || test $am_try -eq 2; then
3670       break
3671     fi
3672     # Just in case.
3673     sleep 1
3674     am_has_slept=yes
3675   done
3676   test "$2" = conftest.file
3677   )
3678then
3679   # Ok.
3680   :
3681else
3682   as_fn_error $? "newly created file is older than distributed files!
3683Check your system clock" "$LINENO" 5
3684fi
3685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3686printf "%s\n" "yes" >&6; }
3687# If we didn't sleep, we still need to ensure time stamps of config.status and
3688# generated files are strictly newer.
3689am_sleep_pid=
3690if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3691  ( sleep 1 ) &
3692  am_sleep_pid=$!
3693fi
3694
3695rm -f conftest.file
3696
3697test "$program_prefix" != NONE &&
3698  program_transform_name="s&^&$program_prefix&;$program_transform_name"
3699# Use a double $ so make ignores it.
3700test "$program_suffix" != NONE &&
3701  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3702# Double any \ or $.
3703# By default was `s,x,x', remove it if useless.
3704ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3705program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"`
3706
3707
3708# Expand $ac_aux_dir to an absolute path.
3709am_aux_dir=`cd "$ac_aux_dir" && pwd`
3710
3711
3712  if test x"${MISSING+set}" != xset; then
3713  MISSING="\${SHELL} '$am_aux_dir/missing'"
3714fi
3715# Use eval to expand $SHELL
3716if eval "$MISSING --is-lightweight"; then
3717  am_missing_run="$MISSING "
3718else
3719  am_missing_run=
3720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3721printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3722fi
3723
3724if test x"${install_sh+set}" != xset; then
3725  case $am_aux_dir in
3726  *\ * | *\	*)
3727    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3728  *)
3729    install_sh="\${SHELL} $am_aux_dir/install-sh"
3730  esac
3731fi
3732
3733# Installed binaries are usually stripped using 'strip' when the user
3734# run "make install-strip".  However 'strip' might not be the right
3735# tool to use in cross-compilation environments, therefore Automake
3736# will honor the 'STRIP' environment variable to overrule this program.
3737if test "$cross_compiling" != no; then
3738  if test -n "$ac_tool_prefix"; then
3739  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3740set dummy ${ac_tool_prefix}strip; ac_word=$2
3741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3742printf %s "checking for $ac_word... " >&6; }
3743if test ${ac_cv_prog_STRIP+y}
3744then :
3745  printf %s "(cached) " >&6
3746else $as_nop
3747  if test -n "$STRIP"; then
3748  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3749else
3750as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3751for as_dir in $PATH
3752do
3753  IFS=$as_save_IFS
3754  case $as_dir in #(((
3755    '') as_dir=./ ;;
3756    */) ;;
3757    *) as_dir=$as_dir/ ;;
3758  esac
3759    for ac_exec_ext in '' $ac_executable_extensions; do
3760  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3761    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3762    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3763    break 2
3764  fi
3765done
3766  done
3767IFS=$as_save_IFS
3768
3769fi
3770fi
3771STRIP=$ac_cv_prog_STRIP
3772if test -n "$STRIP"; then
3773  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3774printf "%s\n" "$STRIP" >&6; }
3775else
3776  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3777printf "%s\n" "no" >&6; }
3778fi
3779
3780
3781fi
3782if test -z "$ac_cv_prog_STRIP"; then
3783  ac_ct_STRIP=$STRIP
3784  # Extract the first word of "strip", so it can be a program name with args.
3785set dummy strip; ac_word=$2
3786{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3787printf %s "checking for $ac_word... " >&6; }
3788if test ${ac_cv_prog_ac_ct_STRIP+y}
3789then :
3790  printf %s "(cached) " >&6
3791else $as_nop
3792  if test -n "$ac_ct_STRIP"; then
3793  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3794else
3795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3796for as_dir in $PATH
3797do
3798  IFS=$as_save_IFS
3799  case $as_dir in #(((
3800    '') as_dir=./ ;;
3801    */) ;;
3802    *) as_dir=$as_dir/ ;;
3803  esac
3804    for ac_exec_ext in '' $ac_executable_extensions; do
3805  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3806    ac_cv_prog_ac_ct_STRIP="strip"
3807    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3808    break 2
3809  fi
3810done
3811  done
3812IFS=$as_save_IFS
3813
3814fi
3815fi
3816ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3817if test -n "$ac_ct_STRIP"; then
3818  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3819printf "%s\n" "$ac_ct_STRIP" >&6; }
3820else
3821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3822printf "%s\n" "no" >&6; }
3823fi
3824
3825  if test "x$ac_ct_STRIP" = x; then
3826    STRIP=":"
3827  else
3828    case $cross_compiling:$ac_tool_warned in
3829yes:)
3830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3831printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3832ac_tool_warned=yes ;;
3833esac
3834    STRIP=$ac_ct_STRIP
3835  fi
3836else
3837  STRIP="$ac_cv_prog_STRIP"
3838fi
3839
3840fi
3841INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3842
3843
3844  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
3845printf %s "checking for a race-free mkdir -p... " >&6; }
3846if test -z "$MKDIR_P"; then
3847  if test ${ac_cv_path_mkdir+y}
3848then :
3849  printf %s "(cached) " >&6
3850else $as_nop
3851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3853do
3854  IFS=$as_save_IFS
3855  case $as_dir in #(((
3856    '') as_dir=./ ;;
3857    */) ;;
3858    *) as_dir=$as_dir/ ;;
3859  esac
3860    for ac_prog in mkdir gmkdir; do
3861	 for ac_exec_ext in '' $ac_executable_extensions; do
3862	   as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
3863	   case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
3864	     'mkdir ('*'coreutils) '* | \
3865	     'BusyBox '* | \
3866	     'mkdir (fileutils) '4.1*)
3867	       ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
3868	       break 3;;
3869	   esac
3870	 done
3871       done
3872  done
3873IFS=$as_save_IFS
3874
3875fi
3876
3877  test -d ./--version && rmdir ./--version
3878  if test ${ac_cv_path_mkdir+y}; then
3879    MKDIR_P="$ac_cv_path_mkdir -p"
3880  else
3881    # As a last resort, use the slow shell script.  Don't cache a
3882    # value for MKDIR_P within a source directory, because that will
3883    # break other packages using the cache if that directory is
3884    # removed, or if the value is a relative name.
3885    MKDIR_P="$ac_install_sh -d"
3886  fi
3887fi
3888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3889printf "%s\n" "$MKDIR_P" >&6; }
3890
3891for ac_prog in gawk mawk nawk awk
3892do
3893  # Extract the first word of "$ac_prog", so it can be a program name with args.
3894set dummy $ac_prog; ac_word=$2
3895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3896printf %s "checking for $ac_word... " >&6; }
3897if test ${ac_cv_prog_AWK+y}
3898then :
3899  printf %s "(cached) " >&6
3900else $as_nop
3901  if test -n "$AWK"; then
3902  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3903else
3904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3905for as_dir in $PATH
3906do
3907  IFS=$as_save_IFS
3908  case $as_dir in #(((
3909    '') as_dir=./ ;;
3910    */) ;;
3911    *) as_dir=$as_dir/ ;;
3912  esac
3913    for ac_exec_ext in '' $ac_executable_extensions; do
3914  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3915    ac_cv_prog_AWK="$ac_prog"
3916    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3917    break 2
3918  fi
3919done
3920  done
3921IFS=$as_save_IFS
3922
3923fi
3924fi
3925AWK=$ac_cv_prog_AWK
3926if test -n "$AWK"; then
3927  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3928printf "%s\n" "$AWK" >&6; }
3929else
3930  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931printf "%s\n" "no" >&6; }
3932fi
3933
3934
3935  test -n "$AWK" && break
3936done
3937
3938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3939printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3940set x ${MAKE-make}
3941ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3942if eval test \${ac_cv_prog_make_${ac_make}_set+y}
3943then :
3944  printf %s "(cached) " >&6
3945else $as_nop
3946  cat >conftest.make <<\_ACEOF
3947SHELL = /bin/sh
3948all:
3949	@echo '@@@%%%=$(MAKE)=@@@%%%'
3950_ACEOF
3951# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3952case `${MAKE-make} -f conftest.make 2>/dev/null` in
3953  *@@@%%%=?*=@@@%%%*)
3954    eval ac_cv_prog_make_${ac_make}_set=yes;;
3955  *)
3956    eval ac_cv_prog_make_${ac_make}_set=no;;
3957esac
3958rm -f conftest.make
3959fi
3960if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3961  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3962printf "%s\n" "yes" >&6; }
3963  SET_MAKE=
3964else
3965  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966printf "%s\n" "no" >&6; }
3967  SET_MAKE="MAKE=${MAKE-make}"
3968fi
3969
3970rm -rf .tst 2>/dev/null
3971mkdir .tst 2>/dev/null
3972if test -d .tst; then
3973  am__leading_dot=.
3974else
3975  am__leading_dot=_
3976fi
3977rmdir .tst 2>/dev/null
3978
3979# Check whether --enable-silent-rules was given.
3980if test ${enable_silent_rules+y}
3981then :
3982  enableval=$enable_silent_rules;
3983fi
3984
3985case $enable_silent_rules in # (((
3986  yes) AM_DEFAULT_VERBOSITY=0;;
3987   no) AM_DEFAULT_VERBOSITY=1;;
3988    *) AM_DEFAULT_VERBOSITY=1;;
3989esac
3990am_make=${MAKE-make}
3991{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3992printf %s "checking whether $am_make supports nested variables... " >&6; }
3993if test ${am_cv_make_support_nested_variables+y}
3994then :
3995  printf %s "(cached) " >&6
3996else $as_nop
3997  if printf "%s\n" 'TRUE=$(BAR$(V))
3998BAR0=false
3999BAR1=true
4000V=1
4001am__doit:
4002	@$(TRUE)
4003.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4004  am_cv_make_support_nested_variables=yes
4005else
4006  am_cv_make_support_nested_variables=no
4007fi
4008fi
4009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4010printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4011if test $am_cv_make_support_nested_variables = yes; then
4012    AM_V='$(V)'
4013  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4014else
4015  AM_V=$AM_DEFAULT_VERBOSITY
4016  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4017fi
4018AM_BACKSLASH='\'
4019
4020if test "`cd $srcdir && pwd`" != "`pwd`"; then
4021  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4022  # is not polluted with repeated "-I."
4023  am__isrc=' -I$(srcdir)'
4024  # test to see if srcdir already configured
4025  if test -f $srcdir/config.status; then
4026    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4027  fi
4028fi
4029
4030# test whether we have cygpath
4031if test -z "$CYGPATH_W"; then
4032  if (cygpath --version) >/dev/null 2>/dev/null; then
4033    CYGPATH_W='cygpath -w'
4034  else
4035    CYGPATH_W=echo
4036  fi
4037fi
4038
4039
4040# Define the identity of the package.
4041 PACKAGE='ntp'
4042 VERSION='4.2.8p18'
4043
4044
4045printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
4046
4047
4048printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h
4049
4050# Some tools Automake needs.
4051
4052ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4053
4054
4055AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4056
4057
4058AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4059
4060
4061AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4062
4063
4064MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4065
4066# For better backward compatibility.  To be removed once Automake 1.9.x
4067# dies out for good.  For more background, see:
4068# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4069# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4070mkdir_p='$(MKDIR_P)'
4071
4072# We need awk for the "check" target (and possibly the TAP driver).  The
4073# system "awk" is bad on some platforms.
4074# Always define AMTAR for backward compatibility.  Yes, it's still used
4075# in the wild :-(  We should find a proper way to deprecate it ...
4076AMTAR='$${TAR-tar}'
4077
4078
4079# We'll loop over all known methods to create a tar archive until one works.
4080_am_tools='gnutar  pax cpio none'
4081
4082am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
4083
4084
4085
4086
4087
4088# Variables for tags utilities; see am/tags.am
4089if test -z "$CTAGS"; then
4090  CTAGS=ctags
4091fi
4092
4093if test -z "$ETAGS"; then
4094  ETAGS=etags
4095fi
4096
4097if test -z "$CSCOPE"; then
4098  CSCOPE=cscope
4099fi
4100
4101
4102
4103# POSIX will say in a future version that running "rm -f" with no argument
4104# is OK; and we want to be able to make that assumption in our Makefile
4105# recipes.  So use an aggressive probe to check that the usage we want is
4106# actually supported "in the wild" to an acceptable degree.
4107# See automake bug#10828.
4108# To make any issue more visible, cause the running configure to be aborted
4109# by default if the 'rm' program in use doesn't match our expectations; the
4110# user can still override this though.
4111if rm -f && rm -fr && rm -rf; then : OK; else
4112  cat >&2 <<'END'
4113Oops!
4114
4115Your 'rm' program seems unable to run without file operands specified
4116on the command line, even when the '-f' option is present.  This is contrary
4117to the behaviour of most rm programs out there, and not conforming with
4118the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
4119
4120Please tell bug-automake@gnu.org about your system, including the value
4121of your $PATH and any error possibly output before this message.  This
4122can help us improve future automake versions.
4123
4124END
4125  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
4126    echo 'Configuration will proceed anyway, since you have set the' >&2
4127    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
4128    echo >&2
4129  else
4130    cat >&2 <<'END'
4131Aborting the configuration process, to ensure you take notice of the issue.
4132
4133You can download and install GNU coreutils to get an 'rm' implementation
4134that behaves properly: <https://www.gnu.org/software/coreutils/>.
4135
4136If you want to complete the configuration process using your problematic
4137'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
4138to "yes", and re-run configure.
4139
4140END
4141    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
4142  fi
4143fi
4144
4145
4146# Check whether --enable-silent-rules was given.
4147if test ${enable_silent_rules+y}
4148then :
4149  enableval=$enable_silent_rules;
4150fi
4151
4152case $enable_silent_rules in # (((
4153  yes) AM_DEFAULT_VERBOSITY=0;;
4154   no) AM_DEFAULT_VERBOSITY=1;;
4155    *) AM_DEFAULT_VERBOSITY=0;;
4156esac
4157am_make=${MAKE-make}
4158{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4159printf %s "checking whether $am_make supports nested variables... " >&6; }
4160if test ${am_cv_make_support_nested_variables+y}
4161then :
4162  printf %s "(cached) " >&6
4163else $as_nop
4164  if printf "%s\n" 'TRUE=$(BAR$(V))
4165BAR0=false
4166BAR1=true
4167V=1
4168am__doit:
4169	@$(TRUE)
4170.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4171  am_cv_make_support_nested_variables=yes
4172else
4173  am_cv_make_support_nested_variables=no
4174fi
4175fi
4176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4177printf "%s\n" "$am_cv_make_support_nested_variables" >&6; }
4178if test $am_cv_make_support_nested_variables = yes; then
4179    AM_V='$(V)'
4180  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4181else
4182  AM_V=$AM_DEFAULT_VERBOSITY
4183  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4184fi
4185AM_BACKSLASH='\'
4186
4187
4188
4189
4190  # Make sure we can run config.sub.
4191$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
4192  as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
4193
4194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4195printf %s "checking build system type... " >&6; }
4196if test ${ac_cv_build+y}
4197then :
4198  printf %s "(cached) " >&6
4199else $as_nop
4200  ac_build_alias=$build_alias
4201test "x$ac_build_alias" = x &&
4202  ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
4203test "x$ac_build_alias" = x &&
4204  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4205ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
4206  as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
4207
4208fi
4209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4210printf "%s\n" "$ac_cv_build" >&6; }
4211case $ac_cv_build in
4212*-*-*) ;;
4213*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4214esac
4215build=$ac_cv_build
4216ac_save_IFS=$IFS; IFS='-'
4217set x $ac_cv_build
4218shift
4219build_cpu=$1
4220build_vendor=$2
4221shift; shift
4222# Remember, the first character of IFS is used to create $*,
4223# except with old shells:
4224build_os=$*
4225IFS=$ac_save_IFS
4226case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4227
4228
4229{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4230printf %s "checking host system type... " >&6; }
4231if test ${ac_cv_host+y}
4232then :
4233  printf %s "(cached) " >&6
4234else $as_nop
4235  if test "x$host_alias" = x; then
4236  ac_cv_host=$ac_cv_build
4237else
4238  ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
4239    as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
4240fi
4241
4242fi
4243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4244printf "%s\n" "$ac_cv_host" >&6; }
4245case $ac_cv_host in
4246*-*-*) ;;
4247*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4248esac
4249host=$ac_cv_host
4250ac_save_IFS=$IFS; IFS='-'
4251set x $ac_cv_host
4252shift
4253host_cpu=$1
4254host_vendor=$2
4255shift; shift
4256# Remember, the first character of IFS is used to create $*,
4257# except with old shells:
4258host_os=$*
4259IFS=$ac_save_IFS
4260case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4261
4262
4263
4264printf "%s\n" "#define STR_SYSTEM \"$host\"" >>confdefs.h
4265
4266ac_config_headers="$ac_config_headers config.h"
4267
4268
4269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable build framework help" >&5
4270printf %s "checking if we should enable build framework help... " >&6; }
4271# Check whether --enable-build-framework-help was given.
4272if test ${enable_build_framework_help+y}
4273then :
4274  enableval=$enable_build_framework_help; ntp_ok=$enableval
4275else $as_nop
4276  ntp_ok=yes
4277
4278fi
4279
4280case "$ntp_ok" in
4281 yes)
4282    ntp_cv_build_framework_help=yes ;;
4283 *) ntp_cv_build_framework_help=no ;;
4284esac
4285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
4286printf "%s\n" "$ntp_ok" >&6; }
4287
4288ntp_atom_ok=${ntp_atom_ok=no}
4289ntp_oncore_ok=${ntp_oncore_ok=no}
4290ntp_parse_ok=${ntp_parse_ok=no}
4291ntp_ripe_ncc_ok=${ntp_parse_ok=no}
4292ntp_jupiter_ok=${ntp_jupiter_ok=no}
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303DEPDIR="${am__leading_dot}deps"
4304
4305ac_config_commands="$ac_config_commands depfiles"
4306
4307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4308printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4309cat > confinc.mk << 'END'
4310am__doit:
4311	@echo this is the am__doit target >confinc.out
4312.PHONY: am__doit
4313END
4314am__include="#"
4315am__quote=
4316# BSD make does it like this.
4317echo '.include "confinc.mk" # ignored' > confmf.BSD
4318# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4319echo 'include confinc.mk # ignored' > confmf.GNU
4320_am_result=no
4321for s in GNU BSD; do
4322  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4323   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4324   ac_status=$?
4325   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4326   (exit $ac_status); }
4327  case $?:`cat confinc.out 2>/dev/null` in #(
4328  '0:this is the am__doit target') :
4329    case $s in #(
4330  BSD) :
4331    am__include='.include' am__quote='"' ;; #(
4332  *) :
4333    am__include='include' am__quote='' ;;
4334esac ;; #(
4335  *) :
4336     ;;
4337esac
4338  if test "$am__include" != "#"; then
4339    _am_result="yes ($s style)"
4340    break
4341  fi
4342done
4343rm -f confinc.* confmf.*
4344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4345printf "%s\n" "${_am_result}" >&6; }
4346
4347# Check whether --enable-dependency-tracking was given.
4348if test ${enable_dependency_tracking+y}
4349then :
4350  enableval=$enable_dependency_tracking;
4351fi
4352
4353if test "x$enable_dependency_tracking" != xno; then
4354  am_depcomp="$ac_aux_dir/depcomp"
4355  AMDEPBACKSLASH='\'
4356  am__nodep='_no'
4357fi
4358 if test "x$enable_dependency_tracking" != xno; then
4359  AMDEP_TRUE=
4360  AMDEP_FALSE='#'
4361else
4362  AMDEP_TRUE='#'
4363  AMDEP_FALSE=
4364fi
4365
4366
4367
4368case "$build" in
4369 *-*-freebsd1?.*)
4370    cclist=cc
4371    ;;
4372 *)
4373    cclist="cc gcc"
4374    ;;
4375esac
4376
4377
4378#AC_USE_SYSTEM_EXTENSIONS
4379
4380ac_ext=c
4381ac_cpp='$CPP $CPPFLAGS'
4382ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4383ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4384ac_compiler_gnu=$ac_cv_c_compiler_gnu
4385if test -n "$ac_tool_prefix"; then
4386  for ac_prog in $cclist
4387  do
4388    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4389set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391printf %s "checking for $ac_word... " >&6; }
4392if test ${ac_cv_prog_CC+y}
4393then :
4394  printf %s "(cached) " >&6
4395else $as_nop
4396  if test -n "$CC"; then
4397  ac_cv_prog_CC="$CC" # Let the user override the test.
4398else
4399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4400for as_dir in $PATH
4401do
4402  IFS=$as_save_IFS
4403  case $as_dir in #(((
4404    '') as_dir=./ ;;
4405    */) ;;
4406    *) as_dir=$as_dir/ ;;
4407  esac
4408    for ac_exec_ext in '' $ac_executable_extensions; do
4409  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4410    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4411    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4412    break 2
4413  fi
4414done
4415  done
4416IFS=$as_save_IFS
4417
4418fi
4419fi
4420CC=$ac_cv_prog_CC
4421if test -n "$CC"; then
4422  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4423printf "%s\n" "$CC" >&6; }
4424else
4425  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4426printf "%s\n" "no" >&6; }
4427fi
4428
4429
4430    test -n "$CC" && break
4431  done
4432fi
4433if test -z "$CC"; then
4434  ac_ct_CC=$CC
4435  for ac_prog in $cclist
4436do
4437  # Extract the first word of "$ac_prog", so it can be a program name with args.
4438set dummy $ac_prog; ac_word=$2
4439{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4440printf %s "checking for $ac_word... " >&6; }
4441if test ${ac_cv_prog_ac_ct_CC+y}
4442then :
4443  printf %s "(cached) " >&6
4444else $as_nop
4445  if test -n "$ac_ct_CC"; then
4446  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4447else
4448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4449for as_dir in $PATH
4450do
4451  IFS=$as_save_IFS
4452  case $as_dir in #(((
4453    '') as_dir=./ ;;
4454    */) ;;
4455    *) as_dir=$as_dir/ ;;
4456  esac
4457    for ac_exec_ext in '' $ac_executable_extensions; do
4458  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4459    ac_cv_prog_ac_ct_CC="$ac_prog"
4460    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4461    break 2
4462  fi
4463done
4464  done
4465IFS=$as_save_IFS
4466
4467fi
4468fi
4469ac_ct_CC=$ac_cv_prog_ac_ct_CC
4470if test -n "$ac_ct_CC"; then
4471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4472printf "%s\n" "$ac_ct_CC" >&6; }
4473else
4474  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475printf "%s\n" "no" >&6; }
4476fi
4477
4478
4479  test -n "$ac_ct_CC" && break
4480done
4481
4482  if test "x$ac_ct_CC" = x; then
4483    CC=""
4484  else
4485    case $cross_compiling:$ac_tool_warned in
4486yes:)
4487{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4488printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4489ac_tool_warned=yes ;;
4490esac
4491    CC=$ac_ct_CC
4492  fi
4493fi
4494
4495
4496test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4497printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4498as_fn_error $? "no acceptable C compiler found in \$PATH
4499See \`config.log' for more details" "$LINENO" 5; }
4500
4501# Provide some information about the compiler.
4502printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4503set X $ac_compile
4504ac_compiler=$2
4505for ac_option in --version -v -V -qversion -version; do
4506  { { ac_try="$ac_compiler $ac_option >&5"
4507case "(($ac_try" in
4508  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4509  *) ac_try_echo=$ac_try;;
4510esac
4511eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4512printf "%s\n" "$ac_try_echo"; } >&5
4513  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4514  ac_status=$?
4515  if test -s conftest.err; then
4516    sed '10a\
4517... rest of stderr output deleted ...
4518         10q' conftest.err >conftest.er1
4519    cat conftest.er1 >&5
4520  fi
4521  rm -f conftest.er1 conftest.err
4522  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4523  test $ac_status = 0; }
4524done
4525
4526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4527/* end confdefs.h.  */
4528
4529int
4530main (void)
4531{
4532
4533  ;
4534  return 0;
4535}
4536_ACEOF
4537ac_clean_files_save=$ac_clean_files
4538ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4539# Try to create an executable without -o first, disregard a.out.
4540# It will help us diagnose broken compilers, and finding out an intuition
4541# of exeext.
4542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4543printf %s "checking whether the C compiler works... " >&6; }
4544ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4545
4546# The possible output files:
4547ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4548
4549ac_rmfiles=
4550for ac_file in $ac_files
4551do
4552  case $ac_file in
4553    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4554    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4555  esac
4556done
4557rm -f $ac_rmfiles
4558
4559if { { ac_try="$ac_link_default"
4560case "(($ac_try" in
4561  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4562  *) ac_try_echo=$ac_try;;
4563esac
4564eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4565printf "%s\n" "$ac_try_echo"; } >&5
4566  (eval "$ac_link_default") 2>&5
4567  ac_status=$?
4568  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4569  test $ac_status = 0; }
4570then :
4571  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4572# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4573# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4574# so that the user can short-circuit this test for compilers unknown to
4575# Autoconf.
4576for ac_file in $ac_files ''
4577do
4578  test -f "$ac_file" || continue
4579  case $ac_file in
4580    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4581	;;
4582    [ab].out )
4583	# We found the default executable, but exeext='' is most
4584	# certainly right.
4585	break;;
4586    *.* )
4587	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4588	then :; else
4589	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4590	fi
4591	# We set ac_cv_exeext here because the later test for it is not
4592	# safe: cross compilers may not add the suffix if given an `-o'
4593	# argument, so we may need to know it at that point already.
4594	# Even if this section looks crufty: it has the advantage of
4595	# actually working.
4596	break;;
4597    * )
4598	break;;
4599  esac
4600done
4601test "$ac_cv_exeext" = no && ac_cv_exeext=
4602
4603else $as_nop
4604  ac_file=''
4605fi
4606if test -z "$ac_file"
4607then :
4608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4609printf "%s\n" "no" >&6; }
4610printf "%s\n" "$as_me: failed program was:" >&5
4611sed 's/^/| /' conftest.$ac_ext >&5
4612
4613{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4614printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4615as_fn_error 77 "C compiler cannot create executables
4616See \`config.log' for more details" "$LINENO" 5; }
4617else $as_nop
4618  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4619printf "%s\n" "yes" >&6; }
4620fi
4621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4622printf %s "checking for C compiler default output file name... " >&6; }
4623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4624printf "%s\n" "$ac_file" >&6; }
4625ac_exeext=$ac_cv_exeext
4626
4627rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4628ac_clean_files=$ac_clean_files_save
4629{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4630printf %s "checking for suffix of executables... " >&6; }
4631if { { ac_try="$ac_link"
4632case "(($ac_try" in
4633  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4634  *) ac_try_echo=$ac_try;;
4635esac
4636eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4637printf "%s\n" "$ac_try_echo"; } >&5
4638  (eval "$ac_link") 2>&5
4639  ac_status=$?
4640  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4641  test $ac_status = 0; }
4642then :
4643  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4644# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4645# work properly (i.e., refer to `conftest.exe'), while it won't with
4646# `rm'.
4647for ac_file in conftest.exe conftest conftest.*; do
4648  test -f "$ac_file" || continue
4649  case $ac_file in
4650    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4651    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4652	  break;;
4653    * ) break;;
4654  esac
4655done
4656else $as_nop
4657  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4658printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4659as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4660See \`config.log' for more details" "$LINENO" 5; }
4661fi
4662rm -f conftest conftest$ac_cv_exeext
4663{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4664printf "%s\n" "$ac_cv_exeext" >&6; }
4665
4666rm -f conftest.$ac_ext
4667EXEEXT=$ac_cv_exeext
4668ac_exeext=$EXEEXT
4669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4670/* end confdefs.h.  */
4671#include <stdio.h>
4672int
4673main (void)
4674{
4675FILE *f = fopen ("conftest.out", "w");
4676 return ferror (f) || fclose (f) != 0;
4677
4678  ;
4679  return 0;
4680}
4681_ACEOF
4682ac_clean_files="$ac_clean_files conftest.out"
4683# Check that the compiler produces executables we can run.  If not, either
4684# the compiler is broken, or we cross compile.
4685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4686printf %s "checking whether we are cross compiling... " >&6; }
4687if test "$cross_compiling" != yes; then
4688  { { ac_try="$ac_link"
4689case "(($ac_try" in
4690  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4691  *) ac_try_echo=$ac_try;;
4692esac
4693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4694printf "%s\n" "$ac_try_echo"; } >&5
4695  (eval "$ac_link") 2>&5
4696  ac_status=$?
4697  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4698  test $ac_status = 0; }
4699  if { ac_try='./conftest$ac_cv_exeext'
4700  { { case "(($ac_try" in
4701  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4702  *) ac_try_echo=$ac_try;;
4703esac
4704eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4705printf "%s\n" "$ac_try_echo"; } >&5
4706  (eval "$ac_try") 2>&5
4707  ac_status=$?
4708  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4709  test $ac_status = 0; }; }; then
4710    cross_compiling=no
4711  else
4712    if test "$cross_compiling" = maybe; then
4713	cross_compiling=yes
4714    else
4715	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4716printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4717as_fn_error 77 "cannot run C compiled programs.
4718If you meant to cross compile, use \`--host'.
4719See \`config.log' for more details" "$LINENO" 5; }
4720    fi
4721  fi
4722fi
4723{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4724printf "%s\n" "$cross_compiling" >&6; }
4725
4726rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4727ac_clean_files=$ac_clean_files_save
4728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4729printf %s "checking for suffix of object files... " >&6; }
4730if test ${ac_cv_objext+y}
4731then :
4732  printf %s "(cached) " >&6
4733else $as_nop
4734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4735/* end confdefs.h.  */
4736
4737int
4738main (void)
4739{
4740
4741  ;
4742  return 0;
4743}
4744_ACEOF
4745rm -f conftest.o conftest.obj
4746if { { ac_try="$ac_compile"
4747case "(($ac_try" in
4748  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4749  *) ac_try_echo=$ac_try;;
4750esac
4751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4752printf "%s\n" "$ac_try_echo"; } >&5
4753  (eval "$ac_compile") 2>&5
4754  ac_status=$?
4755  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4756  test $ac_status = 0; }
4757then :
4758  for ac_file in conftest.o conftest.obj conftest.*; do
4759  test -f "$ac_file" || continue;
4760  case $ac_file in
4761    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4762    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4763       break;;
4764  esac
4765done
4766else $as_nop
4767  printf "%s\n" "$as_me: failed program was:" >&5
4768sed 's/^/| /' conftest.$ac_ext >&5
4769
4770{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4771printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4772as_fn_error $? "cannot compute suffix of object files: cannot compile
4773See \`config.log' for more details" "$LINENO" 5; }
4774fi
4775rm -f conftest.$ac_cv_objext conftest.$ac_ext
4776fi
4777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4778printf "%s\n" "$ac_cv_objext" >&6; }
4779OBJEXT=$ac_cv_objext
4780ac_objext=$OBJEXT
4781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4782printf %s "checking whether the compiler supports GNU C... " >&6; }
4783if test ${ac_cv_c_compiler_gnu+y}
4784then :
4785  printf %s "(cached) " >&6
4786else $as_nop
4787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4788/* end confdefs.h.  */
4789
4790int
4791main (void)
4792{
4793#ifndef __GNUC__
4794       choke me
4795#endif
4796
4797  ;
4798  return 0;
4799}
4800_ACEOF
4801if ac_fn_c_try_compile "$LINENO"
4802then :
4803  ac_compiler_gnu=yes
4804else $as_nop
4805  ac_compiler_gnu=no
4806fi
4807rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4808ac_cv_c_compiler_gnu=$ac_compiler_gnu
4809
4810fi
4811{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4812printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4813ac_compiler_gnu=$ac_cv_c_compiler_gnu
4814
4815if test $ac_compiler_gnu = yes; then
4816  GCC=yes
4817else
4818  GCC=
4819fi
4820ac_test_CFLAGS=${CFLAGS+y}
4821ac_save_CFLAGS=$CFLAGS
4822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4823printf %s "checking whether $CC accepts -g... " >&6; }
4824if test ${ac_cv_prog_cc_g+y}
4825then :
4826  printf %s "(cached) " >&6
4827else $as_nop
4828  ac_save_c_werror_flag=$ac_c_werror_flag
4829   ac_c_werror_flag=yes
4830   ac_cv_prog_cc_g=no
4831   CFLAGS="-g"
4832   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4833/* end confdefs.h.  */
4834
4835int
4836main (void)
4837{
4838
4839  ;
4840  return 0;
4841}
4842_ACEOF
4843if ac_fn_c_try_compile "$LINENO"
4844then :
4845  ac_cv_prog_cc_g=yes
4846else $as_nop
4847  CFLAGS=""
4848      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849/* end confdefs.h.  */
4850
4851int
4852main (void)
4853{
4854
4855  ;
4856  return 0;
4857}
4858_ACEOF
4859if ac_fn_c_try_compile "$LINENO"
4860then :
4861
4862else $as_nop
4863  ac_c_werror_flag=$ac_save_c_werror_flag
4864	 CFLAGS="-g"
4865	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4866/* end confdefs.h.  */
4867
4868int
4869main (void)
4870{
4871
4872  ;
4873  return 0;
4874}
4875_ACEOF
4876if ac_fn_c_try_compile "$LINENO"
4877then :
4878  ac_cv_prog_cc_g=yes
4879fi
4880rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4881fi
4882rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4883fi
4884rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4885   ac_c_werror_flag=$ac_save_c_werror_flag
4886fi
4887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4888printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4889if test $ac_test_CFLAGS; then
4890  CFLAGS=$ac_save_CFLAGS
4891elif test $ac_cv_prog_cc_g = yes; then
4892  if test "$GCC" = yes; then
4893    CFLAGS="-g -O2"
4894  else
4895    CFLAGS="-g"
4896  fi
4897else
4898  if test "$GCC" = yes; then
4899    CFLAGS="-O2"
4900  else
4901    CFLAGS=
4902  fi
4903fi
4904ac_prog_cc_stdc=no
4905if test x$ac_prog_cc_stdc = xno
4906then :
4907  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4908printf %s "checking for $CC option to enable C11 features... " >&6; }
4909if test ${ac_cv_prog_cc_c11+y}
4910then :
4911  printf %s "(cached) " >&6
4912else $as_nop
4913  ac_cv_prog_cc_c11=no
4914ac_save_CC=$CC
4915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4916/* end confdefs.h.  */
4917$ac_c_conftest_c11_program
4918_ACEOF
4919for ac_arg in '' -std=gnu11
4920do
4921  CC="$ac_save_CC $ac_arg"
4922  if ac_fn_c_try_compile "$LINENO"
4923then :
4924  ac_cv_prog_cc_c11=$ac_arg
4925fi
4926rm -f core conftest.err conftest.$ac_objext conftest.beam
4927  test "x$ac_cv_prog_cc_c11" != "xno" && break
4928done
4929rm -f conftest.$ac_ext
4930CC=$ac_save_CC
4931fi
4932
4933if test "x$ac_cv_prog_cc_c11" = xno
4934then :
4935  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4936printf "%s\n" "unsupported" >&6; }
4937else $as_nop
4938  if test "x$ac_cv_prog_cc_c11" = x
4939then :
4940  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4941printf "%s\n" "none needed" >&6; }
4942else $as_nop
4943  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4944printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4945     CC="$CC $ac_cv_prog_cc_c11"
4946fi
4947  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4948  ac_prog_cc_stdc=c11
4949fi
4950fi
4951if test x$ac_prog_cc_stdc = xno
4952then :
4953  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4954printf %s "checking for $CC option to enable C99 features... " >&6; }
4955if test ${ac_cv_prog_cc_c99+y}
4956then :
4957  printf %s "(cached) " >&6
4958else $as_nop
4959  ac_cv_prog_cc_c99=no
4960ac_save_CC=$CC
4961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4962/* end confdefs.h.  */
4963$ac_c_conftest_c99_program
4964_ACEOF
4965for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4966do
4967  CC="$ac_save_CC $ac_arg"
4968  if ac_fn_c_try_compile "$LINENO"
4969then :
4970  ac_cv_prog_cc_c99=$ac_arg
4971fi
4972rm -f core conftest.err conftest.$ac_objext conftest.beam
4973  test "x$ac_cv_prog_cc_c99" != "xno" && break
4974done
4975rm -f conftest.$ac_ext
4976CC=$ac_save_CC
4977fi
4978
4979if test "x$ac_cv_prog_cc_c99" = xno
4980then :
4981  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4982printf "%s\n" "unsupported" >&6; }
4983else $as_nop
4984  if test "x$ac_cv_prog_cc_c99" = x
4985then :
4986  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4987printf "%s\n" "none needed" >&6; }
4988else $as_nop
4989  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4990printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4991     CC="$CC $ac_cv_prog_cc_c99"
4992fi
4993  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4994  ac_prog_cc_stdc=c99
4995fi
4996fi
4997if test x$ac_prog_cc_stdc = xno
4998then :
4999  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5000printf %s "checking for $CC option to enable C89 features... " >&6; }
5001if test ${ac_cv_prog_cc_c89+y}
5002then :
5003  printf %s "(cached) " >&6
5004else $as_nop
5005  ac_cv_prog_cc_c89=no
5006ac_save_CC=$CC
5007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h.  */
5009$ac_c_conftest_c89_program
5010_ACEOF
5011for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5012do
5013  CC="$ac_save_CC $ac_arg"
5014  if ac_fn_c_try_compile "$LINENO"
5015then :
5016  ac_cv_prog_cc_c89=$ac_arg
5017fi
5018rm -f core conftest.err conftest.$ac_objext conftest.beam
5019  test "x$ac_cv_prog_cc_c89" != "xno" && break
5020done
5021rm -f conftest.$ac_ext
5022CC=$ac_save_CC
5023fi
5024
5025if test "x$ac_cv_prog_cc_c89" = xno
5026then :
5027  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5028printf "%s\n" "unsupported" >&6; }
5029else $as_nop
5030  if test "x$ac_cv_prog_cc_c89" = x
5031then :
5032  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5033printf "%s\n" "none needed" >&6; }
5034else $as_nop
5035  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5036printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5037     CC="$CC $ac_cv_prog_cc_c89"
5038fi
5039  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5040  ac_prog_cc_stdc=c89
5041fi
5042fi
5043
5044ac_ext=c
5045ac_cpp='$CPP $CPPFLAGS'
5046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5048ac_compiler_gnu=$ac_cv_c_compiler_gnu
5049
5050
5051  ac_ext=c
5052ac_cpp='$CPP $CPPFLAGS'
5053ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5054ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5055ac_compiler_gnu=$ac_cv_c_compiler_gnu
5056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5057printf %s "checking whether $CC understands -c and -o together... " >&6; }
5058if test ${am_cv_prog_cc_c_o+y}
5059then :
5060  printf %s "(cached) " >&6
5061else $as_nop
5062  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5063/* end confdefs.h.  */
5064
5065int
5066main (void)
5067{
5068
5069  ;
5070  return 0;
5071}
5072_ACEOF
5073  # Make sure it works both with $CC and with simple cc.
5074  # Following AC_PROG_CC_C_O, we do the test twice because some
5075  # compilers refuse to overwrite an existing .o file with -o,
5076  # though they will create one.
5077  am_cv_prog_cc_c_o=yes
5078  for am_i in 1 2; do
5079    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5080   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5081   ac_status=$?
5082   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5083   (exit $ac_status); } \
5084         && test -f conftest2.$ac_objext; then
5085      : OK
5086    else
5087      am_cv_prog_cc_c_o=no
5088      break
5089    fi
5090  done
5091  rm -f core conftest*
5092  unset am_i
5093fi
5094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5095printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5096if test "$am_cv_prog_cc_c_o" != yes; then
5097   # Losing compiler, so override with the script.
5098   # FIXME: It is wrong to rewrite CC.
5099   # But if we don't then we get into trouble of one sort or another.
5100   # A longer-term fix would be to have automake use am__CC in this case,
5101   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5102   CC="$am_aux_dir/compile $CC"
5103fi
5104ac_ext=c
5105ac_cpp='$CPP $CPPFLAGS'
5106ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5107ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5108ac_compiler_gnu=$ac_cv_c_compiler_gnu
5109
5110
5111depcc="$CC"   am_compiler_list=
5112
5113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5114printf %s "checking dependency style of $depcc... " >&6; }
5115if test ${am_cv_CC_dependencies_compiler_type+y}
5116then :
5117  printf %s "(cached) " >&6
5118else $as_nop
5119  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5120  # We make a subdir and do the tests there.  Otherwise we can end up
5121  # making bogus files that we don't know about and never remove.  For
5122  # instance it was reported that on HP-UX the gcc test will end up
5123  # making a dummy file named 'D' -- because '-MD' means "put the output
5124  # in D".
5125  rm -rf conftest.dir
5126  mkdir conftest.dir
5127  # Copy depcomp to subdir because otherwise we won't find it if we're
5128  # using a relative directory.
5129  cp "$am_depcomp" conftest.dir
5130  cd conftest.dir
5131  # We will build objects and dependencies in a subdirectory because
5132  # it helps to detect inapplicable dependency modes.  For instance
5133  # both Tru64's cc and ICC support -MD to output dependencies as a
5134  # side effect of compilation, but ICC will put the dependencies in
5135  # the current directory while Tru64 will put them in the object
5136  # directory.
5137  mkdir sub
5138
5139  am_cv_CC_dependencies_compiler_type=none
5140  if test "$am_compiler_list" = ""; then
5141     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5142  fi
5143  am__universal=false
5144  case " $depcc " in #(
5145     *\ -arch\ *\ -arch\ *) am__universal=true ;;
5146     esac
5147
5148  for depmode in $am_compiler_list; do
5149    # Setup a source with many dependencies, because some compilers
5150    # like to wrap large dependency lists on column 80 (with \), and
5151    # we should not choose a depcomp mode which is confused by this.
5152    #
5153    # We need to recreate these files for each test, as the compiler may
5154    # overwrite some of them when testing with obscure command lines.
5155    # This happens at least with the AIX C compiler.
5156    : > sub/conftest.c
5157    for i in 1 2 3 4 5 6; do
5158      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5159      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5160      # Solaris 10 /bin/sh.
5161      echo '/* dummy */' > sub/conftst$i.h
5162    done
5163    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5164
5165    # We check with '-c' and '-o' for the sake of the "dashmstdout"
5166    # mode.  It turns out that the SunPro C++ compiler does not properly
5167    # handle '-M -o', and we need to detect this.  Also, some Intel
5168    # versions had trouble with output in subdirs.
5169    am__obj=sub/conftest.${OBJEXT-o}
5170    am__minus_obj="-o $am__obj"
5171    case $depmode in
5172    gcc)
5173      # This depmode causes a compiler race in universal mode.
5174      test "$am__universal" = false || continue
5175      ;;
5176    nosideeffect)
5177      # After this tag, mechanisms are not by side-effect, so they'll
5178      # only be used when explicitly requested.
5179      if test "x$enable_dependency_tracking" = xyes; then
5180	continue
5181      else
5182	break
5183      fi
5184      ;;
5185    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5186      # This compiler won't grok '-c -o', but also, the minuso test has
5187      # not run yet.  These depmodes are late enough in the game, and
5188      # so weak that their functioning should not be impacted.
5189      am__obj=conftest.${OBJEXT-o}
5190      am__minus_obj=
5191      ;;
5192    none) break ;;
5193    esac
5194    if depmode=$depmode \
5195       source=sub/conftest.c object=$am__obj \
5196       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5197       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5198         >/dev/null 2>conftest.err &&
5199       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5200       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5201       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5202       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5203      # icc doesn't choke on unknown options, it will just issue warnings
5204      # or remarks (even with -Werror).  So we grep stderr for any message
5205      # that says an option was ignored or not supported.
5206      # When given -MP, icc 7.0 and 7.1 complain thusly:
5207      #   icc: Command line warning: ignoring option '-M'; no argument required
5208      # The diagnosis changed in icc 8.0:
5209      #   icc: Command line remark: option '-MP' not supported
5210      if (grep 'ignoring option' conftest.err ||
5211          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5212        am_cv_CC_dependencies_compiler_type=$depmode
5213        break
5214      fi
5215    fi
5216  done
5217
5218  cd ..
5219  rm -rf conftest.dir
5220else
5221  am_cv_CC_dependencies_compiler_type=none
5222fi
5223
5224fi
5225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5226printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5227CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5228
5229 if
5230  test "x$enable_dependency_tracking" != xno \
5231  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5232  am__fastdepCC_TRUE=
5233  am__fastdepCC_FALSE='#'
5234else
5235  am__fastdepCC_TRUE='#'
5236  am__fastdepCC_FALSE=
5237fi
5238
5239
5240
5241
5242
5243
5244ac_header= ac_cache=
5245for ac_item in $ac_header_c_list
5246do
5247  if test $ac_cache; then
5248    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5249    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5250      printf "%s\n" "#define $ac_item 1" >> confdefs.h
5251    fi
5252    ac_header= ac_cache=
5253  elif test $ac_header; then
5254    ac_cache=$ac_item
5255  else
5256    ac_header=$ac_item
5257  fi
5258done
5259
5260
5261
5262
5263
5264
5265
5266
5267if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5268then :
5269
5270printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5271
5272fi
5273
5274
5275
5276
5277
5278
5279  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5280printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5281if test ${ac_cv_safe_to_define___extensions__+y}
5282then :
5283  printf %s "(cached) " >&6
5284else $as_nop
5285  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5286/* end confdefs.h.  */
5287
5288#         define __EXTENSIONS__ 1
5289          $ac_includes_default
5290int
5291main (void)
5292{
5293
5294  ;
5295  return 0;
5296}
5297_ACEOF
5298if ac_fn_c_try_compile "$LINENO"
5299then :
5300  ac_cv_safe_to_define___extensions__=yes
5301else $as_nop
5302  ac_cv_safe_to_define___extensions__=no
5303fi
5304rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5305fi
5306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5307printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
5308
5309  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5310printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5311if test ${ac_cv_should_define__xopen_source+y}
5312then :
5313  printf %s "(cached) " >&6
5314else $as_nop
5315  ac_cv_should_define__xopen_source=no
5316    if test $ac_cv_header_wchar_h = yes
5317then :
5318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5319/* end confdefs.h.  */
5320
5321          #include <wchar.h>
5322          mbstate_t x;
5323int
5324main (void)
5325{
5326
5327  ;
5328  return 0;
5329}
5330_ACEOF
5331if ac_fn_c_try_compile "$LINENO"
5332then :
5333
5334else $as_nop
5335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5336/* end confdefs.h.  */
5337
5338            #define _XOPEN_SOURCE 500
5339            #include <wchar.h>
5340            mbstate_t x;
5341int
5342main (void)
5343{
5344
5345  ;
5346  return 0;
5347}
5348_ACEOF
5349if ac_fn_c_try_compile "$LINENO"
5350then :
5351  ac_cv_should_define__xopen_source=yes
5352fi
5353rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5354fi
5355rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5356fi
5357fi
5358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5359printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
5360
5361  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
5362
5363  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5364
5365  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
5366
5367  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5368
5369  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5370
5371  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
5372
5373  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5374
5375  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5376
5377  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5378
5379  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5380
5381  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5382
5383  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5384
5385  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5386
5387  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5388
5389  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
5390
5391  if test $ac_cv_header_minix_config_h = yes
5392then :
5393  MINIX=yes
5394    printf "%s\n" "#define _MINIX 1" >>confdefs.h
5395
5396    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
5397
5398    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
5399
5400else $as_nop
5401  MINIX=
5402fi
5403  if test $ac_cv_safe_to_define___extensions__ = yes
5404then :
5405  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
5406
5407fi
5408  if test $ac_cv_should_define__xopen_source = yes
5409then :
5410  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
5411
5412fi
5413
5414
5415
5416
5417
5418
5419CC_NOFORMAT=
5420CFLAGS_NTP=
5421CPPFLAGS_NTP=
5422LDADD_NTP=
5423LDFLAGS_NTP=
5424
5425
5426
5427
5428
5429
5430case "$ac_cv_prog_cc_c89" in
5431 no)
5432    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5433		 version 4.2.5 and higher." >&5
5434printf "%s\n" "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5435		 version 4.2.5 and higher." >&2;}
5436    ;;
5437esac
5438
5439{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5440printf %s "checking if $CC can handle #warning... " >&6; }
5441if test ${ntp_cv_cpp_warning+y}
5442then :
5443  printf %s "(cached) " >&6
5444else $as_nop
5445  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5446/* end confdefs.h.  */
5447
5448int
5449main (void)
5450{
5451#warning foo
5452  ;
5453  return 0;
5454}
5455_ACEOF
5456if ac_fn_c_try_compile "$LINENO"
5457then :
5458  ntp_cv_cpp_warning=yes
5459else $as_nop
5460  ntp_cv_cpp_warning=no
5461
5462fi
5463rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5464
5465fi
5466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5467printf "%s\n" "$ntp_cv_cpp_warning" >&6; }
5468case "$ntp_cv_cpp_warning" in
5469 no)
5470
5471printf "%s\n" "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5472
5473esac
5474
5475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5476printf %s "checking if $CC supports __attribute__((...))... " >&6; }
5477if test ${ntp_cv_cc_attribute+y}
5478then :
5479  printf %s "(cached) " >&6
5480else $as_nop
5481  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h.  */
5483
5484int
5485main (void)
5486{
5487void foo(void) __attribute__((__noreturn__));
5488
5489  ;
5490  return 0;
5491}
5492_ACEOF
5493if ac_fn_c_try_compile "$LINENO"
5494then :
5495  ntp_cv_cc_attribute=yes
5496else $as_nop
5497  ntp_cv_cc_attribute=no
5498
5499fi
5500rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5501
5502fi
5503{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5504printf "%s\n" "$ntp_cv_cc_attribute" >&6; }
5505case "$ntp_cv_cc_attribute" in
5506 yes)
5507
5508printf "%s\n" "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5509
5510esac
5511
5512
5513case "$GCC" in
5514 yes)
5515    SAVED_CFLAGS="$CFLAGS"
5516    CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
5517    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5518printf %s "checking if $CC can handle -Wstrict-overflow... " >&6; }
5519if test ${ntp_cv_gcc_Wstrict_overflow+y}
5520then :
5521  printf %s "(cached) " >&6
5522else $as_nop
5523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524/* end confdefs.h.  */
5525
5526int
5527main (void)
5528{
5529
5530  ;
5531  return 0;
5532}
5533_ACEOF
5534if ac_fn_c_try_compile "$LINENO"
5535then :
5536  ntp_cv_gcc_Wstrict_overflow=yes
5537else $as_nop
5538  ntp_cv_gcc_Wstrict_overflow=no
5539
5540fi
5541rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5542
5543fi
5544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5545printf "%s\n" "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5546    #
5547    # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5548    # flag to CFLAGS.
5549    #
5550    CFLAGS="$SAVED_CFLAGS -Winit-self"
5551    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5552printf %s "checking if $CC can handle -Winit-self... " >&6; }
5553if test ${ntp_cv_gcc_Winit_self+y}
5554then :
5555  printf %s "(cached) " >&6
5556else $as_nop
5557
5558	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5559/* end confdefs.h.  */
5560
5561int
5562main (void)
5563{
5564
5565  ;
5566  return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"
5570then :
5571  ntp_cv_gcc_Winit_self=yes
5572else $as_nop
5573  ntp_cv_gcc_Winit_self=no
5574
5575fi
5576rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5577
5578
5579fi
5580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5581printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
5582    #
5583    # $ntp_cv_gcc_Winit_self is tested later to add the
5584    # flag to CFLAGS_NTP.
5585    #
5586    # libopts specifically builds a string with embedded NULs.
5587    # This causes a bunch of distracting warnings due to -Wformat.
5588    #
5589    CFLAGS="$SAVED_CFLAGS -Wno-format -Wno-format-security"
5590    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format -Wno-format-security" >&5
5591printf %s "checking if $CC can handle -Wno-format -Wno-format-security... " >&6; }
5592if test ${ntp_cv_gcc_Wno_format+y}
5593then :
5594  printf %s "(cached) " >&6
5595else $as_nop
5596
5597	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5598/* end confdefs.h.  */
5599
5600int
5601main (void)
5602{
5603
5604  ;
5605  return 0;
5606}
5607_ACEOF
5608if ac_fn_c_try_compile "$LINENO"
5609then :
5610  ntp_cv_gcc_Wno_format=yes
5611else $as_nop
5612  ntp_cv_gcc_Wno_format=no
5613
5614fi
5615rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5616
5617
5618fi
5619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
5620printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
5621    case "$ntp_cv_gcc_Wno_format" in
5622      no) ntp_cv_gcc_Wno_format_truncation=no
5623	  ;;
5624     yes)
5625	CC_NOFORMAT="-Wno-format -Wno-format-security"
5626	CFLAGS="$SAVED_CFLAGS -Wformat -Wno-format-truncation -Werror"
5627	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wformat -Wno-format-truncation" >&5
5628printf %s "checking if $CC can handle -Wformat -Wno-format-truncation... " >&6; }
5629if test ${ntp_cv_gcc_Wno_format_truncation+y}
5630then :
5631  printf %s "(cached) " >&6
5632else $as_nop
5633  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5634/* end confdefs.h.  */
5635
5636int
5637main (void)
5638{
5639
5640  ;
5641  return 0;
5642}
5643_ACEOF
5644if ac_fn_c_try_compile "$LINENO"
5645then :
5646  ntp_cv_gcc_Wno_format_truncation=yes
5647else $as_nop
5648  ntp_cv_gcc_Wno_format_truncation=no
5649
5650fi
5651rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5652
5653fi
5654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format_truncation" >&5
5655printf "%s\n" "$ntp_cv_gcc_Wno_format_truncation" >&6; }
5656	#
5657	# $ntp_cv_gcc_Wno_format_truncation is tested later to add the
5658	# flag to CFLAGS.
5659	#
5660    esac
5661
5662    CFLAGS="$SAVED_CFLAGS"
5663    { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5664
5665    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5666printf %s "checking if linker supports omitting unused code and data... " >&6; }
5667if test ${ntp_cv_gc_sections_runs+y}
5668then :
5669  printf %s "(cached) " >&6
5670else $as_nop
5671
5672	    #  NetBSD will link but likely not run with --gc-sections
5673	    #  http://bugs.ntp.org/1844
5674	    #  http://gnats.netbsd.org/40401
5675	    #  --gc-sections causes attempt to load as linux elf, with
5676	    #  wrong syscalls in place.  Test a little gauntlet of
5677	    #  simple stdio read code checking for errors, expecting
5678	    #  enough syscall differences that the NetBSD code will
5679	    #  fail even with Linux emulation working as designed.
5680	    #  A shorter test could be refined by someone with access
5681	    #  to a NetBSD host with Linux emulation working.
5682	    origCFLAGS="$CFLAGS"
5683	    CFLAGS="$CFLAGS -Wl,--gc-sections"
5684	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685/* end confdefs.h.  */
5686
5687			#include <stdlib.h>
5688			#include <stdio.h>
5689
5690int
5691main (void)
5692{
5693
5694			FILE *	fpC;
5695			char	buf[32];
5696			size_t	cch;
5697			int	read_success_once;
5698
5699			fpC = fopen("conftest.c", "r");
5700			if (NULL == fpC)
5701				exit(1);
5702			do {
5703				cch = fread(buf, sizeof(buf), 1, fpC);
5704				read_success_once |= (0 != cch);
5705			} while (0 != cch);
5706			if (!read_success_once)
5707				exit(2);
5708			if (!feof(fpC))
5709				exit(3);
5710			if (0 != fclose(fpC))
5711				exit(4);
5712
5713			exit(EXIT_SUCCESS);
5714
5715
5716  ;
5717  return 0;
5718}
5719_ACEOF
5720if ac_fn_c_try_link "$LINENO"
5721then :
5722
5723		    if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5724			ntp_cv_gc_sections_runs=no
5725		    else
5726			ntp_cv_gc_sections_runs=no
5727			./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5728		    fi
5729
5730else $as_nop
5731  ntp_cv_gc_sections_runs=no
5732
5733fi
5734rm -f core conftest.err conftest.$ac_objext conftest.beam \
5735    conftest$ac_exeext conftest.$ac_ext
5736	    CFLAGS="$origCFLAGS"
5737	    { origCFLAGS=; unset origCFLAGS;}
5738
5739
5740fi
5741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
5742printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
5743    case "$ntp_cv_gc_sections_runs" in
5744     yes)
5745	LDADD_LIBNTP="-Wl,--gc-sections"
5746	CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
5747	;;
5748     no)
5749	LDADD_LIBNTP=
5750	;;
5751    esac
5752    CFLAGS_NTP="$CFLAGS_NTP -Wall"
5753    CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
5754    CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
5755    # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
5756    # CFLAGS_NTP="$CFLAGS_NTP -Werror"
5757    # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
5758    # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
5759    CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
5760    CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
5761    CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
5762    # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
5763    # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
5764    case "$ntp_cv_gcc_Winit_self" in
5765     yes)
5766	CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
5767    esac
5768    case "$ntp_cv_gcc_Wstrict_overflow" in
5769     yes)
5770	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
5771    esac
5772    case "$ntp_cv_gcc_Wno_format_truncation" in
5773     yes)
5774	CFLAGS_NTP="$CFLAGS_NTP -Wno-format-truncation"
5775    esac
5776    # -W[no-]strict-prototypes might be added by NTP_OPENSSL
5777esac
5778
5779
5780    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
5781printf %s "checking additional compiler flags... " >&6; }
5782    # allow ntp_os_cflags to be preset to skip this stuff
5783    case "${ntp_os_cflags+set}" in
5784     set)
5785	;;
5786     *)
5787	ntp_os_cflags=
5788	case "$host_os" in
5789	 aix[1-3]*)
5790	    ;;
5791	 aix4.[0-2]*)
5792	    # turn on additional headers
5793	    ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
5794	    ;;
5795	 aix5.3*)
5796	    # avoid circular dependencies in yp headers, and more
5797	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
5798	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
5799	    ;;
5800	 aix*)
5801	    # XXX Only verified thru AIX6.
5802	    # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
5803	    # avoid circular dependencies in yp headers
5804	    # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
5805	    # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
5806	    # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
5807	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
5808	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
5809	    ;;
5810	 amigaos)
5811	    ntp_os_cflags="-DSYS_AMIGA"
5812	    ;;
5813	 darwin*|macosx*|rhapsody*)
5814	    ntp_os_cflags="-D_P1003_1B_VISIBLE"
5815	    ;;
5816	 hpux10.*)		# at least for hppa2.0-hp-hpux10.20
5817	    case "$GCC" in
5818	     yes)
5819		;;
5820	     *)
5821		# use Ansi compiler on HPUX, and some -Wp magic
5822		ntp_os_cflags="-Ae -Wp,-H18816"
5823		;;
5824	    esac
5825	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5826	    ;;
5827	 hpux*)
5828	    case "$GCC" in
5829	     yes)
5830		;;
5831	     *)
5832		# use Ansi compiler on HPUX
5833		ntp_os_cflags="-Ae"
5834	    esac
5835	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
5836	    ;;
5837	 irix6*)
5838	    case "$CC" in
5839	     cc)
5840		# do not use 64-bit compiler
5841		ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
5842	    esac
5843	    ;;
5844	 nextstep3)
5845	    ntp_os_cflags="-posix"
5846	    ;;
5847	 solaris1*|solaris2.[0-5]|solaris2.5.*)
5848	    ;;
5849	 sunos[34]*|sunos5.[0-5]|sunos5.5.*)
5850	    ;;
5851	 solaris2*|sunos5*)
5852	    # turn on 64-bit file offset interface
5853	    ntp_os_cflags="-D_LARGEFILE64_SOURCE"
5854	    ;;
5855	 vxworks*)
5856	    case "$build" in
5857	     $host)
5858		;;
5859	     *)
5860		# Quick and dirty sanity check
5861		case "$VX_KERNEL" in
5862		 '')
5863		    as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
5864		esac
5865		ntp_os_cflags="-DSYS_VXWORKS"
5866	    esac
5867	    ;;
5868	esac
5869    esac
5870    case "$ntp_os_cflags" in
5871     '')
5872	ntp_os_cflags_msg="none needed"
5873	;;
5874     *)
5875	ntp_os_cflags_msg="$ntp_os_cflags"
5876    esac
5877    CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
5878    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
5879printf "%s\n" "$ntp_os_cflags_msg" >&6; }
5880    { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
5881    ###
5882    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
5883printf %s "checking additional linker flags... " >&6; }
5884    # HMS: The following might still need tweaking
5885    # allow ntp_os_ldflags to be preset to skip this stuff
5886    case "${ntp_os_ldflags+set}" in
5887     set)
5888	;;
5889     *)
5890	ntp_os_ldflags=
5891	case "$host_os" in
5892	 hpux*)
5893	    case "$GCC" in
5894	     yes)
5895		ntp_os_ldflags="-Wl,+allowdups"
5896		;;
5897	    esac
5898	    ;;
5899	esac
5900	;;
5901    esac
5902    case "$ntp_os_ldflags" in
5903     '')
5904	ntp_os_ldflags_msg="none needed"
5905	;;
5906     *)
5907	ntp_os_ldflags_msg="$ntp_os_ldflags"
5908    esac
5909    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
5910    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
5911printf "%s\n" "$ntp_os_ldflags_msg" >&6; }
5912    { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
5913
5914
5915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5916printf %s "checking whether byte ordering is bigendian... " >&6; }
5917if test ${ac_cv_c_bigendian+y}
5918then :
5919  printf %s "(cached) " >&6
5920else $as_nop
5921  ac_cv_c_bigendian=unknown
5922    # See if we're dealing with a universal compiler.
5923    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5924/* end confdefs.h.  */
5925#ifndef __APPLE_CC__
5926	       not a universal capable compiler
5927	     #endif
5928	     typedef int dummy;
5929
5930_ACEOF
5931if ac_fn_c_try_compile "$LINENO"
5932then :
5933
5934	# Check for potential -arch flags.  It is not universal unless
5935	# there are at least two -arch flags with different values.
5936	ac_arch=
5937	ac_prev=
5938	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5939	 if test -n "$ac_prev"; then
5940	   case $ac_word in
5941	     i?86 | x86_64 | ppc | ppc64)
5942	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5943		 ac_arch=$ac_word
5944	       else
5945		 ac_cv_c_bigendian=universal
5946		 break
5947	       fi
5948	       ;;
5949	   esac
5950	   ac_prev=
5951	 elif test "x$ac_word" = "x-arch"; then
5952	   ac_prev=arch
5953	 fi
5954       done
5955fi
5956rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5957    if test $ac_cv_c_bigendian = unknown; then
5958      # See if sys/param.h defines the BYTE_ORDER macro.
5959      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5960/* end confdefs.h.  */
5961#include <sys/types.h>
5962	     #include <sys/param.h>
5963
5964int
5965main (void)
5966{
5967#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
5968		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
5969		     && LITTLE_ENDIAN)
5970	      bogus endian macros
5971	     #endif
5972
5973  ;
5974  return 0;
5975}
5976_ACEOF
5977if ac_fn_c_try_compile "$LINENO"
5978then :
5979  # It does; now see whether it defined to BIG_ENDIAN or not.
5980	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5981/* end confdefs.h.  */
5982#include <sys/types.h>
5983		#include <sys/param.h>
5984
5985int
5986main (void)
5987{
5988#if BYTE_ORDER != BIG_ENDIAN
5989		 not big endian
5990		#endif
5991
5992  ;
5993  return 0;
5994}
5995_ACEOF
5996if ac_fn_c_try_compile "$LINENO"
5997then :
5998  ac_cv_c_bigendian=yes
5999else $as_nop
6000  ac_cv_c_bigendian=no
6001fi
6002rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6003fi
6004rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6005    fi
6006    if test $ac_cv_c_bigendian = unknown; then
6007      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6008      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009/* end confdefs.h.  */
6010#include <limits.h>
6011
6012int
6013main (void)
6014{
6015#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6016	      bogus endian macros
6017	     #endif
6018
6019  ;
6020  return 0;
6021}
6022_ACEOF
6023if ac_fn_c_try_compile "$LINENO"
6024then :
6025  # It does; now see whether it defined to _BIG_ENDIAN or not.
6026	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6027/* end confdefs.h.  */
6028#include <limits.h>
6029
6030int
6031main (void)
6032{
6033#ifndef _BIG_ENDIAN
6034		 not big endian
6035		#endif
6036
6037  ;
6038  return 0;
6039}
6040_ACEOF
6041if ac_fn_c_try_compile "$LINENO"
6042then :
6043  ac_cv_c_bigendian=yes
6044else $as_nop
6045  ac_cv_c_bigendian=no
6046fi
6047rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6048fi
6049rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6050    fi
6051    if test $ac_cv_c_bigendian = unknown; then
6052      # Compile a test program.
6053      if test "$cross_compiling" = yes
6054then :
6055  # Try to guess by grepping values from an object file.
6056	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057/* end confdefs.h.  */
6058unsigned short int ascii_mm[] =
6059		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6060		unsigned short int ascii_ii[] =
6061		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6062		int use_ascii (int i) {
6063		  return ascii_mm[i] + ascii_ii[i];
6064		}
6065		unsigned short int ebcdic_ii[] =
6066		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6067		unsigned short int ebcdic_mm[] =
6068		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6069		int use_ebcdic (int i) {
6070		  return ebcdic_mm[i] + ebcdic_ii[i];
6071		}
6072		extern int foo;
6073
6074int
6075main (void)
6076{
6077return use_ascii (foo) == use_ebcdic (foo);
6078  ;
6079  return 0;
6080}
6081_ACEOF
6082if ac_fn_c_try_compile "$LINENO"
6083then :
6084  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6085	      ac_cv_c_bigendian=yes
6086	    fi
6087	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6088	      if test "$ac_cv_c_bigendian" = unknown; then
6089		ac_cv_c_bigendian=no
6090	      else
6091		# finding both strings is unlikely to happen, but who knows?
6092		ac_cv_c_bigendian=unknown
6093	      fi
6094	    fi
6095fi
6096rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6097else $as_nop
6098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6099/* end confdefs.h.  */
6100$ac_includes_default
6101int
6102main (void)
6103{
6104
6105	     /* Are we little or big endian?  From Harbison&Steele.  */
6106	     union
6107	     {
6108	       long int l;
6109	       char c[sizeof (long int)];
6110	     } u;
6111	     u.l = 1;
6112	     return u.c[sizeof (long int) - 1] == 1;
6113
6114  ;
6115  return 0;
6116}
6117_ACEOF
6118if ac_fn_c_try_run "$LINENO"
6119then :
6120  ac_cv_c_bigendian=no
6121else $as_nop
6122  ac_cv_c_bigendian=yes
6123fi
6124rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6125  conftest.$ac_objext conftest.beam conftest.$ac_ext
6126fi
6127
6128    fi
6129fi
6130{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6131printf "%s\n" "$ac_cv_c_bigendian" >&6; }
6132 case $ac_cv_c_bigendian in #(
6133   yes)
6134     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
6135;; #(
6136   no)
6137      ;; #(
6138   universal)
6139
6140printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6141
6142     ;; #(
6143   *)
6144     as_fn_error $? "unknown endianness
6145 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6146 esac
6147
6148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6149printf %s "checking for working volatile... " >&6; }
6150if test ${ac_cv_c_volatile+y}
6151then :
6152  printf %s "(cached) " >&6
6153else $as_nop
6154  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6155/* end confdefs.h.  */
6156
6157int
6158main (void)
6159{
6160
6161volatile int x;
6162int * volatile y = (int *) 0;
6163return !x && !y;
6164  ;
6165  return 0;
6166}
6167_ACEOF
6168if ac_fn_c_try_compile "$LINENO"
6169then :
6170  ac_cv_c_volatile=yes
6171else $as_nop
6172  ac_cv_c_volatile=no
6173fi
6174rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6175fi
6176{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6177printf "%s\n" "$ac_cv_c_volatile" >&6; }
6178if test $ac_cv_c_volatile = no; then
6179
6180printf "%s\n" "#define volatile /**/" >>confdefs.h
6181
6182fi
6183
6184ac_ext=c
6185ac_cpp='$CPP $CPPFLAGS'
6186ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6187ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6188ac_compiler_gnu=$ac_cv_c_compiler_gnu
6189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6190printf %s "checking how to run the C preprocessor... " >&6; }
6191# On Suns, sometimes $CPP names a directory.
6192if test -n "$CPP" && test -d "$CPP"; then
6193  CPP=
6194fi
6195if test -z "$CPP"; then
6196  if test ${ac_cv_prog_CPP+y}
6197then :
6198  printf %s "(cached) " >&6
6199else $as_nop
6200      # Double quotes because $CC needs to be expanded
6201    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6202    do
6203      ac_preproc_ok=false
6204for ac_c_preproc_warn_flag in '' yes
6205do
6206  # Use a header file that comes with gcc, so configuring glibc
6207  # with a fresh cross-compiler works.
6208  # On the NeXT, cc -E runs the code through the compiler's parser,
6209  # not just through cpp. "Syntax error" is here to catch this case.
6210  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6211/* end confdefs.h.  */
6212#include <limits.h>
6213		     Syntax error
6214_ACEOF
6215if ac_fn_c_try_cpp "$LINENO"
6216then :
6217
6218else $as_nop
6219  # Broken: fails on valid input.
6220continue
6221fi
6222rm -f conftest.err conftest.i conftest.$ac_ext
6223
6224  # OK, works on sane cases.  Now check whether nonexistent headers
6225  # can be detected and how.
6226  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6227/* end confdefs.h.  */
6228#include <ac_nonexistent.h>
6229_ACEOF
6230if ac_fn_c_try_cpp "$LINENO"
6231then :
6232  # Broken: success on invalid input.
6233continue
6234else $as_nop
6235  # Passes both tests.
6236ac_preproc_ok=:
6237break
6238fi
6239rm -f conftest.err conftest.i conftest.$ac_ext
6240
6241done
6242# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6243rm -f conftest.i conftest.err conftest.$ac_ext
6244if $ac_preproc_ok
6245then :
6246  break
6247fi
6248
6249    done
6250    ac_cv_prog_CPP=$CPP
6251
6252fi
6253  CPP=$ac_cv_prog_CPP
6254else
6255  ac_cv_prog_CPP=$CPP
6256fi
6257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6258printf "%s\n" "$CPP" >&6; }
6259ac_preproc_ok=false
6260for ac_c_preproc_warn_flag in '' yes
6261do
6262  # Use a header file that comes with gcc, so configuring glibc
6263  # with a fresh cross-compiler works.
6264  # On the NeXT, cc -E runs the code through the compiler's parser,
6265  # not just through cpp. "Syntax error" is here to catch this case.
6266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6267/* end confdefs.h.  */
6268#include <limits.h>
6269		     Syntax error
6270_ACEOF
6271if ac_fn_c_try_cpp "$LINENO"
6272then :
6273
6274else $as_nop
6275  # Broken: fails on valid input.
6276continue
6277fi
6278rm -f conftest.err conftest.i conftest.$ac_ext
6279
6280  # OK, works on sane cases.  Now check whether nonexistent headers
6281  # can be detected and how.
6282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6283/* end confdefs.h.  */
6284#include <ac_nonexistent.h>
6285_ACEOF
6286if ac_fn_c_try_cpp "$LINENO"
6287then :
6288  # Broken: success on invalid input.
6289continue
6290else $as_nop
6291  # Passes both tests.
6292ac_preproc_ok=:
6293break
6294fi
6295rm -f conftest.err conftest.i conftest.$ac_ext
6296
6297done
6298# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6299rm -f conftest.i conftest.err conftest.$ac_ext
6300if $ac_preproc_ok
6301then :
6302
6303else $as_nop
6304  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6305printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6306as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6307See \`config.log' for more details" "$LINENO" 5; }
6308fi
6309
6310ac_ext=c
6311ac_cpp='$CPP $CPPFLAGS'
6312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6314ac_compiler_gnu=$ac_cv_c_compiler_gnu
6315
6316
6317
6318
6319for ac_prog in 'bison -y' byacc
6320do
6321  # Extract the first word of "$ac_prog", so it can be a program name with args.
6322set dummy $ac_prog; ac_word=$2
6323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6324printf %s "checking for $ac_word... " >&6; }
6325if test ${ac_cv_prog_YACC+y}
6326then :
6327  printf %s "(cached) " >&6
6328else $as_nop
6329  if test -n "$YACC"; then
6330  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6331else
6332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6333for as_dir in $PATH
6334do
6335  IFS=$as_save_IFS
6336  case $as_dir in #(((
6337    '') as_dir=./ ;;
6338    */) ;;
6339    *) as_dir=$as_dir/ ;;
6340  esac
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6343    ac_cv_prog_YACC="$ac_prog"
6344    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351fi
6352fi
6353YACC=$ac_cv_prog_YACC
6354if test -n "$YACC"; then
6355  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6356printf "%s\n" "$YACC" >&6; }
6357else
6358  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359printf "%s\n" "no" >&6; }
6360fi
6361
6362
6363  test -n "$YACC" && break
6364done
6365test -n "$YACC" || YACC="yacc"
6366
6367
6368
6369	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
6370printf %s "checking whether the compiler supports C99 structure initialization... " >&6; }
6371
6372
6373	ac_ext=c
6374ac_cpp='$CPP $CPPFLAGS'
6375ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6376ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6377ac_compiler_gnu=$ac_cv_c_compiler_gnu
6378
6379
6380		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6381/* end confdefs.h.  */
6382
6383			struct foo_s {int i1; int i2;};
6384			int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
6385
6386_ACEOF
6387if ac_fn_c_try_compile "$LINENO"
6388then :
6389  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390printf "%s\n" "yes" >&6; }
6391else $as_nop
6392  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393printf "%s\n" "no" >&6; }
6394
6395printf "%s\n" "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
6396
6397fi
6398rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6399
6400	ac_ext=c
6401ac_cpp='$CPP $CPPFLAGS'
6402ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6403ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6404ac_compiler_gnu=$ac_cv_c_compiler_gnu
6405
6406
6407
6408
6409
6410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6411printf %s "checking for compile/link hardening flags... " >&6; }
6412
6413
6414# Check whether --with-hardenfile was given.
6415if test ${with_hardenfile+y}
6416then :
6417  withval=$with_hardenfile;
6418else $as_nop
6419  with_hardenfile=no
6420
6421fi
6422
6423
6424(									\
6425    SENTINEL_DIR="$PWD" &&						\
6426    cd $srcdir/sntp &&							\
6427    case "$with_hardenfile" in						\
6428     yes|no|'')								\
6429	scripts/genHardFlags -d "$SENTINEL_DIR"				\
6430	;;								\
6431     *)									\
6432	scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile"	\
6433	;;								\
6434    esac								\
6435) > genHardFlags.i 2> genHardFlags.err
6436. ./genHardFlags.i
6437
6438case "$GENHARDFLAG" in
6439 OK)
6440    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6441printf "%s\n" "in file $GENHARDFLAGFILE" >&6; }
6442    rm genHardFlags.err genHardFlags.i
6443    ;;
6444 *)
6445    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6446printf "%s\n" "failed." >&6; }
6447    as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6448    ;;
6449esac
6450
6451
6452
6453
6454
6455
6456
6457
6458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
6459printf %s "checking to see if we need ylwrap VPATH hack... " >&6; }
6460ntp_vpath_hack="no"
6461case "$srcdir::${force_ntp_vpath_hack-no}" in
6462 .::*)
6463    ;; # VPATH_HACK path is for VPATH builds only.
6464 *::yes)
6465    ntp_vpath_hack="yes"
6466    ;;
6467 *::*)
6468    case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
6469     '')
6470	ntp_vpath_hack="yes"
6471    esac
6472esac
6473{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
6474printf "%s\n" "$ntp_vpath_hack" >&6; }
6475 if test x$ntp_vpath_hack = xyes; then
6476  VPATH_HACK_TRUE=
6477  VPATH_HACK_FALSE='#'
6478else
6479  VPATH_HACK_TRUE='#'
6480  VPATH_HACK_FALSE=
6481fi
6482
6483
6484
6485
6486{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6487printf %s "checking for install dir and man conventions... " >&6; }
6488
6489
6490# Check whether --with-locfile was given.
6491if test ${with_locfile+y}
6492then :
6493  withval=$with_locfile;
6494else $as_nop
6495  with_locfile=no
6496
6497fi
6498
6499
6500(									\
6501    SENTINEL_DIR="$PWD" &&						\
6502    cd $srcdir/sntp &&							\
6503    case "$with_locfile" in						\
6504     yes|no|'')								\
6505	scripts/genLocInfo -d "$SENTINEL_DIR"				\
6506	;;								\
6507     *)									\
6508	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
6509	;;								\
6510    esac								\
6511) > genLocInfo.i 2> genLocInfo.err
6512. ./genLocInfo.i
6513
6514case "$GENLOCINFO" in
6515 OK)
6516    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6517printf "%s\n" "in file $GENLOCINFOFILE" >&6; }
6518    rm genLocInfo.err genLocInfo.i
6519    ;;
6520 *)
6521    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6522printf "%s\n" "failed." >&6; }
6523    as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6524    ;;
6525esac
6526
6527 if test "$CALC_TICKADJ_MS" ; then
6528  WANT_CALC_TICKADJ_MS_TRUE=
6529  WANT_CALC_TICKADJ_MS_FALSE='#'
6530else
6531  WANT_CALC_TICKADJ_MS_TRUE='#'
6532  WANT_CALC_TICKADJ_MS_FALSE=
6533fi
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577 if test -z "$NTPSWEEP_NI" ; then
6578  INSTALL_NTPSWEEP_TRUE=
6579  INSTALL_NTPSWEEP_FALSE='#'
6580else
6581  INSTALL_NTPSWEEP_TRUE='#'
6582  INSTALL_NTPSWEEP_FALSE=
6583fi
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625 if test -z "$UPDATE_LEAP_NI" ; then
6626  INSTALL_UPDATE_LEAP_TRUE=
6627  INSTALL_UPDATE_LEAP_FALSE='#'
6628else
6629  INSTALL_UPDATE_LEAP_TRUE='#'
6630  INSTALL_UPDATE_LEAP_FALSE=
6631fi
6632
6633
6634
6635
6636  if test -n "$ac_tool_prefix"; then
6637  for ac_prog in ar lib "link -lib"
6638  do
6639    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6641{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6642printf %s "checking for $ac_word... " >&6; }
6643if test ${ac_cv_prog_AR+y}
6644then :
6645  printf %s "(cached) " >&6
6646else $as_nop
6647  if test -n "$AR"; then
6648  ac_cv_prog_AR="$AR" # Let the user override the test.
6649else
6650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6651for as_dir in $PATH
6652do
6653  IFS=$as_save_IFS
6654  case $as_dir in #(((
6655    '') as_dir=./ ;;
6656    */) ;;
6657    *) as_dir=$as_dir/ ;;
6658  esac
6659    for ac_exec_ext in '' $ac_executable_extensions; do
6660  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6661    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6662    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6663    break 2
6664  fi
6665done
6666  done
6667IFS=$as_save_IFS
6668
6669fi
6670fi
6671AR=$ac_cv_prog_AR
6672if test -n "$AR"; then
6673  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6674printf "%s\n" "$AR" >&6; }
6675else
6676  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677printf "%s\n" "no" >&6; }
6678fi
6679
6680
6681    test -n "$AR" && break
6682  done
6683fi
6684if test -z "$AR"; then
6685  ac_ct_AR=$AR
6686  for ac_prog in ar lib "link -lib"
6687do
6688  # Extract the first word of "$ac_prog", so it can be a program name with args.
6689set dummy $ac_prog; ac_word=$2
6690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691printf %s "checking for $ac_word... " >&6; }
6692if test ${ac_cv_prog_ac_ct_AR+y}
6693then :
6694  printf %s "(cached) " >&6
6695else $as_nop
6696  if test -n "$ac_ct_AR"; then
6697  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6698else
6699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700for as_dir in $PATH
6701do
6702  IFS=$as_save_IFS
6703  case $as_dir in #(((
6704    '') as_dir=./ ;;
6705    */) ;;
6706    *) as_dir=$as_dir/ ;;
6707  esac
6708    for ac_exec_ext in '' $ac_executable_extensions; do
6709  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6710    ac_cv_prog_ac_ct_AR="$ac_prog"
6711    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6712    break 2
6713  fi
6714done
6715  done
6716IFS=$as_save_IFS
6717
6718fi
6719fi
6720ac_ct_AR=$ac_cv_prog_ac_ct_AR
6721if test -n "$ac_ct_AR"; then
6722  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6723printf "%s\n" "$ac_ct_AR" >&6; }
6724else
6725  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6726printf "%s\n" "no" >&6; }
6727fi
6728
6729
6730  test -n "$ac_ct_AR" && break
6731done
6732
6733  if test "x$ac_ct_AR" = x; then
6734    AR="false"
6735  else
6736    case $cross_compiling:$ac_tool_warned in
6737yes:)
6738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6739printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6740ac_tool_warned=yes ;;
6741esac
6742    AR=$ac_ct_AR
6743  fi
6744fi
6745
6746: ${AR=ar}
6747
6748{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
6749printf %s "checking the archiver ($AR) interface... " >&6; }
6750if test ${am_cv_ar_interface+y}
6751then :
6752  printf %s "(cached) " >&6
6753else $as_nop
6754  ac_ext=c
6755ac_cpp='$CPP $CPPFLAGS'
6756ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6757ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6758ac_compiler_gnu=$ac_cv_c_compiler_gnu
6759
6760   am_cv_ar_interface=ar
6761   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6762/* end confdefs.h.  */
6763int some_variable = 0;
6764_ACEOF
6765if ac_fn_c_try_compile "$LINENO"
6766then :
6767  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
6768      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6769  (eval $am_ar_try) 2>&5
6770  ac_status=$?
6771  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6772  test $ac_status = 0; }
6773      if test "$ac_status" -eq 0; then
6774        am_cv_ar_interface=ar
6775      else
6776        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
6777        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
6778  (eval $am_ar_try) 2>&5
6779  ac_status=$?
6780  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
6781  test $ac_status = 0; }
6782        if test "$ac_status" -eq 0; then
6783          am_cv_ar_interface=lib
6784        else
6785          am_cv_ar_interface=unknown
6786        fi
6787      fi
6788      rm -f conftest.lib libconftest.a
6789
6790fi
6791rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6792   ac_ext=c
6793ac_cpp='$CPP $CPPFLAGS'
6794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6796ac_compiler_gnu=$ac_cv_c_compiler_gnu
6797
6798fi
6799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
6800printf "%s\n" "$am_cv_ar_interface" >&6; }
6801
6802case $am_cv_ar_interface in
6803ar)
6804  ;;
6805lib)
6806  # Microsoft lib, so override with the ar-lib wrapper script.
6807  # FIXME: It is wrong to rewrite AR.
6808  # But if we don't then we get into trouble of one sort or another.
6809  # A longer-term fix would be to have automake use am__AR in this case,
6810  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
6811  # similar.
6812  AR="$am_aux_dir/ar-lib $AR"
6813  ;;
6814unknown)
6815  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
6816  ;;
6817esac
6818
6819
6820# So far, the only shared library we might use is libopts.
6821# It's a small library - we might as well use a static version of it.
6822case `pwd` in
6823  *\ * | *\	*)
6824    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
6825printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
6826esac
6827
6828
6829
6830macro_version='2.4.6'
6831macro_revision='2.4.6'
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846ltmain=$ac_aux_dir/ltmain.sh
6847
6848# Backslashify metacharacters that are still active within
6849# double-quoted strings.
6850sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
6851
6852# Same as above, but do not quote variable references.
6853double_quote_subst='s/\(["`\\]\)/\\\1/g'
6854
6855# Sed substitution to delay expansion of an escaped shell variable in a
6856# double_quote_subst'ed string.
6857delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
6858
6859# Sed substitution to delay expansion of an escaped single quote.
6860delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
6861
6862# Sed substitution to avoid accidental globbing in evaled expressions
6863no_glob_subst='s/\*/\\\*/g'
6864
6865ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
6866ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
6867ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
6868
6869{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
6870printf %s "checking how to print strings... " >&6; }
6871# Test print first, because it will be a builtin if present.
6872if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
6873   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
6874  ECHO='print -r --'
6875elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
6876  ECHO='printf %s\n'
6877else
6878  # Use this function as a fallback that always works.
6879  func_fallback_echo ()
6880  {
6881    eval 'cat <<_LTECHO_EOF
6882$1
6883_LTECHO_EOF'
6884  }
6885  ECHO='func_fallback_echo'
6886fi
6887
6888# func_echo_all arg...
6889# Invoke $ECHO with all args, space-separated.
6890func_echo_all ()
6891{
6892    $ECHO ""
6893}
6894
6895case $ECHO in
6896  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
6897printf "%s\n" "printf" >&6; } ;;
6898  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
6899printf "%s\n" "print -r" >&6; } ;;
6900  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
6901printf "%s\n" "cat" >&6; } ;;
6902esac
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6918printf %s "checking for a sed that does not truncate output... " >&6; }
6919if test ${ac_cv_path_SED+y}
6920then :
6921  printf %s "(cached) " >&6
6922else $as_nop
6923            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6924     for ac_i in 1 2 3 4 5 6 7; do
6925       ac_script="$ac_script$as_nl$ac_script"
6926     done
6927     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6928     { ac_script=; unset ac_script;}
6929     if test -z "$SED"; then
6930  ac_path_SED_found=false
6931  # Loop through the user's path and test for each of PROGNAME-LIST
6932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6933for as_dir in $PATH
6934do
6935  IFS=$as_save_IFS
6936  case $as_dir in #(((
6937    '') as_dir=./ ;;
6938    */) ;;
6939    *) as_dir=$as_dir/ ;;
6940  esac
6941    for ac_prog in sed gsed
6942   do
6943    for ac_exec_ext in '' $ac_executable_extensions; do
6944      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
6945      as_fn_executable_p "$ac_path_SED" || continue
6946# Check for GNU ac_path_SED and select it if it is found.
6947  # Check for GNU $ac_path_SED
6948case `"$ac_path_SED" --version 2>&1` in
6949*GNU*)
6950  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6951*)
6952  ac_count=0
6953  printf %s 0123456789 >"conftest.in"
6954  while :
6955  do
6956    cat "conftest.in" "conftest.in" >"conftest.tmp"
6957    mv "conftest.tmp" "conftest.in"
6958    cp "conftest.in" "conftest.nl"
6959    printf "%s\n" '' >> "conftest.nl"
6960    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6961    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6962    as_fn_arith $ac_count + 1 && ac_count=$as_val
6963    if test $ac_count -gt ${ac_path_SED_max-0}; then
6964      # Best one so far, save it but keep looking for a better one
6965      ac_cv_path_SED="$ac_path_SED"
6966      ac_path_SED_max=$ac_count
6967    fi
6968    # 10*(2^10) chars as input seems more than enough
6969    test $ac_count -gt 10 && break
6970  done
6971  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6972esac
6973
6974      $ac_path_SED_found && break 3
6975    done
6976  done
6977  done
6978IFS=$as_save_IFS
6979  if test -z "$ac_cv_path_SED"; then
6980    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6981  fi
6982else
6983  ac_cv_path_SED=$SED
6984fi
6985
6986fi
6987{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6988printf "%s\n" "$ac_cv_path_SED" >&6; }
6989 SED="$ac_cv_path_SED"
6990  rm -f conftest.sed
6991
6992test -z "$SED" && SED=sed
6993Xsed="$SED -e 1s/^X//"
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
7006printf %s "checking for grep that handles long lines and -e... " >&6; }
7007if test ${ac_cv_path_GREP+y}
7008then :
7009  printf %s "(cached) " >&6
7010else $as_nop
7011  if test -z "$GREP"; then
7012  ac_path_GREP_found=false
7013  # Loop through the user's path and test for each of PROGNAME-LIST
7014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7016do
7017  IFS=$as_save_IFS
7018  case $as_dir in #(((
7019    '') as_dir=./ ;;
7020    */) ;;
7021    *) as_dir=$as_dir/ ;;
7022  esac
7023    for ac_prog in grep ggrep
7024   do
7025    for ac_exec_ext in '' $ac_executable_extensions; do
7026      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
7027      as_fn_executable_p "$ac_path_GREP" || continue
7028# Check for GNU ac_path_GREP and select it if it is found.
7029  # Check for GNU $ac_path_GREP
7030case `"$ac_path_GREP" --version 2>&1` in
7031*GNU*)
7032  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
7033*)
7034  ac_count=0
7035  printf %s 0123456789 >"conftest.in"
7036  while :
7037  do
7038    cat "conftest.in" "conftest.in" >"conftest.tmp"
7039    mv "conftest.tmp" "conftest.in"
7040    cp "conftest.in" "conftest.nl"
7041    printf "%s\n" 'GREP' >> "conftest.nl"
7042    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7043    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7044    as_fn_arith $ac_count + 1 && ac_count=$as_val
7045    if test $ac_count -gt ${ac_path_GREP_max-0}; then
7046      # Best one so far, save it but keep looking for a better one
7047      ac_cv_path_GREP="$ac_path_GREP"
7048      ac_path_GREP_max=$ac_count
7049    fi
7050    # 10*(2^10) chars as input seems more than enough
7051    test $ac_count -gt 10 && break
7052  done
7053  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7054esac
7055
7056      $ac_path_GREP_found && break 3
7057    done
7058  done
7059  done
7060IFS=$as_save_IFS
7061  if test -z "$ac_cv_path_GREP"; then
7062    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7063  fi
7064else
7065  ac_cv_path_GREP=$GREP
7066fi
7067
7068fi
7069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
7070printf "%s\n" "$ac_cv_path_GREP" >&6; }
7071 GREP="$ac_cv_path_GREP"
7072
7073
7074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
7075printf %s "checking for egrep... " >&6; }
7076if test ${ac_cv_path_EGREP+y}
7077then :
7078  printf %s "(cached) " >&6
7079else $as_nop
7080  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
7081   then ac_cv_path_EGREP="$GREP -E"
7082   else
7083     if test -z "$EGREP"; then
7084  ac_path_EGREP_found=false
7085  # Loop through the user's path and test for each of PROGNAME-LIST
7086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7088do
7089  IFS=$as_save_IFS
7090  case $as_dir in #(((
7091    '') as_dir=./ ;;
7092    */) ;;
7093    *) as_dir=$as_dir/ ;;
7094  esac
7095    for ac_prog in egrep
7096   do
7097    for ac_exec_ext in '' $ac_executable_extensions; do
7098      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
7099      as_fn_executable_p "$ac_path_EGREP" || continue
7100# Check for GNU ac_path_EGREP and select it if it is found.
7101  # Check for GNU $ac_path_EGREP
7102case `"$ac_path_EGREP" --version 2>&1` in
7103*GNU*)
7104  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
7105*)
7106  ac_count=0
7107  printf %s 0123456789 >"conftest.in"
7108  while :
7109  do
7110    cat "conftest.in" "conftest.in" >"conftest.tmp"
7111    mv "conftest.tmp" "conftest.in"
7112    cp "conftest.in" "conftest.nl"
7113    printf "%s\n" 'EGREP' >> "conftest.nl"
7114    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
7115    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7116    as_fn_arith $ac_count + 1 && ac_count=$as_val
7117    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
7118      # Best one so far, save it but keep looking for a better one
7119      ac_cv_path_EGREP="$ac_path_EGREP"
7120      ac_path_EGREP_max=$ac_count
7121    fi
7122    # 10*(2^10) chars as input seems more than enough
7123    test $ac_count -gt 10 && break
7124  done
7125  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7126esac
7127
7128      $ac_path_EGREP_found && break 3
7129    done
7130  done
7131  done
7132IFS=$as_save_IFS
7133  if test -z "$ac_cv_path_EGREP"; then
7134    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7135  fi
7136else
7137  ac_cv_path_EGREP=$EGREP
7138fi
7139
7140   fi
7141fi
7142{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
7143printf "%s\n" "$ac_cv_path_EGREP" >&6; }
7144 EGREP="$ac_cv_path_EGREP"
7145
7146
7147{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7148printf %s "checking for fgrep... " >&6; }
7149if test ${ac_cv_path_FGREP+y}
7150then :
7151  printf %s "(cached) " >&6
7152else $as_nop
7153  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7154   then ac_cv_path_FGREP="$GREP -F"
7155   else
7156     if test -z "$FGREP"; then
7157  ac_path_FGREP_found=false
7158  # Loop through the user's path and test for each of PROGNAME-LIST
7159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7160for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7161do
7162  IFS=$as_save_IFS
7163  case $as_dir in #(((
7164    '') as_dir=./ ;;
7165    */) ;;
7166    *) as_dir=$as_dir/ ;;
7167  esac
7168    for ac_prog in fgrep
7169   do
7170    for ac_exec_ext in '' $ac_executable_extensions; do
7171      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
7172      as_fn_executable_p "$ac_path_FGREP" || continue
7173# Check for GNU ac_path_FGREP and select it if it is found.
7174  # Check for GNU $ac_path_FGREP
7175case `"$ac_path_FGREP" --version 2>&1` in
7176*GNU*)
7177  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7178*)
7179  ac_count=0
7180  printf %s 0123456789 >"conftest.in"
7181  while :
7182  do
7183    cat "conftest.in" "conftest.in" >"conftest.tmp"
7184    mv "conftest.tmp" "conftest.in"
7185    cp "conftest.in" "conftest.nl"
7186    printf "%s\n" 'FGREP' >> "conftest.nl"
7187    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7188    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7189    as_fn_arith $ac_count + 1 && ac_count=$as_val
7190    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7191      # Best one so far, save it but keep looking for a better one
7192      ac_cv_path_FGREP="$ac_path_FGREP"
7193      ac_path_FGREP_max=$ac_count
7194    fi
7195    # 10*(2^10) chars as input seems more than enough
7196    test $ac_count -gt 10 && break
7197  done
7198  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7199esac
7200
7201      $ac_path_FGREP_found && break 3
7202    done
7203  done
7204  done
7205IFS=$as_save_IFS
7206  if test -z "$ac_cv_path_FGREP"; then
7207    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7208  fi
7209else
7210  ac_cv_path_FGREP=$FGREP
7211fi
7212
7213   fi
7214fi
7215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7216printf "%s\n" "$ac_cv_path_FGREP" >&6; }
7217 FGREP="$ac_cv_path_FGREP"
7218
7219
7220test -z "$GREP" && GREP=grep
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240# Check whether --with-gnu-ld was given.
7241if test ${with_gnu_ld+y}
7242then :
7243  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7244else $as_nop
7245  with_gnu_ld=no
7246fi
7247
7248ac_prog=ld
7249if test yes = "$GCC"; then
7250  # Check if gcc -print-prog-name=ld gives a path.
7251  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7252printf %s "checking for ld used by $CC... " >&6; }
7253  case $host in
7254  *-*-mingw*)
7255    # gcc leaves a trailing carriage return, which upsets mingw
7256    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7257  *)
7258    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7259  esac
7260  case $ac_prog in
7261    # Accept absolute paths.
7262    [\\/]* | ?:[\\/]*)
7263      re_direlt='/[^/][^/]*/\.\./'
7264      # Canonicalize the pathname of ld
7265      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7266      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7267	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7268      done
7269      test -z "$LD" && LD=$ac_prog
7270      ;;
7271  "")
7272    # If it fails, then pretend we aren't using GCC.
7273    ac_prog=ld
7274    ;;
7275  *)
7276    # If it is relative, then search for the first ld in PATH.
7277    with_gnu_ld=unknown
7278    ;;
7279  esac
7280elif test yes = "$with_gnu_ld"; then
7281  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7282printf %s "checking for GNU ld... " >&6; }
7283else
7284  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7285printf %s "checking for non-GNU ld... " >&6; }
7286fi
7287if test ${lt_cv_path_LD+y}
7288then :
7289  printf %s "(cached) " >&6
7290else $as_nop
7291  if test -z "$LD"; then
7292  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7293  for ac_dir in $PATH; do
7294    IFS=$lt_save_ifs
7295    test -z "$ac_dir" && ac_dir=.
7296    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7297      lt_cv_path_LD=$ac_dir/$ac_prog
7298      # Check to see if the program is GNU ld.  I'd rather use --version,
7299      # but apparently some variants of GNU ld only accept -v.
7300      # Break only if it was the GNU/non-GNU ld that we prefer.
7301      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7302      *GNU* | *'with BFD'*)
7303	test no != "$with_gnu_ld" && break
7304	;;
7305      *)
7306	test yes != "$with_gnu_ld" && break
7307	;;
7308      esac
7309    fi
7310  done
7311  IFS=$lt_save_ifs
7312else
7313  lt_cv_path_LD=$LD # Let the user override the test with a path.
7314fi
7315fi
7316
7317LD=$lt_cv_path_LD
7318if test -n "$LD"; then
7319  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7320printf "%s\n" "$LD" >&6; }
7321else
7322  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323printf "%s\n" "no" >&6; }
7324fi
7325test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7327printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
7328if test ${lt_cv_prog_gnu_ld+y}
7329then :
7330  printf %s "(cached) " >&6
7331else $as_nop
7332  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7333case `$LD -v 2>&1 </dev/null` in
7334*GNU* | *'with BFD'*)
7335  lt_cv_prog_gnu_ld=yes
7336  ;;
7337*)
7338  lt_cv_prog_gnu_ld=no
7339  ;;
7340esac
7341fi
7342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7343printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
7344with_gnu_ld=$lt_cv_prog_gnu_ld
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7355printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7356if test ${lt_cv_path_NM+y}
7357then :
7358  printf %s "(cached) " >&6
7359else $as_nop
7360  if test -n "$NM"; then
7361  # Let the user override the test.
7362  lt_cv_path_NM=$NM
7363else
7364  lt_nm_to_check=${ac_tool_prefix}nm
7365  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7366    lt_nm_to_check="$lt_nm_to_check nm"
7367  fi
7368  for lt_tmp_nm in $lt_nm_to_check; do
7369    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7370    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7371      IFS=$lt_save_ifs
7372      test -z "$ac_dir" && ac_dir=.
7373      tmp_nm=$ac_dir/$lt_tmp_nm
7374      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7375	# Check to see if the nm accepts a BSD-compat flag.
7376	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7377	#   nm: unknown option "B" ignored
7378	# Tru64's nm complains that /dev/null is an invalid object file
7379	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7380	case $build_os in
7381	mingw*) lt_bad_file=conftest.nm/nofile ;;
7382	*) lt_bad_file=/dev/null ;;
7383	esac
7384	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7385	*$lt_bad_file* | *'Invalid file or object type'*)
7386	  lt_cv_path_NM="$tmp_nm -B"
7387	  break 2
7388	  ;;
7389	*)
7390	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7391	  */dev/null*)
7392	    lt_cv_path_NM="$tmp_nm -p"
7393	    break 2
7394	    ;;
7395	  *)
7396	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7397	    continue # so that we can try to find one that supports BSD flags
7398	    ;;
7399	  esac
7400	  ;;
7401	esac
7402      fi
7403    done
7404    IFS=$lt_save_ifs
7405  done
7406  : ${lt_cv_path_NM=no}
7407fi
7408fi
7409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7410printf "%s\n" "$lt_cv_path_NM" >&6; }
7411if test no != "$lt_cv_path_NM"; then
7412  NM=$lt_cv_path_NM
7413else
7414  # Didn't find any BSD compatible name lister, look for dumpbin.
7415  if test -n "$DUMPBIN"; then :
7416    # Let the user override the test.
7417  else
7418    if test -n "$ac_tool_prefix"; then
7419  for ac_prog in dumpbin "link -dump"
7420  do
7421    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7422set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7424printf %s "checking for $ac_word... " >&6; }
7425if test ${ac_cv_prog_DUMPBIN+y}
7426then :
7427  printf %s "(cached) " >&6
7428else $as_nop
7429  if test -n "$DUMPBIN"; then
7430  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7431else
7432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7433for as_dir in $PATH
7434do
7435  IFS=$as_save_IFS
7436  case $as_dir in #(((
7437    '') as_dir=./ ;;
7438    */) ;;
7439    *) as_dir=$as_dir/ ;;
7440  esac
7441    for ac_exec_ext in '' $ac_executable_extensions; do
7442  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7443    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7444    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7445    break 2
7446  fi
7447done
7448  done
7449IFS=$as_save_IFS
7450
7451fi
7452fi
7453DUMPBIN=$ac_cv_prog_DUMPBIN
7454if test -n "$DUMPBIN"; then
7455  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7456printf "%s\n" "$DUMPBIN" >&6; }
7457else
7458  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459printf "%s\n" "no" >&6; }
7460fi
7461
7462
7463    test -n "$DUMPBIN" && break
7464  done
7465fi
7466if test -z "$DUMPBIN"; then
7467  ac_ct_DUMPBIN=$DUMPBIN
7468  for ac_prog in dumpbin "link -dump"
7469do
7470  # Extract the first word of "$ac_prog", so it can be a program name with args.
7471set dummy $ac_prog; ac_word=$2
7472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7473printf %s "checking for $ac_word... " >&6; }
7474if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
7475then :
7476  printf %s "(cached) " >&6
7477else $as_nop
7478  if test -n "$ac_ct_DUMPBIN"; then
7479  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7480else
7481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7482for as_dir in $PATH
7483do
7484  IFS=$as_save_IFS
7485  case $as_dir in #(((
7486    '') as_dir=./ ;;
7487    */) ;;
7488    *) as_dir=$as_dir/ ;;
7489  esac
7490    for ac_exec_ext in '' $ac_executable_extensions; do
7491  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7492    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7493    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7494    break 2
7495  fi
7496done
7497  done
7498IFS=$as_save_IFS
7499
7500fi
7501fi
7502ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7503if test -n "$ac_ct_DUMPBIN"; then
7504  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7505printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
7506else
7507  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7508printf "%s\n" "no" >&6; }
7509fi
7510
7511
7512  test -n "$ac_ct_DUMPBIN" && break
7513done
7514
7515  if test "x$ac_ct_DUMPBIN" = x; then
7516    DUMPBIN=":"
7517  else
7518    case $cross_compiling:$ac_tool_warned in
7519yes:)
7520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7521printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7522ac_tool_warned=yes ;;
7523esac
7524    DUMPBIN=$ac_ct_DUMPBIN
7525  fi
7526fi
7527
7528    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7529    *COFF*)
7530      DUMPBIN="$DUMPBIN -symbols -headers"
7531      ;;
7532    *)
7533      DUMPBIN=:
7534      ;;
7535    esac
7536  fi
7537
7538  if test : != "$DUMPBIN"; then
7539    NM=$DUMPBIN
7540  fi
7541fi
7542test -z "$NM" && NM=nm
7543
7544
7545
7546
7547
7548
7549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7550printf %s "checking the name lister ($NM) interface... " >&6; }
7551if test ${lt_cv_nm_interface+y}
7552then :
7553  printf %s "(cached) " >&6
7554else $as_nop
7555  lt_cv_nm_interface="BSD nm"
7556  echo "int some_variable = 0;" > conftest.$ac_ext
7557  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7558  (eval "$ac_compile" 2>conftest.err)
7559  cat conftest.err >&5
7560  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7561  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7562  cat conftest.err >&5
7563  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7564  cat conftest.out >&5
7565  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7566    lt_cv_nm_interface="MS dumpbin"
7567  fi
7568  rm -f conftest*
7569fi
7570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7571printf "%s\n" "$lt_cv_nm_interface" >&6; }
7572
7573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7574printf %s "checking whether ln -s works... " >&6; }
7575LN_S=$as_ln_s
7576if test "$LN_S" = "ln -s"; then
7577  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7578printf "%s\n" "yes" >&6; }
7579else
7580  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7581printf "%s\n" "no, using $LN_S" >&6; }
7582fi
7583
7584# find the maximum length of command line arguments
7585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7586printf %s "checking the maximum length of command line arguments... " >&6; }
7587if test ${lt_cv_sys_max_cmd_len+y}
7588then :
7589  printf %s "(cached) " >&6
7590else $as_nop
7591    i=0
7592  teststring=ABCD
7593
7594  case $build_os in
7595  msdosdjgpp*)
7596    # On DJGPP, this test can blow up pretty badly due to problems in libc
7597    # (any single argument exceeding 2000 bytes causes a buffer overrun
7598    # during glob expansion).  Even if it were fixed, the result of this
7599    # check would be larger than it should be.
7600    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7601    ;;
7602
7603  gnu*)
7604    # Under GNU Hurd, this test is not required because there is
7605    # no limit to the length of command line arguments.
7606    # Libtool will interpret -1 as no limit whatsoever
7607    lt_cv_sys_max_cmd_len=-1;
7608    ;;
7609
7610  cygwin* | mingw* | cegcc*)
7611    # On Win9x/ME, this test blows up -- it succeeds, but takes
7612    # about 5 minutes as the teststring grows exponentially.
7613    # Worse, since 9x/ME are not pre-emptively multitasking,
7614    # you end up with a "frozen" computer, even though with patience
7615    # the test eventually succeeds (with a max line length of 256k).
7616    # Instead, let's just punt: use the minimum linelength reported by
7617    # all of the supported platforms: 8192 (on NT/2K/XP).
7618    lt_cv_sys_max_cmd_len=8192;
7619    ;;
7620
7621  mint*)
7622    # On MiNT this can take a long time and run out of memory.
7623    lt_cv_sys_max_cmd_len=8192;
7624    ;;
7625
7626  amigaos*)
7627    # On AmigaOS with pdksh, this test takes hours, literally.
7628    # So we just punt and use a minimum line length of 8192.
7629    lt_cv_sys_max_cmd_len=8192;
7630    ;;
7631
7632  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7633    # This has been around since 386BSD, at least.  Likely further.
7634    if test -x /sbin/sysctl; then
7635      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7636    elif test -x /usr/sbin/sysctl; then
7637      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7638    else
7639      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7640    fi
7641    # And add a safety zone
7642    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7643    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7644    ;;
7645
7646  interix*)
7647    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7648    lt_cv_sys_max_cmd_len=196608
7649    ;;
7650
7651  os2*)
7652    # The test takes a long time on OS/2.
7653    lt_cv_sys_max_cmd_len=8192
7654    ;;
7655
7656  osf*)
7657    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7658    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7659    # nice to cause kernel panics so lets avoid the loop below.
7660    # First set a reasonable default.
7661    lt_cv_sys_max_cmd_len=16384
7662    #
7663    if test -x /sbin/sysconfig; then
7664      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7665        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7666      esac
7667    fi
7668    ;;
7669  sco3.2v5*)
7670    lt_cv_sys_max_cmd_len=102400
7671    ;;
7672  sysv5* | sco5v6* | sysv4.2uw2*)
7673    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7674    if test -n "$kargmax"; then
7675      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7676    else
7677      lt_cv_sys_max_cmd_len=32768
7678    fi
7679    ;;
7680  *)
7681    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7682    if test -n "$lt_cv_sys_max_cmd_len" && \
7683       test undefined != "$lt_cv_sys_max_cmd_len"; then
7684      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7685      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7686    else
7687      # Make teststring a little bigger before we do anything with it.
7688      # a 1K string should be a reasonable start.
7689      for i in 1 2 3 4 5 6 7 8; do
7690        teststring=$teststring$teststring
7691      done
7692      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7693      # If test is not a shell built-in, we'll probably end up computing a
7694      # maximum length that is only half of the actual maximum length, but
7695      # we can't tell.
7696      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7697	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7698	      test 17 != "$i" # 1/2 MB should be enough
7699      do
7700        i=`expr $i + 1`
7701        teststring=$teststring$teststring
7702      done
7703      # Only check the string length outside the loop.
7704      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7705      teststring=
7706      # Add a significant safety factor because C++ compilers can tack on
7707      # massive amounts of additional arguments before passing them to the
7708      # linker.  It appears as though 1/2 is a usable value.
7709      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7710    fi
7711    ;;
7712  esac
7713
7714fi
7715
7716if test -n "$lt_cv_sys_max_cmd_len"; then
7717  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7718printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
7719else
7720  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
7721printf "%s\n" "none" >&6; }
7722fi
7723max_cmd_len=$lt_cv_sys_max_cmd_len
7724
7725
7726
7727
7728
7729
7730: ${CP="cp -f"}
7731: ${MV="mv -f"}
7732: ${RM="rm -f"}
7733
7734if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7735  lt_unset=unset
7736else
7737  lt_unset=false
7738fi
7739
7740
7741
7742
7743
7744# test EBCDIC or ASCII
7745case `echo X|tr X '\101'` in
7746 A) # ASCII based system
7747    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7748  lt_SP2NL='tr \040 \012'
7749  lt_NL2SP='tr \015\012 \040\040'
7750  ;;
7751 *) # EBCDIC based system
7752  lt_SP2NL='tr \100 \n'
7753  lt_NL2SP='tr \r\n \100\100'
7754  ;;
7755esac
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7766printf %s "checking how to convert $build file names to $host format... " >&6; }
7767if test ${lt_cv_to_host_file_cmd+y}
7768then :
7769  printf %s "(cached) " >&6
7770else $as_nop
7771  case $host in
7772  *-*-mingw* )
7773    case $build in
7774      *-*-mingw* ) # actually msys
7775        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7776        ;;
7777      *-*-cygwin* )
7778        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7779        ;;
7780      * ) # otherwise, assume *nix
7781        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7782        ;;
7783    esac
7784    ;;
7785  *-*-cygwin* )
7786    case $build in
7787      *-*-mingw* ) # actually msys
7788        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7789        ;;
7790      *-*-cygwin* )
7791        lt_cv_to_host_file_cmd=func_convert_file_noop
7792        ;;
7793      * ) # otherwise, assume *nix
7794        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7795        ;;
7796    esac
7797    ;;
7798  * ) # unhandled hosts (and "normal" native builds)
7799    lt_cv_to_host_file_cmd=func_convert_file_noop
7800    ;;
7801esac
7802
7803fi
7804
7805to_host_file_cmd=$lt_cv_to_host_file_cmd
7806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7807printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
7808
7809
7810
7811
7812
7813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7814printf %s "checking how to convert $build file names to toolchain format... " >&6; }
7815if test ${lt_cv_to_tool_file_cmd+y}
7816then :
7817  printf %s "(cached) " >&6
7818else $as_nop
7819  #assume ordinary cross tools, or native build.
7820lt_cv_to_tool_file_cmd=func_convert_file_noop
7821case $host in
7822  *-*-mingw* )
7823    case $build in
7824      *-*-mingw* ) # actually msys
7825        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7826        ;;
7827    esac
7828    ;;
7829esac
7830
7831fi
7832
7833to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7835printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
7836
7837
7838
7839
7840
7841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7842printf %s "checking for $LD option to reload object files... " >&6; }
7843if test ${lt_cv_ld_reload_flag+y}
7844then :
7845  printf %s "(cached) " >&6
7846else $as_nop
7847  lt_cv_ld_reload_flag='-r'
7848fi
7849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
7850printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
7851reload_flag=$lt_cv_ld_reload_flag
7852case $reload_flag in
7853"" | " "*) ;;
7854*) reload_flag=" $reload_flag" ;;
7855esac
7856reload_cmds='$LD$reload_flag -o $output$reload_objs'
7857case $host_os in
7858  cygwin* | mingw* | pw32* | cegcc*)
7859    if test yes != "$GCC"; then
7860      reload_cmds=false
7861    fi
7862    ;;
7863  darwin*)
7864    if test yes = "$GCC"; then
7865      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
7866    else
7867      reload_cmds='$LD$reload_flag -o $output$reload_objs'
7868    fi
7869    ;;
7870esac
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880if test -n "$ac_tool_prefix"; then
7881  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
7882set dummy ${ac_tool_prefix}objdump; ac_word=$2
7883{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7884printf %s "checking for $ac_word... " >&6; }
7885if test ${ac_cv_prog_OBJDUMP+y}
7886then :
7887  printf %s "(cached) " >&6
7888else $as_nop
7889  if test -n "$OBJDUMP"; then
7890  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
7891else
7892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7893for as_dir in $PATH
7894do
7895  IFS=$as_save_IFS
7896  case $as_dir in #(((
7897    '') as_dir=./ ;;
7898    */) ;;
7899    *) as_dir=$as_dir/ ;;
7900  esac
7901    for ac_exec_ext in '' $ac_executable_extensions; do
7902  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7903    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
7904    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7905    break 2
7906  fi
7907done
7908  done
7909IFS=$as_save_IFS
7910
7911fi
7912fi
7913OBJDUMP=$ac_cv_prog_OBJDUMP
7914if test -n "$OBJDUMP"; then
7915  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
7916printf "%s\n" "$OBJDUMP" >&6; }
7917else
7918  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7919printf "%s\n" "no" >&6; }
7920fi
7921
7922
7923fi
7924if test -z "$ac_cv_prog_OBJDUMP"; then
7925  ac_ct_OBJDUMP=$OBJDUMP
7926  # Extract the first word of "objdump", so it can be a program name with args.
7927set dummy objdump; ac_word=$2
7928{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7929printf %s "checking for $ac_word... " >&6; }
7930if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
7931then :
7932  printf %s "(cached) " >&6
7933else $as_nop
7934  if test -n "$ac_ct_OBJDUMP"; then
7935  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
7936else
7937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7938for as_dir in $PATH
7939do
7940  IFS=$as_save_IFS
7941  case $as_dir in #(((
7942    '') as_dir=./ ;;
7943    */) ;;
7944    *) as_dir=$as_dir/ ;;
7945  esac
7946    for ac_exec_ext in '' $ac_executable_extensions; do
7947  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7948    ac_cv_prog_ac_ct_OBJDUMP="objdump"
7949    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7950    break 2
7951  fi
7952done
7953  done
7954IFS=$as_save_IFS
7955
7956fi
7957fi
7958ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
7959if test -n "$ac_ct_OBJDUMP"; then
7960  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
7961printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
7962else
7963  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964printf "%s\n" "no" >&6; }
7965fi
7966
7967  if test "x$ac_ct_OBJDUMP" = x; then
7968    OBJDUMP="false"
7969  else
7970    case $cross_compiling:$ac_tool_warned in
7971yes:)
7972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7973printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7974ac_tool_warned=yes ;;
7975esac
7976    OBJDUMP=$ac_ct_OBJDUMP
7977  fi
7978else
7979  OBJDUMP="$ac_cv_prog_OBJDUMP"
7980fi
7981
7982test -z "$OBJDUMP" && OBJDUMP=objdump
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
7993printf %s "checking how to recognize dependent libraries... " >&6; }
7994if test ${lt_cv_deplibs_check_method+y}
7995then :
7996  printf %s "(cached) " >&6
7997else $as_nop
7998  lt_cv_file_magic_cmd='$MAGIC_CMD'
7999lt_cv_file_magic_test_file=
8000lt_cv_deplibs_check_method='unknown'
8001# Need to set the preceding variable on all platforms that support
8002# interlibrary dependencies.
8003# 'none' -- dependencies not supported.
8004# 'unknown' -- same as none, but documents that we really don't know.
8005# 'pass_all' -- all dependencies passed with no checks.
8006# 'test_compile' -- check by making test program.
8007# 'file_magic [[regex]]' -- check by looking for files in library path
8008# that responds to the $file_magic_cmd with a given extended regex.
8009# If you have 'file' or equivalent on your system and you're not sure
8010# whether 'pass_all' will *always* work, you probably want this one.
8011
8012case $host_os in
8013aix[4-9]*)
8014  lt_cv_deplibs_check_method=pass_all
8015  ;;
8016
8017beos*)
8018  lt_cv_deplibs_check_method=pass_all
8019  ;;
8020
8021bsdi[45]*)
8022  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8023  lt_cv_file_magic_cmd='/usr/bin/file -L'
8024  lt_cv_file_magic_test_file=/shlib/libc.so
8025  ;;
8026
8027cygwin*)
8028  # func_win32_libid is a shell function defined in ltmain.sh
8029  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8030  lt_cv_file_magic_cmd='func_win32_libid'
8031  ;;
8032
8033mingw* | pw32*)
8034  # Base MSYS/MinGW do not provide the 'file' command needed by
8035  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8036  # unless we find 'file', for example because we are cross-compiling.
8037  if ( file / ) >/dev/null 2>&1; then
8038    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8039    lt_cv_file_magic_cmd='func_win32_libid'
8040  else
8041    # Keep this pattern in sync with the one in func_win32_libid.
8042    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8043    lt_cv_file_magic_cmd='$OBJDUMP -f'
8044  fi
8045  ;;
8046
8047cegcc*)
8048  # use the weaker test based on 'objdump'. See mingw*.
8049  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8050  lt_cv_file_magic_cmd='$OBJDUMP -f'
8051  ;;
8052
8053darwin* | rhapsody*)
8054  lt_cv_deplibs_check_method=pass_all
8055  ;;
8056
8057freebsd* | dragonfly*)
8058  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8059    case $host_cpu in
8060    i*86 )
8061      # Not sure whether the presence of OpenBSD here was a mistake.
8062      # Let's accept both of them until this is cleared up.
8063      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8064      lt_cv_file_magic_cmd=/usr/bin/file
8065      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8066      ;;
8067    esac
8068  else
8069    lt_cv_deplibs_check_method=pass_all
8070  fi
8071  ;;
8072
8073haiku*)
8074  lt_cv_deplibs_check_method=pass_all
8075  ;;
8076
8077hpux10.20* | hpux11*)
8078  lt_cv_file_magic_cmd=/usr/bin/file
8079  case $host_cpu in
8080  ia64*)
8081    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8082    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8083    ;;
8084  hppa*64*)
8085    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]'
8086    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8087    ;;
8088  *)
8089    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8090    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8091    ;;
8092  esac
8093  ;;
8094
8095interix[3-9]*)
8096  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8097  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8098  ;;
8099
8100irix5* | irix6* | nonstopux*)
8101  case $LD in
8102  *-32|*"-32 ") libmagic=32-bit;;
8103  *-n32|*"-n32 ") libmagic=N32;;
8104  *-64|*"-64 ") libmagic=64-bit;;
8105  *) libmagic=never-match;;
8106  esac
8107  lt_cv_deplibs_check_method=pass_all
8108  ;;
8109
8110# This must be glibc/ELF.
8111linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8112  lt_cv_deplibs_check_method=pass_all
8113  ;;
8114
8115netbsd*)
8116  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8117    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8118  else
8119    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8120  fi
8121  ;;
8122
8123newos6*)
8124  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8125  lt_cv_file_magic_cmd=/usr/bin/file
8126  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8127  ;;
8128
8129*nto* | *qnx*)
8130  lt_cv_deplibs_check_method=pass_all
8131  ;;
8132
8133openbsd* | bitrig*)
8134  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8135    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8136  else
8137    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8138  fi
8139  ;;
8140
8141osf3* | osf4* | osf5*)
8142  lt_cv_deplibs_check_method=pass_all
8143  ;;
8144
8145rdos*)
8146  lt_cv_deplibs_check_method=pass_all
8147  ;;
8148
8149solaris*)
8150  lt_cv_deplibs_check_method=pass_all
8151  ;;
8152
8153sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8154  lt_cv_deplibs_check_method=pass_all
8155  ;;
8156
8157sysv4 | sysv4.3*)
8158  case $host_vendor in
8159  motorola)
8160    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]'
8161    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8162    ;;
8163  ncr)
8164    lt_cv_deplibs_check_method=pass_all
8165    ;;
8166  sequent)
8167    lt_cv_file_magic_cmd='/bin/file'
8168    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8169    ;;
8170  sni)
8171    lt_cv_file_magic_cmd='/bin/file'
8172    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8173    lt_cv_file_magic_test_file=/lib/libc.so
8174    ;;
8175  siemens)
8176    lt_cv_deplibs_check_method=pass_all
8177    ;;
8178  pc)
8179    lt_cv_deplibs_check_method=pass_all
8180    ;;
8181  esac
8182  ;;
8183
8184tpf*)
8185  lt_cv_deplibs_check_method=pass_all
8186  ;;
8187os2*)
8188  lt_cv_deplibs_check_method=pass_all
8189  ;;
8190esac
8191
8192fi
8193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8194printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
8195
8196file_magic_glob=
8197want_nocaseglob=no
8198if test "$build" = "$host"; then
8199  case $host_os in
8200  mingw* | pw32*)
8201    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8202      want_nocaseglob=yes
8203    else
8204      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8205    fi
8206    ;;
8207  esac
8208fi
8209
8210file_magic_cmd=$lt_cv_file_magic_cmd
8211deplibs_check_method=$lt_cv_deplibs_check_method
8212test -z "$deplibs_check_method" && deplibs_check_method=unknown
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235if test -n "$ac_tool_prefix"; then
8236  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8237set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8238{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8239printf %s "checking for $ac_word... " >&6; }
8240if test ${ac_cv_prog_DLLTOOL+y}
8241then :
8242  printf %s "(cached) " >&6
8243else $as_nop
8244  if test -n "$DLLTOOL"; then
8245  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8246else
8247as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8248for as_dir in $PATH
8249do
8250  IFS=$as_save_IFS
8251  case $as_dir in #(((
8252    '') as_dir=./ ;;
8253    */) ;;
8254    *) as_dir=$as_dir/ ;;
8255  esac
8256    for ac_exec_ext in '' $ac_executable_extensions; do
8257  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8258    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8259    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8260    break 2
8261  fi
8262done
8263  done
8264IFS=$as_save_IFS
8265
8266fi
8267fi
8268DLLTOOL=$ac_cv_prog_DLLTOOL
8269if test -n "$DLLTOOL"; then
8270  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8271printf "%s\n" "$DLLTOOL" >&6; }
8272else
8273  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8274printf "%s\n" "no" >&6; }
8275fi
8276
8277
8278fi
8279if test -z "$ac_cv_prog_DLLTOOL"; then
8280  ac_ct_DLLTOOL=$DLLTOOL
8281  # Extract the first word of "dlltool", so it can be a program name with args.
8282set dummy dlltool; ac_word=$2
8283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8284printf %s "checking for $ac_word... " >&6; }
8285if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
8286then :
8287  printf %s "(cached) " >&6
8288else $as_nop
8289  if test -n "$ac_ct_DLLTOOL"; then
8290  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8291else
8292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295  IFS=$as_save_IFS
8296  case $as_dir in #(((
8297    '') as_dir=./ ;;
8298    */) ;;
8299    *) as_dir=$as_dir/ ;;
8300  esac
8301    for ac_exec_ext in '' $ac_executable_extensions; do
8302  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8303    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8304    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8305    break 2
8306  fi
8307done
8308  done
8309IFS=$as_save_IFS
8310
8311fi
8312fi
8313ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8314if test -n "$ac_ct_DLLTOOL"; then
8315  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8316printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
8317else
8318  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319printf "%s\n" "no" >&6; }
8320fi
8321
8322  if test "x$ac_ct_DLLTOOL" = x; then
8323    DLLTOOL="false"
8324  else
8325    case $cross_compiling:$ac_tool_warned in
8326yes:)
8327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8328printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8329ac_tool_warned=yes ;;
8330esac
8331    DLLTOOL=$ac_ct_DLLTOOL
8332  fi
8333else
8334  DLLTOOL="$ac_cv_prog_DLLTOOL"
8335fi
8336
8337test -z "$DLLTOOL" && DLLTOOL=dlltool
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8349printf %s "checking how to associate runtime and link libraries... " >&6; }
8350if test ${lt_cv_sharedlib_from_linklib_cmd+y}
8351then :
8352  printf %s "(cached) " >&6
8353else $as_nop
8354  lt_cv_sharedlib_from_linklib_cmd='unknown'
8355
8356case $host_os in
8357cygwin* | mingw* | pw32* | cegcc*)
8358  # two different shell functions defined in ltmain.sh;
8359  # decide which one to use based on capabilities of $DLLTOOL
8360  case `$DLLTOOL --help 2>&1` in
8361  *--identify-strict*)
8362    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8363    ;;
8364  *)
8365    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8366    ;;
8367  esac
8368  ;;
8369*)
8370  # fallback: assume linklib IS sharedlib
8371  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8372  ;;
8373esac
8374
8375fi
8376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8377printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8378sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8379test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8380
8381
8382
8383
8384
8385
8386
8387if test -n "$ac_tool_prefix"; then
8388  for ac_prog in ar
8389  do
8390    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8391set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8392{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8393printf %s "checking for $ac_word... " >&6; }
8394if test ${ac_cv_prog_AR+y}
8395then :
8396  printf %s "(cached) " >&6
8397else $as_nop
8398  if test -n "$AR"; then
8399  ac_cv_prog_AR="$AR" # Let the user override the test.
8400else
8401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8402for as_dir in $PATH
8403do
8404  IFS=$as_save_IFS
8405  case $as_dir in #(((
8406    '') as_dir=./ ;;
8407    */) ;;
8408    *) as_dir=$as_dir/ ;;
8409  esac
8410    for ac_exec_ext in '' $ac_executable_extensions; do
8411  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8412    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8413    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8414    break 2
8415  fi
8416done
8417  done
8418IFS=$as_save_IFS
8419
8420fi
8421fi
8422AR=$ac_cv_prog_AR
8423if test -n "$AR"; then
8424  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8425printf "%s\n" "$AR" >&6; }
8426else
8427  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8428printf "%s\n" "no" >&6; }
8429fi
8430
8431
8432    test -n "$AR" && break
8433  done
8434fi
8435if test -z "$AR"; then
8436  ac_ct_AR=$AR
8437  for ac_prog in ar
8438do
8439  # Extract the first word of "$ac_prog", so it can be a program name with args.
8440set dummy $ac_prog; ac_word=$2
8441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8442printf %s "checking for $ac_word... " >&6; }
8443if test ${ac_cv_prog_ac_ct_AR+y}
8444then :
8445  printf %s "(cached) " >&6
8446else $as_nop
8447  if test -n "$ac_ct_AR"; then
8448  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8449else
8450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8451for as_dir in $PATH
8452do
8453  IFS=$as_save_IFS
8454  case $as_dir in #(((
8455    '') as_dir=./ ;;
8456    */) ;;
8457    *) as_dir=$as_dir/ ;;
8458  esac
8459    for ac_exec_ext in '' $ac_executable_extensions; do
8460  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8461    ac_cv_prog_ac_ct_AR="$ac_prog"
8462    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8463    break 2
8464  fi
8465done
8466  done
8467IFS=$as_save_IFS
8468
8469fi
8470fi
8471ac_ct_AR=$ac_cv_prog_ac_ct_AR
8472if test -n "$ac_ct_AR"; then
8473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8474printf "%s\n" "$ac_ct_AR" >&6; }
8475else
8476  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8477printf "%s\n" "no" >&6; }
8478fi
8479
8480
8481  test -n "$ac_ct_AR" && break
8482done
8483
8484  if test "x$ac_ct_AR" = x; then
8485    AR="false"
8486  else
8487    case $cross_compiling:$ac_tool_warned in
8488yes:)
8489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8490printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8491ac_tool_warned=yes ;;
8492esac
8493    AR=$ac_ct_AR
8494  fi
8495fi
8496
8497: ${AR=ar}
8498: ${AR_FLAGS=cru}
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8511printf %s "checking for archiver @FILE support... " >&6; }
8512if test ${lt_cv_ar_at_file+y}
8513then :
8514  printf %s "(cached) " >&6
8515else $as_nop
8516  lt_cv_ar_at_file=no
8517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8518/* end confdefs.h.  */
8519
8520int
8521main (void)
8522{
8523
8524  ;
8525  return 0;
8526}
8527_ACEOF
8528if ac_fn_c_try_compile "$LINENO"
8529then :
8530  echo conftest.$ac_objext > conftest.lst
8531      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8532      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8533  (eval $lt_ar_try) 2>&5
8534  ac_status=$?
8535  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8536  test $ac_status = 0; }
8537      if test 0 -eq "$ac_status"; then
8538	# Ensure the archiver fails upon bogus file names.
8539	rm -f conftest.$ac_objext libconftest.a
8540	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8541  (eval $lt_ar_try) 2>&5
8542  ac_status=$?
8543  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8544  test $ac_status = 0; }
8545	if test 0 -ne "$ac_status"; then
8546          lt_cv_ar_at_file=@
8547        fi
8548      fi
8549      rm -f conftest.* libconftest.a
8550
8551fi
8552rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8553
8554fi
8555{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8556printf "%s\n" "$lt_cv_ar_at_file" >&6; }
8557
8558if test no = "$lt_cv_ar_at_file"; then
8559  archiver_list_spec=
8560else
8561  archiver_list_spec=$lt_cv_ar_at_file
8562fi
8563
8564
8565
8566
8567
8568
8569
8570if test -n "$ac_tool_prefix"; then
8571  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8572set dummy ${ac_tool_prefix}strip; ac_word=$2
8573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8574printf %s "checking for $ac_word... " >&6; }
8575if test ${ac_cv_prog_STRIP+y}
8576then :
8577  printf %s "(cached) " >&6
8578else $as_nop
8579  if test -n "$STRIP"; then
8580  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8581else
8582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8583for as_dir in $PATH
8584do
8585  IFS=$as_save_IFS
8586  case $as_dir in #(((
8587    '') as_dir=./ ;;
8588    */) ;;
8589    *) as_dir=$as_dir/ ;;
8590  esac
8591    for ac_exec_ext in '' $ac_executable_extensions; do
8592  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8593    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8594    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8595    break 2
8596  fi
8597done
8598  done
8599IFS=$as_save_IFS
8600
8601fi
8602fi
8603STRIP=$ac_cv_prog_STRIP
8604if test -n "$STRIP"; then
8605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8606printf "%s\n" "$STRIP" >&6; }
8607else
8608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8609printf "%s\n" "no" >&6; }
8610fi
8611
8612
8613fi
8614if test -z "$ac_cv_prog_STRIP"; then
8615  ac_ct_STRIP=$STRIP
8616  # Extract the first word of "strip", so it can be a program name with args.
8617set dummy strip; ac_word=$2
8618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8619printf %s "checking for $ac_word... " >&6; }
8620if test ${ac_cv_prog_ac_ct_STRIP+y}
8621then :
8622  printf %s "(cached) " >&6
8623else $as_nop
8624  if test -n "$ac_ct_STRIP"; then
8625  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8626else
8627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8628for as_dir in $PATH
8629do
8630  IFS=$as_save_IFS
8631  case $as_dir in #(((
8632    '') as_dir=./ ;;
8633    */) ;;
8634    *) as_dir=$as_dir/ ;;
8635  esac
8636    for ac_exec_ext in '' $ac_executable_extensions; do
8637  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8638    ac_cv_prog_ac_ct_STRIP="strip"
8639    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8640    break 2
8641  fi
8642done
8643  done
8644IFS=$as_save_IFS
8645
8646fi
8647fi
8648ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8649if test -n "$ac_ct_STRIP"; then
8650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8651printf "%s\n" "$ac_ct_STRIP" >&6; }
8652else
8653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8654printf "%s\n" "no" >&6; }
8655fi
8656
8657  if test "x$ac_ct_STRIP" = x; then
8658    STRIP=":"
8659  else
8660    case $cross_compiling:$ac_tool_warned in
8661yes:)
8662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8663printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8664ac_tool_warned=yes ;;
8665esac
8666    STRIP=$ac_ct_STRIP
8667  fi
8668else
8669  STRIP="$ac_cv_prog_STRIP"
8670fi
8671
8672test -z "$STRIP" && STRIP=:
8673
8674
8675
8676
8677
8678
8679if test -n "$ac_tool_prefix"; then
8680  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8681set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8683printf %s "checking for $ac_word... " >&6; }
8684if test ${ac_cv_prog_RANLIB+y}
8685then :
8686  printf %s "(cached) " >&6
8687else $as_nop
8688  if test -n "$RANLIB"; then
8689  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8690else
8691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  case $as_dir in #(((
8696    '') as_dir=./ ;;
8697    */) ;;
8698    *) as_dir=$as_dir/ ;;
8699  esac
8700    for ac_exec_ext in '' $ac_executable_extensions; do
8701  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8702    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8703    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8704    break 2
8705  fi
8706done
8707  done
8708IFS=$as_save_IFS
8709
8710fi
8711fi
8712RANLIB=$ac_cv_prog_RANLIB
8713if test -n "$RANLIB"; then
8714  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8715printf "%s\n" "$RANLIB" >&6; }
8716else
8717  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8718printf "%s\n" "no" >&6; }
8719fi
8720
8721
8722fi
8723if test -z "$ac_cv_prog_RANLIB"; then
8724  ac_ct_RANLIB=$RANLIB
8725  # Extract the first word of "ranlib", so it can be a program name with args.
8726set dummy ranlib; ac_word=$2
8727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8728printf %s "checking for $ac_word... " >&6; }
8729if test ${ac_cv_prog_ac_ct_RANLIB+y}
8730then :
8731  printf %s "(cached) " >&6
8732else $as_nop
8733  if test -n "$ac_ct_RANLIB"; then
8734  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8735else
8736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8737for as_dir in $PATH
8738do
8739  IFS=$as_save_IFS
8740  case $as_dir in #(((
8741    '') as_dir=./ ;;
8742    */) ;;
8743    *) as_dir=$as_dir/ ;;
8744  esac
8745    for ac_exec_ext in '' $ac_executable_extensions; do
8746  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8747    ac_cv_prog_ac_ct_RANLIB="ranlib"
8748    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8749    break 2
8750  fi
8751done
8752  done
8753IFS=$as_save_IFS
8754
8755fi
8756fi
8757ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8758if test -n "$ac_ct_RANLIB"; then
8759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8760printf "%s\n" "$ac_ct_RANLIB" >&6; }
8761else
8762  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8763printf "%s\n" "no" >&6; }
8764fi
8765
8766  if test "x$ac_ct_RANLIB" = x; then
8767    RANLIB=":"
8768  else
8769    case $cross_compiling:$ac_tool_warned in
8770yes:)
8771{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8772printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8773ac_tool_warned=yes ;;
8774esac
8775    RANLIB=$ac_ct_RANLIB
8776  fi
8777else
8778  RANLIB="$ac_cv_prog_RANLIB"
8779fi
8780
8781test -z "$RANLIB" && RANLIB=:
8782
8783
8784
8785
8786
8787
8788# Determine commands to create old-style static archives.
8789old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8790old_postinstall_cmds='chmod 644 $oldlib'
8791old_postuninstall_cmds=
8792
8793if test -n "$RANLIB"; then
8794  case $host_os in
8795  bitrig* | openbsd*)
8796    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8797    ;;
8798  *)
8799    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8800    ;;
8801  esac
8802  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8803fi
8804
8805case $host_os in
8806  darwin*)
8807    lock_old_archive_extraction=yes ;;
8808  *)
8809    lock_old_archive_extraction=no ;;
8810esac
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850# If no C compiler was specified, use CC.
8851LTCC=${LTCC-"$CC"}
8852
8853# If no C compiler flags were specified, use CFLAGS.
8854LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
8855
8856# Allow CC to be a program name with arguments.
8857compiler=$CC
8858
8859
8860# Check for command to grab the raw symbol name followed by C symbol from nm.
8861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
8862printf %s "checking command to parse $NM output from $compiler object... " >&6; }
8863if test ${lt_cv_sys_global_symbol_pipe+y}
8864then :
8865  printf %s "(cached) " >&6
8866else $as_nop
8867
8868# These are sane defaults that work on at least a few old systems.
8869# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
8870
8871# Character class describing NM global symbol codes.
8872symcode='[BCDEGRST]'
8873
8874# Regexp to match symbols that can be accessed directly from C.
8875sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
8876
8877# Define system-specific variables.
8878case $host_os in
8879aix*)
8880  symcode='[BCDT]'
8881  ;;
8882cygwin* | mingw* | pw32* | cegcc*)
8883  symcode='[ABCDGISTW]'
8884  ;;
8885hpux*)
8886  if test ia64 = "$host_cpu"; then
8887    symcode='[ABCDEGRST]'
8888  fi
8889  ;;
8890irix* | nonstopux*)
8891  symcode='[BCDEGRST]'
8892  ;;
8893osf*)
8894  symcode='[BCDEGQRST]'
8895  ;;
8896solaris*)
8897  symcode='[BDRT]'
8898  ;;
8899sco3.2v5*)
8900  symcode='[DT]'
8901  ;;
8902sysv4.2uw2*)
8903  symcode='[DT]'
8904  ;;
8905sysv5* | sco5v6* | unixware* | OpenUNIX*)
8906  symcode='[ABDT]'
8907  ;;
8908sysv4)
8909  symcode='[DFNSTU]'
8910  ;;
8911esac
8912
8913# If we're using GNU nm, then use its standard symbol codes.
8914case `$NM -V 2>&1` in
8915*GNU* | *'with BFD'*)
8916  symcode='[ABCDGIRSTW]' ;;
8917esac
8918
8919if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8920  # Gets list of data symbols to import.
8921  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
8922  # Adjust the below global symbol transforms to fixup imported variables.
8923  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
8924  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
8925  lt_c_name_lib_hook="\
8926  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
8927  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
8928else
8929  # Disable hooks by default.
8930  lt_cv_sys_global_symbol_to_import=
8931  lt_cdecl_hook=
8932  lt_c_name_hook=
8933  lt_c_name_lib_hook=
8934fi
8935
8936# Transform an extracted symbol line into a proper C declaration.
8937# Some systems (esp. on ia64) link data and code symbols differently,
8938# so use this general approach.
8939lt_cv_sys_global_symbol_to_cdecl="sed -n"\
8940$lt_cdecl_hook\
8941" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
8942" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
8943
8944# Transform an extracted symbol line into symbol name and symbol address
8945lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
8946$lt_c_name_hook\
8947" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8948" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
8949
8950# Transform an extracted symbol line into symbol name with lib prefix and
8951# symbol address.
8952lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
8953$lt_c_name_lib_hook\
8954" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
8955" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
8956" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
8957
8958# Handle CRLF in mingw tool chain
8959opt_cr=
8960case $build_os in
8961mingw*)
8962  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
8963  ;;
8964esac
8965
8966# Try without a prefix underscore, then with it.
8967for ac_symprfx in "" "_"; do
8968
8969  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
8970  symxfrm="\\1 $ac_symprfx\\2 \\2"
8971
8972  # Write the raw and C identifiers.
8973  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8974    # Fake it for dumpbin and say T for any non-static function,
8975    # D for any global variable and I for any imported variable.
8976    # Also find C++ and __fastcall symbols from MSVC++,
8977    # which start with @ or ?.
8978    lt_cv_sys_global_symbol_pipe="$AWK '"\
8979"     {last_section=section; section=\$ 3};"\
8980"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
8981"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
8982"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
8983"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
8984"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
8985"     \$ 0!~/External *\|/{next};"\
8986"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
8987"     {if(hide[section]) next};"\
8988"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
8989"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
8990"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
8991"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
8992"     ' prfx=^$ac_symprfx"
8993  else
8994    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
8995  fi
8996  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
8997
8998  # Check to see that the pipe works correctly.
8999  pipe_works=no
9000
9001  rm -f conftest*
9002  cat > conftest.$ac_ext <<_LT_EOF
9003#ifdef __cplusplus
9004extern "C" {
9005#endif
9006char nm_test_var;
9007void nm_test_func(void);
9008void nm_test_func(void){}
9009#ifdef __cplusplus
9010}
9011#endif
9012int main(){nm_test_var='a';nm_test_func();return(0);}
9013_LT_EOF
9014
9015  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9016  (eval $ac_compile) 2>&5
9017  ac_status=$?
9018  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9019  test $ac_status = 0; }; then
9020    # Now try to grab the symbols.
9021    nlist=conftest.nm
9022    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9023  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9024  ac_status=$?
9025  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9026  test $ac_status = 0; } && test -s "$nlist"; then
9027      # Try sorting and uniquifying the output.
9028      if sort "$nlist" | uniq > "$nlist"T; then
9029	mv -f "$nlist"T "$nlist"
9030      else
9031	rm -f "$nlist"T
9032      fi
9033
9034      # Make sure that we snagged all the symbols we need.
9035      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9036	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9037	  cat <<_LT_EOF > conftest.$ac_ext
9038/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9039#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9040/* DATA imports from DLLs on WIN32 can't be const, because runtime
9041   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9042# define LT_DLSYM_CONST
9043#elif defined __osf__
9044/* This system does not cope well with relocations in const data.  */
9045# define LT_DLSYM_CONST
9046#else
9047# define LT_DLSYM_CONST const
9048#endif
9049
9050#ifdef __cplusplus
9051extern "C" {
9052#endif
9053
9054_LT_EOF
9055	  # Now generate the symbol file.
9056	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9057
9058	  cat <<_LT_EOF >> conftest.$ac_ext
9059
9060/* The mapping between symbol names and symbols.  */
9061LT_DLSYM_CONST struct {
9062  const char *name;
9063  void       *address;
9064}
9065lt__PROGRAM__LTX_preloaded_symbols[] =
9066{
9067  { "@PROGRAM@", (void *) 0 },
9068_LT_EOF
9069	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9070	  cat <<\_LT_EOF >> conftest.$ac_ext
9071  {0, (void *) 0}
9072};
9073
9074/* This works around a problem in FreeBSD linker */
9075#ifdef FREEBSD_WORKAROUND
9076static const void *lt_preloaded_setup() {
9077  return lt__PROGRAM__LTX_preloaded_symbols;
9078}
9079#endif
9080
9081#ifdef __cplusplus
9082}
9083#endif
9084_LT_EOF
9085	  # Now try linking the two files.
9086	  mv conftest.$ac_objext conftstm.$ac_objext
9087	  lt_globsym_save_LIBS=$LIBS
9088	  lt_globsym_save_CFLAGS=$CFLAGS
9089	  LIBS=conftstm.$ac_objext
9090	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9091	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9092  (eval $ac_link) 2>&5
9093  ac_status=$?
9094  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9095  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9096	    pipe_works=yes
9097	  fi
9098	  LIBS=$lt_globsym_save_LIBS
9099	  CFLAGS=$lt_globsym_save_CFLAGS
9100	else
9101	  echo "cannot find nm_test_func in $nlist" >&5
9102	fi
9103      else
9104	echo "cannot find nm_test_var in $nlist" >&5
9105      fi
9106    else
9107      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9108    fi
9109  else
9110    echo "$progname: failed program was:" >&5
9111    cat conftest.$ac_ext >&5
9112  fi
9113  rm -rf conftest* conftst*
9114
9115  # Do not use the global_symbol_pipe unless it works.
9116  if test yes = "$pipe_works"; then
9117    break
9118  else
9119    lt_cv_sys_global_symbol_pipe=
9120  fi
9121done
9122
9123fi
9124
9125if test -z "$lt_cv_sys_global_symbol_pipe"; then
9126  lt_cv_sys_global_symbol_to_cdecl=
9127fi
9128if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9129  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9130printf "%s\n" "failed" >&6; }
9131else
9132  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9133printf "%s\n" "ok" >&6; }
9134fi
9135
9136# Response file support.
9137if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9138  nm_file_list_spec='@'
9139elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9140  nm_file_list_spec='@'
9141fi
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9180printf %s "checking for sysroot... " >&6; }
9181
9182# Check whether --with-sysroot was given.
9183if test ${with_sysroot+y}
9184then :
9185  withval=$with_sysroot;
9186else $as_nop
9187  with_sysroot=no
9188fi
9189
9190
9191lt_sysroot=
9192case $with_sysroot in #(
9193 yes)
9194   if test yes = "$GCC"; then
9195     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9196   fi
9197   ;; #(
9198 /*)
9199   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9200   ;; #(
9201 no|'')
9202   ;; #(
9203 *)
9204   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9205printf "%s\n" "$with_sysroot" >&6; }
9206   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9207   ;;
9208esac
9209
9210 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9211printf "%s\n" "${lt_sysroot:-no}" >&6; }
9212
9213
9214
9215
9216
9217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9218printf %s "checking for a working dd... " >&6; }
9219if test ${ac_cv_path_lt_DD+y}
9220then :
9221  printf %s "(cached) " >&6
9222else $as_nop
9223  printf 0123456789abcdef0123456789abcdef >conftest.i
9224cat conftest.i conftest.i >conftest2.i
9225: ${lt_DD:=$DD}
9226if test -z "$lt_DD"; then
9227  ac_path_lt_DD_found=false
9228  # Loop through the user's path and test for each of PROGNAME-LIST
9229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9230for as_dir in $PATH
9231do
9232  IFS=$as_save_IFS
9233  case $as_dir in #(((
9234    '') as_dir=./ ;;
9235    */) ;;
9236    *) as_dir=$as_dir/ ;;
9237  esac
9238    for ac_prog in dd
9239   do
9240    for ac_exec_ext in '' $ac_executable_extensions; do
9241      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
9242      as_fn_executable_p "$ac_path_lt_DD" || continue
9243if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9244  cmp -s conftest.i conftest.out \
9245  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9246fi
9247      $ac_path_lt_DD_found && break 3
9248    done
9249  done
9250  done
9251IFS=$as_save_IFS
9252  if test -z "$ac_cv_path_lt_DD"; then
9253    :
9254  fi
9255else
9256  ac_cv_path_lt_DD=$lt_DD
9257fi
9258
9259rm -f conftest.i conftest2.i conftest.out
9260fi
9261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9262printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
9263
9264
9265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9266printf %s "checking how to truncate binary pipes... " >&6; }
9267if test ${lt_cv_truncate_bin+y}
9268then :
9269  printf %s "(cached) " >&6
9270else $as_nop
9271  printf 0123456789abcdef0123456789abcdef >conftest.i
9272cat conftest.i conftest.i >conftest2.i
9273lt_cv_truncate_bin=
9274if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9275  cmp -s conftest.i conftest.out \
9276  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9277fi
9278rm -f conftest.i conftest2.i conftest.out
9279test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9280fi
9281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9282printf "%s\n" "$lt_cv_truncate_bin" >&6; }
9283
9284
9285
9286
9287
9288
9289
9290# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9291func_cc_basename ()
9292{
9293    for cc_temp in $*""; do
9294      case $cc_temp in
9295        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9296        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9297        \-*) ;;
9298        *) break;;
9299      esac
9300    done
9301    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9302}
9303
9304# Check whether --enable-libtool-lock was given.
9305if test ${enable_libtool_lock+y}
9306then :
9307  enableval=$enable_libtool_lock;
9308fi
9309
9310test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9311
9312# Some flags need to be propagated to the compiler or linker for good
9313# libtool support.
9314case $host in
9315ia64-*-hpux*)
9316  # Find out what ABI is being produced by ac_compile, and set mode
9317  # options accordingly.
9318  echo 'int i;' > conftest.$ac_ext
9319  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9320  (eval $ac_compile) 2>&5
9321  ac_status=$?
9322  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9323  test $ac_status = 0; }; then
9324    case `/usr/bin/file conftest.$ac_objext` in
9325      *ELF-32*)
9326	HPUX_IA64_MODE=32
9327	;;
9328      *ELF-64*)
9329	HPUX_IA64_MODE=64
9330	;;
9331    esac
9332  fi
9333  rm -rf conftest*
9334  ;;
9335*-*-irix6*)
9336  # Find out what ABI is being produced by ac_compile, and set linker
9337  # options accordingly.
9338  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9339  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9340  (eval $ac_compile) 2>&5
9341  ac_status=$?
9342  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9343  test $ac_status = 0; }; then
9344    if test yes = "$lt_cv_prog_gnu_ld"; then
9345      case `/usr/bin/file conftest.$ac_objext` in
9346	*32-bit*)
9347	  LD="${LD-ld} -melf32bsmip"
9348	  ;;
9349	*N32*)
9350	  LD="${LD-ld} -melf32bmipn32"
9351	  ;;
9352	*64-bit*)
9353	  LD="${LD-ld} -melf64bmip"
9354	;;
9355      esac
9356    else
9357      case `/usr/bin/file conftest.$ac_objext` in
9358	*32-bit*)
9359	  LD="${LD-ld} -32"
9360	  ;;
9361	*N32*)
9362	  LD="${LD-ld} -n32"
9363	  ;;
9364	*64-bit*)
9365	  LD="${LD-ld} -64"
9366	  ;;
9367      esac
9368    fi
9369  fi
9370  rm -rf conftest*
9371  ;;
9372
9373mips64*-*linux*)
9374  # Find out what ABI is being produced by ac_compile, and set linker
9375  # options accordingly.
9376  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9377  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9378  (eval $ac_compile) 2>&5
9379  ac_status=$?
9380  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9381  test $ac_status = 0; }; then
9382    emul=elf
9383    case `/usr/bin/file conftest.$ac_objext` in
9384      *32-bit*)
9385	emul="${emul}32"
9386	;;
9387      *64-bit*)
9388	emul="${emul}64"
9389	;;
9390    esac
9391    case `/usr/bin/file conftest.$ac_objext` in
9392      *MSB*)
9393	emul="${emul}btsmip"
9394	;;
9395      *LSB*)
9396	emul="${emul}ltsmip"
9397	;;
9398    esac
9399    case `/usr/bin/file conftest.$ac_objext` in
9400      *N32*)
9401	emul="${emul}n32"
9402	;;
9403    esac
9404    LD="${LD-ld} -m $emul"
9405  fi
9406  rm -rf conftest*
9407  ;;
9408
9409x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9410s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9411  # Find out what ABI is being produced by ac_compile, and set linker
9412  # options accordingly.  Note that the listed cases only cover the
9413  # situations where additional linker options are needed (such as when
9414  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9415  # vice versa); the common cases where no linker options are needed do
9416  # not appear in the list.
9417  echo 'int i;' > conftest.$ac_ext
9418  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9419  (eval $ac_compile) 2>&5
9420  ac_status=$?
9421  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9422  test $ac_status = 0; }; then
9423    case `/usr/bin/file conftest.o` in
9424      *32-bit*)
9425	case $host in
9426	  x86_64-*kfreebsd*-gnu)
9427	    LD="${LD-ld} -m elf_i386_fbsd"
9428	    ;;
9429	  x86_64-*linux*)
9430	    case `/usr/bin/file conftest.o` in
9431	      *x86-64*)
9432		LD="${LD-ld} -m elf32_x86_64"
9433		;;
9434	      *)
9435		LD="${LD-ld} -m elf_i386"
9436		;;
9437	    esac
9438	    ;;
9439	  powerpc64le-*linux*)
9440	    LD="${LD-ld} -m elf32lppclinux"
9441	    ;;
9442	  powerpc64-*linux*)
9443	    LD="${LD-ld} -m elf32ppclinux"
9444	    ;;
9445	  s390x-*linux*)
9446	    LD="${LD-ld} -m elf_s390"
9447	    ;;
9448	  sparc64-*linux*)
9449	    LD="${LD-ld} -m elf32_sparc"
9450	    ;;
9451	esac
9452	;;
9453      *64-bit*)
9454	case $host in
9455	  x86_64-*kfreebsd*-gnu)
9456	    LD="${LD-ld} -m elf_x86_64_fbsd"
9457	    ;;
9458	  x86_64-*linux*)
9459	    LD="${LD-ld} -m elf_x86_64"
9460	    ;;
9461	  powerpcle-*linux*)
9462	    LD="${LD-ld} -m elf64lppc"
9463	    ;;
9464	  powerpc-*linux*)
9465	    LD="${LD-ld} -m elf64ppc"
9466	    ;;
9467	  s390*-*linux*|s390*-*tpf*)
9468	    LD="${LD-ld} -m elf64_s390"
9469	    ;;
9470	  sparc*-*linux*)
9471	    LD="${LD-ld} -m elf64_sparc"
9472	    ;;
9473	esac
9474	;;
9475    esac
9476  fi
9477  rm -rf conftest*
9478  ;;
9479
9480*-*-sco3.2v5*)
9481  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9482  SAVE_CFLAGS=$CFLAGS
9483  CFLAGS="$CFLAGS -belf"
9484  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9485printf %s "checking whether the C compiler needs -belf... " >&6; }
9486if test ${lt_cv_cc_needs_belf+y}
9487then :
9488  printf %s "(cached) " >&6
9489else $as_nop
9490  ac_ext=c
9491ac_cpp='$CPP $CPPFLAGS'
9492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9494ac_compiler_gnu=$ac_cv_c_compiler_gnu
9495
9496     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9497/* end confdefs.h.  */
9498
9499int
9500main (void)
9501{
9502
9503  ;
9504  return 0;
9505}
9506_ACEOF
9507if ac_fn_c_try_link "$LINENO"
9508then :
9509  lt_cv_cc_needs_belf=yes
9510else $as_nop
9511  lt_cv_cc_needs_belf=no
9512fi
9513rm -f core conftest.err conftest.$ac_objext conftest.beam \
9514    conftest$ac_exeext conftest.$ac_ext
9515     ac_ext=c
9516ac_cpp='$CPP $CPPFLAGS'
9517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9519ac_compiler_gnu=$ac_cv_c_compiler_gnu
9520
9521fi
9522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9523printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
9524  if test yes != "$lt_cv_cc_needs_belf"; then
9525    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9526    CFLAGS=$SAVE_CFLAGS
9527  fi
9528  ;;
9529*-*solaris*)
9530  # Find out what ABI is being produced by ac_compile, and set linker
9531  # options accordingly.
9532  echo 'int i;' > conftest.$ac_ext
9533  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9534  (eval $ac_compile) 2>&5
9535  ac_status=$?
9536  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9537  test $ac_status = 0; }; then
9538    case `/usr/bin/file conftest.o` in
9539    *64-bit*)
9540      case $lt_cv_prog_gnu_ld in
9541      yes*)
9542        case $host in
9543        i?86-*-solaris*|x86_64-*-solaris*)
9544          LD="${LD-ld} -m elf_x86_64"
9545          ;;
9546        sparc*-*-solaris*)
9547          LD="${LD-ld} -m elf64_sparc"
9548          ;;
9549        esac
9550        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9551        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9552          LD=${LD-ld}_sol2
9553        fi
9554        ;;
9555      *)
9556	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9557	  LD="${LD-ld} -64"
9558	fi
9559	;;
9560      esac
9561      ;;
9562    esac
9563  fi
9564  rm -rf conftest*
9565  ;;
9566esac
9567
9568need_locks=$enable_libtool_lock
9569
9570if test -n "$ac_tool_prefix"; then
9571  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9572set dummy ${ac_tool_prefix}mt; ac_word=$2
9573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9574printf %s "checking for $ac_word... " >&6; }
9575if test ${ac_cv_prog_MANIFEST_TOOL+y}
9576then :
9577  printf %s "(cached) " >&6
9578else $as_nop
9579  if test -n "$MANIFEST_TOOL"; then
9580  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9581else
9582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9583for as_dir in $PATH
9584do
9585  IFS=$as_save_IFS
9586  case $as_dir in #(((
9587    '') as_dir=./ ;;
9588    */) ;;
9589    *) as_dir=$as_dir/ ;;
9590  esac
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9593    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9594    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601fi
9602fi
9603MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9604if test -n "$MANIFEST_TOOL"; then
9605  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9606printf "%s\n" "$MANIFEST_TOOL" >&6; }
9607else
9608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609printf "%s\n" "no" >&6; }
9610fi
9611
9612
9613fi
9614if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9615  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9616  # Extract the first word of "mt", so it can be a program name with args.
9617set dummy mt; ac_word=$2
9618{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9619printf %s "checking for $ac_word... " >&6; }
9620if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
9621then :
9622  printf %s "(cached) " >&6
9623else $as_nop
9624  if test -n "$ac_ct_MANIFEST_TOOL"; then
9625  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9626else
9627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628for as_dir in $PATH
9629do
9630  IFS=$as_save_IFS
9631  case $as_dir in #(((
9632    '') as_dir=./ ;;
9633    */) ;;
9634    *) as_dir=$as_dir/ ;;
9635  esac
9636    for ac_exec_ext in '' $ac_executable_extensions; do
9637  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9638    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9639    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9640    break 2
9641  fi
9642done
9643  done
9644IFS=$as_save_IFS
9645
9646fi
9647fi
9648ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9649if test -n "$ac_ct_MANIFEST_TOOL"; then
9650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9651printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
9652else
9653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9654printf "%s\n" "no" >&6; }
9655fi
9656
9657  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9658    MANIFEST_TOOL=":"
9659  else
9660    case $cross_compiling:$ac_tool_warned in
9661yes:)
9662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9663printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9664ac_tool_warned=yes ;;
9665esac
9666    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9667  fi
9668else
9669  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9670fi
9671
9672test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9674printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9675if test ${lt_cv_path_mainfest_tool+y}
9676then :
9677  printf %s "(cached) " >&6
9678else $as_nop
9679  lt_cv_path_mainfest_tool=no
9680  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9681  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9682  cat conftest.err >&5
9683  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9684    lt_cv_path_mainfest_tool=yes
9685  fi
9686  rm -f conftest*
9687fi
9688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9689printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
9690if test yes != "$lt_cv_path_mainfest_tool"; then
9691  MANIFEST_TOOL=:
9692fi
9693
9694
9695
9696
9697
9698
9699  case $host_os in
9700    rhapsody* | darwin*)
9701    if test -n "$ac_tool_prefix"; then
9702  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9703set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9705printf %s "checking for $ac_word... " >&6; }
9706if test ${ac_cv_prog_DSYMUTIL+y}
9707then :
9708  printf %s "(cached) " >&6
9709else $as_nop
9710  if test -n "$DSYMUTIL"; then
9711  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9712else
9713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714for as_dir in $PATH
9715do
9716  IFS=$as_save_IFS
9717  case $as_dir in #(((
9718    '') as_dir=./ ;;
9719    */) ;;
9720    *) as_dir=$as_dir/ ;;
9721  esac
9722    for ac_exec_ext in '' $ac_executable_extensions; do
9723  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9724    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9725    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9726    break 2
9727  fi
9728done
9729  done
9730IFS=$as_save_IFS
9731
9732fi
9733fi
9734DSYMUTIL=$ac_cv_prog_DSYMUTIL
9735if test -n "$DSYMUTIL"; then
9736  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9737printf "%s\n" "$DSYMUTIL" >&6; }
9738else
9739  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9740printf "%s\n" "no" >&6; }
9741fi
9742
9743
9744fi
9745if test -z "$ac_cv_prog_DSYMUTIL"; then
9746  ac_ct_DSYMUTIL=$DSYMUTIL
9747  # Extract the first word of "dsymutil", so it can be a program name with args.
9748set dummy dsymutil; ac_word=$2
9749{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9750printf %s "checking for $ac_word... " >&6; }
9751if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
9752then :
9753  printf %s "(cached) " >&6
9754else $as_nop
9755  if test -n "$ac_ct_DSYMUTIL"; then
9756  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9757else
9758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9759for as_dir in $PATH
9760do
9761  IFS=$as_save_IFS
9762  case $as_dir in #(((
9763    '') as_dir=./ ;;
9764    */) ;;
9765    *) as_dir=$as_dir/ ;;
9766  esac
9767    for ac_exec_ext in '' $ac_executable_extensions; do
9768  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9769    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9770    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9771    break 2
9772  fi
9773done
9774  done
9775IFS=$as_save_IFS
9776
9777fi
9778fi
9779ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9780if test -n "$ac_ct_DSYMUTIL"; then
9781  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9782printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
9783else
9784  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9785printf "%s\n" "no" >&6; }
9786fi
9787
9788  if test "x$ac_ct_DSYMUTIL" = x; then
9789    DSYMUTIL=":"
9790  else
9791    case $cross_compiling:$ac_tool_warned in
9792yes:)
9793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9794printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9795ac_tool_warned=yes ;;
9796esac
9797    DSYMUTIL=$ac_ct_DSYMUTIL
9798  fi
9799else
9800  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9801fi
9802
9803    if test -n "$ac_tool_prefix"; then
9804  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9805set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9807printf %s "checking for $ac_word... " >&6; }
9808if test ${ac_cv_prog_NMEDIT+y}
9809then :
9810  printf %s "(cached) " >&6
9811else $as_nop
9812  if test -n "$NMEDIT"; then
9813  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9814else
9815as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9816for as_dir in $PATH
9817do
9818  IFS=$as_save_IFS
9819  case $as_dir in #(((
9820    '') as_dir=./ ;;
9821    */) ;;
9822    *) as_dir=$as_dir/ ;;
9823  esac
9824    for ac_exec_ext in '' $ac_executable_extensions; do
9825  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9826    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9827    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9828    break 2
9829  fi
9830done
9831  done
9832IFS=$as_save_IFS
9833
9834fi
9835fi
9836NMEDIT=$ac_cv_prog_NMEDIT
9837if test -n "$NMEDIT"; then
9838  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9839printf "%s\n" "$NMEDIT" >&6; }
9840else
9841  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842printf "%s\n" "no" >&6; }
9843fi
9844
9845
9846fi
9847if test -z "$ac_cv_prog_NMEDIT"; then
9848  ac_ct_NMEDIT=$NMEDIT
9849  # Extract the first word of "nmedit", so it can be a program name with args.
9850set dummy nmedit; ac_word=$2
9851{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9852printf %s "checking for $ac_word... " >&6; }
9853if test ${ac_cv_prog_ac_ct_NMEDIT+y}
9854then :
9855  printf %s "(cached) " >&6
9856else $as_nop
9857  if test -n "$ac_ct_NMEDIT"; then
9858  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
9859else
9860as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9861for as_dir in $PATH
9862do
9863  IFS=$as_save_IFS
9864  case $as_dir in #(((
9865    '') as_dir=./ ;;
9866    */) ;;
9867    *) as_dir=$as_dir/ ;;
9868  esac
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9871    ac_cv_prog_ac_ct_NMEDIT="nmedit"
9872    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879fi
9880fi
9881ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
9882if test -n "$ac_ct_NMEDIT"; then
9883  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
9884printf "%s\n" "$ac_ct_NMEDIT" >&6; }
9885else
9886  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9887printf "%s\n" "no" >&6; }
9888fi
9889
9890  if test "x$ac_ct_NMEDIT" = x; then
9891    NMEDIT=":"
9892  else
9893    case $cross_compiling:$ac_tool_warned in
9894yes:)
9895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9896printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9897ac_tool_warned=yes ;;
9898esac
9899    NMEDIT=$ac_ct_NMEDIT
9900  fi
9901else
9902  NMEDIT="$ac_cv_prog_NMEDIT"
9903fi
9904
9905    if test -n "$ac_tool_prefix"; then
9906  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
9907set dummy ${ac_tool_prefix}lipo; ac_word=$2
9908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9909printf %s "checking for $ac_word... " >&6; }
9910if test ${ac_cv_prog_LIPO+y}
9911then :
9912  printf %s "(cached) " >&6
9913else $as_nop
9914  if test -n "$LIPO"; then
9915  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
9916else
9917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9918for as_dir in $PATH
9919do
9920  IFS=$as_save_IFS
9921  case $as_dir in #(((
9922    '') as_dir=./ ;;
9923    */) ;;
9924    *) as_dir=$as_dir/ ;;
9925  esac
9926    for ac_exec_ext in '' $ac_executable_extensions; do
9927  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9928    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
9929    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9930    break 2
9931  fi
9932done
9933  done
9934IFS=$as_save_IFS
9935
9936fi
9937fi
9938LIPO=$ac_cv_prog_LIPO
9939if test -n "$LIPO"; then
9940  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
9941printf "%s\n" "$LIPO" >&6; }
9942else
9943  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9944printf "%s\n" "no" >&6; }
9945fi
9946
9947
9948fi
9949if test -z "$ac_cv_prog_LIPO"; then
9950  ac_ct_LIPO=$LIPO
9951  # Extract the first word of "lipo", so it can be a program name with args.
9952set dummy lipo; ac_word=$2
9953{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9954printf %s "checking for $ac_word... " >&6; }
9955if test ${ac_cv_prog_ac_ct_LIPO+y}
9956then :
9957  printf %s "(cached) " >&6
9958else $as_nop
9959  if test -n "$ac_ct_LIPO"; then
9960  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
9961else
9962as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9963for as_dir in $PATH
9964do
9965  IFS=$as_save_IFS
9966  case $as_dir in #(((
9967    '') as_dir=./ ;;
9968    */) ;;
9969    *) as_dir=$as_dir/ ;;
9970  esac
9971    for ac_exec_ext in '' $ac_executable_extensions; do
9972  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9973    ac_cv_prog_ac_ct_LIPO="lipo"
9974    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9975    break 2
9976  fi
9977done
9978  done
9979IFS=$as_save_IFS
9980
9981fi
9982fi
9983ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
9984if test -n "$ac_ct_LIPO"; then
9985  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
9986printf "%s\n" "$ac_ct_LIPO" >&6; }
9987else
9988  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989printf "%s\n" "no" >&6; }
9990fi
9991
9992  if test "x$ac_ct_LIPO" = x; then
9993    LIPO=":"
9994  else
9995    case $cross_compiling:$ac_tool_warned in
9996yes:)
9997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9998printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9999ac_tool_warned=yes ;;
10000esac
10001    LIPO=$ac_ct_LIPO
10002  fi
10003else
10004  LIPO="$ac_cv_prog_LIPO"
10005fi
10006
10007    if test -n "$ac_tool_prefix"; then
10008  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10009set dummy ${ac_tool_prefix}otool; ac_word=$2
10010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10011printf %s "checking for $ac_word... " >&6; }
10012if test ${ac_cv_prog_OTOOL+y}
10013then :
10014  printf %s "(cached) " >&6
10015else $as_nop
10016  if test -n "$OTOOL"; then
10017  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10018else
10019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10020for as_dir in $PATH
10021do
10022  IFS=$as_save_IFS
10023  case $as_dir in #(((
10024    '') as_dir=./ ;;
10025    */) ;;
10026    *) as_dir=$as_dir/ ;;
10027  esac
10028    for ac_exec_ext in '' $ac_executable_extensions; do
10029  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10030    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10031    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10032    break 2
10033  fi
10034done
10035  done
10036IFS=$as_save_IFS
10037
10038fi
10039fi
10040OTOOL=$ac_cv_prog_OTOOL
10041if test -n "$OTOOL"; then
10042  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10043printf "%s\n" "$OTOOL" >&6; }
10044else
10045  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046printf "%s\n" "no" >&6; }
10047fi
10048
10049
10050fi
10051if test -z "$ac_cv_prog_OTOOL"; then
10052  ac_ct_OTOOL=$OTOOL
10053  # Extract the first word of "otool", so it can be a program name with args.
10054set dummy otool; ac_word=$2
10055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10056printf %s "checking for $ac_word... " >&6; }
10057if test ${ac_cv_prog_ac_ct_OTOOL+y}
10058then :
10059  printf %s "(cached) " >&6
10060else $as_nop
10061  if test -n "$ac_ct_OTOOL"; then
10062  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10063else
10064as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10065for as_dir in $PATH
10066do
10067  IFS=$as_save_IFS
10068  case $as_dir in #(((
10069    '') as_dir=./ ;;
10070    */) ;;
10071    *) as_dir=$as_dir/ ;;
10072  esac
10073    for ac_exec_ext in '' $ac_executable_extensions; do
10074  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10075    ac_cv_prog_ac_ct_OTOOL="otool"
10076    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10077    break 2
10078  fi
10079done
10080  done
10081IFS=$as_save_IFS
10082
10083fi
10084fi
10085ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10086if test -n "$ac_ct_OTOOL"; then
10087  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10088printf "%s\n" "$ac_ct_OTOOL" >&6; }
10089else
10090  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091printf "%s\n" "no" >&6; }
10092fi
10093
10094  if test "x$ac_ct_OTOOL" = x; then
10095    OTOOL=":"
10096  else
10097    case $cross_compiling:$ac_tool_warned in
10098yes:)
10099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10100printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10101ac_tool_warned=yes ;;
10102esac
10103    OTOOL=$ac_ct_OTOOL
10104  fi
10105else
10106  OTOOL="$ac_cv_prog_OTOOL"
10107fi
10108
10109    if test -n "$ac_tool_prefix"; then
10110  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10111set dummy ${ac_tool_prefix}otool64; ac_word=$2
10112{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10113printf %s "checking for $ac_word... " >&6; }
10114if test ${ac_cv_prog_OTOOL64+y}
10115then :
10116  printf %s "(cached) " >&6
10117else $as_nop
10118  if test -n "$OTOOL64"; then
10119  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10120else
10121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10122for as_dir in $PATH
10123do
10124  IFS=$as_save_IFS
10125  case $as_dir in #(((
10126    '') as_dir=./ ;;
10127    */) ;;
10128    *) as_dir=$as_dir/ ;;
10129  esac
10130    for ac_exec_ext in '' $ac_executable_extensions; do
10131  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10132    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10133    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10134    break 2
10135  fi
10136done
10137  done
10138IFS=$as_save_IFS
10139
10140fi
10141fi
10142OTOOL64=$ac_cv_prog_OTOOL64
10143if test -n "$OTOOL64"; then
10144  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10145printf "%s\n" "$OTOOL64" >&6; }
10146else
10147  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10148printf "%s\n" "no" >&6; }
10149fi
10150
10151
10152fi
10153if test -z "$ac_cv_prog_OTOOL64"; then
10154  ac_ct_OTOOL64=$OTOOL64
10155  # Extract the first word of "otool64", so it can be a program name with args.
10156set dummy otool64; ac_word=$2
10157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158printf %s "checking for $ac_word... " >&6; }
10159if test ${ac_cv_prog_ac_ct_OTOOL64+y}
10160then :
10161  printf %s "(cached) " >&6
10162else $as_nop
10163  if test -n "$ac_ct_OTOOL64"; then
10164  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10165else
10166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10167for as_dir in $PATH
10168do
10169  IFS=$as_save_IFS
10170  case $as_dir in #(((
10171    '') as_dir=./ ;;
10172    */) ;;
10173    *) as_dir=$as_dir/ ;;
10174  esac
10175    for ac_exec_ext in '' $ac_executable_extensions; do
10176  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10177    ac_cv_prog_ac_ct_OTOOL64="otool64"
10178    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10179    break 2
10180  fi
10181done
10182  done
10183IFS=$as_save_IFS
10184
10185fi
10186fi
10187ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10188if test -n "$ac_ct_OTOOL64"; then
10189  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10190printf "%s\n" "$ac_ct_OTOOL64" >&6; }
10191else
10192  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10193printf "%s\n" "no" >&6; }
10194fi
10195
10196  if test "x$ac_ct_OTOOL64" = x; then
10197    OTOOL64=":"
10198  else
10199    case $cross_compiling:$ac_tool_warned in
10200yes:)
10201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10202printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10203ac_tool_warned=yes ;;
10204esac
10205    OTOOL64=$ac_ct_OTOOL64
10206  fi
10207else
10208  OTOOL64="$ac_cv_prog_OTOOL64"
10209fi
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10238printf %s "checking for -single_module linker flag... " >&6; }
10239if test ${lt_cv_apple_cc_single_mod+y}
10240then :
10241  printf %s "(cached) " >&6
10242else $as_nop
10243  lt_cv_apple_cc_single_mod=no
10244      if test -z "$LT_MULTI_MODULE"; then
10245	# By default we will add the -single_module flag. You can override
10246	# by either setting the environment variable LT_MULTI_MODULE
10247	# non-empty at configure time, or by adding -multi_module to the
10248	# link flags.
10249	rm -rf libconftest.dylib*
10250	echo "int foo(void){return 1;}" > conftest.c
10251	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10252-dynamiclib -Wl,-single_module conftest.c" >&5
10253	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10254	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10255        _lt_result=$?
10256	# If there is a non-empty error log, and "single_module"
10257	# appears in it, assume the flag caused a linker warning
10258        if test -s conftest.err && $GREP single_module conftest.err; then
10259	  cat conftest.err >&5
10260	# Otherwise, if the output was created with a 0 exit code from
10261	# the compiler, it worked.
10262	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10263	  lt_cv_apple_cc_single_mod=yes
10264	else
10265	  cat conftest.err >&5
10266	fi
10267	rm -rf libconftest.dylib*
10268	rm -f conftest.*
10269      fi
10270fi
10271{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10272printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
10273
10274    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10275printf %s "checking for -exported_symbols_list linker flag... " >&6; }
10276if test ${lt_cv_ld_exported_symbols_list+y}
10277then :
10278  printf %s "(cached) " >&6
10279else $as_nop
10280  lt_cv_ld_exported_symbols_list=no
10281      save_LDFLAGS=$LDFLAGS
10282      echo "_main" > conftest.sym
10283      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10284      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10285/* end confdefs.h.  */
10286
10287int
10288main (void)
10289{
10290
10291  ;
10292  return 0;
10293}
10294_ACEOF
10295if ac_fn_c_try_link "$LINENO"
10296then :
10297  lt_cv_ld_exported_symbols_list=yes
10298else $as_nop
10299  lt_cv_ld_exported_symbols_list=no
10300fi
10301rm -f core conftest.err conftest.$ac_objext conftest.beam \
10302    conftest$ac_exeext conftest.$ac_ext
10303	LDFLAGS=$save_LDFLAGS
10304
10305fi
10306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10307printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
10308
10309    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10310printf %s "checking for -force_load linker flag... " >&6; }
10311if test ${lt_cv_ld_force_load+y}
10312then :
10313  printf %s "(cached) " >&6
10314else $as_nop
10315  lt_cv_ld_force_load=no
10316      cat > conftest.c << _LT_EOF
10317int forced_loaded() { return 2;}
10318_LT_EOF
10319      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10320      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10321      echo "$AR cru libconftest.a conftest.o" >&5
10322      $AR cru libconftest.a conftest.o 2>&5
10323      echo "$RANLIB libconftest.a" >&5
10324      $RANLIB libconftest.a 2>&5
10325      cat > conftest.c << _LT_EOF
10326int main() { return 0;}
10327_LT_EOF
10328      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10329      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10330      _lt_result=$?
10331      if test -s conftest.err && $GREP force_load conftest.err; then
10332	cat conftest.err >&5
10333      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10334	lt_cv_ld_force_load=yes
10335      else
10336	cat conftest.err >&5
10337      fi
10338        rm -f conftest.err libconftest.a conftest conftest.c
10339        rm -rf conftest.dSYM
10340
10341fi
10342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10343printf "%s\n" "$lt_cv_ld_force_load" >&6; }
10344    case $host_os in
10345    rhapsody* | darwin1.[012])
10346      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10347    darwin1.*)
10348      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10349    darwin*) # darwin 5.x on
10350      # if running on 10.5 or later, the deployment target defaults
10351      # to the OS version, if on x86, and 10.4, the deployment
10352      # target defaults to 10.4. Don't you love it?
10353      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10354	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10355	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10356	10.[012][,.]*)
10357	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10358	10.*)
10359	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10360      esac
10361    ;;
10362  esac
10363    if test yes = "$lt_cv_apple_cc_single_mod"; then
10364      _lt_dar_single_mod='$single_module'
10365    fi
10366    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10367      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10368    else
10369      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10370    fi
10371    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10372      _lt_dsymutil='~$DSYMUTIL $lib || :'
10373    else
10374      _lt_dsymutil=
10375    fi
10376    ;;
10377  esac
10378
10379# func_munge_path_list VARIABLE PATH
10380# -----------------------------------
10381# VARIABLE is name of variable containing _space_ separated list of
10382# directories to be munged by the contents of PATH, which is string
10383# having a format:
10384# "DIR[:DIR]:"
10385#       string "DIR[ DIR]" will be prepended to VARIABLE
10386# ":DIR[:DIR]"
10387#       string "DIR[ DIR]" will be appended to VARIABLE
10388# "DIRP[:DIRP]::[DIRA:]DIRA"
10389#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10390#       "DIRA[ DIRA]" will be appended to VARIABLE
10391# "DIR[:DIR]"
10392#       VARIABLE will be replaced by "DIR[ DIR]"
10393func_munge_path_list ()
10394{
10395    case x$2 in
10396    x)
10397        ;;
10398    *:)
10399        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10400        ;;
10401    x:*)
10402        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10403        ;;
10404    *::*)
10405        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10406        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10407        ;;
10408    *)
10409        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10410        ;;
10411    esac
10412}
10413
10414ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10415"
10416if test "x$ac_cv_header_dlfcn_h" = xyes
10417then :
10418  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
10419
10420fi
10421
10422
10423
10424
10425
10426# Set options
10427# Check whether --enable-shared was given.
10428if test ${enable_shared+y}
10429then :
10430  enableval=$enable_shared; p=${PACKAGE-default}
10431    case $enableval in
10432    yes) enable_shared=yes ;;
10433    no) enable_shared=no ;;
10434    *)
10435      enable_shared=no
10436      # Look at the argument we got.  We use all the common list separators.
10437      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10438      for pkg in $enableval; do
10439	IFS=$lt_save_ifs
10440	if test "X$pkg" = "X$p"; then
10441	  enable_shared=yes
10442	fi
10443      done
10444      IFS=$lt_save_ifs
10445      ;;
10446    esac
10447else $as_nop
10448  enable_shared=no
10449fi
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460        enable_dlopen=no
10461
10462
10463  enable_win32_dll=no
10464
10465
10466
10467  # Check whether --enable-static was given.
10468if test ${enable_static+y}
10469then :
10470  enableval=$enable_static; p=${PACKAGE-default}
10471    case $enableval in
10472    yes) enable_static=yes ;;
10473    no) enable_static=no ;;
10474    *)
10475     enable_static=no
10476      # Look at the argument we got.  We use all the common list separators.
10477      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10478      for pkg in $enableval; do
10479	IFS=$lt_save_ifs
10480	if test "X$pkg" = "X$p"; then
10481	  enable_static=yes
10482	fi
10483      done
10484      IFS=$lt_save_ifs
10485      ;;
10486    esac
10487else $as_nop
10488  enable_static=yes
10489fi
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500# Check whether --with-pic was given.
10501if test ${with_pic+y}
10502then :
10503  withval=$with_pic; lt_p=${PACKAGE-default}
10504    case $withval in
10505    yes|no) pic_mode=$withval ;;
10506    *)
10507      pic_mode=default
10508      # Look at the argument we got.  We use all the common list separators.
10509      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10510      for lt_pkg in $withval; do
10511	IFS=$lt_save_ifs
10512	if test "X$lt_pkg" = "X$lt_p"; then
10513	  pic_mode=yes
10514	fi
10515      done
10516      IFS=$lt_save_ifs
10517      ;;
10518    esac
10519else $as_nop
10520  pic_mode=default
10521fi
10522
10523
10524
10525
10526
10527
10528
10529
10530  # Check whether --enable-fast-install was given.
10531if test ${enable_fast_install+y}
10532then :
10533  enableval=$enable_fast_install; p=${PACKAGE-default}
10534    case $enableval in
10535    yes) enable_fast_install=yes ;;
10536    no) enable_fast_install=no ;;
10537    *)
10538      enable_fast_install=no
10539      # Look at the argument we got.  We use all the common list separators.
10540      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10541      for pkg in $enableval; do
10542	IFS=$lt_save_ifs
10543	if test "X$pkg" = "X$p"; then
10544	  enable_fast_install=yes
10545	fi
10546      done
10547      IFS=$lt_save_ifs
10548      ;;
10549    esac
10550else $as_nop
10551  enable_fast_install=yes
10552fi
10553
10554
10555
10556
10557
10558
10559
10560
10561  shared_archive_member_spec=
10562case $host,$enable_shared in
10563power*-*-aix[5-9]*,yes)
10564  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10565printf %s "checking which variant of shared library versioning to provide... " >&6; }
10566
10567# Check whether --with-aix-soname was given.
10568if test ${with_aix_soname+y}
10569then :
10570  withval=$with_aix_soname; case $withval in
10571    aix|svr4|both)
10572      ;;
10573    *)
10574      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10575      ;;
10576    esac
10577    lt_cv_with_aix_soname=$with_aix_soname
10578else $as_nop
10579  if test ${lt_cv_with_aix_soname+y}
10580then :
10581  printf %s "(cached) " >&6
10582else $as_nop
10583  lt_cv_with_aix_soname=aix
10584fi
10585
10586    with_aix_soname=$lt_cv_with_aix_soname
10587fi
10588
10589  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10590printf "%s\n" "$with_aix_soname" >&6; }
10591  if test aix != "$with_aix_soname"; then
10592    # For the AIX way of multilib, we name the shared archive member
10593    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10594    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10595    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10596    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10597    if test 64 = "${OBJECT_MODE-32}"; then
10598      shared_archive_member_spec=shr_64
10599    else
10600      shared_archive_member_spec=shr
10601    fi
10602  fi
10603  ;;
10604*)
10605  with_aix_soname=aix
10606  ;;
10607esac
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618# This can be used to rebuild libtool when needed
10619LIBTOOL_DEPS=$ltmain
10620
10621# Always use our own libtool.
10622LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653test -z "$LN_S" && LN_S="ln -s"
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668if test -n "${ZSH_VERSION+set}"; then
10669   setopt NO_GLOB_SUBST
10670fi
10671
10672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10673printf %s "checking for objdir... " >&6; }
10674if test ${lt_cv_objdir+y}
10675then :
10676  printf %s "(cached) " >&6
10677else $as_nop
10678  rm -f .libs 2>/dev/null
10679mkdir .libs 2>/dev/null
10680if test -d .libs; then
10681  lt_cv_objdir=.libs
10682else
10683  # MS-DOS does not allow filenames that begin with a dot.
10684  lt_cv_objdir=_libs
10685fi
10686rmdir .libs 2>/dev/null
10687fi
10688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10689printf "%s\n" "$lt_cv_objdir" >&6; }
10690objdir=$lt_cv_objdir
10691
10692
10693
10694
10695
10696printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
10697
10698
10699
10700
10701case $host_os in
10702aix3*)
10703  # AIX sometimes has problems with the GCC collect2 program.  For some
10704  # reason, if we set the COLLECT_NAMES environment variable, the problems
10705  # vanish in a puff of smoke.
10706  if test set != "${COLLECT_NAMES+set}"; then
10707    COLLECT_NAMES=
10708    export COLLECT_NAMES
10709  fi
10710  ;;
10711esac
10712
10713# Global variables:
10714ofile=libtool
10715can_build_shared=yes
10716
10717# All known linkers require a '.a' archive for static linking (except MSVC,
10718# which needs '.lib').
10719libext=a
10720
10721with_gnu_ld=$lt_cv_prog_gnu_ld
10722
10723old_CC=$CC
10724old_CFLAGS=$CFLAGS
10725
10726# Set sane defaults for various variables
10727test -z "$CC" && CC=cc
10728test -z "$LTCC" && LTCC=$CC
10729test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10730test -z "$LD" && LD=ld
10731test -z "$ac_objext" && ac_objext=o
10732
10733func_cc_basename $compiler
10734cc_basename=$func_cc_basename_result
10735
10736
10737# Only perform the check for file, if the check method requires it
10738test -z "$MAGIC_CMD" && MAGIC_CMD=file
10739case $deplibs_check_method in
10740file_magic*)
10741  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10742    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10743printf %s "checking for ${ac_tool_prefix}file... " >&6; }
10744if test ${lt_cv_path_MAGIC_CMD+y}
10745then :
10746  printf %s "(cached) " >&6
10747else $as_nop
10748  case $MAGIC_CMD in
10749[\\/*] |  ?:[\\/]*)
10750  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10751  ;;
10752*)
10753  lt_save_MAGIC_CMD=$MAGIC_CMD
10754  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10755  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10756  for ac_dir in $ac_dummy; do
10757    IFS=$lt_save_ifs
10758    test -z "$ac_dir" && ac_dir=.
10759    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10760      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10761      if test -n "$file_magic_test_file"; then
10762	case $deplibs_check_method in
10763	"file_magic "*)
10764	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10765	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10766	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10767	    $EGREP "$file_magic_regex" > /dev/null; then
10768	    :
10769	  else
10770	    cat <<_LT_EOF 1>&2
10771
10772*** Warning: the command libtool uses to detect shared libraries,
10773*** $file_magic_cmd, produces output that libtool cannot recognize.
10774*** The result is that libtool may fail to recognize shared libraries
10775*** as such.  This will affect the creation of libtool libraries that
10776*** depend on shared libraries, but programs linked with such libtool
10777*** libraries will work regardless of this problem.  Nevertheless, you
10778*** may want to report the problem to your system manager and/or to
10779*** bug-libtool@gnu.org
10780
10781_LT_EOF
10782	  fi ;;
10783	esac
10784      fi
10785      break
10786    fi
10787  done
10788  IFS=$lt_save_ifs
10789  MAGIC_CMD=$lt_save_MAGIC_CMD
10790  ;;
10791esac
10792fi
10793
10794MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10795if test -n "$MAGIC_CMD"; then
10796  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10797printf "%s\n" "$MAGIC_CMD" >&6; }
10798else
10799  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10800printf "%s\n" "no" >&6; }
10801fi
10802
10803
10804
10805
10806
10807if test -z "$lt_cv_path_MAGIC_CMD"; then
10808  if test -n "$ac_tool_prefix"; then
10809    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10810printf %s "checking for file... " >&6; }
10811if test ${lt_cv_path_MAGIC_CMD+y}
10812then :
10813  printf %s "(cached) " >&6
10814else $as_nop
10815  case $MAGIC_CMD in
10816[\\/*] |  ?:[\\/]*)
10817  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10818  ;;
10819*)
10820  lt_save_MAGIC_CMD=$MAGIC_CMD
10821  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10822  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10823  for ac_dir in $ac_dummy; do
10824    IFS=$lt_save_ifs
10825    test -z "$ac_dir" && ac_dir=.
10826    if test -f "$ac_dir/file"; then
10827      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10828      if test -n "$file_magic_test_file"; then
10829	case $deplibs_check_method in
10830	"file_magic "*)
10831	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10832	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10833	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10834	    $EGREP "$file_magic_regex" > /dev/null; then
10835	    :
10836	  else
10837	    cat <<_LT_EOF 1>&2
10838
10839*** Warning: the command libtool uses to detect shared libraries,
10840*** $file_magic_cmd, produces output that libtool cannot recognize.
10841*** The result is that libtool may fail to recognize shared libraries
10842*** as such.  This will affect the creation of libtool libraries that
10843*** depend on shared libraries, but programs linked with such libtool
10844*** libraries will work regardless of this problem.  Nevertheless, you
10845*** may want to report the problem to your system manager and/or to
10846*** bug-libtool@gnu.org
10847
10848_LT_EOF
10849	  fi ;;
10850	esac
10851      fi
10852      break
10853    fi
10854  done
10855  IFS=$lt_save_ifs
10856  MAGIC_CMD=$lt_save_MAGIC_CMD
10857  ;;
10858esac
10859fi
10860
10861MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10862if test -n "$MAGIC_CMD"; then
10863  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10864printf "%s\n" "$MAGIC_CMD" >&6; }
10865else
10866  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10867printf "%s\n" "no" >&6; }
10868fi
10869
10870
10871  else
10872    MAGIC_CMD=:
10873  fi
10874fi
10875
10876  fi
10877  ;;
10878esac
10879
10880# Use C for the default configuration in the libtool script
10881
10882lt_save_CC=$CC
10883ac_ext=c
10884ac_cpp='$CPP $CPPFLAGS'
10885ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10886ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10887ac_compiler_gnu=$ac_cv_c_compiler_gnu
10888
10889
10890# Source file extension for C test sources.
10891ac_ext=c
10892
10893# Object file extension for compiled C test sources.
10894objext=o
10895objext=$objext
10896
10897# Code to be used in simple compile tests
10898lt_simple_compile_test_code="int some_variable = 0;"
10899
10900# Code to be used in simple link tests
10901lt_simple_link_test_code='int main(){return(0);}'
10902
10903
10904
10905
10906
10907
10908
10909# If no C compiler was specified, use CC.
10910LTCC=${LTCC-"$CC"}
10911
10912# If no C compiler flags were specified, use CFLAGS.
10913LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
10914
10915# Allow CC to be a program name with arguments.
10916compiler=$CC
10917
10918# Save the default compiler, since it gets overwritten when the other
10919# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
10920compiler_DEFAULT=$CC
10921
10922# save warnings/boilerplate of simple test code
10923ac_outfile=conftest.$ac_objext
10924echo "$lt_simple_compile_test_code" >conftest.$ac_ext
10925eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10926_lt_compiler_boilerplate=`cat conftest.err`
10927$RM conftest*
10928
10929ac_outfile=conftest.$ac_objext
10930echo "$lt_simple_link_test_code" >conftest.$ac_ext
10931eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
10932_lt_linker_boilerplate=`cat conftest.err`
10933$RM -r conftest*
10934
10935
10936## CAVEAT EMPTOR:
10937## There is no encapsulation within the following macros, do not change
10938## the running order or otherwise move them around unless you know exactly
10939## what you are doing...
10940if test -n "$compiler"; then
10941
10942lt_prog_compiler_no_builtin_flag=
10943
10944if test yes = "$GCC"; then
10945  case $cc_basename in
10946  nvcc*)
10947    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
10948  *)
10949    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
10950  esac
10951
10952  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
10953printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
10954if test ${lt_cv_prog_compiler_rtti_exceptions+y}
10955then :
10956  printf %s "(cached) " >&6
10957else $as_nop
10958  lt_cv_prog_compiler_rtti_exceptions=no
10959   ac_outfile=conftest.$ac_objext
10960   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10961   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
10962   # Insert the option either (1) after the last *FLAGS variable, or
10963   # (2) before a word containing "conftest.", or (3) at the end.
10964   # Note that $ac_compile itself does not contain backslashes and begins
10965   # with a dollar sign (not a hyphen), so the echo should work correctly.
10966   # The option is referenced via a variable to avoid confusing sed.
10967   lt_compile=`echo "$ac_compile" | $SED \
10968   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10969   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10970   -e 's:$: $lt_compiler_flag:'`
10971   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10972   (eval "$lt_compile" 2>conftest.err)
10973   ac_status=$?
10974   cat conftest.err >&5
10975   echo "$as_me:$LINENO: \$? = $ac_status" >&5
10976   if (exit $ac_status) && test -s "$ac_outfile"; then
10977     # The compiler can only warn and ignore the option if not recognized
10978     # So say no if there are warnings other than the usual output.
10979     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10980     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10981     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10982       lt_cv_prog_compiler_rtti_exceptions=yes
10983     fi
10984   fi
10985   $RM conftest*
10986
10987fi
10988{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
10989printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
10990
10991if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
10992    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
10993else
10994    :
10995fi
10996
10997fi
10998
10999
11000
11001
11002
11003
11004  lt_prog_compiler_wl=
11005lt_prog_compiler_pic=
11006lt_prog_compiler_static=
11007
11008
11009  if test yes = "$GCC"; then
11010    lt_prog_compiler_wl='-Wl,'
11011    lt_prog_compiler_static='-static'
11012
11013    case $host_os in
11014      aix*)
11015      # All AIX code is PIC.
11016      if test ia64 = "$host_cpu"; then
11017	# AIX 5 now supports IA64 processor
11018	lt_prog_compiler_static='-Bstatic'
11019      fi
11020      lt_prog_compiler_pic='-fPIC'
11021      ;;
11022
11023    amigaos*)
11024      case $host_cpu in
11025      powerpc)
11026            # see comment about AmigaOS4 .so support
11027            lt_prog_compiler_pic='-fPIC'
11028        ;;
11029      m68k)
11030            # FIXME: we need at least 68020 code to build shared libraries, but
11031            # adding the '-m68020' flag to GCC prevents building anything better,
11032            # like '-m68040'.
11033            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11034        ;;
11035      esac
11036      ;;
11037
11038    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11039      # PIC is the default for these OSes.
11040      ;;
11041
11042    mingw* | cygwin* | pw32* | os2* | cegcc*)
11043      # This hack is so that the source file can tell whether it is being
11044      # built for inclusion in a dll (and should export symbols for example).
11045      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11046      # (--disable-auto-import) libraries
11047      lt_prog_compiler_pic='-DDLL_EXPORT'
11048      case $host_os in
11049      os2*)
11050	lt_prog_compiler_static='$wl-static'
11051	;;
11052      esac
11053      ;;
11054
11055    darwin* | rhapsody*)
11056      # PIC is the default on this platform
11057      # Common symbols not allowed in MH_DYLIB files
11058      lt_prog_compiler_pic='-fno-common'
11059      ;;
11060
11061    haiku*)
11062      # PIC is the default for Haiku.
11063      # The "-static" flag exists, but is broken.
11064      lt_prog_compiler_static=
11065      ;;
11066
11067    hpux*)
11068      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
11069      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
11070      # sets the default TLS model and affects inlining.
11071      case $host_cpu in
11072      hppa*64*)
11073	# +Z the default
11074	;;
11075      *)
11076	lt_prog_compiler_pic='-fPIC'
11077	;;
11078      esac
11079      ;;
11080
11081    interix[3-9]*)
11082      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11083      # Instead, we relocate shared libraries at runtime.
11084      ;;
11085
11086    msdosdjgpp*)
11087      # Just because we use GCC doesn't mean we suddenly get shared libraries
11088      # on systems that don't support them.
11089      lt_prog_compiler_can_build_shared=no
11090      enable_shared=no
11091      ;;
11092
11093    *nto* | *qnx*)
11094      # QNX uses GNU C++, but need to define -shared option too, otherwise
11095      # it will coredump.
11096      lt_prog_compiler_pic='-fPIC -shared'
11097      ;;
11098
11099    sysv4*MP*)
11100      if test -d /usr/nec; then
11101	lt_prog_compiler_pic=-Kconform_pic
11102      fi
11103      ;;
11104
11105    *)
11106      lt_prog_compiler_pic='-fPIC'
11107      ;;
11108    esac
11109
11110    case $cc_basename in
11111    nvcc*) # Cuda Compiler Driver 2.2
11112      lt_prog_compiler_wl='-Xlinker '
11113      if test -n "$lt_prog_compiler_pic"; then
11114        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11115      fi
11116      ;;
11117    esac
11118  else
11119    # PORTME Check for flag to pass linker flags through the system compiler.
11120    case $host_os in
11121    aix*)
11122      lt_prog_compiler_wl='-Wl,'
11123      if test ia64 = "$host_cpu"; then
11124	# AIX 5 now supports IA64 processor
11125	lt_prog_compiler_static='-Bstatic'
11126      else
11127	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11128      fi
11129      ;;
11130
11131    darwin* | rhapsody*)
11132      # PIC is the default on this platform
11133      # Common symbols not allowed in MH_DYLIB files
11134      lt_prog_compiler_pic='-fno-common'
11135      case $cc_basename in
11136      nagfor*)
11137        # NAG Fortran compiler
11138        lt_prog_compiler_wl='-Wl,-Wl,,'
11139        lt_prog_compiler_pic='-PIC'
11140        lt_prog_compiler_static='-Bstatic'
11141        ;;
11142      esac
11143      ;;
11144
11145    mingw* | cygwin* | pw32* | os2* | cegcc*)
11146      # This hack is so that the source file can tell whether it is being
11147      # built for inclusion in a dll (and should export symbols for example).
11148      lt_prog_compiler_pic='-DDLL_EXPORT'
11149      case $host_os in
11150      os2*)
11151	lt_prog_compiler_static='$wl-static'
11152	;;
11153      esac
11154      ;;
11155
11156    hpux9* | hpux10* | hpux11*)
11157      lt_prog_compiler_wl='-Wl,'
11158      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11159      # not for PA HP-UX.
11160      case $host_cpu in
11161      hppa*64*|ia64*)
11162	# +Z the default
11163	;;
11164      *)
11165	lt_prog_compiler_pic='+Z'
11166	;;
11167      esac
11168      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11169      lt_prog_compiler_static='$wl-a ${wl}archive'
11170      ;;
11171
11172    irix5* | irix6* | nonstopux*)
11173      lt_prog_compiler_wl='-Wl,'
11174      # PIC (with -KPIC) is the default.
11175      lt_prog_compiler_static='-non_shared'
11176      ;;
11177
11178    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11179      case $cc_basename in
11180      # old Intel for x86_64, which still supported -KPIC.
11181      ecc*)
11182	lt_prog_compiler_wl='-Wl,'
11183	lt_prog_compiler_pic='-KPIC'
11184	lt_prog_compiler_static='-static'
11185        ;;
11186      # icc used to be incompatible with GCC.
11187      # ICC 10 doesn't accept -KPIC any more.
11188      icc* | ifort*)
11189	lt_prog_compiler_wl='-Wl,'
11190	lt_prog_compiler_pic='-fPIC'
11191	lt_prog_compiler_static='-static'
11192        ;;
11193      # Lahey Fortran 8.1.
11194      lf95*)
11195	lt_prog_compiler_wl='-Wl,'
11196	lt_prog_compiler_pic='--shared'
11197	lt_prog_compiler_static='--static'
11198	;;
11199      nagfor*)
11200	# NAG Fortran compiler
11201	lt_prog_compiler_wl='-Wl,-Wl,,'
11202	lt_prog_compiler_pic='-PIC'
11203	lt_prog_compiler_static='-Bstatic'
11204	;;
11205      tcc*)
11206	# Fabrice Bellard et al's Tiny C Compiler
11207	lt_prog_compiler_wl='-Wl,'
11208	lt_prog_compiler_pic='-fPIC'
11209	lt_prog_compiler_static='-static'
11210	;;
11211      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11212        # Portland Group compilers (*not* the Pentium gcc compiler,
11213	# which looks to be a dead project)
11214	lt_prog_compiler_wl='-Wl,'
11215	lt_prog_compiler_pic='-fpic'
11216	lt_prog_compiler_static='-Bstatic'
11217        ;;
11218      ccc*)
11219        lt_prog_compiler_wl='-Wl,'
11220        # All Alpha code is PIC.
11221        lt_prog_compiler_static='-non_shared'
11222        ;;
11223      xl* | bgxl* | bgf* | mpixl*)
11224	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11225	lt_prog_compiler_wl='-Wl,'
11226	lt_prog_compiler_pic='-qpic'
11227	lt_prog_compiler_static='-qstaticlink'
11228	;;
11229      *)
11230	case `$CC -V 2>&1 | sed 5q` in
11231	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11232	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
11233	  lt_prog_compiler_pic='-KPIC'
11234	  lt_prog_compiler_static='-Bstatic'
11235	  lt_prog_compiler_wl=''
11236	  ;;
11237	*Sun\ F* | *Sun*Fortran*)
11238	  lt_prog_compiler_pic='-KPIC'
11239	  lt_prog_compiler_static='-Bstatic'
11240	  lt_prog_compiler_wl='-Qoption ld '
11241	  ;;
11242	*Sun\ C*)
11243	  # Sun C 5.9
11244	  lt_prog_compiler_pic='-KPIC'
11245	  lt_prog_compiler_static='-Bstatic'
11246	  lt_prog_compiler_wl='-Wl,'
11247	  ;;
11248        *Intel*\ [CF]*Compiler*)
11249	  lt_prog_compiler_wl='-Wl,'
11250	  lt_prog_compiler_pic='-fPIC'
11251	  lt_prog_compiler_static='-static'
11252	  ;;
11253	*Portland\ Group*)
11254	  lt_prog_compiler_wl='-Wl,'
11255	  lt_prog_compiler_pic='-fpic'
11256	  lt_prog_compiler_static='-Bstatic'
11257	  ;;
11258	esac
11259	;;
11260      esac
11261      ;;
11262
11263    newsos6)
11264      lt_prog_compiler_pic='-KPIC'
11265      lt_prog_compiler_static='-Bstatic'
11266      ;;
11267
11268    *nto* | *qnx*)
11269      # QNX uses GNU C++, but need to define -shared option too, otherwise
11270      # it will coredump.
11271      lt_prog_compiler_pic='-fPIC -shared'
11272      ;;
11273
11274    osf3* | osf4* | osf5*)
11275      lt_prog_compiler_wl='-Wl,'
11276      # All OSF/1 code is PIC.
11277      lt_prog_compiler_static='-non_shared'
11278      ;;
11279
11280    rdos*)
11281      lt_prog_compiler_static='-non_shared'
11282      ;;
11283
11284    solaris*)
11285      lt_prog_compiler_pic='-KPIC'
11286      lt_prog_compiler_static='-Bstatic'
11287      case $cc_basename in
11288      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11289	lt_prog_compiler_wl='-Qoption ld ';;
11290      *)
11291	lt_prog_compiler_wl='-Wl,';;
11292      esac
11293      ;;
11294
11295    sunos4*)
11296      lt_prog_compiler_wl='-Qoption ld '
11297      lt_prog_compiler_pic='-PIC'
11298      lt_prog_compiler_static='-Bstatic'
11299      ;;
11300
11301    sysv4 | sysv4.2uw2* | sysv4.3*)
11302      lt_prog_compiler_wl='-Wl,'
11303      lt_prog_compiler_pic='-KPIC'
11304      lt_prog_compiler_static='-Bstatic'
11305      ;;
11306
11307    sysv4*MP*)
11308      if test -d /usr/nec; then
11309	lt_prog_compiler_pic='-Kconform_pic'
11310	lt_prog_compiler_static='-Bstatic'
11311      fi
11312      ;;
11313
11314    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11315      lt_prog_compiler_wl='-Wl,'
11316      lt_prog_compiler_pic='-KPIC'
11317      lt_prog_compiler_static='-Bstatic'
11318      ;;
11319
11320    unicos*)
11321      lt_prog_compiler_wl='-Wl,'
11322      lt_prog_compiler_can_build_shared=no
11323      ;;
11324
11325    uts4*)
11326      lt_prog_compiler_pic='-pic'
11327      lt_prog_compiler_static='-Bstatic'
11328      ;;
11329
11330    *)
11331      lt_prog_compiler_can_build_shared=no
11332      ;;
11333    esac
11334  fi
11335
11336case $host_os in
11337  # For platforms that do not support PIC, -DPIC is meaningless:
11338  *djgpp*)
11339    lt_prog_compiler_pic=
11340    ;;
11341  *)
11342    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11343    ;;
11344esac
11345
11346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11347printf %s "checking for $compiler option to produce PIC... " >&6; }
11348if test ${lt_cv_prog_compiler_pic+y}
11349then :
11350  printf %s "(cached) " >&6
11351else $as_nop
11352  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11353fi
11354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11355printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
11356lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11357
11358#
11359# Check to make sure the PIC flag actually works.
11360#
11361if test -n "$lt_prog_compiler_pic"; then
11362  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11363printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11364if test ${lt_cv_prog_compiler_pic_works+y}
11365then :
11366  printf %s "(cached) " >&6
11367else $as_nop
11368  lt_cv_prog_compiler_pic_works=no
11369   ac_outfile=conftest.$ac_objext
11370   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11371   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11372   # Insert the option either (1) after the last *FLAGS variable, or
11373   # (2) before a word containing "conftest.", or (3) at the end.
11374   # Note that $ac_compile itself does not contain backslashes and begins
11375   # with a dollar sign (not a hyphen), so the echo should work correctly.
11376   # The option is referenced via a variable to avoid confusing sed.
11377   lt_compile=`echo "$ac_compile" | $SED \
11378   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11379   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11380   -e 's:$: $lt_compiler_flag:'`
11381   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11382   (eval "$lt_compile" 2>conftest.err)
11383   ac_status=$?
11384   cat conftest.err >&5
11385   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11386   if (exit $ac_status) && test -s "$ac_outfile"; then
11387     # The compiler can only warn and ignore the option if not recognized
11388     # So say no if there are warnings other than the usual output.
11389     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11390     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11391     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11392       lt_cv_prog_compiler_pic_works=yes
11393     fi
11394   fi
11395   $RM conftest*
11396
11397fi
11398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11399printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
11400
11401if test yes = "$lt_cv_prog_compiler_pic_works"; then
11402    case $lt_prog_compiler_pic in
11403     "" | " "*) ;;
11404     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11405     esac
11406else
11407    lt_prog_compiler_pic=
11408     lt_prog_compiler_can_build_shared=no
11409fi
11410
11411fi
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423#
11424# Check to make sure the static flag actually works.
11425#
11426wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11428printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11429if test ${lt_cv_prog_compiler_static_works+y}
11430then :
11431  printf %s "(cached) " >&6
11432else $as_nop
11433  lt_cv_prog_compiler_static_works=no
11434   save_LDFLAGS=$LDFLAGS
11435   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11436   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11437   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11438     # The linker can only warn and ignore the option if not recognized
11439     # So say no if there are warnings
11440     if test -s conftest.err; then
11441       # Append any errors to the config.log.
11442       cat conftest.err 1>&5
11443       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11444       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11445       if diff conftest.exp conftest.er2 >/dev/null; then
11446         lt_cv_prog_compiler_static_works=yes
11447       fi
11448     else
11449       lt_cv_prog_compiler_static_works=yes
11450     fi
11451   fi
11452   $RM -r conftest*
11453   LDFLAGS=$save_LDFLAGS
11454
11455fi
11456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11457printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
11458
11459if test yes = "$lt_cv_prog_compiler_static_works"; then
11460    :
11461else
11462    lt_prog_compiler_static=
11463fi
11464
11465
11466
11467
11468
11469
11470
11471  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11472printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11473if test ${lt_cv_prog_compiler_c_o+y}
11474then :
11475  printf %s "(cached) " >&6
11476else $as_nop
11477  lt_cv_prog_compiler_c_o=no
11478   $RM -r conftest 2>/dev/null
11479   mkdir conftest
11480   cd conftest
11481   mkdir out
11482   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11483
11484   lt_compiler_flag="-o out/conftest2.$ac_objext"
11485   # Insert the option either (1) after the last *FLAGS variable, or
11486   # (2) before a word containing "conftest.", or (3) at the end.
11487   # Note that $ac_compile itself does not contain backslashes and begins
11488   # with a dollar sign (not a hyphen), so the echo should work correctly.
11489   lt_compile=`echo "$ac_compile" | $SED \
11490   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11491   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11492   -e 's:$: $lt_compiler_flag:'`
11493   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11494   (eval "$lt_compile" 2>out/conftest.err)
11495   ac_status=$?
11496   cat out/conftest.err >&5
11497   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11499   then
11500     # The compiler can only warn and ignore the option if not recognized
11501     # So say no if there are warnings
11502     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11503     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11504     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11505       lt_cv_prog_compiler_c_o=yes
11506     fi
11507   fi
11508   chmod u+w . 2>&5
11509   $RM conftest*
11510   # SGI C++ compiler will create directory out/ii_files/ for
11511   # template instantiation
11512   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11513   $RM out/* && rmdir out
11514   cd ..
11515   $RM -r conftest
11516   $RM conftest*
11517
11518fi
11519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11520printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
11521
11522
11523
11524
11525
11526
11527  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11528printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11529if test ${lt_cv_prog_compiler_c_o+y}
11530then :
11531  printf %s "(cached) " >&6
11532else $as_nop
11533  lt_cv_prog_compiler_c_o=no
11534   $RM -r conftest 2>/dev/null
11535   mkdir conftest
11536   cd conftest
11537   mkdir out
11538   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11539
11540   lt_compiler_flag="-o out/conftest2.$ac_objext"
11541   # Insert the option either (1) after the last *FLAGS variable, or
11542   # (2) before a word containing "conftest.", or (3) at the end.
11543   # Note that $ac_compile itself does not contain backslashes and begins
11544   # with a dollar sign (not a hyphen), so the echo should work correctly.
11545   lt_compile=`echo "$ac_compile" | $SED \
11546   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11547   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11548   -e 's:$: $lt_compiler_flag:'`
11549   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11550   (eval "$lt_compile" 2>out/conftest.err)
11551   ac_status=$?
11552   cat out/conftest.err >&5
11553   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11554   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11555   then
11556     # The compiler can only warn and ignore the option if not recognized
11557     # So say no if there are warnings
11558     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11559     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11560     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11561       lt_cv_prog_compiler_c_o=yes
11562     fi
11563   fi
11564   chmod u+w . 2>&5
11565   $RM conftest*
11566   # SGI C++ compiler will create directory out/ii_files/ for
11567   # template instantiation
11568   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11569   $RM out/* && rmdir out
11570   cd ..
11571   $RM -r conftest
11572   $RM conftest*
11573
11574fi
11575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11576printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
11577
11578
11579
11580
11581hard_links=nottested
11582if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11583  # do not overwrite the value of need_locks provided by the user
11584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11585printf %s "checking if we can lock with hard links... " >&6; }
11586  hard_links=yes
11587  $RM conftest*
11588  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11589  touch conftest.a
11590  ln conftest.a conftest.b 2>&5 || hard_links=no
11591  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11592  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11593printf "%s\n" "$hard_links" >&6; }
11594  if test no = "$hard_links"; then
11595    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11596printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11597    need_locks=warn
11598  fi
11599else
11600  need_locks=no
11601fi
11602
11603
11604
11605
11606
11607
11608  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11609printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11610
11611  runpath_var=
11612  allow_undefined_flag=
11613  always_export_symbols=no
11614  archive_cmds=
11615  archive_expsym_cmds=
11616  compiler_needs_object=no
11617  enable_shared_with_static_runtimes=no
11618  export_dynamic_flag_spec=
11619  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11620  hardcode_automatic=no
11621  hardcode_direct=no
11622  hardcode_direct_absolute=no
11623  hardcode_libdir_flag_spec=
11624  hardcode_libdir_separator=
11625  hardcode_minus_L=no
11626  hardcode_shlibpath_var=unsupported
11627  inherit_rpath=no
11628  link_all_deplibs=unknown
11629  module_cmds=
11630  module_expsym_cmds=
11631  old_archive_from_new_cmds=
11632  old_archive_from_expsyms_cmds=
11633  thread_safe_flag_spec=
11634  whole_archive_flag_spec=
11635  # include_expsyms should be a list of space-separated symbols to be *always*
11636  # included in the symbol list
11637  include_expsyms=
11638  # exclude_expsyms can be an extended regexp of symbols to exclude
11639  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11640  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11641  # as well as any symbol that contains 'd'.
11642  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11643  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11644  # platforms (ab)use it in PIC code, but their linkers get confused if
11645  # the symbol is explicitly referenced.  Since portable code cannot
11646  # rely on this symbol name, it's probably fine to never include it in
11647  # preloaded symbol tables.
11648  # Exclude shared library initialization/finalization symbols.
11649  extract_expsyms_cmds=
11650
11651  case $host_os in
11652  cygwin* | mingw* | pw32* | cegcc*)
11653    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11654    # When not using gcc, we currently assume that we are using
11655    # Microsoft Visual C++.
11656    if test yes != "$GCC"; then
11657      with_gnu_ld=no
11658    fi
11659    ;;
11660  interix*)
11661    # we just hope/assume this is gcc and not c89 (= MSVC++)
11662    with_gnu_ld=yes
11663    ;;
11664  openbsd* | bitrig*)
11665    with_gnu_ld=no
11666    ;;
11667  esac
11668
11669  ld_shlibs=yes
11670
11671  # On some targets, GNU ld is compatible enough with the native linker
11672  # that we're better off using the native interface for both.
11673  lt_use_gnu_ld_interface=no
11674  if test yes = "$with_gnu_ld"; then
11675    case $host_os in
11676      aix*)
11677	# The AIX port of GNU ld has always aspired to compatibility
11678	# with the native linker.  However, as the warning in the GNU ld
11679	# block says, versions before 2.19.5* couldn't really create working
11680	# shared libraries, regardless of the interface used.
11681	case `$LD -v 2>&1` in
11682	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11683	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11684	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11685	  *)
11686	    lt_use_gnu_ld_interface=yes
11687	    ;;
11688	esac
11689	;;
11690      *)
11691	lt_use_gnu_ld_interface=yes
11692	;;
11693    esac
11694  fi
11695
11696  if test yes = "$lt_use_gnu_ld_interface"; then
11697    # If archive_cmds runs LD, not CC, wlarc should be empty
11698    wlarc='$wl'
11699
11700    # Set some defaults for GNU ld with shared library support. These
11701    # are reset later if shared libraries are not supported. Putting them
11702    # here allows them to be overridden if necessary.
11703    runpath_var=LD_RUN_PATH
11704    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11705    export_dynamic_flag_spec='$wl--export-dynamic'
11706    # ancient GNU ld didn't support --whole-archive et. al.
11707    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11708      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11709    else
11710      whole_archive_flag_spec=
11711    fi
11712    supports_anon_versioning=no
11713    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11714      *GNU\ gold*) supports_anon_versioning=yes ;;
11715      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11716      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11717      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11718      *\ 2.11.*) ;; # other 2.11 versions
11719      *) supports_anon_versioning=yes ;;
11720    esac
11721
11722    # See if GNU ld supports shared libraries.
11723    case $host_os in
11724    aix[3-9]*)
11725      # On AIX/PPC, the GNU linker is very broken
11726      if test ia64 != "$host_cpu"; then
11727	ld_shlibs=no
11728	cat <<_LT_EOF 1>&2
11729
11730*** Warning: the GNU linker, at least up to release 2.19, is reported
11731*** to be unable to reliably create shared libraries on AIX.
11732*** Therefore, libtool is disabling shared libraries support.  If you
11733*** really care for shared libraries, you may want to install binutils
11734*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11735*** You will then need to restart the configuration process.
11736
11737_LT_EOF
11738      fi
11739      ;;
11740
11741    amigaos*)
11742      case $host_cpu in
11743      powerpc)
11744            # see comment about AmigaOS4 .so support
11745            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11746            archive_expsym_cmds=''
11747        ;;
11748      m68k)
11749            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)'
11750            hardcode_libdir_flag_spec='-L$libdir'
11751            hardcode_minus_L=yes
11752        ;;
11753      esac
11754      ;;
11755
11756    beos*)
11757      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11758	allow_undefined_flag=unsupported
11759	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11760	# support --undefined.  This deserves some investigation.  FIXME
11761	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11762      else
11763	ld_shlibs=no
11764      fi
11765      ;;
11766
11767    cygwin* | mingw* | pw32* | cegcc*)
11768      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11769      # as there is no search path for DLLs.
11770      hardcode_libdir_flag_spec='-L$libdir'
11771      export_dynamic_flag_spec='$wl--export-all-symbols'
11772      allow_undefined_flag=unsupported
11773      always_export_symbols=no
11774      enable_shared_with_static_runtimes=yes
11775      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'
11776      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11777
11778      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11779        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11780	# If the export-symbols file already is a .def file, use it as
11781	# is; otherwise, prepend EXPORTS...
11782	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11783          cp $export_symbols $output_objdir/$soname.def;
11784        else
11785          echo EXPORTS > $output_objdir/$soname.def;
11786          cat $export_symbols >> $output_objdir/$soname.def;
11787        fi~
11788        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11789      else
11790	ld_shlibs=no
11791      fi
11792      ;;
11793
11794    haiku*)
11795      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11796      link_all_deplibs=yes
11797      ;;
11798
11799    os2*)
11800      hardcode_libdir_flag_spec='-L$libdir'
11801      hardcode_minus_L=yes
11802      allow_undefined_flag=unsupported
11803      shrext_cmds=.dll
11804      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11805	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11806	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11807	$ECHO EXPORTS >> $output_objdir/$libname.def~
11808	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11809	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11810	emximp -o $lib $output_objdir/$libname.def'
11811      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11812	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11813	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11814	$ECHO EXPORTS >> $output_objdir/$libname.def~
11815	prefix_cmds="$SED"~
11816	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11817	  prefix_cmds="$prefix_cmds -e 1d";
11818	fi~
11819	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11820	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11821	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11822	emximp -o $lib $output_objdir/$libname.def'
11823      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11824      enable_shared_with_static_runtimes=yes
11825      ;;
11826
11827    interix[3-9]*)
11828      hardcode_direct=no
11829      hardcode_shlibpath_var=no
11830      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11831      export_dynamic_flag_spec='$wl-E'
11832      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11833      # Instead, shared libraries are loaded at an image base (0x10000000 by
11834      # default) and relocated if they conflict, which is a slow very memory
11835      # consuming and fragmenting process.  To avoid this, we pick a random,
11836      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11837      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11838      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11839      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'
11840      ;;
11841
11842    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11843      tmp_diet=no
11844      if test linux-dietlibc = "$host_os"; then
11845	case $cc_basename in
11846	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11847	esac
11848      fi
11849      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11850	 && test no = "$tmp_diet"
11851      then
11852	tmp_addflag=' $pic_flag'
11853	tmp_sharedflag='-shared'
11854	case $cc_basename,$host_cpu in
11855        pgcc*)				# Portland Group C compiler
11856	  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'
11857	  tmp_addflag=' $pic_flag'
11858	  ;;
11859	pgf77* | pgf90* | pgf95* | pgfortran*)
11860					# Portland Group f77 and f90 compilers
11861	  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'
11862	  tmp_addflag=' $pic_flag -Mnomain' ;;
11863	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11864	  tmp_addflag=' -i_dynamic' ;;
11865	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11866	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11867	ifc* | ifort*)			# Intel Fortran compiler
11868	  tmp_addflag=' -nofor_main' ;;
11869	lf95*)				# Lahey Fortran 8.1
11870	  whole_archive_flag_spec=
11871	  tmp_sharedflag='--shared' ;;
11872        nagfor*)                        # NAGFOR 5.3
11873          tmp_sharedflag='-Wl,-shared' ;;
11874	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11875	  tmp_sharedflag='-qmkshrobj'
11876	  tmp_addflag= ;;
11877	nvcc*)	# Cuda Compiler Driver 2.2
11878	  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'
11879	  compiler_needs_object=yes
11880	  ;;
11881	esac
11882	case `$CC -V 2>&1 | sed 5q` in
11883	*Sun\ C*)			# Sun C 5.9
11884	  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'
11885	  compiler_needs_object=yes
11886	  tmp_sharedflag='-G' ;;
11887	*Sun\ F*)			# Sun Fortran 8.3
11888	  tmp_sharedflag='-G' ;;
11889	esac
11890	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11891
11892        if test yes = "$supports_anon_versioning"; then
11893          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11894            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11895            echo "local: *; };" >> $output_objdir/$libname.ver~
11896            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
11897        fi
11898
11899	case $cc_basename in
11900	tcc*)
11901	  export_dynamic_flag_spec='-rdynamic'
11902	  ;;
11903	xlf* | bgf* | bgxlf* | mpixlf*)
11904	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
11905	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
11906	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11907	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
11908	  if test yes = "$supports_anon_versioning"; then
11909	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
11910              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
11911              echo "local: *; };" >> $output_objdir/$libname.ver~
11912              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
11913	  fi
11914	  ;;
11915	esac
11916      else
11917        ld_shlibs=no
11918      fi
11919      ;;
11920
11921    netbsd*)
11922      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11923	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
11924	wlarc=
11925      else
11926	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11927	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11928      fi
11929      ;;
11930
11931    solaris*)
11932      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
11933	ld_shlibs=no
11934	cat <<_LT_EOF 1>&2
11935
11936*** Warning: The releases 2.8.* of the GNU linker cannot reliably
11937*** create shared libraries on Solaris systems.  Therefore, libtool
11938*** is disabling shared libraries support.  We urge you to upgrade GNU
11939*** binutils to release 2.9.1 or newer.  Another option is to modify
11940*** your PATH or compiler configuration so that the native linker is
11941*** used, and then restart.
11942
11943_LT_EOF
11944      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11945	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11946	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11947      else
11948	ld_shlibs=no
11949      fi
11950      ;;
11951
11952    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
11953      case `$LD -v 2>&1` in
11954        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
11955	ld_shlibs=no
11956	cat <<_LT_EOF 1>&2
11957
11958*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
11959*** reliably create shared libraries on SCO systems.  Therefore, libtool
11960*** is disabling shared libraries support.  We urge you to upgrade GNU
11961*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
11962*** your PATH or compiler configuration so that the native linker is
11963*** used, and then restart.
11964
11965_LT_EOF
11966	;;
11967	*)
11968	  # For security reasons, it is highly recommended that you always
11969	  # use absolute paths for naming shared libraries, and exclude the
11970	  # DT_RUNPATH tag from executables and libraries.  But doing so
11971	  # requires that you compile everything twice, which is a pain.
11972	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11973	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11974	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11975	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11976	  else
11977	    ld_shlibs=no
11978	  fi
11979	;;
11980      esac
11981      ;;
11982
11983    sunos4*)
11984      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11985      wlarc=
11986      hardcode_direct=yes
11987      hardcode_shlibpath_var=no
11988      ;;
11989
11990    *)
11991      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11992	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11993	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11994      else
11995	ld_shlibs=no
11996      fi
11997      ;;
11998    esac
11999
12000    if test no = "$ld_shlibs"; then
12001      runpath_var=
12002      hardcode_libdir_flag_spec=
12003      export_dynamic_flag_spec=
12004      whole_archive_flag_spec=
12005    fi
12006  else
12007    # PORTME fill in a description of your system's linker (not GNU ld)
12008    case $host_os in
12009    aix3*)
12010      allow_undefined_flag=unsupported
12011      always_export_symbols=yes
12012      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'
12013      # Note: this linker hardcodes the directories in LIBPATH if there
12014      # are no directories specified by -L.
12015      hardcode_minus_L=yes
12016      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12017	# Neither direct hardcoding nor static linking is supported with a
12018	# broken collect2.
12019	hardcode_direct=unsupported
12020      fi
12021      ;;
12022
12023    aix[4-9]*)
12024      if test ia64 = "$host_cpu"; then
12025	# On IA64, the linker does run time linking by default, so we don't
12026	# have to do anything special.
12027	aix_use_runtimelinking=no
12028	exp_sym_flag='-Bexport'
12029	no_entry_flag=
12030      else
12031	# If we're using GNU nm, then we don't want the "-C" option.
12032	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12033	# Without the "-l" option, or with the "-B" option, AIX nm treats
12034	# weak defined symbols like other global defined symbols, whereas
12035	# GNU nm marks them as "W".
12036	# While the 'weak' keyword is ignored in the Export File, we need
12037	# it in the Import File for the 'aix-soname' feature, so we have
12038	# to replace the "-B" option with "-P" for AIX nm.
12039	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12040	  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'
12041	else
12042	  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'
12043	fi
12044	aix_use_runtimelinking=no
12045
12046	# Test if we are trying to use run time linking or normal
12047	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12048	# have runtime linking enabled, and use it for executables.
12049	# For shared libraries, we enable/disable runtime linking
12050	# depending on the kind of the shared library created -
12051	# when "with_aix_soname,aix_use_runtimelinking" is:
12052	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12053	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12054	#            lib.a           static archive
12055	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12056	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12057	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12058	#            lib.a(lib.so.V) shared, rtl:no
12059	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
12060	#            lib.a           static archive
12061	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12062	  for ld_flag in $LDFLAGS; do
12063	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
12064	    aix_use_runtimelinking=yes
12065	    break
12066	  fi
12067	  done
12068	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
12069	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
12070	    # so we don't have lib.a shared libs to link our executables.
12071	    # We have to force runtime linking in this case.
12072	    aix_use_runtimelinking=yes
12073	    LDFLAGS="$LDFLAGS -Wl,-brtl"
12074	  fi
12075	  ;;
12076	esac
12077
12078	exp_sym_flag='-bexport'
12079	no_entry_flag='-bnoentry'
12080      fi
12081
12082      # When large executables or shared objects are built, AIX ld can
12083      # have problems creating the table of contents.  If linking a library
12084      # or program results in "error TOC overflow" add -mminimal-toc to
12085      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
12086      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12087
12088      archive_cmds=''
12089      hardcode_direct=yes
12090      hardcode_direct_absolute=yes
12091      hardcode_libdir_separator=':'
12092      link_all_deplibs=yes
12093      file_list_spec='$wl-f,'
12094      case $with_aix_soname,$aix_use_runtimelinking in
12095      aix,*) ;; # traditional, no import file
12096      svr4,* | *,yes) # use import file
12097	# The Import File defines what to hardcode.
12098	hardcode_direct=no
12099	hardcode_direct_absolute=no
12100	;;
12101      esac
12102
12103      if test yes = "$GCC"; then
12104	case $host_os in aix4.[012]|aix4.[012].*)
12105	# We only want to do this on AIX 4.2 and lower, the check
12106	# below for broken collect2 doesn't work under 4.3+
12107	  collect2name=`$CC -print-prog-name=collect2`
12108	  if test -f "$collect2name" &&
12109	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12110	  then
12111	  # We have reworked collect2
12112	  :
12113	  else
12114	  # We have old collect2
12115	  hardcode_direct=unsupported
12116	  # It fails to find uninstalled libraries when the uninstalled
12117	  # path is not listed in the libpath.  Setting hardcode_minus_L
12118	  # to unsupported forces relinking
12119	  hardcode_minus_L=yes
12120	  hardcode_libdir_flag_spec='-L$libdir'
12121	  hardcode_libdir_separator=
12122	  fi
12123	  ;;
12124	esac
12125	shared_flag='-shared'
12126	if test yes = "$aix_use_runtimelinking"; then
12127	  shared_flag="$shared_flag "'$wl-G'
12128	fi
12129	# Need to ensure runtime linking is disabled for the traditional
12130	# shared library, or the linker may eventually find shared libraries
12131	# /with/ Import File - we do not want to mix them.
12132	shared_flag_aix='-shared'
12133	shared_flag_svr4='-shared $wl-G'
12134      else
12135	# not using gcc
12136	if test ia64 = "$host_cpu"; then
12137	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12138	# chokes on -Wl,-G. The following line is correct:
12139	  shared_flag='-G'
12140	else
12141	  if test yes = "$aix_use_runtimelinking"; then
12142	    shared_flag='$wl-G'
12143	  else
12144	    shared_flag='$wl-bM:SRE'
12145	  fi
12146	  shared_flag_aix='$wl-bM:SRE'
12147	  shared_flag_svr4='$wl-G'
12148	fi
12149      fi
12150
12151      export_dynamic_flag_spec='$wl-bexpall'
12152      # It seems that -bexpall does not export symbols beginning with
12153      # underscore (_), so it is better to generate a list of symbols to export.
12154      always_export_symbols=yes
12155      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12156	# Warning - without using the other runtime loading flags (-brtl),
12157	# -berok will link without error, but may produce a broken library.
12158	allow_undefined_flag='-berok'
12159        # Determine the default libpath from the value encoded in an
12160        # empty executable.
12161        if test set = "${lt_cv_aix_libpath+set}"; then
12162  aix_libpath=$lt_cv_aix_libpath
12163else
12164  if test ${lt_cv_aix_libpath_+y}
12165then :
12166  printf %s "(cached) " >&6
12167else $as_nop
12168  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12169/* end confdefs.h.  */
12170
12171int
12172main (void)
12173{
12174
12175  ;
12176  return 0;
12177}
12178_ACEOF
12179if ac_fn_c_try_link "$LINENO"
12180then :
12181
12182  lt_aix_libpath_sed='
12183      /Import File Strings/,/^$/ {
12184	  /^0/ {
12185	      s/^0  *\([^ ]*\) *$/\1/
12186	      p
12187	  }
12188      }'
12189  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12190  # Check for a 64-bit object if we didn't find anything.
12191  if test -z "$lt_cv_aix_libpath_"; then
12192    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12193  fi
12194fi
12195rm -f core conftest.err conftest.$ac_objext conftest.beam \
12196    conftest$ac_exeext conftest.$ac_ext
12197  if test -z "$lt_cv_aix_libpath_"; then
12198    lt_cv_aix_libpath_=/usr/lib:/lib
12199  fi
12200
12201fi
12202
12203  aix_libpath=$lt_cv_aix_libpath_
12204fi
12205
12206        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12207        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
12208      else
12209	if test ia64 = "$host_cpu"; then
12210	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12211	  allow_undefined_flag="-z nodefs"
12212	  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"
12213	else
12214	 # Determine the default libpath from the value encoded in an
12215	 # empty executable.
12216	 if test set = "${lt_cv_aix_libpath+set}"; then
12217  aix_libpath=$lt_cv_aix_libpath
12218else
12219  if test ${lt_cv_aix_libpath_+y}
12220then :
12221  printf %s "(cached) " >&6
12222else $as_nop
12223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224/* end confdefs.h.  */
12225
12226int
12227main (void)
12228{
12229
12230  ;
12231  return 0;
12232}
12233_ACEOF
12234if ac_fn_c_try_link "$LINENO"
12235then :
12236
12237  lt_aix_libpath_sed='
12238      /Import File Strings/,/^$/ {
12239	  /^0/ {
12240	      s/^0  *\([^ ]*\) *$/\1/
12241	      p
12242	  }
12243      }'
12244  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12245  # Check for a 64-bit object if we didn't find anything.
12246  if test -z "$lt_cv_aix_libpath_"; then
12247    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12248  fi
12249fi
12250rm -f core conftest.err conftest.$ac_objext conftest.beam \
12251    conftest$ac_exeext conftest.$ac_ext
12252  if test -z "$lt_cv_aix_libpath_"; then
12253    lt_cv_aix_libpath_=/usr/lib:/lib
12254  fi
12255
12256fi
12257
12258  aix_libpath=$lt_cv_aix_libpath_
12259fi
12260
12261	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12262	  # Warning - without using the other run time loading flags,
12263	  # -berok will link without error, but may produce a broken library.
12264	  no_undefined_flag=' $wl-bernotok'
12265	  allow_undefined_flag=' $wl-berok'
12266	  if test yes = "$with_gnu_ld"; then
12267	    # We only use this code for GNU lds that support --whole-archive.
12268	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12269	  else
12270	    # Exported symbols can be pulled into shared objects from archives
12271	    whole_archive_flag_spec='$convenience'
12272	  fi
12273	  archive_cmds_need_lc=yes
12274	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12275	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12276	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12277	  if test svr4 != "$with_aix_soname"; then
12278	    # This is similar to how AIX traditionally builds its shared libraries.
12279	    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'
12280	  fi
12281	  if test aix != "$with_aix_soname"; then
12282	    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'
12283	  else
12284	    # used by -dlpreopen to get the symbols
12285	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12286	  fi
12287	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12288	fi
12289      fi
12290      ;;
12291
12292    amigaos*)
12293      case $host_cpu in
12294      powerpc)
12295            # see comment about AmigaOS4 .so support
12296            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12297            archive_expsym_cmds=''
12298        ;;
12299      m68k)
12300            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)'
12301            hardcode_libdir_flag_spec='-L$libdir'
12302            hardcode_minus_L=yes
12303        ;;
12304      esac
12305      ;;
12306
12307    bsdi[45]*)
12308      export_dynamic_flag_spec=-rdynamic
12309      ;;
12310
12311    cygwin* | mingw* | pw32* | cegcc*)
12312      # When not using gcc, we currently assume that we are using
12313      # Microsoft Visual C++.
12314      # hardcode_libdir_flag_spec is actually meaningless, as there is
12315      # no search path for DLLs.
12316      case $cc_basename in
12317      cl*)
12318	# Native MSVC
12319	hardcode_libdir_flag_spec=' '
12320	allow_undefined_flag=unsupported
12321	always_export_symbols=yes
12322	file_list_spec='@'
12323	# Tell ltmain to make .lib files, not .a files.
12324	libext=lib
12325	# Tell ltmain to make .dll files, not .so files.
12326	shrext_cmds=.dll
12327	# FIXME: Setting linknames here is a bad hack.
12328	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12329	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12330            cp "$export_symbols" "$output_objdir/$soname.def";
12331            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12332          else
12333            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12334          fi~
12335          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12336          linknames='
12337	# The linker will not automatically build a static lib if we build a DLL.
12338	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12339	enable_shared_with_static_runtimes=yes
12340	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12341	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12342	# Don't use ranlib
12343	old_postinstall_cmds='chmod 644 $oldlib'
12344	postlink_cmds='lt_outputfile="@OUTPUT@"~
12345          lt_tool_outputfile="@TOOL_OUTPUT@"~
12346          case $lt_outputfile in
12347            *.exe|*.EXE) ;;
12348            *)
12349              lt_outputfile=$lt_outputfile.exe
12350              lt_tool_outputfile=$lt_tool_outputfile.exe
12351              ;;
12352          esac~
12353          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12354            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12355            $RM "$lt_outputfile.manifest";
12356          fi'
12357	;;
12358      *)
12359	# Assume MSVC wrapper
12360	hardcode_libdir_flag_spec=' '
12361	allow_undefined_flag=unsupported
12362	# Tell ltmain to make .lib files, not .a files.
12363	libext=lib
12364	# Tell ltmain to make .dll files, not .so files.
12365	shrext_cmds=.dll
12366	# FIXME: Setting linknames here is a bad hack.
12367	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12368	# The linker will automatically build a .lib file if we build a DLL.
12369	old_archive_from_new_cmds='true'
12370	# FIXME: Should let the user specify the lib program.
12371	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12372	enable_shared_with_static_runtimes=yes
12373	;;
12374      esac
12375      ;;
12376
12377    darwin* | rhapsody*)
12378
12379
12380  archive_cmds_need_lc=no
12381  hardcode_direct=no
12382  hardcode_automatic=yes
12383  hardcode_shlibpath_var=unsupported
12384  if test yes = "$lt_cv_ld_force_load"; then
12385    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\"`'
12386
12387  else
12388    whole_archive_flag_spec=''
12389  fi
12390  link_all_deplibs=yes
12391  allow_undefined_flag=$_lt_dar_allow_undefined
12392  case $cc_basename in
12393     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12394     *) _lt_dar_can_shared=$GCC ;;
12395  esac
12396  if test yes = "$_lt_dar_can_shared"; then
12397    output_verbose_link_cmd=func_echo_all
12398    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12399    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12400    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"
12401    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"
12402
12403  else
12404  ld_shlibs=no
12405  fi
12406
12407      ;;
12408
12409    dgux*)
12410      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12411      hardcode_libdir_flag_spec='-L$libdir'
12412      hardcode_shlibpath_var=no
12413      ;;
12414
12415    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12416    # support.  Future versions do this automatically, but an explicit c++rt0.o
12417    # does not break anything, and helps significantly (at the cost of a little
12418    # extra space).
12419    freebsd2.2*)
12420      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12421      hardcode_libdir_flag_spec='-R$libdir'
12422      hardcode_direct=yes
12423      hardcode_shlibpath_var=no
12424      ;;
12425
12426    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12427    freebsd2.*)
12428      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12429      hardcode_direct=yes
12430      hardcode_minus_L=yes
12431      hardcode_shlibpath_var=no
12432      ;;
12433
12434    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12435    freebsd* | dragonfly*)
12436      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12437      hardcode_libdir_flag_spec='-R$libdir'
12438      hardcode_direct=yes
12439      hardcode_shlibpath_var=no
12440      ;;
12441
12442    hpux9*)
12443      if test yes = "$GCC"; then
12444	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'
12445      else
12446	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'
12447      fi
12448      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12449      hardcode_libdir_separator=:
12450      hardcode_direct=yes
12451
12452      # hardcode_minus_L: Not really in the search PATH,
12453      # but as the default location of the library.
12454      hardcode_minus_L=yes
12455      export_dynamic_flag_spec='$wl-E'
12456      ;;
12457
12458    hpux10*)
12459      if test yes,no = "$GCC,$with_gnu_ld"; then
12460	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12461      else
12462	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12463      fi
12464      if test no = "$with_gnu_ld"; then
12465	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12466	hardcode_libdir_separator=:
12467	hardcode_direct=yes
12468	hardcode_direct_absolute=yes
12469	export_dynamic_flag_spec='$wl-E'
12470	# hardcode_minus_L: Not really in the search PATH,
12471	# but as the default location of the library.
12472	hardcode_minus_L=yes
12473      fi
12474      ;;
12475
12476    hpux11*)
12477      if test yes,no = "$GCC,$with_gnu_ld"; then
12478	case $host_cpu in
12479	hppa*64*)
12480	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12481	  ;;
12482	ia64*)
12483	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12484	  ;;
12485	*)
12486	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12487	  ;;
12488	esac
12489      else
12490	case $host_cpu in
12491	hppa*64*)
12492	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12493	  ;;
12494	ia64*)
12495	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12496	  ;;
12497	*)
12498
12499	  # Older versions of the 11.00 compiler do not understand -b yet
12500	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12501	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12502printf %s "checking if $CC understands -b... " >&6; }
12503if test ${lt_cv_prog_compiler__b+y}
12504then :
12505  printf %s "(cached) " >&6
12506else $as_nop
12507  lt_cv_prog_compiler__b=no
12508   save_LDFLAGS=$LDFLAGS
12509   LDFLAGS="$LDFLAGS -b"
12510   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12511   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12512     # The linker can only warn and ignore the option if not recognized
12513     # So say no if there are warnings
12514     if test -s conftest.err; then
12515       # Append any errors to the config.log.
12516       cat conftest.err 1>&5
12517       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12518       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12519       if diff conftest.exp conftest.er2 >/dev/null; then
12520         lt_cv_prog_compiler__b=yes
12521       fi
12522     else
12523       lt_cv_prog_compiler__b=yes
12524     fi
12525   fi
12526   $RM -r conftest*
12527   LDFLAGS=$save_LDFLAGS
12528
12529fi
12530{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12531printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
12532
12533if test yes = "$lt_cv_prog_compiler__b"; then
12534    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12535else
12536    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12537fi
12538
12539	  ;;
12540	esac
12541      fi
12542      if test no = "$with_gnu_ld"; then
12543	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12544	hardcode_libdir_separator=:
12545
12546	case $host_cpu in
12547	hppa*64*|ia64*)
12548	  hardcode_direct=no
12549	  hardcode_shlibpath_var=no
12550	  ;;
12551	*)
12552	  hardcode_direct=yes
12553	  hardcode_direct_absolute=yes
12554	  export_dynamic_flag_spec='$wl-E'
12555
12556	  # hardcode_minus_L: Not really in the search PATH,
12557	  # but as the default location of the library.
12558	  hardcode_minus_L=yes
12559	  ;;
12560	esac
12561      fi
12562      ;;
12563
12564    irix5* | irix6* | nonstopux*)
12565      if test yes = "$GCC"; then
12566	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'
12567	# Try to use the -exported_symbol ld option, if it does not
12568	# work, assume that -exports_file does not work either and
12569	# implicitly export all symbols.
12570	# This should be the same for all languages, so no per-tag cache variable.
12571	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12572printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12573if test ${lt_cv_irix_exported_symbol+y}
12574then :
12575  printf %s "(cached) " >&6
12576else $as_nop
12577  save_LDFLAGS=$LDFLAGS
12578	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12579	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12580/* end confdefs.h.  */
12581int foo (void) { return 0; }
12582_ACEOF
12583if ac_fn_c_try_link "$LINENO"
12584then :
12585  lt_cv_irix_exported_symbol=yes
12586else $as_nop
12587  lt_cv_irix_exported_symbol=no
12588fi
12589rm -f core conftest.err conftest.$ac_objext conftest.beam \
12590    conftest$ac_exeext conftest.$ac_ext
12591           LDFLAGS=$save_LDFLAGS
12592fi
12593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12594printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
12595	if test yes = "$lt_cv_irix_exported_symbol"; then
12596          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'
12597	fi
12598      else
12599	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'
12600	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'
12601      fi
12602      archive_cmds_need_lc='no'
12603      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12604      hardcode_libdir_separator=:
12605      inherit_rpath=yes
12606      link_all_deplibs=yes
12607      ;;
12608
12609    linux*)
12610      case $cc_basename in
12611      tcc*)
12612	# Fabrice Bellard et al's Tiny C Compiler
12613	ld_shlibs=yes
12614	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12615	;;
12616      esac
12617      ;;
12618
12619    netbsd*)
12620      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12621	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12622      else
12623	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12624      fi
12625      hardcode_libdir_flag_spec='-R$libdir'
12626      hardcode_direct=yes
12627      hardcode_shlibpath_var=no
12628      ;;
12629
12630    newsos6)
12631      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12632      hardcode_direct=yes
12633      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12634      hardcode_libdir_separator=:
12635      hardcode_shlibpath_var=no
12636      ;;
12637
12638    *nto* | *qnx*)
12639      ;;
12640
12641    openbsd* | bitrig*)
12642      if test -f /usr/libexec/ld.so; then
12643	hardcode_direct=yes
12644	hardcode_shlibpath_var=no
12645	hardcode_direct_absolute=yes
12646	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12647	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12648	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12649	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12650	  export_dynamic_flag_spec='$wl-E'
12651	else
12652	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12653	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12654	fi
12655      else
12656	ld_shlibs=no
12657      fi
12658      ;;
12659
12660    os2*)
12661      hardcode_libdir_flag_spec='-L$libdir'
12662      hardcode_minus_L=yes
12663      allow_undefined_flag=unsupported
12664      shrext_cmds=.dll
12665      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12666	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12667	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12668	$ECHO EXPORTS >> $output_objdir/$libname.def~
12669	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12670	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12671	emximp -o $lib $output_objdir/$libname.def'
12672      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12673	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12674	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12675	$ECHO EXPORTS >> $output_objdir/$libname.def~
12676	prefix_cmds="$SED"~
12677	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12678	  prefix_cmds="$prefix_cmds -e 1d";
12679	fi~
12680	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12681	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12682	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12683	emximp -o $lib $output_objdir/$libname.def'
12684      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12685      enable_shared_with_static_runtimes=yes
12686      ;;
12687
12688    osf3*)
12689      if test yes = "$GCC"; then
12690	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12691	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'
12692      else
12693	allow_undefined_flag=' -expect_unresolved \*'
12694	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'
12695      fi
12696      archive_cmds_need_lc='no'
12697      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12698      hardcode_libdir_separator=:
12699      ;;
12700
12701    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12702      if test yes = "$GCC"; then
12703	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12704	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'
12705	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12706      else
12707	allow_undefined_flag=' -expect_unresolved \*'
12708	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'
12709	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~
12710          $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'
12711
12712	# Both c and cxx compiler support -rpath directly
12713	hardcode_libdir_flag_spec='-rpath $libdir'
12714      fi
12715      archive_cmds_need_lc='no'
12716      hardcode_libdir_separator=:
12717      ;;
12718
12719    solaris*)
12720      no_undefined_flag=' -z defs'
12721      if test yes = "$GCC"; then
12722	wlarc='$wl'
12723	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12724	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12725          $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'
12726      else
12727	case `$CC -V 2>&1` in
12728	*"Compilers 5.0"*)
12729	  wlarc=''
12730	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12731	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12732            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12733	  ;;
12734	*)
12735	  wlarc='$wl'
12736	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12737	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12738            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12739	  ;;
12740	esac
12741      fi
12742      hardcode_libdir_flag_spec='-R$libdir'
12743      hardcode_shlibpath_var=no
12744      case $host_os in
12745      solaris2.[0-5] | solaris2.[0-5].*) ;;
12746      *)
12747	# The compiler driver will combine and reorder linker options,
12748	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12749	# but is careful enough not to reorder.
12750	# Supported since Solaris 2.6 (maybe 2.5.1?)
12751	if test yes = "$GCC"; then
12752	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12753	else
12754	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12755	fi
12756	;;
12757      esac
12758      link_all_deplibs=yes
12759      ;;
12760
12761    sunos4*)
12762      if test sequent = "$host_vendor"; then
12763	# Use $CC to link under sequent, because it throws in some extra .o
12764	# files that make .init and .fini sections work.
12765	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12766      else
12767	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12768      fi
12769      hardcode_libdir_flag_spec='-L$libdir'
12770      hardcode_direct=yes
12771      hardcode_minus_L=yes
12772      hardcode_shlibpath_var=no
12773      ;;
12774
12775    sysv4)
12776      case $host_vendor in
12777	sni)
12778	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12779	  hardcode_direct=yes # is this really true???
12780	;;
12781	siemens)
12782	  ## LD is ld it makes a PLAMLIB
12783	  ## CC just makes a GrossModule.
12784	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12785	  reload_cmds='$CC -r -o $output$reload_objs'
12786	  hardcode_direct=no
12787        ;;
12788	motorola)
12789	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12790	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12791	;;
12792      esac
12793      runpath_var='LD_RUN_PATH'
12794      hardcode_shlibpath_var=no
12795      ;;
12796
12797    sysv4.3*)
12798      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12799      hardcode_shlibpath_var=no
12800      export_dynamic_flag_spec='-Bexport'
12801      ;;
12802
12803    sysv4*MP*)
12804      if test -d /usr/nec; then
12805	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12806	hardcode_shlibpath_var=no
12807	runpath_var=LD_RUN_PATH
12808	hardcode_runpath_var=yes
12809	ld_shlibs=yes
12810      fi
12811      ;;
12812
12813    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12814      no_undefined_flag='$wl-z,text'
12815      archive_cmds_need_lc=no
12816      hardcode_shlibpath_var=no
12817      runpath_var='LD_RUN_PATH'
12818
12819      if test yes = "$GCC"; then
12820	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12821	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12822      else
12823	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12824	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12825      fi
12826      ;;
12827
12828    sysv5* | sco3.2v5* | sco5v6*)
12829      # Note: We CANNOT use -z defs as we might desire, because we do not
12830      # link with -lc, and that would cause any symbols used from libc to
12831      # always be unresolved, which means just about no library would
12832      # ever link correctly.  If we're not using GNU ld we use -z text
12833      # though, which does catch some bad symbols but isn't as heavy-handed
12834      # as -z defs.
12835      no_undefined_flag='$wl-z,text'
12836      allow_undefined_flag='$wl-z,nodefs'
12837      archive_cmds_need_lc=no
12838      hardcode_shlibpath_var=no
12839      hardcode_libdir_flag_spec='$wl-R,$libdir'
12840      hardcode_libdir_separator=':'
12841      link_all_deplibs=yes
12842      export_dynamic_flag_spec='$wl-Bexport'
12843      runpath_var='LD_RUN_PATH'
12844
12845      if test yes = "$GCC"; then
12846	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12847	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12848      else
12849	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12850	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12851      fi
12852      ;;
12853
12854    uts4*)
12855      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12856      hardcode_libdir_flag_spec='-L$libdir'
12857      hardcode_shlibpath_var=no
12858      ;;
12859
12860    *)
12861      ld_shlibs=no
12862      ;;
12863    esac
12864
12865    if test sni = "$host_vendor"; then
12866      case $host in
12867      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12868	export_dynamic_flag_spec='$wl-Blargedynsym'
12869	;;
12870      esac
12871    fi
12872  fi
12873
12874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12875printf "%s\n" "$ld_shlibs" >&6; }
12876test no = "$ld_shlibs" && can_build_shared=no
12877
12878with_gnu_ld=$with_gnu_ld
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894#
12895# Do we need to explicitly link libc?
12896#
12897case "x$archive_cmds_need_lc" in
12898x|xyes)
12899  # Assume -lc should be added
12900  archive_cmds_need_lc=yes
12901
12902  if test yes,yes = "$GCC,$enable_shared"; then
12903    case $archive_cmds in
12904    *'~'*)
12905      # FIXME: we may have to deal with multi-command sequences.
12906      ;;
12907    '$CC '*)
12908      # Test whether the compiler implicitly links with -lc since on some
12909      # systems, -lgcc has to come before -lc. If gcc already passes -lc
12910      # to ld, don't add -lc before -lgcc.
12911      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
12912printf %s "checking whether -lc should be explicitly linked in... " >&6; }
12913if test ${lt_cv_archive_cmds_need_lc+y}
12914then :
12915  printf %s "(cached) " >&6
12916else $as_nop
12917  $RM conftest*
12918	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
12919
12920	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12921  (eval $ac_compile) 2>&5
12922  ac_status=$?
12923  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12924  test $ac_status = 0; } 2>conftest.err; then
12925	  soname=conftest
12926	  lib=conftest
12927	  libobjs=conftest.$ac_objext
12928	  deplibs=
12929	  wl=$lt_prog_compiler_wl
12930	  pic_flag=$lt_prog_compiler_pic
12931	  compiler_flags=-v
12932	  linker_flags=-v
12933	  verstring=
12934	  output_objdir=.
12935	  libname=conftest
12936	  lt_save_allow_undefined_flag=$allow_undefined_flag
12937	  allow_undefined_flag=
12938	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
12939  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
12940  ac_status=$?
12941  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12942  test $ac_status = 0; }
12943	  then
12944	    lt_cv_archive_cmds_need_lc=no
12945	  else
12946	    lt_cv_archive_cmds_need_lc=yes
12947	  fi
12948	  allow_undefined_flag=$lt_save_allow_undefined_flag
12949	else
12950	  cat conftest.err 1>&5
12951	fi
12952	$RM conftest*
12953
12954fi
12955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
12956printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
12957      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
12958      ;;
12959    esac
12960  fi
12961  ;;
12962esac
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13116printf %s "checking dynamic linker characteristics... " >&6; }
13117
13118if test yes = "$GCC"; then
13119  case $host_os in
13120    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13121    *) lt_awk_arg='/^libraries:/' ;;
13122  esac
13123  case $host_os in
13124    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13125    *) lt_sed_strip_eq='s|=/|/|g' ;;
13126  esac
13127  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13128  case $lt_search_path_spec in
13129  *\;*)
13130    # if the path contains ";" then we assume it to be the separator
13131    # otherwise default to the standard path separator (i.e. ":") - it is
13132    # assumed that no part of a normal pathname contains ";" but that should
13133    # okay in the real world where ";" in dirpaths is itself problematic.
13134    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13135    ;;
13136  *)
13137    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13138    ;;
13139  esac
13140  # Ok, now we have the path, separated by spaces, we can step through it
13141  # and add multilib dir if necessary...
13142  lt_tmp_lt_search_path_spec=
13143  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13144  # ...but if some path component already ends with the multilib dir we assume
13145  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13146  case "$lt_multi_os_dir; $lt_search_path_spec " in
13147  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13148    lt_multi_os_dir=
13149    ;;
13150  esac
13151  for lt_sys_path in $lt_search_path_spec; do
13152    if test -d "$lt_sys_path$lt_multi_os_dir"; then
13153      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13154    elif test -n "$lt_multi_os_dir"; then
13155      test -d "$lt_sys_path" && \
13156	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13157    fi
13158  done
13159  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13160BEGIN {RS = " "; FS = "/|\n";} {
13161  lt_foo = "";
13162  lt_count = 0;
13163  for (lt_i = NF; lt_i > 0; lt_i--) {
13164    if ($lt_i != "" && $lt_i != ".") {
13165      if ($lt_i == "..") {
13166        lt_count++;
13167      } else {
13168        if (lt_count == 0) {
13169          lt_foo = "/" $lt_i lt_foo;
13170        } else {
13171          lt_count--;
13172        }
13173      }
13174    }
13175  }
13176  if (lt_foo != "") { lt_freq[lt_foo]++; }
13177  if (lt_freq[lt_foo] == 1) { print lt_foo; }
13178}'`
13179  # AWK program above erroneously prepends '/' to C:/dos/paths
13180  # for these hosts.
13181  case $host_os in
13182    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13183      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13184  esac
13185  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13186else
13187  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13188fi
13189library_names_spec=
13190libname_spec='lib$name'
13191soname_spec=
13192shrext_cmds=.so
13193postinstall_cmds=
13194postuninstall_cmds=
13195finish_cmds=
13196finish_eval=
13197shlibpath_var=
13198shlibpath_overrides_runpath=unknown
13199version_type=none
13200dynamic_linker="$host_os ld.so"
13201sys_lib_dlsearch_path_spec="/lib /usr/lib"
13202need_lib_prefix=unknown
13203hardcode_into_libs=no
13204
13205# when you set need_version to no, make sure it does not cause -set_version
13206# flags to be left without arguments
13207need_version=unknown
13208
13209
13210
13211case $host_os in
13212aix3*)
13213  version_type=linux # correct to gnu/linux during the next big refactor
13214  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13215  shlibpath_var=LIBPATH
13216
13217  # AIX 3 has no versioning support, so we append a major version to the name.
13218  soname_spec='$libname$release$shared_ext$major'
13219  ;;
13220
13221aix[4-9]*)
13222  version_type=linux # correct to gnu/linux during the next big refactor
13223  need_lib_prefix=no
13224  need_version=no
13225  hardcode_into_libs=yes
13226  if test ia64 = "$host_cpu"; then
13227    # AIX 5 supports IA64
13228    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13229    shlibpath_var=LD_LIBRARY_PATH
13230  else
13231    # With GCC up to 2.95.x, collect2 would create an import file
13232    # for dependence libraries.  The import file would start with
13233    # the line '#! .'.  This would cause the generated library to
13234    # depend on '.', always an invalid library.  This was fixed in
13235    # development snapshots of GCC prior to 3.0.
13236    case $host_os in
13237      aix4 | aix4.[01] | aix4.[01].*)
13238      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13239	   echo ' yes '
13240	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13241	:
13242      else
13243	can_build_shared=no
13244      fi
13245      ;;
13246    esac
13247    # Using Import Files as archive members, it is possible to support
13248    # filename-based versioning of shared library archives on AIX. While
13249    # this would work for both with and without runtime linking, it will
13250    # prevent static linking of such archives. So we do filename-based
13251    # shared library versioning with .so extension only, which is used
13252    # when both runtime linking and shared linking is enabled.
13253    # Unfortunately, runtime linking may impact performance, so we do
13254    # not want this to be the default eventually. Also, we use the
13255    # versioned .so libs for executables only if there is the -brtl
13256    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13257    # To allow for filename-based versioning support, we need to create
13258    # libNAME.so.V as an archive file, containing:
13259    # *) an Import File, referring to the versioned filename of the
13260    #    archive as well as the shared archive member, telling the
13261    #    bitwidth (32 or 64) of that shared object, and providing the
13262    #    list of exported symbols of that shared object, eventually
13263    #    decorated with the 'weak' keyword
13264    # *) the shared object with the F_LOADONLY flag set, to really avoid
13265    #    it being seen by the linker.
13266    # At run time we better use the real file rather than another symlink,
13267    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13268
13269    case $with_aix_soname,$aix_use_runtimelinking in
13270    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13271    # soname into executable. Probably we can add versioning support to
13272    # collect2, so additional links can be useful in future.
13273    aix,yes) # traditional libtool
13274      dynamic_linker='AIX unversionable lib.so'
13275      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13276      # instead of lib<name>.a to let people know that these are not
13277      # typical AIX shared libraries.
13278      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13279      ;;
13280    aix,no) # traditional AIX only
13281      dynamic_linker='AIX lib.a(lib.so.V)'
13282      # We preserve .a as extension for shared libraries through AIX4.2
13283      # and later when we are not doing run time linking.
13284      library_names_spec='$libname$release.a $libname.a'
13285      soname_spec='$libname$release$shared_ext$major'
13286      ;;
13287    svr4,*) # full svr4 only
13288      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13289      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13290      # We do not specify a path in Import Files, so LIBPATH fires.
13291      shlibpath_overrides_runpath=yes
13292      ;;
13293    *,yes) # both, prefer svr4
13294      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13295      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13296      # unpreferred sharedlib libNAME.a needs extra handling
13297      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"'
13298      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"'
13299      # We do not specify a path in Import Files, so LIBPATH fires.
13300      shlibpath_overrides_runpath=yes
13301      ;;
13302    *,no) # both, prefer aix
13303      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13304      library_names_spec='$libname$release.a $libname.a'
13305      soname_spec='$libname$release$shared_ext$major'
13306      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13307      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)'
13308      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"'
13309      ;;
13310    esac
13311    shlibpath_var=LIBPATH
13312  fi
13313  ;;
13314
13315amigaos*)
13316  case $host_cpu in
13317  powerpc)
13318    # Since July 2007 AmigaOS4 officially supports .so libraries.
13319    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13320    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13321    ;;
13322  m68k)
13323    library_names_spec='$libname.ixlibrary $libname.a'
13324    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13325    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'
13326    ;;
13327  esac
13328  ;;
13329
13330beos*)
13331  library_names_spec='$libname$shared_ext'
13332  dynamic_linker="$host_os ld.so"
13333  shlibpath_var=LIBRARY_PATH
13334  ;;
13335
13336bsdi[45]*)
13337  version_type=linux # correct to gnu/linux during the next big refactor
13338  need_version=no
13339  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13340  soname_spec='$libname$release$shared_ext$major'
13341  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13342  shlibpath_var=LD_LIBRARY_PATH
13343  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13344  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13345  # the default ld.so.conf also contains /usr/contrib/lib and
13346  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13347  # libtool to hard-code these into programs
13348  ;;
13349
13350cygwin* | mingw* | pw32* | cegcc*)
13351  version_type=windows
13352  shrext_cmds=.dll
13353  need_version=no
13354  need_lib_prefix=no
13355
13356  case $GCC,$cc_basename in
13357  yes,*)
13358    # gcc
13359    library_names_spec='$libname.dll.a'
13360    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13361    postinstall_cmds='base_file=`basename \$file`~
13362      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13363      dldir=$destdir/`dirname \$dlpath`~
13364      test -d \$dldir || mkdir -p \$dldir~
13365      $install_prog $dir/$dlname \$dldir/$dlname~
13366      chmod a+x \$dldir/$dlname~
13367      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13368        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13369      fi'
13370    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13371      dlpath=$dir/\$dldll~
13372       $RM \$dlpath'
13373    shlibpath_overrides_runpath=yes
13374
13375    case $host_os in
13376    cygwin*)
13377      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13378      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13379
13380      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13381      ;;
13382    mingw* | cegcc*)
13383      # MinGW DLLs use traditional 'lib' prefix
13384      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13385      ;;
13386    pw32*)
13387      # pw32 DLLs use 'pw' prefix rather than 'lib'
13388      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13389      ;;
13390    esac
13391    dynamic_linker='Win32 ld.exe'
13392    ;;
13393
13394  *,cl*)
13395    # Native MSVC
13396    libname_spec='$name'
13397    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13398    library_names_spec='$libname.dll.lib'
13399
13400    case $build_os in
13401    mingw*)
13402      sys_lib_search_path_spec=
13403      lt_save_ifs=$IFS
13404      IFS=';'
13405      for lt_path in $LIB
13406      do
13407        IFS=$lt_save_ifs
13408        # Let DOS variable expansion print the short 8.3 style file name.
13409        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13410        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13411      done
13412      IFS=$lt_save_ifs
13413      # Convert to MSYS style.
13414      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13415      ;;
13416    cygwin*)
13417      # Convert to unix form, then to dos form, then back to unix form
13418      # but this time dos style (no spaces!) so that the unix form looks
13419      # like /cygdrive/c/PROGRA~1:/cygdr...
13420      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13421      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13422      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13423      ;;
13424    *)
13425      sys_lib_search_path_spec=$LIB
13426      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13427        # It is most probably a Windows format PATH.
13428        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13429      else
13430        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13431      fi
13432      # FIXME: find the short name or the path components, as spaces are
13433      # common. (e.g. "Program Files" -> "PROGRA~1")
13434      ;;
13435    esac
13436
13437    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13438    postinstall_cmds='base_file=`basename \$file`~
13439      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13440      dldir=$destdir/`dirname \$dlpath`~
13441      test -d \$dldir || mkdir -p \$dldir~
13442      $install_prog $dir/$dlname \$dldir/$dlname'
13443    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13444      dlpath=$dir/\$dldll~
13445       $RM \$dlpath'
13446    shlibpath_overrides_runpath=yes
13447    dynamic_linker='Win32 link.exe'
13448    ;;
13449
13450  *)
13451    # Assume MSVC wrapper
13452    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13453    dynamic_linker='Win32 ld.exe'
13454    ;;
13455  esac
13456  # FIXME: first we should search . and the directory the executable is in
13457  shlibpath_var=PATH
13458  ;;
13459
13460darwin* | rhapsody*)
13461  dynamic_linker="$host_os dyld"
13462  version_type=darwin
13463  need_lib_prefix=no
13464  need_version=no
13465  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13466  soname_spec='$libname$release$major$shared_ext'
13467  shlibpath_overrides_runpath=yes
13468  shlibpath_var=DYLD_LIBRARY_PATH
13469  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13470
13471  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13472  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13473  ;;
13474
13475dgux*)
13476  version_type=linux # correct to gnu/linux during the next big refactor
13477  need_lib_prefix=no
13478  need_version=no
13479  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13480  soname_spec='$libname$release$shared_ext$major'
13481  shlibpath_var=LD_LIBRARY_PATH
13482  ;;
13483
13484freebsd* | dragonfly*)
13485  # DragonFly does not have aout.  When/if they implement a new
13486  # versioning mechanism, adjust this.
13487  if test -x /usr/bin/objformat; then
13488    objformat=`/usr/bin/objformat`
13489  else
13490    case $host_os in
13491    freebsd[23].*) objformat=aout ;;
13492    *) objformat=elf ;;
13493    esac
13494  fi
13495  version_type=freebsd-$objformat
13496  case $version_type in
13497    freebsd-elf*)
13498      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13499      soname_spec='$libname$release$shared_ext$major'
13500      need_version=no
13501      need_lib_prefix=no
13502      ;;
13503    freebsd-*)
13504      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13505      need_version=yes
13506      ;;
13507  esac
13508  shlibpath_var=LD_LIBRARY_PATH
13509  case $host_os in
13510  freebsd2.*)
13511    shlibpath_overrides_runpath=yes
13512    ;;
13513  freebsd3.[01]* | freebsdelf3.[01]*)
13514    shlibpath_overrides_runpath=yes
13515    hardcode_into_libs=yes
13516    ;;
13517  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13518  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13519    shlibpath_overrides_runpath=no
13520    hardcode_into_libs=yes
13521    ;;
13522  *) # from 4.6 on, and DragonFly
13523    shlibpath_overrides_runpath=yes
13524    hardcode_into_libs=yes
13525    ;;
13526  esac
13527  ;;
13528
13529haiku*)
13530  version_type=linux # correct to gnu/linux during the next big refactor
13531  need_lib_prefix=no
13532  need_version=no
13533  dynamic_linker="$host_os runtime_loader"
13534  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13535  soname_spec='$libname$release$shared_ext$major'
13536  shlibpath_var=LIBRARY_PATH
13537  shlibpath_overrides_runpath=no
13538  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13539  hardcode_into_libs=yes
13540  ;;
13541
13542hpux9* | hpux10* | hpux11*)
13543  # Give a soname corresponding to the major version so that dld.sl refuses to
13544  # link against other versions.
13545  version_type=sunos
13546  need_lib_prefix=no
13547  need_version=no
13548  case $host_cpu in
13549  ia64*)
13550    shrext_cmds='.so'
13551    hardcode_into_libs=yes
13552    dynamic_linker="$host_os dld.so"
13553    shlibpath_var=LD_LIBRARY_PATH
13554    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13555    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13556    soname_spec='$libname$release$shared_ext$major'
13557    if test 32 = "$HPUX_IA64_MODE"; then
13558      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13559      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13560    else
13561      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13562      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13563    fi
13564    ;;
13565  hppa*64*)
13566    shrext_cmds='.sl'
13567    hardcode_into_libs=yes
13568    dynamic_linker="$host_os dld.sl"
13569    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13570    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13571    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13572    soname_spec='$libname$release$shared_ext$major'
13573    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13574    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13575    ;;
13576  *)
13577    shrext_cmds='.sl'
13578    dynamic_linker="$host_os dld.sl"
13579    shlibpath_var=SHLIB_PATH
13580    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13581    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13582    soname_spec='$libname$release$shared_ext$major'
13583    ;;
13584  esac
13585  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13586  postinstall_cmds='chmod 555 $lib'
13587  # or fails outright, so override atomically:
13588  install_override_mode=555
13589  ;;
13590
13591interix[3-9]*)
13592  version_type=linux # correct to gnu/linux during the next big refactor
13593  need_lib_prefix=no
13594  need_version=no
13595  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13596  soname_spec='$libname$release$shared_ext$major'
13597  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13598  shlibpath_var=LD_LIBRARY_PATH
13599  shlibpath_overrides_runpath=no
13600  hardcode_into_libs=yes
13601  ;;
13602
13603irix5* | irix6* | nonstopux*)
13604  case $host_os in
13605    nonstopux*) version_type=nonstopux ;;
13606    *)
13607	if test yes = "$lt_cv_prog_gnu_ld"; then
13608		version_type=linux # correct to gnu/linux during the next big refactor
13609	else
13610		version_type=irix
13611	fi ;;
13612  esac
13613  need_lib_prefix=no
13614  need_version=no
13615  soname_spec='$libname$release$shared_ext$major'
13616  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13617  case $host_os in
13618  irix5* | nonstopux*)
13619    libsuff= shlibsuff=
13620    ;;
13621  *)
13622    case $LD in # libtool.m4 will add one of these switches to LD
13623    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13624      libsuff= shlibsuff= libmagic=32-bit;;
13625    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13626      libsuff=32 shlibsuff=N32 libmagic=N32;;
13627    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13628      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13629    *) libsuff= shlibsuff= libmagic=never-match;;
13630    esac
13631    ;;
13632  esac
13633  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13634  shlibpath_overrides_runpath=no
13635  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13636  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13637  hardcode_into_libs=yes
13638  ;;
13639
13640# No shared lib support for Linux oldld, aout, or coff.
13641linux*oldld* | linux*aout* | linux*coff*)
13642  dynamic_linker=no
13643  ;;
13644
13645linux*android*)
13646  version_type=none # Android doesn't support versioned libraries.
13647  need_lib_prefix=no
13648  need_version=no
13649  library_names_spec='$libname$release$shared_ext'
13650  soname_spec='$libname$release$shared_ext'
13651  finish_cmds=
13652  shlibpath_var=LD_LIBRARY_PATH
13653  shlibpath_overrides_runpath=yes
13654
13655  # This implies no fast_install, which is unacceptable.
13656  # Some rework will be needed to allow for fast_install
13657  # before this can be enabled.
13658  hardcode_into_libs=yes
13659
13660  dynamic_linker='Android linker'
13661  # Don't embed -rpath directories since the linker doesn't support them.
13662  hardcode_libdir_flag_spec='-L$libdir'
13663  ;;
13664
13665# This must be glibc/ELF.
13666linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13667  version_type=linux # correct to gnu/linux during the next big refactor
13668  need_lib_prefix=no
13669  need_version=no
13670  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13671  soname_spec='$libname$release$shared_ext$major'
13672  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13673  shlibpath_var=LD_LIBRARY_PATH
13674  shlibpath_overrides_runpath=no
13675
13676  # Some binutils ld are patched to set DT_RUNPATH
13677  if test ${lt_cv_shlibpath_overrides_runpath+y}
13678then :
13679  printf %s "(cached) " >&6
13680else $as_nop
13681  lt_cv_shlibpath_overrides_runpath=no
13682    save_LDFLAGS=$LDFLAGS
13683    save_libdir=$libdir
13684    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13685	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13686    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h.  */
13688
13689int
13690main (void)
13691{
13692
13693  ;
13694  return 0;
13695}
13696_ACEOF
13697if ac_fn_c_try_link "$LINENO"
13698then :
13699  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
13700then :
13701  lt_cv_shlibpath_overrides_runpath=yes
13702fi
13703fi
13704rm -f core conftest.err conftest.$ac_objext conftest.beam \
13705    conftest$ac_exeext conftest.$ac_ext
13706    LDFLAGS=$save_LDFLAGS
13707    libdir=$save_libdir
13708
13709fi
13710
13711  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13712
13713  # This implies no fast_install, which is unacceptable.
13714  # Some rework will be needed to allow for fast_install
13715  # before this can be enabled.
13716  hardcode_into_libs=yes
13717
13718  # Ideally, we could use ldconfig to report *all* directores which are
13719  # searched for libraries, however this is still not possible.  Aside from not
13720  # being certain /sbin/ldconfig is available, command
13721  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13722  # even though it is searched at run-time.  Try to do the best guess by
13723  # appending ld.so.conf contents (and includes) to the search path.
13724  if test -f /etc/ld.so.conf; then
13725    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' ' '`
13726    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
13727  fi
13728
13729  # We used to test for /lib/ld.so.1 and disable shared libraries on
13730  # powerpc, because MkLinux only supported shared libraries with the
13731  # GNU dynamic linker.  Since this was broken with cross compilers,
13732  # most powerpc-linux boxes support dynamic linking these days and
13733  # people can always --disable-shared, the test was removed, and we
13734  # assume the GNU/Linux dynamic linker is in use.
13735  dynamic_linker='GNU/Linux ld.so'
13736  ;;
13737
13738netbsd*)
13739  version_type=sunos
13740  need_lib_prefix=no
13741  need_version=no
13742  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13743    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13744    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13745    dynamic_linker='NetBSD (a.out) ld.so'
13746  else
13747    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13748    soname_spec='$libname$release$shared_ext$major'
13749    dynamic_linker='NetBSD ld.elf_so'
13750  fi
13751  shlibpath_var=LD_LIBRARY_PATH
13752  shlibpath_overrides_runpath=yes
13753  hardcode_into_libs=yes
13754  ;;
13755
13756newsos6)
13757  version_type=linux # correct to gnu/linux during the next big refactor
13758  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13759  shlibpath_var=LD_LIBRARY_PATH
13760  shlibpath_overrides_runpath=yes
13761  ;;
13762
13763*nto* | *qnx*)
13764  version_type=qnx
13765  need_lib_prefix=no
13766  need_version=no
13767  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13768  soname_spec='$libname$release$shared_ext$major'
13769  shlibpath_var=LD_LIBRARY_PATH
13770  shlibpath_overrides_runpath=no
13771  hardcode_into_libs=yes
13772  dynamic_linker='ldqnx.so'
13773  ;;
13774
13775openbsd* | bitrig*)
13776  version_type=sunos
13777  sys_lib_dlsearch_path_spec=/usr/lib
13778  need_lib_prefix=no
13779  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13780    need_version=no
13781  else
13782    need_version=yes
13783  fi
13784  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13785  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13786  shlibpath_var=LD_LIBRARY_PATH
13787  shlibpath_overrides_runpath=yes
13788  ;;
13789
13790os2*)
13791  libname_spec='$name'
13792  version_type=windows
13793  shrext_cmds=.dll
13794  need_version=no
13795  need_lib_prefix=no
13796  # OS/2 can only load a DLL with a base name of 8 characters or less.
13797  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13798    v=$($ECHO $release$versuffix | tr -d .-);
13799    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13800    $ECHO $n$v`$shared_ext'
13801  library_names_spec='${libname}_dll.$libext'
13802  dynamic_linker='OS/2 ld.exe'
13803  shlibpath_var=BEGINLIBPATH
13804  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13805  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13806  postinstall_cmds='base_file=`basename \$file`~
13807    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13808    dldir=$destdir/`dirname \$dlpath`~
13809    test -d \$dldir || mkdir -p \$dldir~
13810    $install_prog $dir/$dlname \$dldir/$dlname~
13811    chmod a+x \$dldir/$dlname~
13812    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13813      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13814    fi'
13815  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13816    dlpath=$dir/\$dldll~
13817    $RM \$dlpath'
13818  ;;
13819
13820osf3* | osf4* | osf5*)
13821  version_type=osf
13822  need_lib_prefix=no
13823  need_version=no
13824  soname_spec='$libname$release$shared_ext$major'
13825  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13826  shlibpath_var=LD_LIBRARY_PATH
13827  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13828  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13829  ;;
13830
13831rdos*)
13832  dynamic_linker=no
13833  ;;
13834
13835solaris*)
13836  version_type=linux # correct to gnu/linux during the next big refactor
13837  need_lib_prefix=no
13838  need_version=no
13839  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13840  soname_spec='$libname$release$shared_ext$major'
13841  shlibpath_var=LD_LIBRARY_PATH
13842  shlibpath_overrides_runpath=yes
13843  hardcode_into_libs=yes
13844  # ldd complains unless libraries are executable
13845  postinstall_cmds='chmod +x $lib'
13846  ;;
13847
13848sunos4*)
13849  version_type=sunos
13850  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13851  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13852  shlibpath_var=LD_LIBRARY_PATH
13853  shlibpath_overrides_runpath=yes
13854  if test yes = "$with_gnu_ld"; then
13855    need_lib_prefix=no
13856  fi
13857  need_version=yes
13858  ;;
13859
13860sysv4 | sysv4.3*)
13861  version_type=linux # correct to gnu/linux during the next big refactor
13862  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13863  soname_spec='$libname$release$shared_ext$major'
13864  shlibpath_var=LD_LIBRARY_PATH
13865  case $host_vendor in
13866    sni)
13867      shlibpath_overrides_runpath=no
13868      need_lib_prefix=no
13869      runpath_var=LD_RUN_PATH
13870      ;;
13871    siemens)
13872      need_lib_prefix=no
13873      ;;
13874    motorola)
13875      need_lib_prefix=no
13876      need_version=no
13877      shlibpath_overrides_runpath=no
13878      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
13879      ;;
13880  esac
13881  ;;
13882
13883sysv4*MP*)
13884  if test -d /usr/nec; then
13885    version_type=linux # correct to gnu/linux during the next big refactor
13886    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
13887    soname_spec='$libname$shared_ext.$major'
13888    shlibpath_var=LD_LIBRARY_PATH
13889  fi
13890  ;;
13891
13892sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
13893  version_type=sco
13894  need_lib_prefix=no
13895  need_version=no
13896  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
13897  soname_spec='$libname$release$shared_ext$major'
13898  shlibpath_var=LD_LIBRARY_PATH
13899  shlibpath_overrides_runpath=yes
13900  hardcode_into_libs=yes
13901  if test yes = "$with_gnu_ld"; then
13902    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13903  else
13904    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13905    case $host_os in
13906      sco3.2v5*)
13907        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13908	;;
13909    esac
13910  fi
13911  sys_lib_dlsearch_path_spec='/usr/lib'
13912  ;;
13913
13914tpf*)
13915  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
13916  version_type=linux # correct to gnu/linux during the next big refactor
13917  need_lib_prefix=no
13918  need_version=no
13919  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13920  shlibpath_var=LD_LIBRARY_PATH
13921  shlibpath_overrides_runpath=no
13922  hardcode_into_libs=yes
13923  ;;
13924
13925uts4*)
13926  version_type=linux # correct to gnu/linux during the next big refactor
13927  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13928  soname_spec='$libname$release$shared_ext$major'
13929  shlibpath_var=LD_LIBRARY_PATH
13930  ;;
13931
13932*)
13933  dynamic_linker=no
13934  ;;
13935esac
13936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13937printf "%s\n" "$dynamic_linker" >&6; }
13938test no = "$dynamic_linker" && can_build_shared=no
13939
13940variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13941if test yes = "$GCC"; then
13942  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13943fi
13944
13945if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13946  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13947fi
13948
13949if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13950  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13951fi
13952
13953# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13954configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13955
13956# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13957func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13958
13959# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13960configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14059printf %s "checking how to hardcode library paths into programs... " >&6; }
14060hardcode_action=
14061if test -n "$hardcode_libdir_flag_spec" ||
14062   test -n "$runpath_var" ||
14063   test yes = "$hardcode_automatic"; then
14064
14065  # We can hardcode non-existent directories.
14066  if test no != "$hardcode_direct" &&
14067     # If the only mechanism to avoid hardcoding is shlibpath_var, we
14068     # have to relink, otherwise we might link with an installed library
14069     # when we should be linking with a yet-to-be-installed one
14070     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
14071     test no != "$hardcode_minus_L"; then
14072    # Linking always hardcodes the temporary library directory.
14073    hardcode_action=relink
14074  else
14075    # We can link without hardcoding, and we can hardcode nonexisting dirs.
14076    hardcode_action=immediate
14077  fi
14078else
14079  # We cannot hardcode anything, or else we can only hardcode existing
14080  # directories.
14081  hardcode_action=unsupported
14082fi
14083{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
14084printf "%s\n" "$hardcode_action" >&6; }
14085
14086if test relink = "$hardcode_action" ||
14087   test yes = "$inherit_rpath"; then
14088  # Fast installation is not supported
14089  enable_fast_install=no
14090elif test yes = "$shlibpath_overrides_runpath" ||
14091     test no = "$enable_shared"; then
14092  # Fast installation is not necessary
14093  enable_fast_install=needless
14094fi
14095
14096
14097
14098
14099
14100
14101  if test yes != "$enable_dlopen"; then
14102  enable_dlopen=unknown
14103  enable_dlopen_self=unknown
14104  enable_dlopen_self_static=unknown
14105else
14106  lt_cv_dlopen=no
14107  lt_cv_dlopen_libs=
14108
14109  case $host_os in
14110  beos*)
14111    lt_cv_dlopen=load_add_on
14112    lt_cv_dlopen_libs=
14113    lt_cv_dlopen_self=yes
14114    ;;
14115
14116  mingw* | pw32* | cegcc*)
14117    lt_cv_dlopen=LoadLibrary
14118    lt_cv_dlopen_libs=
14119    ;;
14120
14121  cygwin*)
14122    lt_cv_dlopen=dlopen
14123    lt_cv_dlopen_libs=
14124    ;;
14125
14126  darwin*)
14127    # if libdl is installed we need to link against it
14128    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14129printf %s "checking for dlopen in -ldl... " >&6; }
14130if test ${ac_cv_lib_dl_dlopen+y}
14131then :
14132  printf %s "(cached) " >&6
14133else $as_nop
14134  ac_check_lib_save_LIBS=$LIBS
14135LIBS="-ldl  $LIBS"
14136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14137/* end confdefs.h.  */
14138
14139/* Override any GCC internal prototype to avoid an error.
14140   Use char because int might match the return type of a GCC
14141   builtin and then its argument prototype would still apply.  */
14142char dlopen ();
14143int
14144main (void)
14145{
14146return dlopen ();
14147  ;
14148  return 0;
14149}
14150_ACEOF
14151if ac_fn_c_try_link "$LINENO"
14152then :
14153  ac_cv_lib_dl_dlopen=yes
14154else $as_nop
14155  ac_cv_lib_dl_dlopen=no
14156fi
14157rm -f core conftest.err conftest.$ac_objext conftest.beam \
14158    conftest$ac_exeext conftest.$ac_ext
14159LIBS=$ac_check_lib_save_LIBS
14160fi
14161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14162printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
14163if test "x$ac_cv_lib_dl_dlopen" = xyes
14164then :
14165  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14166else $as_nop
14167
14168    lt_cv_dlopen=dyld
14169    lt_cv_dlopen_libs=
14170    lt_cv_dlopen_self=yes
14171
14172fi
14173
14174    ;;
14175
14176  tpf*)
14177    # Don't try to run any link tests for TPF.  We know it's impossible
14178    # because TPF is a cross-compiler, and we know how we open DSOs.
14179    lt_cv_dlopen=dlopen
14180    lt_cv_dlopen_libs=
14181    lt_cv_dlopen_self=no
14182    ;;
14183
14184  *)
14185    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14186if test "x$ac_cv_func_shl_load" = xyes
14187then :
14188  lt_cv_dlopen=shl_load
14189else $as_nop
14190  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14191printf %s "checking for shl_load in -ldld... " >&6; }
14192if test ${ac_cv_lib_dld_shl_load+y}
14193then :
14194  printf %s "(cached) " >&6
14195else $as_nop
14196  ac_check_lib_save_LIBS=$LIBS
14197LIBS="-ldld  $LIBS"
14198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14199/* end confdefs.h.  */
14200
14201/* Override any GCC internal prototype to avoid an error.
14202   Use char because int might match the return type of a GCC
14203   builtin and then its argument prototype would still apply.  */
14204char shl_load ();
14205int
14206main (void)
14207{
14208return shl_load ();
14209  ;
14210  return 0;
14211}
14212_ACEOF
14213if ac_fn_c_try_link "$LINENO"
14214then :
14215  ac_cv_lib_dld_shl_load=yes
14216else $as_nop
14217  ac_cv_lib_dld_shl_load=no
14218fi
14219rm -f core conftest.err conftest.$ac_objext conftest.beam \
14220    conftest$ac_exeext conftest.$ac_ext
14221LIBS=$ac_check_lib_save_LIBS
14222fi
14223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14224printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
14225if test "x$ac_cv_lib_dld_shl_load" = xyes
14226then :
14227  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14228else $as_nop
14229  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14230if test "x$ac_cv_func_dlopen" = xyes
14231then :
14232  lt_cv_dlopen=dlopen
14233else $as_nop
14234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14235printf %s "checking for dlopen in -ldl... " >&6; }
14236if test ${ac_cv_lib_dl_dlopen+y}
14237then :
14238  printf %s "(cached) " >&6
14239else $as_nop
14240  ac_check_lib_save_LIBS=$LIBS
14241LIBS="-ldl  $LIBS"
14242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14243/* end confdefs.h.  */
14244
14245/* Override any GCC internal prototype to avoid an error.
14246   Use char because int might match the return type of a GCC
14247   builtin and then its argument prototype would still apply.  */
14248char dlopen ();
14249int
14250main (void)
14251{
14252return dlopen ();
14253  ;
14254  return 0;
14255}
14256_ACEOF
14257if ac_fn_c_try_link "$LINENO"
14258then :
14259  ac_cv_lib_dl_dlopen=yes
14260else $as_nop
14261  ac_cv_lib_dl_dlopen=no
14262fi
14263rm -f core conftest.err conftest.$ac_objext conftest.beam \
14264    conftest$ac_exeext conftest.$ac_ext
14265LIBS=$ac_check_lib_save_LIBS
14266fi
14267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14268printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
14269if test "x$ac_cv_lib_dl_dlopen" = xyes
14270then :
14271  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14272else $as_nop
14273  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14274printf %s "checking for dlopen in -lsvld... " >&6; }
14275if test ${ac_cv_lib_svld_dlopen+y}
14276then :
14277  printf %s "(cached) " >&6
14278else $as_nop
14279  ac_check_lib_save_LIBS=$LIBS
14280LIBS="-lsvld  $LIBS"
14281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14282/* end confdefs.h.  */
14283
14284/* Override any GCC internal prototype to avoid an error.
14285   Use char because int might match the return type of a GCC
14286   builtin and then its argument prototype would still apply.  */
14287char dlopen ();
14288int
14289main (void)
14290{
14291return dlopen ();
14292  ;
14293  return 0;
14294}
14295_ACEOF
14296if ac_fn_c_try_link "$LINENO"
14297then :
14298  ac_cv_lib_svld_dlopen=yes
14299else $as_nop
14300  ac_cv_lib_svld_dlopen=no
14301fi
14302rm -f core conftest.err conftest.$ac_objext conftest.beam \
14303    conftest$ac_exeext conftest.$ac_ext
14304LIBS=$ac_check_lib_save_LIBS
14305fi
14306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14307printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
14308if test "x$ac_cv_lib_svld_dlopen" = xyes
14309then :
14310  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14311else $as_nop
14312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14313printf %s "checking for dld_link in -ldld... " >&6; }
14314if test ${ac_cv_lib_dld_dld_link+y}
14315then :
14316  printf %s "(cached) " >&6
14317else $as_nop
14318  ac_check_lib_save_LIBS=$LIBS
14319LIBS="-ldld  $LIBS"
14320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14321/* end confdefs.h.  */
14322
14323/* Override any GCC internal prototype to avoid an error.
14324   Use char because int might match the return type of a GCC
14325   builtin and then its argument prototype would still apply.  */
14326char dld_link ();
14327int
14328main (void)
14329{
14330return dld_link ();
14331  ;
14332  return 0;
14333}
14334_ACEOF
14335if ac_fn_c_try_link "$LINENO"
14336then :
14337  ac_cv_lib_dld_dld_link=yes
14338else $as_nop
14339  ac_cv_lib_dld_dld_link=no
14340fi
14341rm -f core conftest.err conftest.$ac_objext conftest.beam \
14342    conftest$ac_exeext conftest.$ac_ext
14343LIBS=$ac_check_lib_save_LIBS
14344fi
14345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14346printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
14347if test "x$ac_cv_lib_dld_dld_link" = xyes
14348then :
14349  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14350fi
14351
14352
14353fi
14354
14355
14356fi
14357
14358
14359fi
14360
14361
14362fi
14363
14364
14365fi
14366
14367    ;;
14368  esac
14369
14370  if test no = "$lt_cv_dlopen"; then
14371    enable_dlopen=no
14372  else
14373    enable_dlopen=yes
14374  fi
14375
14376  case $lt_cv_dlopen in
14377  dlopen)
14378    save_CPPFLAGS=$CPPFLAGS
14379    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14380
14381    save_LDFLAGS=$LDFLAGS
14382    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14383
14384    save_LIBS=$LIBS
14385    LIBS="$lt_cv_dlopen_libs $LIBS"
14386
14387    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14388printf %s "checking whether a program can dlopen itself... " >&6; }
14389if test ${lt_cv_dlopen_self+y}
14390then :
14391  printf %s "(cached) " >&6
14392else $as_nop
14393  	  if test yes = "$cross_compiling"; then :
14394  lt_cv_dlopen_self=cross
14395else
14396  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14397  lt_status=$lt_dlunknown
14398  cat > conftest.$ac_ext <<_LT_EOF
14399#line $LINENO "configure"
14400#include "confdefs.h"
14401
14402#if HAVE_DLFCN_H
14403#include <dlfcn.h>
14404#endif
14405
14406#include <stdio.h>
14407
14408#ifdef RTLD_GLOBAL
14409#  define LT_DLGLOBAL		RTLD_GLOBAL
14410#else
14411#  ifdef DL_GLOBAL
14412#    define LT_DLGLOBAL		DL_GLOBAL
14413#  else
14414#    define LT_DLGLOBAL		0
14415#  endif
14416#endif
14417
14418/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14419   find out it does not work in some platform. */
14420#ifndef LT_DLLAZY_OR_NOW
14421#  ifdef RTLD_LAZY
14422#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14423#  else
14424#    ifdef DL_LAZY
14425#      define LT_DLLAZY_OR_NOW		DL_LAZY
14426#    else
14427#      ifdef RTLD_NOW
14428#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14429#      else
14430#        ifdef DL_NOW
14431#          define LT_DLLAZY_OR_NOW	DL_NOW
14432#        else
14433#          define LT_DLLAZY_OR_NOW	0
14434#        endif
14435#      endif
14436#    endif
14437#  endif
14438#endif
14439
14440/* When -fvisibility=hidden is used, assume the code has been annotated
14441   correspondingly for the symbols needed.  */
14442#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14443int fnord () __attribute__((visibility("default")));
14444#endif
14445
14446int fnord () { return 42; }
14447int main ()
14448{
14449  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14450  int status = $lt_dlunknown;
14451
14452  if (self)
14453    {
14454      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14455      else
14456        {
14457	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14458          else puts (dlerror ());
14459	}
14460      /* dlclose (self); */
14461    }
14462  else
14463    puts (dlerror ());
14464
14465  return status;
14466}
14467_LT_EOF
14468  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14469  (eval $ac_link) 2>&5
14470  ac_status=$?
14471  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14472  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14473    (./conftest; exit; ) >&5 2>/dev/null
14474    lt_status=$?
14475    case x$lt_status in
14476      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14477      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14478      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14479    esac
14480  else :
14481    # compilation failed
14482    lt_cv_dlopen_self=no
14483  fi
14484fi
14485rm -fr conftest*
14486
14487
14488fi
14489{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14490printf "%s\n" "$lt_cv_dlopen_self" >&6; }
14491
14492    if test yes = "$lt_cv_dlopen_self"; then
14493      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14494      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14495printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
14496if test ${lt_cv_dlopen_self_static+y}
14497then :
14498  printf %s "(cached) " >&6
14499else $as_nop
14500  	  if test yes = "$cross_compiling"; then :
14501  lt_cv_dlopen_self_static=cross
14502else
14503  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14504  lt_status=$lt_dlunknown
14505  cat > conftest.$ac_ext <<_LT_EOF
14506#line $LINENO "configure"
14507#include "confdefs.h"
14508
14509#if HAVE_DLFCN_H
14510#include <dlfcn.h>
14511#endif
14512
14513#include <stdio.h>
14514
14515#ifdef RTLD_GLOBAL
14516#  define LT_DLGLOBAL		RTLD_GLOBAL
14517#else
14518#  ifdef DL_GLOBAL
14519#    define LT_DLGLOBAL		DL_GLOBAL
14520#  else
14521#    define LT_DLGLOBAL		0
14522#  endif
14523#endif
14524
14525/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14526   find out it does not work in some platform. */
14527#ifndef LT_DLLAZY_OR_NOW
14528#  ifdef RTLD_LAZY
14529#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14530#  else
14531#    ifdef DL_LAZY
14532#      define LT_DLLAZY_OR_NOW		DL_LAZY
14533#    else
14534#      ifdef RTLD_NOW
14535#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14536#      else
14537#        ifdef DL_NOW
14538#          define LT_DLLAZY_OR_NOW	DL_NOW
14539#        else
14540#          define LT_DLLAZY_OR_NOW	0
14541#        endif
14542#      endif
14543#    endif
14544#  endif
14545#endif
14546
14547/* When -fvisibility=hidden is used, assume the code has been annotated
14548   correspondingly for the symbols needed.  */
14549#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14550int fnord () __attribute__((visibility("default")));
14551#endif
14552
14553int fnord () { return 42; }
14554int main ()
14555{
14556  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14557  int status = $lt_dlunknown;
14558
14559  if (self)
14560    {
14561      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14562      else
14563        {
14564	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14565          else puts (dlerror ());
14566	}
14567      /* dlclose (self); */
14568    }
14569  else
14570    puts (dlerror ());
14571
14572  return status;
14573}
14574_LT_EOF
14575  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14576  (eval $ac_link) 2>&5
14577  ac_status=$?
14578  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14579  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14580    (./conftest; exit; ) >&5 2>/dev/null
14581    lt_status=$?
14582    case x$lt_status in
14583      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14584      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14585      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14586    esac
14587  else :
14588    # compilation failed
14589    lt_cv_dlopen_self_static=no
14590  fi
14591fi
14592rm -fr conftest*
14593
14594
14595fi
14596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14597printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
14598    fi
14599
14600    CPPFLAGS=$save_CPPFLAGS
14601    LDFLAGS=$save_LDFLAGS
14602    LIBS=$save_LIBS
14603    ;;
14604  esac
14605
14606  case $lt_cv_dlopen_self in
14607  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14608  *) enable_dlopen_self=unknown ;;
14609  esac
14610
14611  case $lt_cv_dlopen_self_static in
14612  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14613  *) enable_dlopen_self_static=unknown ;;
14614  esac
14615fi
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633striplib=
14634old_striplib=
14635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14636printf %s "checking whether stripping libraries is possible... " >&6; }
14637if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14638  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14639  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14640  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14641printf "%s\n" "yes" >&6; }
14642else
14643# FIXME - insert some real tests, host_os isn't really good enough
14644  case $host_os in
14645  darwin*)
14646    if test -n "$STRIP"; then
14647      striplib="$STRIP -x"
14648      old_striplib="$STRIP -S"
14649      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14650printf "%s\n" "yes" >&6; }
14651    else
14652      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14653printf "%s\n" "no" >&6; }
14654    fi
14655    ;;
14656  *)
14657    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14658printf "%s\n" "no" >&6; }
14659    ;;
14660  esac
14661fi
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674  # Report what library types will actually be built
14675  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14676printf %s "checking if libtool supports shared libraries... " >&6; }
14677  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14678printf "%s\n" "$can_build_shared" >&6; }
14679
14680  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14681printf %s "checking whether to build shared libraries... " >&6; }
14682  test no = "$can_build_shared" && enable_shared=no
14683
14684  # On AIX, shared libraries and static libraries use the same namespace, and
14685  # are all built from PIC.
14686  case $host_os in
14687  aix3*)
14688    test yes = "$enable_shared" && enable_static=no
14689    if test -n "$RANLIB"; then
14690      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14691      postinstall_cmds='$RANLIB $lib'
14692    fi
14693    ;;
14694
14695  aix[4-9]*)
14696    if test ia64 != "$host_cpu"; then
14697      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14698      yes,aix,yes) ;;			# shared object as lib.so file only
14699      yes,svr4,*) ;;			# shared object as lib.so archive member only
14700      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14701      esac
14702    fi
14703    ;;
14704  esac
14705  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14706printf "%s\n" "$enable_shared" >&6; }
14707
14708  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14709printf %s "checking whether to build static libraries... " >&6; }
14710  # Make sure either enable_shared or enable_static is yes.
14711  test yes = "$enable_shared" || enable_static=yes
14712  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14713printf "%s\n" "$enable_static" >&6; }
14714
14715
14716
14717
14718fi
14719ac_ext=c
14720ac_cpp='$CPP $CPPFLAGS'
14721ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14722ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14723ac_compiler_gnu=$ac_cv_c_compiler_gnu
14724
14725CC=$lt_save_CC
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741        ac_config_commands="$ac_config_commands libtool"
14742
14743
14744
14745
14746# Only expand once:
14747
14748
14749
14750
14751# NTP has (so far) been relying on leading-edge autogen, which
14752# means we need the appropriate corresponding libopts as well.
14753# Therefore, by default:
14754# - use the version of libopts we ship with
14755# - do not install it
14756# - build a static copy (disable-shared - done earlier)
14757case "${enable_local_libopts+set}" in
14758 set) ;;
14759 *) enable_local_libopts=yes ;;
14760esac
14761case "${enable_libopts_install+set}" in
14762 set) ;;
14763 *) enable_libopts_install=no ;;
14764esac
14765enable_nls=no
14766# Autoupdate added the next two lines to ensure that your configure
14767# script's behavior did not change.  They are probably safe to remove.
14768
14769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
14770printf %s "checking for egrep... " >&6; }
14771if test ${ac_cv_path_EGREP+y}
14772then :
14773  printf %s "(cached) " >&6
14774else $as_nop
14775  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
14776   then ac_cv_path_EGREP="$GREP -E"
14777   else
14778     if test -z "$EGREP"; then
14779  ac_path_EGREP_found=false
14780  # Loop through the user's path and test for each of PROGNAME-LIST
14781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14782for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
14783do
14784  IFS=$as_save_IFS
14785  case $as_dir in #(((
14786    '') as_dir=./ ;;
14787    */) ;;
14788    *) as_dir=$as_dir/ ;;
14789  esac
14790    for ac_prog in egrep
14791   do
14792    for ac_exec_ext in '' $ac_executable_extensions; do
14793      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
14794      as_fn_executable_p "$ac_path_EGREP" || continue
14795# Check for GNU ac_path_EGREP and select it if it is found.
14796  # Check for GNU $ac_path_EGREP
14797case `"$ac_path_EGREP" --version 2>&1` in
14798*GNU*)
14799  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
14800*)
14801  ac_count=0
14802  printf %s 0123456789 >"conftest.in"
14803  while :
14804  do
14805    cat "conftest.in" "conftest.in" >"conftest.tmp"
14806    mv "conftest.tmp" "conftest.in"
14807    cp "conftest.in" "conftest.nl"
14808    printf "%s\n" 'EGREP' >> "conftest.nl"
14809    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
14810    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14811    as_fn_arith $ac_count + 1 && ac_count=$as_val
14812    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
14813      # Best one so far, save it but keep looking for a better one
14814      ac_cv_path_EGREP="$ac_path_EGREP"
14815      ac_path_EGREP_max=$ac_count
14816    fi
14817    # 10*(2^10) chars as input seems more than enough
14818    test $ac_count -gt 10 && break
14819  done
14820  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14821esac
14822
14823      $ac_path_EGREP_found && break 3
14824    done
14825  done
14826  done
14827IFS=$as_save_IFS
14828  if test -z "$ac_cv_path_EGREP"; then
14829    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14830  fi
14831else
14832  ac_cv_path_EGREP=$EGREP
14833fi
14834
14835   fi
14836fi
14837{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
14838printf "%s\n" "$ac_cv_path_EGREP" >&6; }
14839 EGREP="$ac_cv_path_EGREP"
14840
14841
14842
14843ac_func=
14844for ac_item in $ac_func_c_list
14845do
14846  if test $ac_func; then
14847    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
14848    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
14849      echo "#define $ac_item 1" >> confdefs.h
14850    fi
14851    ac_func=
14852  else
14853    ac_func=$ac_item
14854  fi
14855done
14856
14857  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
14858"
14859if test "x$ac_cv_type_pid_t" = xyes
14860then :
14861
14862else $as_nop
14863                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864/* end confdefs.h.  */
14865
14866          #if defined _WIN64 && !defined __CYGWIN__
14867          LLP64
14868          #endif
14869
14870int
14871main (void)
14872{
14873
14874  ;
14875  return 0;
14876}
14877
14878_ACEOF
14879if ac_fn_c_try_compile "$LINENO"
14880then :
14881  ac_pid_type='int'
14882else $as_nop
14883  ac_pid_type='__int64'
14884fi
14885rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14886
14887printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
14888
14889
14890fi
14891
14892
14893
14894
14895
14896
14897
14898  ac_header_dirent=no
14899for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14900  as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
14902printf %s "checking for $ac_hdr that defines DIR... " >&6; }
14903if eval test \${$as_ac_Header+y}
14904then :
14905  printf %s "(cached) " >&6
14906else $as_nop
14907  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908/* end confdefs.h.  */
14909#include <sys/types.h>
14910#include <$ac_hdr>
14911
14912int
14913main (void)
14914{
14915if ((DIR *) 0)
14916return 0;
14917  ;
14918  return 0;
14919}
14920_ACEOF
14921if ac_fn_c_try_compile "$LINENO"
14922then :
14923  eval "$as_ac_Header=yes"
14924else $as_nop
14925  eval "$as_ac_Header=no"
14926fi
14927rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14928fi
14929eval ac_res=\$$as_ac_Header
14930	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
14931printf "%s\n" "$ac_res" >&6; }
14932if eval test \"x\$"$as_ac_Header"\" = x"yes"
14933then :
14934  cat >>confdefs.h <<_ACEOF
14935#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
14936_ACEOF
14937
14938ac_header_dirent=$ac_hdr; break
14939fi
14940
14941done
14942# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14943if test $ac_header_dirent = dirent.h; then
14944  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
14945printf %s "checking for library containing opendir... " >&6; }
14946if test ${ac_cv_search_opendir+y}
14947then :
14948  printf %s "(cached) " >&6
14949else $as_nop
14950  ac_func_search_save_LIBS=$LIBS
14951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14952/* end confdefs.h.  */
14953
14954/* Override any GCC internal prototype to avoid an error.
14955   Use char because int might match the return type of a GCC
14956   builtin and then its argument prototype would still apply.  */
14957char opendir ();
14958int
14959main (void)
14960{
14961return opendir ();
14962  ;
14963  return 0;
14964}
14965_ACEOF
14966for ac_lib in '' dir
14967do
14968  if test -z "$ac_lib"; then
14969    ac_res="none required"
14970  else
14971    ac_res=-l$ac_lib
14972    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
14973  fi
14974  if ac_fn_c_try_link "$LINENO"
14975then :
14976  ac_cv_search_opendir=$ac_res
14977fi
14978rm -f core conftest.err conftest.$ac_objext conftest.beam \
14979    conftest$ac_exeext
14980  if test ${ac_cv_search_opendir+y}
14981then :
14982  break
14983fi
14984done
14985if test ${ac_cv_search_opendir+y}
14986then :
14987
14988else $as_nop
14989  ac_cv_search_opendir=no
14990fi
14991rm conftest.$ac_ext
14992LIBS=$ac_func_search_save_LIBS
14993fi
14994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
14995printf "%s\n" "$ac_cv_search_opendir" >&6; }
14996ac_res=$ac_cv_search_opendir
14997if test "$ac_res" != no
14998then :
14999  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15000
15001fi
15002
15003else
15004  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
15005printf %s "checking for library containing opendir... " >&6; }
15006if test ${ac_cv_search_opendir+y}
15007then :
15008  printf %s "(cached) " >&6
15009else $as_nop
15010  ac_func_search_save_LIBS=$LIBS
15011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15012/* end confdefs.h.  */
15013
15014/* Override any GCC internal prototype to avoid an error.
15015   Use char because int might match the return type of a GCC
15016   builtin and then its argument prototype would still apply.  */
15017char opendir ();
15018int
15019main (void)
15020{
15021return opendir ();
15022  ;
15023  return 0;
15024}
15025_ACEOF
15026for ac_lib in '' x
15027do
15028  if test -z "$ac_lib"; then
15029    ac_res="none required"
15030  else
15031    ac_res=-l$ac_lib
15032    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15033  fi
15034  if ac_fn_c_try_link "$LINENO"
15035then :
15036  ac_cv_search_opendir=$ac_res
15037fi
15038rm -f core conftest.err conftest.$ac_objext conftest.beam \
15039    conftest$ac_exeext
15040  if test ${ac_cv_search_opendir+y}
15041then :
15042  break
15043fi
15044done
15045if test ${ac_cv_search_opendir+y}
15046then :
15047
15048else $as_nop
15049  ac_cv_search_opendir=no
15050fi
15051rm conftest.$ac_ext
15052LIBS=$ac_func_search_save_LIBS
15053fi
15054{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
15055printf "%s\n" "$ac_cv_search_opendir" >&6; }
15056ac_res=$ac_cv_search_opendir
15057if test "$ac_res" != no
15058then :
15059  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15060
15061fi
15062
15063fi
15064
15065
15066  # =================
15067  # AC_CHECK_HEADERS
15068  # =================
15069  ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
15070if test "x$ac_cv_header_sys_mman_h" = xyes
15071then :
15072  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
15073
15074fi
15075ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
15076if test "x$ac_cv_header_sys_param_h" = xyes
15077then :
15078  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15079
15080fi
15081ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
15082if test "x$ac_cv_header_sys_poll_h" = xyes
15083then :
15084  printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
15085
15086fi
15087ac_fn_c_check_header_compile "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default"
15088if test "x$ac_cv_header_sys_procset_h" = xyes
15089then :
15090  printf "%s\n" "#define HAVE_SYS_PROCSET_H 1" >>confdefs.h
15091
15092fi
15093ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
15094if test "x$ac_cv_header_sys_select_h" = xyes
15095then :
15096  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15097
15098fi
15099ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
15100if test "x$ac_cv_header_sys_socket_h" = xyes
15101then :
15102  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15103
15104fi
15105ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
15106if test "x$ac_cv_header_sys_stropts_h" = xyes
15107then :
15108  printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
15109
15110fi
15111ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
15112if test "x$ac_cv_header_sys_time_h" = xyes
15113then :
15114  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
15115
15116fi
15117ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
15118if test "x$ac_cv_header_sys_un_h" = xyes
15119then :
15120  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15121
15122fi
15123ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
15124if test "x$ac_cv_header_sys_wait_h" = xyes
15125then :
15126  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15127
15128fi
15129ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15130if test "x$ac_cv_header_dlfcn_h" = xyes
15131then :
15132  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
15133
15134fi
15135ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
15136if test "x$ac_cv_header_errno_h" = xyes
15137then :
15138  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
15139
15140fi
15141ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
15142if test "x$ac_cv_header_fcntl_h" = xyes
15143then :
15144  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
15145
15146fi
15147ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
15148if test "x$ac_cv_header_libgen_h" = xyes
15149then :
15150  printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
15151
15152fi
15153ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15154if test "x$ac_cv_header_libintl_h" = xyes
15155then :
15156  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
15157
15158fi
15159ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
15160if test "x$ac_cv_header_memory_h" = xyes
15161then :
15162  printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
15163
15164fi
15165ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15166if test "x$ac_cv_header_netinet_in_h" = xyes
15167then :
15168  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15169
15170fi
15171ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
15172if test "x$ac_cv_header_setjmp_h" = xyes
15173then :
15174  printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
15175
15176fi
15177ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
15178if test "x$ac_cv_header_stdbool_h" = xyes
15179then :
15180  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15181
15182fi
15183ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
15184if test "x$ac_cv_header_sysexits_h" = xyes
15185then :
15186  printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
15187
15188fi
15189ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15190if test "x$ac_cv_header_unistd_h" = xyes
15191then :
15192  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
15193
15194fi
15195ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
15196if test "x$ac_cv_header_utime_h" = xyes
15197then :
15198  printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
15199
15200fi
15201
15202
15203         for ac_header in stdarg.h varargs.h
15204do :
15205  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15206ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15207if eval test \"x\$"$as_ac_Header"\" = x"yes"
15208then :
15209  cat >>confdefs.h <<_ACEOF
15210#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15211_ACEOF
15212 lo_have_arg_hdr=true;break
15213else $as_nop
15214  lo_have_arg_hdr=false
15215fi
15216
15217done
15218
15219         for ac_header in string.h strings.h
15220do :
15221  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15222ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15223if eval test \"x\$"$as_ac_Header"\" = x"yes"
15224then :
15225  cat >>confdefs.h <<_ACEOF
15226#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15227_ACEOF
15228 lo_have_str_hdr=true;break
15229else $as_nop
15230  lo_have_str_hdr=false
15231fi
15232
15233done
15234
15235         for ac_header in limits.h sys/limits.h values.h
15236do :
15237  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15238ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15239if eval test \"x\$"$as_ac_Header"\" = x"yes"
15240then :
15241  cat >>confdefs.h <<_ACEOF
15242#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15243_ACEOF
15244 lo_have_lim_hdr=true;break
15245else $as_nop
15246  lo_have_lim_hdr=false
15247fi
15248
15249done
15250
15251         for ac_header in inttypes.h stdint.h
15252do :
15253  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15254ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15255if eval test \"x\$"$as_ac_Header"\" = x"yes"
15256then :
15257  cat >>confdefs.h <<_ACEOF
15258#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15259_ACEOF
15260 lo_have_typ_hdr=true;break
15261else $as_nop
15262  lo_have_typ_hdr=false
15263fi
15264
15265done
15266
15267
15268  case "$host_os" in
15269    cygwin*)
15270                        STDNORETURN_H='stdnoreturn.h'
15271      ;;
15272    *)
15273      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
15274printf %s "checking for working stdnoreturn.h... " >&6; }
15275if test ${gl_cv_header_working_stdnoreturn_h+y}
15276then :
15277  printf %s "(cached) " >&6
15278else $as_nop
15279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15280/* end confdefs.h.  */
15281#include <stdlib.h>
15282                #include <stdnoreturn.h>
15283                /* Do not check for 'noreturn' after the return type.
15284                   C11 allows it, but it's rarely done that way
15285                   and circa-2012 bleeding-edge GCC rejects it when given
15286                   -Werror=old-style-declaration.  */
15287                noreturn void foo1 (void) { exit (0); }
15288                _Noreturn void foo2 (void) { exit (0); }
15289                int testit (int argc, char **argv)
15290                {
15291                  if (argc & 1)
15292                    return 0;
15293                  (argv[0][0] ? foo1 : foo2) ();
15294                }
15295
15296int
15297main (void)
15298{
15299
15300  ;
15301  return 0;
15302}
15303_ACEOF
15304if ac_fn_c_try_compile "$LINENO"
15305then :
15306  gl_cv_header_working_stdnoreturn_h=yes
15307else $as_nop
15308  gl_cv_header_working_stdnoreturn_h=no
15309fi
15310rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15311fi
15312{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
15313printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
15314      if test $gl_cv_header_working_stdnoreturn_h = yes; then
15315        STDNORETURN_H=''
15316      else
15317        STDNORETURN_H='stdnoreturn.h'
15318      fi
15319      ;;
15320  esac
15321
15322   if test -n "$STDNORETURN_H"; then
15323  GL_GENERATE_STDNORETURN_H_TRUE=
15324  GL_GENERATE_STDNORETURN_H_FALSE='#'
15325else
15326  GL_GENERATE_STDNORETURN_H_TRUE='#'
15327  GL_GENERATE_STDNORETURN_H_FALSE=
15328fi
15329
15330
15331
15332  # ----------------------------------------------------------------------
15333  # check for various programs used during the build.
15334  # On OS/X, "wchar.h" needs "runetype.h" to work properly.
15335  # ----------------------------------------------------------------------
15336  ac_fn_c_check_header_compile "$LINENO" "runetype.h" "ac_cv_header_runetype_h" "
15337  $ac_includes_default
15338  #if HAVE_RUNETYPE_H
15339  # include <runetype.h>
15340  #endif
15341
15342"
15343if test "x$ac_cv_header_runetype_h" = xyes
15344then :
15345  printf "%s\n" "#define HAVE_RUNETYPE_H 1" >>confdefs.h
15346
15347fi
15348ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "
15349  $ac_includes_default
15350  #if HAVE_RUNETYPE_H
15351  # include <runetype.h>
15352  #endif
15353
15354"
15355if test "x$ac_cv_header_wchar_h" = xyes
15356then :
15357  printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
15358
15359fi
15360
15361
15362  # Check whether --enable-nls was given.
15363if test ${enable_nls+y}
15364then :
15365  enableval=$enable_nls;
15366fi
15367
15368  if test "x$enable_nls" != "xno" && \
15369  test "X${ac_cv_header_libintl_h}" = Xyes
15370then :
15371
15372
15373printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
15374
15375fi
15376
15377  # --------------------------------------------
15378  # Verify certain entries from AC_CHECK_HEADERS
15379  # --------------------------------------------
15380  ${lo_have_arg_hdr} || \
15381    as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
15382
15383  ${lo_have_str_hdr} || \
15384    as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
15385
15386  ${lo_have_lim_hdr} || \
15387    as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
15388
15389  ${lo_have_typ_hdr} || \
15390    as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
15391
15392  for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
15393  do eval as_ac_var=\${ac_cv_header_${f}_h}
15394     test "X${as_ac_var}" = Xyes || {
15395       as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
15396     }
15397  done
15398  test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
15399    echo '#include <stdint.h>' > inttypes.h
15400
15401  # ----------------------------------------------------------------------
15402  # Checks for typedefs
15403  # ----------------------------------------------------------------------
15404  ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
15405if test "x$ac_cv_type_wchar_t" = xyes
15406then :
15407
15408printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
15409
15410
15411fi
15412
15413  ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
15414    $ac_includes_default
15415    #if HAVE_RUNETYPE_H
15416    # include <runetype.h>
15417    #endif
15418    #if HAVE_WCHAR_H
15419    # include <wchar.h>
15420    #endif
15421
15422"
15423if test "x$ac_cv_type_wint_t" = xyes
15424then :
15425
15426printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
15427
15428
15429fi
15430
15431  ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
15432if test "x$ac_cv_type_int8_t" = xyes
15433then :
15434
15435printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h
15436
15437
15438fi
15439ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
15440if test "x$ac_cv_type_uint8_t" = xyes
15441then :
15442
15443printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
15444
15445
15446fi
15447ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
15448if test "x$ac_cv_type_int16_t" = xyes
15449then :
15450
15451printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h
15452
15453
15454fi
15455ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
15456if test "x$ac_cv_type_uint16_t" = xyes
15457then :
15458
15459printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
15460
15461
15462fi
15463ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
15464if test "x$ac_cv_type_int32_t" = xyes
15465then :
15466
15467printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h
15468
15469
15470fi
15471ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
15472if test "x$ac_cv_type_uint32_t" = xyes
15473then :
15474
15475printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
15476
15477
15478fi
15479ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
15480if test "x$ac_cv_type_intptr_t" = xyes
15481then :
15482
15483printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
15484
15485
15486fi
15487ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15488if test "x$ac_cv_type_uintptr_t" = xyes
15489then :
15490
15491printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
15492
15493
15494fi
15495ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
15496if test "x$ac_cv_type_uint_t" = xyes
15497then :
15498
15499printf "%s\n" "#define HAVE_UINT_T 1" >>confdefs.h
15500
15501
15502fi
15503ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15504if test "x$ac_cv_type_pid_t" = xyes
15505then :
15506
15507printf "%s\n" "#define HAVE_PID_T 1" >>confdefs.h
15508
15509
15510fi
15511ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
15512if test "x$ac_cv_type_size_t" = xyes
15513then :
15514
15515printf "%s\n" "#define HAVE_SIZE_T 1" >>confdefs.h
15516
15517
15518fi
15519ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15520if test "x$ac_cv_type_ptrdiff_t" = xyes
15521then :
15522
15523printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
15524
15525
15526fi
15527
15528  # The cast to long int works around a bug in the HP C Compiler
15529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15531# This bug is HP SR number 8606223364.
15532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
15533printf %s "checking size of char *... " >&6; }
15534if test ${ac_cv_sizeof_char_p+y}
15535then :
15536  printf %s "(cached) " >&6
15537else $as_nop
15538  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"
15539then :
15540
15541else $as_nop
15542  if test "$ac_cv_type_char_p" = yes; then
15543     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15544printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15545as_fn_error 77 "cannot compute sizeof (char *)
15546See \`config.log' for more details" "$LINENO" 5; }
15547   else
15548     ac_cv_sizeof_char_p=0
15549   fi
15550fi
15551
15552fi
15553{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
15554printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
15555
15556
15557
15558printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
15559
15560
15561  # The cast to long int works around a bug in the HP C Compiler
15562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15564# This bug is HP SR number 8606223364.
15565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15566printf %s "checking size of int... " >&6; }
15567if test ${ac_cv_sizeof_int+y}
15568then :
15569  printf %s "(cached) " >&6
15570else $as_nop
15571  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
15572then :
15573
15574else $as_nop
15575  if test "$ac_cv_type_int" = yes; then
15576     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15577printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15578as_fn_error 77 "cannot compute sizeof (int)
15579See \`config.log' for more details" "$LINENO" 5; }
15580   else
15581     ac_cv_sizeof_int=0
15582   fi
15583fi
15584
15585fi
15586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15587printf "%s\n" "$ac_cv_sizeof_int" >&6; }
15588
15589
15590
15591printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
15592
15593
15594  # The cast to long int works around a bug in the HP C Compiler
15595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15597# This bug is HP SR number 8606223364.
15598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15599printf %s "checking size of long... " >&6; }
15600if test ${ac_cv_sizeof_long+y}
15601then :
15602  printf %s "(cached) " >&6
15603else $as_nop
15604  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
15605then :
15606
15607else $as_nop
15608  if test "$ac_cv_type_long" = yes; then
15609     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15610printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15611as_fn_error 77 "cannot compute sizeof (long)
15612See \`config.log' for more details" "$LINENO" 5; }
15613   else
15614     ac_cv_sizeof_long=0
15615   fi
15616fi
15617
15618fi
15619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15620printf "%s\n" "$ac_cv_sizeof_long" >&6; }
15621
15622
15623
15624printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
15625
15626
15627  # The cast to long int works around a bug in the HP C Compiler
15628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15630# This bug is HP SR number 8606223364.
15631{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
15632printf %s "checking size of short... " >&6; }
15633if test ${ac_cv_sizeof_short+y}
15634then :
15635  printf %s "(cached) " >&6
15636else $as_nop
15637  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
15638then :
15639
15640else $as_nop
15641  if test "$ac_cv_type_short" = yes; then
15642     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15643printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15644as_fn_error 77 "cannot compute sizeof (short)
15645See \`config.log' for more details" "$LINENO" 5; }
15646   else
15647     ac_cv_sizeof_short=0
15648   fi
15649fi
15650
15651fi
15652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
15653printf "%s\n" "$ac_cv_sizeof_short" >&6; }
15654
15655
15656
15657printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
15658
15659
15660
15661  # ------------
15662  # AC_CHECK_LIB
15663  # ------------
15664  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
15665printf %s "checking for pathfind in -lgen... " >&6; }
15666if test ${ac_cv_lib_gen_pathfind+y}
15667then :
15668  printf %s "(cached) " >&6
15669else $as_nop
15670  ac_check_lib_save_LIBS=$LIBS
15671LIBS="-lgen  $LIBS"
15672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15673/* end confdefs.h.  */
15674
15675/* Override any GCC internal prototype to avoid an error.
15676   Use char because int might match the return type of a GCC
15677   builtin and then its argument prototype would still apply.  */
15678char pathfind ();
15679int
15680main (void)
15681{
15682return pathfind ();
15683  ;
15684  return 0;
15685}
15686_ACEOF
15687if ac_fn_c_try_link "$LINENO"
15688then :
15689  ac_cv_lib_gen_pathfind=yes
15690else $as_nop
15691  ac_cv_lib_gen_pathfind=no
15692fi
15693rm -f core conftest.err conftest.$ac_objext conftest.beam \
15694    conftest$ac_exeext conftest.$ac_ext
15695LIBS=$ac_check_lib_save_LIBS
15696fi
15697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
15698printf "%s\n" "$ac_cv_lib_gen_pathfind" >&6; }
15699if test "x$ac_cv_lib_gen_pathfind" = xyes
15700then :
15701  printf "%s\n" "#define HAVE_LIBGEN 1" >>confdefs.h
15702
15703  LIBS="-lgen $LIBS"
15704
15705fi
15706
15707  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
15708printf %s "checking for gettext in -lintl... " >&6; }
15709if test ${ac_cv_lib_intl_gettext+y}
15710then :
15711  printf %s "(cached) " >&6
15712else $as_nop
15713  ac_check_lib_save_LIBS=$LIBS
15714LIBS="-lintl  $LIBS"
15715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716/* end confdefs.h.  */
15717
15718/* Override any GCC internal prototype to avoid an error.
15719   Use char because int might match the return type of a GCC
15720   builtin and then its argument prototype would still apply.  */
15721char gettext ();
15722int
15723main (void)
15724{
15725return gettext ();
15726  ;
15727  return 0;
15728}
15729_ACEOF
15730if ac_fn_c_try_link "$LINENO"
15731then :
15732  ac_cv_lib_intl_gettext=yes
15733else $as_nop
15734  ac_cv_lib_intl_gettext=no
15735fi
15736rm -f core conftest.err conftest.$ac_objext conftest.beam \
15737    conftest$ac_exeext conftest.$ac_ext
15738LIBS=$ac_check_lib_save_LIBS
15739fi
15740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
15741printf "%s\n" "$ac_cv_lib_intl_gettext" >&6; }
15742if test "x$ac_cv_lib_intl_gettext" = xyes
15743then :
15744  printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h
15745
15746  LIBS="-lintl $LIBS"
15747
15748fi
15749
15750
15751if test "x$ac_cv_func_vprintf" = xno
15752then :
15753  ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
15754if test "x$ac_cv_func__doprnt" = xyes
15755then :
15756
15757printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
15758
15759fi
15760
15761fi
15762
15763
15764if test "x$ac_cv_func_fork" = xyes; then
15765  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15766printf %s "checking for working fork... " >&6; }
15767if test ${ac_cv_func_fork_works+y}
15768then :
15769  printf %s "(cached) " >&6
15770else $as_nop
15771  if test "$cross_compiling" = yes
15772then :
15773  ac_cv_func_fork_works=cross
15774else $as_nop
15775  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776/* end confdefs.h.  */
15777$ac_includes_default
15778int
15779main (void)
15780{
15781
15782	  /* By Ruediger Kuhlmann. */
15783	  return fork () < 0;
15784
15785  ;
15786  return 0;
15787}
15788_ACEOF
15789if ac_fn_c_try_run "$LINENO"
15790then :
15791  ac_cv_func_fork_works=yes
15792else $as_nop
15793  ac_cv_func_fork_works=no
15794fi
15795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15796  conftest.$ac_objext conftest.beam conftest.$ac_ext
15797fi
15798
15799fi
15800{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15801printf "%s\n" "$ac_cv_func_fork_works" >&6; }
15802
15803else
15804  ac_cv_func_fork_works=$ac_cv_func_fork
15805fi
15806if test "x$ac_cv_func_fork_works" = xcross; then
15807  case $host in
15808    *-*-amigaos* | *-*-msdosdjgpp*)
15809      # Override, as these systems have only a dummy fork() stub
15810      ac_cv_func_fork_works=no
15811      ;;
15812    *)
15813      ac_cv_func_fork_works=yes
15814      ;;
15815  esac
15816  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15817printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15818fi
15819ac_cv_func_vfork_works=$ac_cv_func_vfork
15820if test "x$ac_cv_func_vfork" = xyes; then
15821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15822printf %s "checking for working vfork... " >&6; }
15823if test ${ac_cv_func_vfork_works+y}
15824then :
15825  printf %s "(cached) " >&6
15826else $as_nop
15827  if test "$cross_compiling" = yes
15828then :
15829  ac_cv_func_vfork_works=cross
15830else $as_nop
15831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15832/* end confdefs.h.  */
15833/* Thanks to Paul Eggert for this test.  */
15834$ac_includes_default
15835#include <signal.h>
15836#include <sys/wait.h>
15837#ifdef HAVE_VFORK_H
15838# include <vfork.h>
15839#endif
15840
15841static void
15842do_nothing (int sig)
15843{
15844  (void) sig;
15845}
15846
15847/* On some sparc systems, changes by the child to local and incoming
15848   argument registers are propagated back to the parent.  The compiler
15849   is told about this with #include <vfork.h>, but some compilers
15850   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15851   static variable whose address is put into a register that is
15852   clobbered by the vfork.  */
15853static void
15854sparc_address_test (int arg)
15855{
15856  static pid_t child;
15857  if (!child) {
15858    child = vfork ();
15859    if (child < 0) {
15860      perror ("vfork");
15861      _exit(2);
15862    }
15863    if (!child) {
15864      arg = getpid();
15865      write(-1, "", 0);
15866      _exit (arg);
15867    }
15868  }
15869}
15870
15871int
15872main (void)
15873{
15874  pid_t parent = getpid ();
15875  pid_t child;
15876
15877  sparc_address_test (0);
15878
15879  /* On Solaris 2.4, changes by the child to the signal handler
15880     also munge signal handlers in the parent.  To detect this,
15881     start by putting the parent's handler in a known state.  */
15882  signal (SIGTERM, SIG_DFL);
15883
15884  child = vfork ();
15885
15886  if (child == 0) {
15887    /* Here is another test for sparc vfork register problems.  This
15888       test uses lots of local variables, at least as many local
15889       variables as main has allocated so far including compiler
15890       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15891       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15892       reuse the register of parent for one of the local variables,
15893       since it will think that parent can't possibly be used any more
15894       in this routine.  Assigning to the local variable will thus
15895       munge parent in the parent process.  */
15896    pid_t
15897      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15898      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15899    /* Convince the compiler that p..p7 are live; otherwise, it might
15900       use the same hardware register for all 8 local variables.  */
15901    if (p != p1 || p != p2 || p != p3 || p != p4
15902	|| p != p5 || p != p6 || p != p7)
15903      _exit(1);
15904
15905    /* Alter the child's signal handler.  */
15906    if (signal (SIGTERM, do_nothing) != SIG_DFL)
15907      _exit(1);
15908
15909    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15910       from child file descriptors.  If the child closes a descriptor
15911       before it execs or exits, this munges the parent's descriptor
15912       as well.  Test for this by closing stdout in the child.  */
15913    _exit(close(fileno(stdout)) != 0);
15914  } else {
15915    int status;
15916    struct stat st;
15917
15918    while (wait(&status) != child)
15919      ;
15920    return (
15921	 /* Was there some problem with vforking?  */
15922	 child < 0
15923
15924	 /* Did the child munge the parent's signal handler?  */
15925	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
15926
15927	 /* Did the child fail?  (This shouldn't happen.)  */
15928	 || status
15929
15930	 /* Did the vfork/compiler bug occur?  */
15931	 || parent != getpid()
15932
15933	 /* Did the file descriptor bug occur?  */
15934	 || fstat(fileno(stdout), &st) != 0
15935	 );
15936  }
15937}
15938_ACEOF
15939if ac_fn_c_try_run "$LINENO"
15940then :
15941  ac_cv_func_vfork_works=yes
15942else $as_nop
15943  ac_cv_func_vfork_works=no
15944fi
15945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15946  conftest.$ac_objext conftest.beam conftest.$ac_ext
15947fi
15948
15949fi
15950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
15951printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
15952
15953fi;
15954if test "x$ac_cv_func_fork_works" = xcross; then
15955  ac_cv_func_vfork_works=$ac_cv_func_vfork
15956  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
15957printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
15958fi
15959
15960if test "x$ac_cv_func_vfork_works" = xyes; then
15961
15962printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
15963
15964else
15965
15966printf "%s\n" "#define vfork fork" >>confdefs.h
15967
15968fi
15969if test "x$ac_cv_func_fork_works" = xyes; then
15970
15971printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
15972
15973fi
15974
15975  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
15976if test "x$ac_cv_func_mmap" = xyes
15977then :
15978  printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
15979
15980fi
15981ac_fn_c_check_func "$LINENO" "canonicalize_file_name" "ac_cv_func_canonicalize_file_name"
15982if test "x$ac_cv_func_canonicalize_file_name" = xyes
15983then :
15984  printf "%s\n" "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h
15985
15986fi
15987ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
15988if test "x$ac_cv_func_snprintf" = xyes
15989then :
15990  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
15991
15992fi
15993ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
15994if test "x$ac_cv_func_strdup" = xyes
15995then :
15996  printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
15997
15998fi
15999ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
16000if test "x$ac_cv_func_strchr" = xyes
16001then :
16002  printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
16003
16004fi
16005ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
16006if test "x$ac_cv_func_strrchr" = xyes
16007then :
16008  printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h
16009
16010fi
16011ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
16012if test "x$ac_cv_func_strsignal" = xyes
16013then :
16014  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
16015
16016fi
16017ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
16018if test "x$ac_cv_func_fchmod" = xyes
16019then :
16020  printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
16021
16022fi
16023ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
16024if test "x$ac_cv_func_fstat" = xyes
16025then :
16026  printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h
16027
16028fi
16029ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod"
16030if test "x$ac_cv_func_chmod" = xyes
16031then :
16032  printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h
16033
16034fi
16035
16036  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
16037printf %s "checking for a sed that does not truncate output... " >&6; }
16038if test ${ac_cv_path_SED+y}
16039then :
16040  printf %s "(cached) " >&6
16041else $as_nop
16042            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
16043     for ac_i in 1 2 3 4 5 6 7; do
16044       ac_script="$ac_script$as_nl$ac_script"
16045     done
16046     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
16047     { ac_script=; unset ac_script;}
16048     if test -z "$SED"; then
16049  ac_path_SED_found=false
16050  # Loop through the user's path and test for each of PROGNAME-LIST
16051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16052for as_dir in $PATH
16053do
16054  IFS=$as_save_IFS
16055  case $as_dir in #(((
16056    '') as_dir=./ ;;
16057    */) ;;
16058    *) as_dir=$as_dir/ ;;
16059  esac
16060    for ac_prog in sed gsed
16061   do
16062    for ac_exec_ext in '' $ac_executable_extensions; do
16063      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
16064      as_fn_executable_p "$ac_path_SED" || continue
16065# Check for GNU ac_path_SED and select it if it is found.
16066  # Check for GNU $ac_path_SED
16067case `"$ac_path_SED" --version 2>&1` in
16068*GNU*)
16069  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
16070*)
16071  ac_count=0
16072  printf %s 0123456789 >"conftest.in"
16073  while :
16074  do
16075    cat "conftest.in" "conftest.in" >"conftest.tmp"
16076    mv "conftest.tmp" "conftest.in"
16077    cp "conftest.in" "conftest.nl"
16078    printf "%s\n" '' >> "conftest.nl"
16079    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
16080    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
16081    as_fn_arith $ac_count + 1 && ac_count=$as_val
16082    if test $ac_count -gt ${ac_path_SED_max-0}; then
16083      # Best one so far, save it but keep looking for a better one
16084      ac_cv_path_SED="$ac_path_SED"
16085      ac_path_SED_max=$ac_count
16086    fi
16087    # 10*(2^10) chars as input seems more than enough
16088    test $ac_count -gt 10 && break
16089  done
16090  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
16091esac
16092
16093      $ac_path_SED_found && break 3
16094    done
16095  done
16096  done
16097IFS=$as_save_IFS
16098  if test -z "$ac_cv_path_SED"; then
16099    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
16100  fi
16101else
16102  ac_cv_path_SED=$SED
16103fi
16104
16105fi
16106{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
16107printf "%s\n" "$ac_cv_path_SED" >&6; }
16108 SED="$ac_cv_path_SED"
16109  rm -f conftest.sed
16110
16111  while :
16112  do
16113      test -x "$POSIX_SHELL" && break
16114      POSIX_SHELL=`which bash`
16115      test -x "$POSIX_SHELL" && break
16116      POSIX_SHELL=`which dash`
16117      test -x "$POSIX_SHELL" && break
16118      POSIX_SHELL=/usr/xpg4/bin/sh
16119      test -x "$POSIX_SHELL" && break
16120      POSIX_SHELL=`/bin/sh -c '
16121          exec 2>/dev/null
16122          if ! true ; then exit 1 ; fi
16123          echo /bin/sh'`
16124      test -x "$POSIX_SHELL" && break
16125      as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
16126  done
16127
16128printf "%s\n" "#define POSIX_SHELL \"${POSIX_SHELL}\"" >>confdefs.h
16129
16130
16131
16132
16133
16134  LIBOPTS_BUILD_BLOCKED=true
16135
16136
16137  NEED_LIBOPTS_DIR=''
16138
16139  # Check whether --enable-local-libopts was given.
16140if test ${enable_local_libopts+y}
16141then :
16142  enableval=$enable_local_libopts;
16143    if test x$enableval = xyes ; then
16144       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
16145printf "%s\n" "$as_me: Using supplied libopts tearoff" >&6;}
16146       LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
16147       NEED_LIBOPTS_DIR=true
16148       LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
16149    fi
16150fi
16151
16152
16153  # Check whether --enable-libopts-install was given.
16154if test ${enable_libopts_install+y}
16155then :
16156  enableval=$enable_libopts_install;
16157fi
16158
16159   if test "X${enable_libopts_install}" = Xyes; then
16160  INSTALL_LIBOPTS_TRUE=
16161  INSTALL_LIBOPTS_FALSE='#'
16162else
16163  INSTALL_LIBOPTS_TRUE='#'
16164  INSTALL_LIBOPTS_FALSE=
16165fi
16166
16167
16168  if test -z "${NEED_LIBOPTS_DIR}" ; then
16169     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
16170printf %s "checking whether autoopts-config can be found... " >&6; }
16171
16172# Check whether --with-autoopts-config was given.
16173if test ${with_autoopts_config+y}
16174then :
16175  withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
16176else $as_nop
16177  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
16178printf %s "checking whether autoopts-config is specified... " >&6; }
16179if test ${lo_cv_with_autoopts_config+y}
16180then :
16181  printf %s "(cached) " >&6
16182else $as_nop
16183  if autoopts-config --help 2>/dev/null 1>&2
16184        then lo_cv_with_autoopts_config=autoopts-config
16185        elif libopts-config --help 2>/dev/null 1>&2
16186        then lo_cv_with_autoopts_config=libopts-config
16187        else lo_cv_with_autoopts_config=no ; fi
16188fi
16189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
16190printf "%s\n" "$lo_cv_with_autoopts_config" >&6; }
16191
16192fi
16193 # end of AC_ARG_WITH
16194
16195     if test ${lo_cv_test_autoopts+y}
16196then :
16197  printf %s "(cached) " >&6
16198else $as_nop
16199
16200        if test -z "${lo_cv_with_autoopts_config}" \
16201                -o X"${lo_cv_with_autoopts_config}" = Xno
16202        then
16203           if autoopts-config --help 2>/dev/null 1>&2
16204           then lo_cv_with_autoopts_config=autoopts-config
16205           elif libopts-config --help 2>/dev/null 1>&2
16206           then lo_cv_with_autoopts_config=libopts-config
16207           else lo_cv_with_autoopts_config=false ; fi
16208        fi
16209        lo_cv_test_autoopts=`
16210            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
16211        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
16212        then lo_cv_test_autoopts=no ; fi
16213
16214fi
16215 # end of CACHE_VAL
16216     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
16217printf "%s\n" "${lo_cv_test_autoopts}" >&6; }
16218
16219     if test "X${lo_cv_test_autoopts}" != Xno
16220     then
16221        LIBOPTS_LDADD="${lo_cv_test_autoopts}"
16222        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
16223     else
16224        LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
16225        LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
16226        NEED_LIBOPTS_DIR=true
16227     fi
16228  fi # end of if test -z "${NEED_LIBOPTS_DIR}"
16229  if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
16230    NEED_LIBOPTS_DIR=''
16231  fi
16232   if test -n "${NEED_LIBOPTS_DIR}"; then
16233  NEED_LIBOPTS_TRUE=
16234  NEED_LIBOPTS_FALSE='#'
16235else
16236  NEED_LIBOPTS_TRUE='#'
16237  NEED_LIBOPTS_FALSE=
16238fi
16239
16240
16241
16242  LIBOPTS_DIR=sntp/libopts
16243
16244
16245# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
16246
16247  # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
16248
16249
16250
16251
16252ntp_pkgconfig_min_version='0.15.0'
16253if test -n "$ac_tool_prefix"; then
16254  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16255set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16256{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16257printf %s "checking for $ac_word... " >&6; }
16258if test ${ac_cv_path_PKG_CONFIG+y}
16259then :
16260  printf %s "(cached) " >&6
16261else $as_nop
16262  case $PKG_CONFIG in
16263  [\\/]* | ?:[\\/]*)
16264  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
16265  ;;
16266  *)
16267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16268for as_dir in $PATH
16269do
16270  IFS=$as_save_IFS
16271  case $as_dir in #(((
16272    '') as_dir=./ ;;
16273    */) ;;
16274    *) as_dir=$as_dir/ ;;
16275  esac
16276    for ac_exec_ext in '' $ac_executable_extensions; do
16277  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16278    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16279    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16280    break 2
16281  fi
16282done
16283  done
16284IFS=$as_save_IFS
16285
16286  ;;
16287esac
16288fi
16289PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16290if test -n "$PKG_CONFIG"; then
16291  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16292printf "%s\n" "$PKG_CONFIG" >&6; }
16293else
16294  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16295printf "%s\n" "no" >&6; }
16296fi
16297
16298
16299fi
16300if test -z "$ac_cv_path_PKG_CONFIG"; then
16301  ac_pt_PKG_CONFIG=$PKG_CONFIG
16302  # Extract the first word of "pkg-config", so it can be a program name with args.
16303set dummy pkg-config; ac_word=$2
16304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16305printf %s "checking for $ac_word... " >&6; }
16306if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
16307then :
16308  printf %s "(cached) " >&6
16309else $as_nop
16310  case $ac_pt_PKG_CONFIG in
16311  [\\/]* | ?:[\\/]*)
16312  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16313  ;;
16314  *)
16315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16316for as_dir in $PATH
16317do
16318  IFS=$as_save_IFS
16319  case $as_dir in #(((
16320    '') as_dir=./ ;;
16321    */) ;;
16322    *) as_dir=$as_dir/ ;;
16323  esac
16324    for ac_exec_ext in '' $ac_executable_extensions; do
16325  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16326    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16327    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16328    break 2
16329  fi
16330done
16331  done
16332IFS=$as_save_IFS
16333
16334  ;;
16335esac
16336fi
16337ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16338if test -n "$ac_pt_PKG_CONFIG"; then
16339  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
16340printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
16341else
16342  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16343printf "%s\n" "no" >&6; }
16344fi
16345
16346  if test "x$ac_pt_PKG_CONFIG" = x; then
16347    PKG_CONFIG=""
16348  else
16349    case $cross_compiling:$ac_tool_warned in
16350yes:)
16351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16352printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16353ac_tool_warned=yes ;;
16354esac
16355    PKG_CONFIG=$ac_pt_PKG_CONFIG
16356  fi
16357else
16358  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16359fi
16360
16361{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
16362{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
16363
16364case "$PKG_CONFIG" in
16365 /*)
16366    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
16367printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
16368    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
16369	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16370printf "%s\n" "yes" >&6; }
16371    else
16372	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16373printf "%s\n" "no" >&6; }
16374	PKG_CONFIG=""
16375    fi
16376    ;;
16377esac
16378
16379
16380
16381
16382# Check whether --enable-local-libevent was given.
16383if test ${enable_local_libevent+y}
16384then :
16385  enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
16386else $as_nop
16387  ntp_use_local_libevent=${ntp_use_local_libevent-detect}
16388
16389fi
16390
16391
16392
16393
16394
16395ntp_libevent_min_version=2
16396ntp_libevent_tearoff=sntp/libevent
16397
16398
16399
16400
16401
16402case "$ntp_use_local_libevent" in
16403 yes)
16404    ;;
16405 *) # If we have (a good enough) pkg-config, see if it can find libevent
16406    case "$PKG_CONFIG" in
16407     /*)
16408	if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
16409	then
16410	    ntp_use_local_libevent=no
16411	    ntp_libevent_version="`$PKG_CONFIG --modversion libevent`"
16412	    case "$ntp_libevent_version" in
16413	     *.*) ;;
16414	     *) ntp_libevent_version='(unknown)' ;;
16415	    esac
16416	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
16417printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
16418	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
16419printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
16420	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
16421	    CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
16422	    # HMS: I hope the following is accurate.
16423	    # We don't need -levent, we only need  -levent_core.
16424	    # While we could grab only the -L stuff, there *might* be
16425	    # other flags there we want.  Originally we just removed -levent
16426	    # but then somebody decided to install -levent-2.0
16427	    # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
16428	    # So now we dance...
16429	    LDADD_LIBEVENT=
16430	    for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
16431	    do
16432		case "$i" in
16433		 -D*) ;;
16434		 -levent*) ;;
16435		 *) case "$LDADD_LIBEVENT" in
16436		     '') LDADD_LIBEVENT="$i" ;;
16437		     *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
16438		    esac
16439		    ;;
16440		esac
16441	    done
16442	    case "$LIBISC_PTHREADS_NOTHREADS" in
16443	     pthreads)
16444		LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
16445	    esac
16446	    LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
16447	else
16448	    ntp_use_local_libevent=yes
16449	    # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
16450	    # is "pthreads"?
16451	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
16452	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
16453printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
16454	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16455printf "%s\n" "no" >&6; }
16456	fi
16457	;;
16458     *)
16459	ntp_use_local_libevent=yes
16460	;;
16461    esac
16462    ;;
16463esac
16464
16465case "$ntp_use_local_libevent" in
16466 yes)
16467    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
16468printf "%s\n" "$as_me: Using libevent tearoff" >&6;}
16469    CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
16470    case "$LIBISC_PTHREADS_NOTHREADS" in
16471     pthreads)
16472	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
16473	;;
16474     *)
16475	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
16476    esac
16477esac
16478
16479
16480 if test "x$ntp_use_local_libevent" = "xyes"; then
16481  BUILD_LIBEVENT_TRUE=
16482  BUILD_LIBEVENT_FALSE='#'
16483else
16484  BUILD_LIBEVENT_TRUE='#'
16485  BUILD_LIBEVENT_FALSE=
16486fi
16487
16488
16489
16490
16491
16492
16493# Expose a cross-compilation indicator to makefiles
16494 if test $build != $host; then
16495  NTP_CROSSCOMPILE_TRUE=
16496  NTP_CROSSCOMPILE_FALSE='#'
16497else
16498  NTP_CROSSCOMPILE_TRUE='#'
16499  NTP_CROSSCOMPILE_FALSE=
16500fi
16501
16502
16503
16504ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16505if test "x$ac_cv_type_size_t" = xyes
16506then :
16507
16508else $as_nop
16509
16510printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16511
16512fi
16513
16514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
16515printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
16516if test ${ac_cv_c_undeclared_builtin_options+y}
16517then :
16518  printf %s "(cached) " >&6
16519else $as_nop
16520  ac_save_CFLAGS=$CFLAGS
16521   ac_cv_c_undeclared_builtin_options='cannot detect'
16522   for ac_arg in '' -fno-builtin; do
16523     CFLAGS="$ac_save_CFLAGS $ac_arg"
16524     # This test program should *not* compile successfully.
16525     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16526/* end confdefs.h.  */
16527
16528int
16529main (void)
16530{
16531(void) strchr;
16532  ;
16533  return 0;
16534}
16535_ACEOF
16536if ac_fn_c_try_compile "$LINENO"
16537then :
16538
16539else $as_nop
16540  # This test program should compile successfully.
16541        # No library function is consistently available on
16542        # freestanding implementations, so test against a dummy
16543        # declaration.  Include always-available headers on the
16544        # off chance that they somehow elicit warnings.
16545        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16546/* end confdefs.h.  */
16547#include <float.h>
16548#include <limits.h>
16549#include <stdarg.h>
16550#include <stddef.h>
16551extern void ac_decl (int, char *);
16552
16553int
16554main (void)
16555{
16556(void) ac_decl (0, (char *) 0);
16557  (void) ac_decl;
16558
16559  ;
16560  return 0;
16561}
16562_ACEOF
16563if ac_fn_c_try_compile "$LINENO"
16564then :
16565  if test x"$ac_arg" = x
16566then :
16567  ac_cv_c_undeclared_builtin_options='none needed'
16568else $as_nop
16569  ac_cv_c_undeclared_builtin_options=$ac_arg
16570fi
16571          break
16572fi
16573rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16574fi
16575rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16576    done
16577    CFLAGS=$ac_save_CFLAGS
16578
16579fi
16580{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
16581printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
16582  case $ac_cv_c_undeclared_builtin_options in #(
16583  'cannot detect') :
16584    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16585printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16586as_fn_error $? "cannot make $CC report undeclared builtins
16587See \`config.log' for more details" "$LINENO" 5; } ;; #(
16588  'none needed') :
16589    ac_c_undeclared_builtin_options='' ;; #(
16590  *) :
16591    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
16592esac
16593
16594ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
16595if test "x$ac_cv_have_decl_strerror_r" = xyes
16596then :
16597  ac_have_decl=1
16598else $as_nop
16599  ac_have_decl=0
16600fi
16601printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
16602
16603
16604
16605            # Check whether --enable-c99-snprintf was given.
16606if test ${enable_c99_snprintf+y}
16607then :
16608  enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
16609else $as_nop
16610  force_c99_snprintf=no
16611
16612fi
16613
16614    case "$force_c99_snprintf" in
16615     yes)
16616	hw_force_rpl_snprintf=yes
16617	hw_force_rpl_vsnprintf=yes
16618    esac
16619
16620
16621
16622
16623
16624
16625
16626
16627  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16628printf %s "checking for unsigned long long int... " >&6; }
16629if test ${ac_cv_type_unsigned_long_long_int+y}
16630then :
16631  printf %s "(cached) " >&6
16632else $as_nop
16633  ac_cv_type_unsigned_long_long_int=yes
16634     case $ac_prog_cc_stdc in
16635       no | c89) ;;
16636       *)
16637	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16638/* end confdefs.h.  */
16639
16640  /* For now, do not test the preprocessor; as of 2007 there are too many
16641	 implementations with broken preprocessors.  Perhaps this can
16642	 be revisited in 2012.  In the meantime, code should not expect
16643	 #if to work with literals wider than 32 bits.  */
16644      /* Test literals.  */
16645      long long int ll = 9223372036854775807ll;
16646      long long int nll = -9223372036854775807LL;
16647      unsigned long long int ull = 18446744073709551615ULL;
16648      /* Test constant expressions.   */
16649      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16650		     ? 1 : -1)];
16651      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16652		     ? 1 : -1)];
16653      int i = 63;
16654int
16655main (void)
16656{
16657/* Test availability of runtime routines for shift and division.  */
16658      long long int llmax = 9223372036854775807ll;
16659      unsigned long long int ullmax = 18446744073709551615ull;
16660      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16661	      | (llmax / ll) | (llmax % ll)
16662	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16663	      | (ullmax / ull) | (ullmax % ull));
16664  ;
16665  return 0;
16666}
16667
16668_ACEOF
16669if ac_fn_c_try_link "$LINENO"
16670then :
16671
16672else $as_nop
16673  ac_cv_type_unsigned_long_long_int=no
16674fi
16675rm -f core conftest.err conftest.$ac_objext conftest.beam \
16676    conftest$ac_exeext conftest.$ac_ext;;
16677     esac
16678fi
16679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
16680printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
16681  if test $ac_cv_type_unsigned_long_long_int = yes; then
16682
16683printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
16684
16685  fi
16686
16687
16688      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
16689if test "x$ac_cv_func_vsnprintf" = xyes
16690then :
16691  hw_cv_func_vsnprintf=yes
16692else $as_nop
16693  hw_cv_func_vsnprintf=no
16694fi
16695
16696  if test "$hw_cv_func_vsnprintf" = yes
16697then :
16698  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
16699printf %s "checking whether vsnprintf is C99 compliant... " >&6; }
16700if test ${hw_cv_func_vsnprintf_c99+y}
16701then :
16702  printf %s "(cached) " >&6
16703else $as_nop
16704  if test "$cross_compiling" = yes
16705then :
16706  hw_cv_func_vsnprintf_c99=no
16707else $as_nop
16708  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16709/* end confdefs.h.  */
16710#if HAVE_STDARG_H
16711          #include <stdarg.h>
16712          #endif
16713          #include <stdio.h>
16714          static int testprintf(char *buf, size_t size, const char *format, ...)
16715          {
16716            int result;
16717            va_list ap;
16718            va_start(ap, format);
16719            result = vsnprintf(buf, size, format, ap);
16720            va_end(ap);
16721            return result;
16722          }
16723int
16724main (void)
16725{
16726char buf[43];
16727          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
16728              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
16729              buf[0] != 'T' || buf[3] != '\0')
16730            return 1;
16731  ;
16732  return 0;
16733}
16734_ACEOF
16735if ac_fn_c_try_run "$LINENO"
16736then :
16737  hw_cv_func_vsnprintf_c99=yes
16738else $as_nop
16739  hw_cv_func_vsnprintf_c99=no
16740fi
16741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16742  conftest.$ac_objext conftest.beam conftest.$ac_ext
16743fi
16744
16745fi
16746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
16747printf "%s\n" "$hw_cv_func_vsnprintf_c99" >&6; }
16748else $as_nop
16749  hw_cv_func_vsnprintf_c99=no
16750fi
16751
16752printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
16753
16754  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
16755printf %s "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
16756  if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no
16757then :
16758  hw_use_rpl_vsnprintf=yes
16759else $as_nop
16760  hw_use_rpl_vsnprintf=no
16761fi
16762  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
16763printf "%s\n" "$hw_use_rpl_vsnprintf" >&6; }
16764  if test "$hw_use_rpl_vsnprintf" = yes
16765then :
16766
16767printf "%s\n" "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
16768
16769    if test ${hw_nodef_vsnprintf=no} = no
16770then :
16771
16772printf "%s\n" "#define vsnprintf rpl_vsnprintf" >>confdefs.h
16773
16774fi
16775    ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
16776if test "x$ac_cv_header_inttypes_h" = xyes
16777then :
16778  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
16779
16780fi
16781ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
16782if test "x$ac_cv_header_locale_h" = xyes
16783then :
16784  printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
16785
16786fi
16787ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
16788if test "x$ac_cv_header_stddef_h" = xyes
16789then :
16790  printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
16791
16792fi
16793ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
16794if test "x$ac_cv_header_stdint_h" = xyes
16795then :
16796  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
16797
16798fi
16799
16800    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
16801"
16802if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
16803then :
16804
16805printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
16806
16807
16808fi
16809ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
16810"
16811if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes
16812then :
16813
16814printf "%s\n" "#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1" >>confdefs.h
16815
16816
16817fi
16818
16819
16820  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
16821printf %s "checking for long double... " >&6; }
16822if test ${ac_cv_type_long_double+y}
16823then :
16824  printf %s "(cached) " >&6
16825else $as_nop
16826  if test "$GCC" = yes; then
16827       ac_cv_type_long_double=yes
16828     else
16829       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16830/* end confdefs.h.  */
16831/* The Stardent Vistra knows sizeof (long double), but does
16832		 not support it.  */
16833	      long double foo = 0.0L;
16834int
16835main (void)
16836{
16837static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
16838	      sizeof (double) <= sizeof (long double))];
16839test_array [0] = 0;
16840return test_array [0];
16841
16842  ;
16843  return 0;
16844}
16845_ACEOF
16846if ac_fn_c_try_compile "$LINENO"
16847then :
16848  ac_cv_type_long_double=yes
16849else $as_nop
16850  ac_cv_type_long_double=no
16851fi
16852rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16853     fi
16854fi
16855{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
16856printf "%s\n" "$ac_cv_type_long_double" >&6; }
16857  if test $ac_cv_type_long_double = yes; then
16858
16859printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16860
16861  fi
16862
16863
16864
16865  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
16866printf %s "checking for long long int... " >&6; }
16867if test ${ac_cv_type_long_long_int+y}
16868then :
16869  printf %s "(cached) " >&6
16870else $as_nop
16871  ac_cv_type_long_long_int=yes
16872      case $ac_prog_cc_stdc in
16873	no | c89) ;;
16874	*)
16875	  ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
16876	  if test $ac_cv_type_long_long_int = yes; then
16877	    	    	    	    if test "$cross_compiling" = yes
16878then :
16879  :
16880else $as_nop
16881  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16882/* end confdefs.h.  */
16883#include <limits.h>
16884		   #ifndef LLONG_MAX
16885		   # define HALF \
16886			    (1LL << (sizeof (long long int) * CHAR_BIT - 2))
16887		   # define LLONG_MAX (HALF - 1 + HALF)
16888		   #endif
16889int
16890main (void)
16891{
16892long long int n = 1;
16893		   int i;
16894		   for (i = 0; ; i++)
16895		     {
16896		       long long int m = n << i;
16897		       if (m >> i != n)
16898			 return 1;
16899		       if (LLONG_MAX / 2 < m)
16900			 break;
16901		     }
16902		   return 0;
16903  ;
16904  return 0;
16905}
16906_ACEOF
16907if ac_fn_c_try_run "$LINENO"
16908then :
16909
16910else $as_nop
16911  ac_cv_type_long_long_int=no
16912fi
16913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16914  conftest.$ac_objext conftest.beam conftest.$ac_ext
16915fi
16916
16917	  fi;;
16918      esac
16919fi
16920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
16921printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
16922  if test $ac_cv_type_long_long_int = yes; then
16923
16924printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
16925
16926  fi
16927
16928
16929  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16930printf %s "checking for unsigned long long int... " >&6; }
16931if test ${ac_cv_type_unsigned_long_long_int+y}
16932then :
16933  printf %s "(cached) " >&6
16934else $as_nop
16935  ac_cv_type_unsigned_long_long_int=yes
16936     case $ac_prog_cc_stdc in
16937       no | c89) ;;
16938       *)
16939	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16940/* end confdefs.h.  */
16941
16942  /* For now, do not test the preprocessor; as of 2007 there are too many
16943	 implementations with broken preprocessors.  Perhaps this can
16944	 be revisited in 2012.  In the meantime, code should not expect
16945	 #if to work with literals wider than 32 bits.  */
16946      /* Test literals.  */
16947      long long int ll = 9223372036854775807ll;
16948      long long int nll = -9223372036854775807LL;
16949      unsigned long long int ull = 18446744073709551615ULL;
16950      /* Test constant expressions.   */
16951      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16952		     ? 1 : -1)];
16953      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16954		     ? 1 : -1)];
16955      int i = 63;
16956int
16957main (void)
16958{
16959/* Test availability of runtime routines for shift and division.  */
16960      long long int llmax = 9223372036854775807ll;
16961      unsigned long long int ullmax = 18446744073709551615ull;
16962      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16963	      | (llmax / ll) | (llmax % ll)
16964	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16965	      | (ullmax / ull) | (ullmax % ull));
16966  ;
16967  return 0;
16968}
16969
16970_ACEOF
16971if ac_fn_c_try_link "$LINENO"
16972then :
16973
16974else $as_nop
16975  ac_cv_type_unsigned_long_long_int=no
16976fi
16977rm -f core conftest.err conftest.$ac_objext conftest.beam \
16978    conftest$ac_exeext conftest.$ac_ext;;
16979     esac
16980fi
16981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
16982printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
16983  if test $ac_cv_type_unsigned_long_long_int = yes; then
16984
16985printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
16986
16987  fi
16988
16989    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16990if test "x$ac_cv_type_size_t" = xyes
16991then :
16992
16993else $as_nop
16994
16995printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16996
16997fi
16998
16999
17000
17001  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
17002if test "x$ac_cv_type_intmax_t" = xyes
17003then :
17004
17005printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
17006
17007else $as_nop
17008  test $ac_cv_type_long_long_int = yes \
17009       && ac_type='long long int' \
17010       || ac_type='long int'
17011
17012printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
17013
17014fi
17015
17016
17017
17018
17019  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
17020if test "x$ac_cv_type_uintmax_t" = xyes
17021then :
17022
17023printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
17024
17025else $as_nop
17026  test $ac_cv_type_unsigned_long_long_int = yes \
17027       && ac_type='unsigned long long int' \
17028       || ac_type='unsigned long int'
17029
17030printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
17031
17032fi
17033
17034
17035
17036  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
17037if test "x$ac_cv_type_uintptr_t" = xyes
17038then :
17039
17040printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
17041
17042else $as_nop
17043  for ac_type in 'unsigned int' 'unsigned long int' \
17044	'unsigned long long int'; do
17045       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17046/* end confdefs.h.  */
17047$ac_includes_default
17048int
17049main (void)
17050{
17051static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17052test_array [0] = 0;
17053return test_array [0];
17054
17055  ;
17056  return 0;
17057}
17058_ACEOF
17059if ac_fn_c_try_compile "$LINENO"
17060then :
17061
17062printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
17063
17064	  ac_type=
17065fi
17066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17067       test -z "$ac_type" && break
17068     done
17069fi
17070
17071
17072    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
17073if test "x$ac_cv_type_ptrdiff_t" = xyes
17074then :
17075
17076printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
17077
17078
17079fi
17080
17081    ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
17082if test "x$ac_cv_func_localeconv" = xyes
17083then :
17084  printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
17085
17086fi
17087
17088
17089  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
17090then :
17091  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
17092printf %s "checking for an ANSI C-conforming const... " >&6; }
17093if test ${ac_cv_c_const+y}
17094then :
17095  printf %s "(cached) " >&6
17096else $as_nop
17097  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17098/* end confdefs.h.  */
17099
17100int
17101main (void)
17102{
17103
17104#ifndef __cplusplus
17105  /* Ultrix mips cc rejects this sort of thing.  */
17106  typedef int charset[2];
17107  const charset cs = { 0, 0 };
17108  /* SunOS 4.1.1 cc rejects this.  */
17109  char const *const *pcpcc;
17110  char **ppc;
17111  /* NEC SVR4.0.2 mips cc rejects this.  */
17112  struct point {int x, y;};
17113  static struct point const zero = {0,0};
17114  /* IBM XL C 1.02.0.0 rejects this.
17115     It does not let you subtract one const X* pointer from another in
17116     an arm of an if-expression whose if-part is not a constant
17117     expression */
17118  const char *g = "string";
17119  pcpcc = &g + (g ? g-g : 0);
17120  /* HPUX 7.0 cc rejects these. */
17121  ++pcpcc;
17122  ppc = (char**) pcpcc;
17123  pcpcc = (char const *const *) ppc;
17124  { /* SCO 3.2v4 cc rejects this sort of thing.  */
17125    char tx;
17126    char *t = &tx;
17127    char const *s = 0 ? (char *) 0 : (char const *) 0;
17128
17129    *t++ = 0;
17130    if (s) return 0;
17131  }
17132  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17133    int x[] = {25, 17};
17134    const int *foo = &x[0];
17135    ++foo;
17136  }
17137  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17138    typedef const int *iptr;
17139    iptr p = 0;
17140    ++p;
17141  }
17142  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
17143       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17144    struct s { int j; const int *ap[3]; } bx;
17145    struct s *b = &bx; b->j = 5;
17146  }
17147  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17148    const int foo = 10;
17149    if (!foo) return 0;
17150  }
17151  return !cs[0] && !zero.x;
17152#endif
17153
17154  ;
17155  return 0;
17156}
17157_ACEOF
17158if ac_fn_c_try_compile "$LINENO"
17159then :
17160  ac_cv_c_const=yes
17161else $as_nop
17162  ac_cv_c_const=no
17163fi
17164rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17165fi
17166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
17167printf "%s\n" "$ac_cv_c_const" >&6; }
17168if test $ac_cv_c_const = no; then
17169
17170printf "%s\n" "#define const /**/" >>confdefs.h
17171
17172fi
17173
17174
17175
17176
17177    case " $LIBOBJS " in
17178  *" snprintf.$ac_objext "* ) ;;
17179  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
17180 ;;
17181esac
17182
17183    _hw_cv_func_xprintf_replace_done=yes
17184fi
17185
17186fi
17187
17188
17189    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
17190if test "x$ac_cv_func_snprintf" = xyes
17191then :
17192  hw_cv_func_snprintf=yes
17193else $as_nop
17194  hw_cv_func_snprintf=no
17195fi
17196
17197  if test "$hw_cv_func_snprintf" = yes
17198then :
17199  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
17200printf %s "checking whether snprintf is C99 compliant... " >&6; }
17201if test ${hw_cv_func_snprintf_c99+y}
17202then :
17203  printf %s "(cached) " >&6
17204else $as_nop
17205  if test "$cross_compiling" = yes
17206then :
17207  hw_cv_func_snprintf_c99=no
17208else $as_nop
17209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17210/* end confdefs.h.  */
17211#include <stdio.h>
17212int
17213main (void)
17214{
17215char buf[43];
17216          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
17217              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
17218              buf[0] != 'T' || buf[3] != '\0')
17219            return 1;
17220  ;
17221  return 0;
17222}
17223_ACEOF
17224if ac_fn_c_try_run "$LINENO"
17225then :
17226  hw_cv_func_snprintf_c99=yes
17227else $as_nop
17228  hw_cv_func_snprintf_c99=no
17229fi
17230rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17231  conftest.$ac_objext conftest.beam conftest.$ac_ext
17232fi
17233
17234fi
17235{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
17236printf "%s\n" "$hw_cv_func_snprintf_c99" >&6; }
17237else $as_nop
17238  hw_cv_func_snprintf_c99=no
17239fi
17240
17241printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
17242
17243  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
17244printf %s "checking if C99-snprintf replacement snprintf will be used... " >&6; }
17245  if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no
17246then :
17247  hw_use_rpl_snprintf=yes
17248else $as_nop
17249  hw_use_rpl_snprintf=no
17250fi
17251  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
17252printf "%s\n" "$hw_use_rpl_snprintf" >&6; }
17253  if test "$hw_use_rpl_snprintf" = yes
17254then :
17255
17256printf "%s\n" "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
17257
17258    if test ${hw_nodef_snprintf=no} = no
17259then :
17260
17261printf "%s\n" "#define snprintf rpl_snprintf" >>confdefs.h
17262
17263fi
17264
17265  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
17266then :
17267  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
17268printf %s "checking for an ANSI C-conforming const... " >&6; }
17269if test ${ac_cv_c_const+y}
17270then :
17271  printf %s "(cached) " >&6
17272else $as_nop
17273  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17274/* end confdefs.h.  */
17275
17276int
17277main (void)
17278{
17279
17280#ifndef __cplusplus
17281  /* Ultrix mips cc rejects this sort of thing.  */
17282  typedef int charset[2];
17283  const charset cs = { 0, 0 };
17284  /* SunOS 4.1.1 cc rejects this.  */
17285  char const *const *pcpcc;
17286  char **ppc;
17287  /* NEC SVR4.0.2 mips cc rejects this.  */
17288  struct point {int x, y;};
17289  static struct point const zero = {0,0};
17290  /* IBM XL C 1.02.0.0 rejects this.
17291     It does not let you subtract one const X* pointer from another in
17292     an arm of an if-expression whose if-part is not a constant
17293     expression */
17294  const char *g = "string";
17295  pcpcc = &g + (g ? g-g : 0);
17296  /* HPUX 7.0 cc rejects these. */
17297  ++pcpcc;
17298  ppc = (char**) pcpcc;
17299  pcpcc = (char const *const *) ppc;
17300  { /* SCO 3.2v4 cc rejects this sort of thing.  */
17301    char tx;
17302    char *t = &tx;
17303    char const *s = 0 ? (char *) 0 : (char const *) 0;
17304
17305    *t++ = 0;
17306    if (s) return 0;
17307  }
17308  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17309    int x[] = {25, 17};
17310    const int *foo = &x[0];
17311    ++foo;
17312  }
17313  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17314    typedef const int *iptr;
17315    iptr p = 0;
17316    ++p;
17317  }
17318  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
17319       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17320    struct s { int j; const int *ap[3]; } bx;
17321    struct s *b = &bx; b->j = 5;
17322  }
17323  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17324    const int foo = 10;
17325    if (!foo) return 0;
17326  }
17327  return !cs[0] && !zero.x;
17328#endif
17329
17330  ;
17331  return 0;
17332}
17333_ACEOF
17334if ac_fn_c_try_compile "$LINENO"
17335then :
17336  ac_cv_c_const=yes
17337else $as_nop
17338  ac_cv_c_const=no
17339fi
17340rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17341fi
17342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
17343printf "%s\n" "$ac_cv_c_const" >&6; }
17344if test $ac_cv_c_const = no; then
17345
17346printf "%s\n" "#define const /**/" >>confdefs.h
17347
17348fi
17349
17350
17351
17352
17353    case " $LIBOBJS " in
17354  *" snprintf.$ac_objext "* ) ;;
17355  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
17356 ;;
17357esac
17358
17359    _hw_cv_func_xprintf_replace_done=yes
17360fi
17361
17362fi
17363
17364
17365
17366
17367VER_SUFFIX=
17368
17369	case "$enable_verbose_ssl" in
17370	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
17371printf "%s\n" "$as_me: " >&6;}
17372	esac
17373
17374
17375
17376
17377
17378
17379
17380# HMS: Save $LIBS and empty it.
17381# any LIBS we add here should go in to LDADD_LIBNTP
17382
17383SAVED_LIBS=$LIBS
17384LIBS=
17385
17386
17387
17388# [Bug 2332] because we need to know if we are using GNU ld...
17389
17390
17391# Check whether --with-gnu-ld was given.
17392if test ${with_gnu_ld+y}
17393then :
17394  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
17395else $as_nop
17396  with_gnu_ld=no
17397fi
17398
17399ac_prog=ld
17400if test yes = "$GCC"; then
17401  # Check if gcc -print-prog-name=ld gives a path.
17402  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17403printf %s "checking for ld used by $CC... " >&6; }
17404  case $host in
17405  *-*-mingw*)
17406    # gcc leaves a trailing carriage return, which upsets mingw
17407    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17408  *)
17409    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17410  esac
17411  case $ac_prog in
17412    # Accept absolute paths.
17413    [\\/]* | ?:[\\/]*)
17414      re_direlt='/[^/][^/]*/\.\./'
17415      # Canonicalize the pathname of ld
17416      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17417      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17418	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17419      done
17420      test -z "$LD" && LD=$ac_prog
17421      ;;
17422  "")
17423    # If it fails, then pretend we aren't using GCC.
17424    ac_prog=ld
17425    ;;
17426  *)
17427    # If it is relative, then search for the first ld in PATH.
17428    with_gnu_ld=unknown
17429    ;;
17430  esac
17431elif test yes = "$with_gnu_ld"; then
17432  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17433printf %s "checking for GNU ld... " >&6; }
17434else
17435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17436printf %s "checking for non-GNU ld... " >&6; }
17437fi
17438if test ${lt_cv_path_LD+y}
17439then :
17440  printf %s "(cached) " >&6
17441else $as_nop
17442  if test -z "$LD"; then
17443  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
17444  for ac_dir in $PATH; do
17445    IFS=$lt_save_ifs
17446    test -z "$ac_dir" && ac_dir=.
17447    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17448      lt_cv_path_LD=$ac_dir/$ac_prog
17449      # Check to see if the program is GNU ld.  I'd rather use --version,
17450      # but apparently some variants of GNU ld only accept -v.
17451      # Break only if it was the GNU/non-GNU ld that we prefer.
17452      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17453      *GNU* | *'with BFD'*)
17454	test no != "$with_gnu_ld" && break
17455	;;
17456      *)
17457	test yes != "$with_gnu_ld" && break
17458	;;
17459      esac
17460    fi
17461  done
17462  IFS=$lt_save_ifs
17463else
17464  lt_cv_path_LD=$LD # Let the user override the test with a path.
17465fi
17466fi
17467
17468LD=$lt_cv_path_LD
17469if test -n "$LD"; then
17470  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17471printf "%s\n" "$LD" >&6; }
17472else
17473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474printf "%s\n" "no" >&6; }
17475fi
17476test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17478printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
17479if test ${lt_cv_prog_gnu_ld+y}
17480then :
17481  printf %s "(cached) " >&6
17482else $as_nop
17483  # I'd rather use --version here, but apparently some GNU lds only accept -v.
17484case `$LD -v 2>&1 </dev/null` in
17485*GNU* | *'with BFD'*)
17486  lt_cv_prog_gnu_ld=yes
17487  ;;
17488*)
17489  lt_cv_prog_gnu_ld=no
17490  ;;
17491esac
17492fi
17493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17494printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
17495with_gnu_ld=$lt_cv_prog_gnu_ld
17496
17497
17498
17499
17500
17501
17502
17503
17504{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
17505printf %s "checking for directory path separator... " >&6; }
17506if test ${ntp_cv_dir_sep+y}
17507then :
17508  printf %s "(cached) " >&6
17509else $as_nop
17510
17511	case "$ntp_cv_dir_sep" in
17512	 '')
17513	    case "$host_os" in
17514	     *djgpp | *mingw32* | *emx*)
17515		ntp_cv_dir_sep="'\\'"
17516		;;
17517	     *)
17518		ntp_cv_dir_sep="'/'"
17519		;;
17520	    esac
17521	esac
17522
17523
17524fi
17525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
17526printf "%s\n" "$ntp_cv_dir_sep" >&6; }
17527
17528printf "%s\n" "#define DIR_SEP $ntp_cv_dir_sep" >>confdefs.h
17529
17530
17531
17532    NTP_ORIG_LIBS="$LIBS"
17533
17534# Check whether --with-lineeditlibs was given.
17535if test ${with_lineeditlibs+y}
17536then :
17537  withval=$with_lineeditlibs; use_lineeditlibs="$withval"
17538else $as_nop
17539  use_lineeditlibs="edit,editline"
17540
17541fi
17542
17543    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
17544printf %s "checking line editing libraries... " >&6; }
17545    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
17546printf "%s\n" "$use_lineeditlibs" >&6; }
17547    case "$use_lineeditlibs" in
17548     no)
17549	ntp_lib_lineedit=no
17550	;;
17551     *)
17552	for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
17553	    for term_lib in "" termcap curses ncurses; do
17554		case "$term_lib" in
17555		 '')
17556		    TRY_LIB="-l$lineedit_lib"
17557		    ;;
17558		 *)
17559		    TRY_LIB="-l$lineedit_lib -l$term_lib"
17560		    ;;
17561		esac
17562		LIBS="$NTP_ORIG_LIBS $TRY_LIB"
17563		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
17564printf %s "checking for readline() with $TRY_LIB... " >&6; }
17565		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17566/* end confdefs.h.  */
17567
17568/* Override any GCC internal prototype to avoid an error.
17569   Use char because int might match the return type of a GCC
17570   builtin and then its argument prototype would still apply.  */
17571char readline ();
17572int
17573main (void)
17574{
17575return readline ();
17576  ;
17577  return 0;
17578}
17579_ACEOF
17580if ac_fn_c_try_link "$LINENO"
17581then :
17582  ntp_lib_lineedit="$TRY_LIB"
17583fi
17584rm -f core conftest.err conftest.$ac_objext conftest.beam \
17585    conftest$ac_exeext conftest.$ac_ext
17586		case "$ntp_lib_lineedit" in
17587		 '')
17588		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589printf "%s\n" "no" >&6; }
17590		    ;;
17591		 *)
17592		    # Use readline()
17593		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17594printf "%s\n" "yes" >&6; }
17595		    break
17596		esac
17597		case "$term_lib" in
17598		 '')
17599		    # do not try el_gets without a terminal library
17600		    ;;
17601		 *)
17602		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
17603printf %s "checking for el_gets() with $TRY_LIB... " >&6; }
17604		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17605/* end confdefs.h.  */
17606
17607/* Override any GCC internal prototype to avoid an error.
17608   Use char because int might match the return type of a GCC
17609   builtin and then its argument prototype would still apply.  */
17610char el_gets ();
17611int
17612main (void)
17613{
17614return el_gets ();
17615  ;
17616  return 0;
17617}
17618_ACEOF
17619if ac_fn_c_try_link "$LINENO"
17620then :
17621  ntp_lib_lineedit="$TRY_LIB"
17622fi
17623rm -f core conftest.err conftest.$ac_objext conftest.beam \
17624    conftest$ac_exeext conftest.$ac_ext
17625		    case "$ntp_lib_lineedit" in
17626		     '')
17627			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17628printf "%s\n" "no" >&6; }
17629			;;
17630		     *) # Use el_gets()
17631			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17632printf "%s\n" "yes" >&6; }
17633			break
17634			;;
17635		    esac	# $ntp_lib_lineedit
17636		esac		# $term_lib
17637	    done
17638	    case "$ntp_lib_lineedit" in
17639	     '')
17640		;;
17641	     *)
17642		break
17643		;;
17644	    esac
17645	done
17646	LIBS="$NTP_ORIG_LIBS"
17647	;;
17648    esac	# $use_lineeditlibs
17649
17650    case "$ntp_lib_lineedit" in
17651     '')
17652	ntp_lib_lineedit="no"
17653	;;
17654     no)
17655	;;
17656     *)
17657	EDITLINE_LIBS="$ntp_lib_lineedit"
17658
17659	;;
17660    esac	# $ntp_lib_lineedit
17661
17662    case "$ntp_lib_lineedit" in
17663     no)
17664	;;
17665     *)
17666	ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
17667if test "x$ac_cv_header_readline_h" = xyes
17668then :
17669  printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h
17670
17671fi
17672ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
17673if test "x$ac_cv_header_readline_readline_h" = xyes
17674then :
17675  printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h
17676
17677fi
17678ac_fn_c_check_header_compile "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
17679if test "x$ac_cv_header_histedit_h" = xyes
17680then :
17681  printf "%s\n" "#define HAVE_HISTEDIT_H 1" >>confdefs.h
17682
17683fi
17684
17685	ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
17686if test "x$ac_cv_header_history_h" = xyes
17687then :
17688  printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h
17689
17690fi
17691ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
17692if test "x$ac_cv_header_readline_history_h" = xyes
17693then :
17694  printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
17695
17696fi
17697
17698
17699	case "$ac_cv_header_histedit_h" in
17700	 yes)
17701	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
17702printf %s "checking number of arguments to el_init()... " >&6; }
17703if test ${ntp_cv_el_init_args+y}
17704then :
17705  printf %s "(cached) " >&6
17706else $as_nop
17707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17708/* end confdefs.h.  */
17709
17710			    #include <stdio.h>
17711			    #include <histedit.h>
17712
17713int
17714main (void)
17715{
17716
17717			    el_init("conftest", stdin, stdout, stderr);
17718
17719
17720  ;
17721  return 0;
17722}
17723_ACEOF
17724if ac_fn_c_try_compile "$LINENO"
17725then :
17726  ntp_cv_el_init_args=4
17727else $as_nop
17728  ntp_cv_el_init_args=3
17729
17730fi
17731rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17732
17733fi
17734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
17735printf "%s\n" "$ntp_cv_el_init_args" >&6; }
17736
17737printf "%s\n" "#define EL_INIT_ARGS $ntp_cv_el_init_args" >>confdefs.h
17738
17739	esac
17740
17741	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
17742printf %s "checking whether readline supports history... " >&6; }
17743
17744	ntp_lib_lineedit_history="no"
17745	ORIG_LIBS="$LIBS"
17746	LIBS="$ORIG_LIBS $ntp_lib_lineedit"
17747	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17748/* end confdefs.h.  */
17749
17750/* Override any GCC internal prototype to avoid an error.
17751   Use char because int might match the return type of a GCC
17752   builtin and then its argument prototype would still apply.  */
17753char add_history ();
17754int
17755main (void)
17756{
17757return add_history ();
17758  ;
17759  return 0;
17760}
17761_ACEOF
17762if ac_fn_c_try_link "$LINENO"
17763then :
17764  ntp_lib_lineedit_history="yes"
17765fi
17766rm -f core conftest.err conftest.$ac_objext conftest.beam \
17767    conftest$ac_exeext conftest.$ac_ext
17768	LIBS="$ORIG_LIBS"
17769
17770	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
17771printf "%s\n" "$ntp_lib_lineedit_history" >&6; }
17772
17773	case "$ntp_lib_lineedit_history" in
17774	 yes)
17775
17776printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
17777
17778	esac
17779    esac	# $ntp_lib_lineedit
17780    { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
17781    { ORIG_LIBS=; unset ORIG_LIBS;}
17782    { TRY_LIB=; unset TRY_LIB;}
17783    { use_lineeditlibs=; unset use_lineeditlibs;}
17784
17785
17786LIBM=
17787case "$host" in
17788 *-*-darwin*)
17789    ;;
17790 *)
17791    _libs=$LIBS
17792    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
17793printf %s "checking for library containing cos... " >&6; }
17794if test ${ac_cv_search_cos+y}
17795then :
17796  printf %s "(cached) " >&6
17797else $as_nop
17798  ac_func_search_save_LIBS=$LIBS
17799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17800/* end confdefs.h.  */
17801
17802/* Override any GCC internal prototype to avoid an error.
17803   Use char because int might match the return type of a GCC
17804   builtin and then its argument prototype would still apply.  */
17805char cos ();
17806int
17807main (void)
17808{
17809return cos ();
17810  ;
17811  return 0;
17812}
17813_ACEOF
17814for ac_lib in '' m
17815do
17816  if test -z "$ac_lib"; then
17817    ac_res="none required"
17818  else
17819    ac_res=-l$ac_lib
17820    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17821  fi
17822  if ac_fn_c_try_link "$LINENO"
17823then :
17824  ac_cv_search_cos=$ac_res
17825fi
17826rm -f core conftest.err conftest.$ac_objext conftest.beam \
17827    conftest$ac_exeext
17828  if test ${ac_cv_search_cos+y}
17829then :
17830  break
17831fi
17832done
17833if test ${ac_cv_search_cos+y}
17834then :
17835
17836else $as_nop
17837  ac_cv_search_cos=no
17838fi
17839rm conftest.$ac_ext
17840LIBS=$ac_func_search_save_LIBS
17841fi
17842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
17843printf "%s\n" "$ac_cv_search_cos" >&6; }
17844ac_res=$ac_cv_search_cos
17845if test "$ac_res" != no
17846then :
17847  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17848  LIBM="-lm"
17849fi
17850
17851    LIBS=$_libs
17852    ;;
17853esac
17854
17855{ _libs=; unset _libs;}
17856
17857
17858
17859
17860if test "x$ac_cv_func_fork" = xyes; then
17861  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17862printf %s "checking for working fork... " >&6; }
17863if test ${ac_cv_func_fork_works+y}
17864then :
17865  printf %s "(cached) " >&6
17866else $as_nop
17867  if test "$cross_compiling" = yes
17868then :
17869  ac_cv_func_fork_works=cross
17870else $as_nop
17871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17872/* end confdefs.h.  */
17873$ac_includes_default
17874int
17875main (void)
17876{
17877
17878	  /* By Ruediger Kuhlmann. */
17879	  return fork () < 0;
17880
17881  ;
17882  return 0;
17883}
17884_ACEOF
17885if ac_fn_c_try_run "$LINENO"
17886then :
17887  ac_cv_func_fork_works=yes
17888else $as_nop
17889  ac_cv_func_fork_works=no
17890fi
17891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17892  conftest.$ac_objext conftest.beam conftest.$ac_ext
17893fi
17894
17895fi
17896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
17897printf "%s\n" "$ac_cv_func_fork_works" >&6; }
17898
17899else
17900  ac_cv_func_fork_works=$ac_cv_func_fork
17901fi
17902if test "x$ac_cv_func_fork_works" = xcross; then
17903  case $host in
17904    *-*-amigaos* | *-*-msdosdjgpp*)
17905      # Override, as these systems have only a dummy fork() stub
17906      ac_cv_func_fork_works=no
17907      ;;
17908    *)
17909      ac_cv_func_fork_works=yes
17910      ;;
17911  esac
17912  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
17913printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
17914fi
17915ac_cv_func_vfork_works=$ac_cv_func_vfork
17916if test "x$ac_cv_func_vfork" = xyes; then
17917  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
17918printf %s "checking for working vfork... " >&6; }
17919if test ${ac_cv_func_vfork_works+y}
17920then :
17921  printf %s "(cached) " >&6
17922else $as_nop
17923  if test "$cross_compiling" = yes
17924then :
17925  ac_cv_func_vfork_works=cross
17926else $as_nop
17927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17928/* end confdefs.h.  */
17929/* Thanks to Paul Eggert for this test.  */
17930$ac_includes_default
17931#include <signal.h>
17932#include <sys/wait.h>
17933#ifdef HAVE_VFORK_H
17934# include <vfork.h>
17935#endif
17936
17937static void
17938do_nothing (int sig)
17939{
17940  (void) sig;
17941}
17942
17943/* On some sparc systems, changes by the child to local and incoming
17944   argument registers are propagated back to the parent.  The compiler
17945   is told about this with #include <vfork.h>, but some compilers
17946   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17947   static variable whose address is put into a register that is
17948   clobbered by the vfork.  */
17949static void
17950sparc_address_test (int arg)
17951{
17952  static pid_t child;
17953  if (!child) {
17954    child = vfork ();
17955    if (child < 0) {
17956      perror ("vfork");
17957      _exit(2);
17958    }
17959    if (!child) {
17960      arg = getpid();
17961      write(-1, "", 0);
17962      _exit (arg);
17963    }
17964  }
17965}
17966
17967int
17968main (void)
17969{
17970  pid_t parent = getpid ();
17971  pid_t child;
17972
17973  sparc_address_test (0);
17974
17975  /* On Solaris 2.4, changes by the child to the signal handler
17976     also munge signal handlers in the parent.  To detect this,
17977     start by putting the parent's handler in a known state.  */
17978  signal (SIGTERM, SIG_DFL);
17979
17980  child = vfork ();
17981
17982  if (child == 0) {
17983    /* Here is another test for sparc vfork register problems.  This
17984       test uses lots of local variables, at least as many local
17985       variables as main has allocated so far including compiler
17986       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17987       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17988       reuse the register of parent for one of the local variables,
17989       since it will think that parent can't possibly be used any more
17990       in this routine.  Assigning to the local variable will thus
17991       munge parent in the parent process.  */
17992    pid_t
17993      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17994      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17995    /* Convince the compiler that p..p7 are live; otherwise, it might
17996       use the same hardware register for all 8 local variables.  */
17997    if (p != p1 || p != p2 || p != p3 || p != p4
17998	|| p != p5 || p != p6 || p != p7)
17999      _exit(1);
18000
18001    /* Alter the child's signal handler.  */
18002    if (signal (SIGTERM, do_nothing) != SIG_DFL)
18003      _exit(1);
18004
18005    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18006       from child file descriptors.  If the child closes a descriptor
18007       before it execs or exits, this munges the parent's descriptor
18008       as well.  Test for this by closing stdout in the child.  */
18009    _exit(close(fileno(stdout)) != 0);
18010  } else {
18011    int status;
18012    struct stat st;
18013
18014    while (wait(&status) != child)
18015      ;
18016    return (
18017	 /* Was there some problem with vforking?  */
18018	 child < 0
18019
18020	 /* Did the child munge the parent's signal handler?  */
18021	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
18022
18023	 /* Did the child fail?  (This shouldn't happen.)  */
18024	 || status
18025
18026	 /* Did the vfork/compiler bug occur?  */
18027	 || parent != getpid()
18028
18029	 /* Did the file descriptor bug occur?  */
18030	 || fstat(fileno(stdout), &st) != 0
18031	 );
18032  }
18033}
18034_ACEOF
18035if ac_fn_c_try_run "$LINENO"
18036then :
18037  ac_cv_func_vfork_works=yes
18038else $as_nop
18039  ac_cv_func_vfork_works=no
18040fi
18041rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18042  conftest.$ac_objext conftest.beam conftest.$ac_ext
18043fi
18044
18045fi
18046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
18047printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
18048
18049fi;
18050if test "x$ac_cv_func_fork_works" = xcross; then
18051  ac_cv_func_vfork_works=$ac_cv_func_vfork
18052  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
18053printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
18054fi
18055
18056if test "x$ac_cv_func_vfork_works" = xyes; then
18057
18058printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
18059
18060else
18061
18062printf "%s\n" "#define vfork fork" >>confdefs.h
18063
18064fi
18065if test "x$ac_cv_func_fork_works" = xyes; then
18066
18067printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
18068
18069fi
18070
18071# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
18072# for constant arguments.  Useless!
18073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
18074printf %s "checking for working alloca.h... " >&6; }
18075if test ${ac_cv_working_alloca_h+y}
18076then :
18077  printf %s "(cached) " >&6
18078else $as_nop
18079  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18080/* end confdefs.h.  */
18081#include <alloca.h>
18082int
18083main (void)
18084{
18085char *p = (char *) alloca (2 * sizeof (int));
18086			  if (p) return 0;
18087  ;
18088  return 0;
18089}
18090_ACEOF
18091if ac_fn_c_try_link "$LINENO"
18092then :
18093  ac_cv_working_alloca_h=yes
18094else $as_nop
18095  ac_cv_working_alloca_h=no
18096fi
18097rm -f core conftest.err conftest.$ac_objext conftest.beam \
18098    conftest$ac_exeext conftest.$ac_ext
18099fi
18100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
18101printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
18102if test $ac_cv_working_alloca_h = yes; then
18103
18104printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
18105
18106fi
18107
18108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
18109printf %s "checking for alloca... " >&6; }
18110if test ${ac_cv_func_alloca_works+y}
18111then :
18112  printf %s "(cached) " >&6
18113else $as_nop
18114  if test $ac_cv_working_alloca_h = yes; then
18115  ac_cv_func_alloca_works=yes
18116else
18117  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18118/* end confdefs.h.  */
18119#include <stdlib.h>
18120#include <stddef.h>
18121#ifndef alloca
18122# ifdef __GNUC__
18123#  define alloca __builtin_alloca
18124# elif defined _MSC_VER
18125#  include <malloc.h>
18126#  define alloca _alloca
18127# else
18128#  ifdef  __cplusplus
18129extern "C"
18130#  endif
18131void *alloca (size_t);
18132# endif
18133#endif
18134
18135int
18136main (void)
18137{
18138char *p = (char *) alloca (1);
18139				    if (p) return 0;
18140  ;
18141  return 0;
18142}
18143_ACEOF
18144if ac_fn_c_try_link "$LINENO"
18145then :
18146  ac_cv_func_alloca_works=yes
18147else $as_nop
18148  ac_cv_func_alloca_works=no
18149fi
18150rm -f core conftest.err conftest.$ac_objext conftest.beam \
18151    conftest$ac_exeext conftest.$ac_ext
18152fi
18153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
18154printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
18155fi
18156
18157if test $ac_cv_func_alloca_works = yes; then
18158
18159printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
18160
18161else
18162  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
18163# that cause trouble.  Some versions do not even contain alloca or
18164# contain a buggy version.  If you still want to use their alloca,
18165# use ar to extract alloca.o from them instead of compiling alloca.c.
18166
18167ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
18168
18169printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
18170
18171
18172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
18173printf %s "checking stack direction for C alloca... " >&6; }
18174if test ${ac_cv_c_stack_direction+y}
18175then :
18176  printf %s "(cached) " >&6
18177else $as_nop
18178  if test "$cross_compiling" = yes
18179then :
18180  ac_cv_c_stack_direction=0
18181else $as_nop
18182  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18183/* end confdefs.h.  */
18184$ac_includes_default
18185int
18186find_stack_direction (int *addr, int depth)
18187{
18188  int dir, dummy = 0;
18189  if (! addr)
18190    addr = &dummy;
18191  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
18192  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
18193  return dir + dummy;
18194}
18195
18196int
18197main (int argc, char **argv)
18198{
18199  return find_stack_direction (0, argc + !argv + 20) < 0;
18200}
18201_ACEOF
18202if ac_fn_c_try_run "$LINENO"
18203then :
18204  ac_cv_c_stack_direction=1
18205else $as_nop
18206  ac_cv_c_stack_direction=-1
18207fi
18208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18209  conftest.$ac_objext conftest.beam conftest.$ac_ext
18210fi
18211
18212fi
18213{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
18214printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
18215printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
18216
18217
18218fi
18219
18220
18221if test $ac_cv_have_decl_strerror_r = yes; then
18222  # For backward compatibility's sake, define HAVE_STRERROR_R.
18223  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
18224  # as AC_CHECK_DECLS_ONCE.)
18225
18226printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
18227
18228fi
18229
18230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
18231printf %s "checking whether strerror_r returns char *... " >&6; }
18232if test ${ac_cv_func_strerror_r_char_p+y}
18233then :
18234  printf %s "(cached) " >&6
18235else $as_nop
18236
18237    ac_cv_func_strerror_r_char_p=no
18238    if test $ac_cv_have_decl_strerror_r = yes; then
18239      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18240/* end confdefs.h.  */
18241#include <string.h>
18242int
18243main (void)
18244{
18245
18246	  char buf[100];
18247	  char x = *strerror_r (0, buf, sizeof buf);
18248	  char *p = strerror_r (0, buf, sizeof buf);
18249	  return !p || x;
18250
18251  ;
18252  return 0;
18253}
18254_ACEOF
18255if ac_fn_c_try_compile "$LINENO"
18256then :
18257  ac_cv_func_strerror_r_char_p=yes
18258fi
18259rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18260
18261    fi
18262
18263fi
18264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
18265printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
18266if test $ac_cv_func_strerror_r_char_p = yes; then
18267
18268printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
18269
18270fi
18271
18272
18273ac_busted_vpath_in_make=no
18274case "$build" in
18275 *-*-irix6.1*)	# 64 bit only
18276    # busted vpath?
18277    ;;
18278 *-*-irix6*)	# 6.2 (and later?)
18279    ac_busted_vpath_in_make=yes
18280    ;;
18281 *-*-solaris2.5.1)
18282    ac_busted_vpath_in_make=yes
18283    ;;
18284 *-*-unicosmp*)
18285    ac_busted_vpath_in_make=yes
18286    ;;
18287esac
18288
18289case "$ac_busted_vpath_in_make$srcdir" in
18290 yes.|no*)
18291    ;;
18292 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
18293     '')
18294	as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
18295    esac
18296    ;;
18297esac
18298
18299case "$host" in
18300 *-*-aix4*)
18301	# Bug 2516:
18302	# Was *-*-aix[[4-9]]*
18303	# XXX only verified thru AIX6.  But...
18304	# Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
18305	# that this support would be in 5.3, removed in 6, and added back.
18306	#
18307	# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
18308	# (returning ENOSYS).  I didn't check 4.2.  If, in the future,
18309	# IBM pulls its thumbs out long enough to implement clock_settime,
18310	# this conditional will need to change.  Maybe use AC_TRY_RUN
18311	# instead to try to set the time to itself and check errno.
18312    ;;
18313 *)
18314    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18315printf %s "checking for library containing clock_gettime... " >&6; }
18316if test ${ac_cv_search_clock_gettime+y}
18317then :
18318  printf %s "(cached) " >&6
18319else $as_nop
18320  ac_func_search_save_LIBS=$LIBS
18321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18322/* end confdefs.h.  */
18323
18324/* Override any GCC internal prototype to avoid an error.
18325   Use char because int might match the return type of a GCC
18326   builtin and then its argument prototype would still apply.  */
18327char clock_gettime ();
18328int
18329main (void)
18330{
18331return clock_gettime ();
18332  ;
18333  return 0;
18334}
18335_ACEOF
18336for ac_lib in '' rt
18337do
18338  if test -z "$ac_lib"; then
18339    ac_res="none required"
18340  else
18341    ac_res=-l$ac_lib
18342    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18343  fi
18344  if ac_fn_c_try_link "$LINENO"
18345then :
18346  ac_cv_search_clock_gettime=$ac_res
18347fi
18348rm -f core conftest.err conftest.$ac_objext conftest.beam \
18349    conftest$ac_exeext
18350  if test ${ac_cv_search_clock_gettime+y}
18351then :
18352  break
18353fi
18354done
18355if test ${ac_cv_search_clock_gettime+y}
18356then :
18357
18358else $as_nop
18359  ac_cv_search_clock_gettime=no
18360fi
18361rm conftest.$ac_ext
18362LIBS=$ac_func_search_save_LIBS
18363fi
18364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18365printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18366ac_res=$ac_cv_search_clock_gettime
18367if test "$ac_res" != no
18368then :
18369  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18370  case "$ac_cv_search_clock_gettime" in
18371 'none required') ;;
18372 no) ;;
18373 *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
18374 esac
18375
18376fi
18377
18378    ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
18379if test "x$ac_cv_func_clock_getres" = xyes
18380then :
18381  printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
18382
18383fi
18384ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
18385if test "x$ac_cv_func_clock_gettime" = xyes
18386then :
18387  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
18388
18389fi
18390ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
18391if test "x$ac_cv_func_clock_settime" = xyes
18392then :
18393  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
18394
18395fi
18396
18397    ;;
18398esac
18399
18400ac_fn_c_check_func "$LINENO" "getclock" "ac_cv_func_getclock"
18401if test "x$ac_cv_func_getclock" = xyes
18402then :
18403  printf "%s\n" "#define HAVE_GETCLOCK 1" >>confdefs.h
18404
18405fi
18406ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime"
18407if test "x$ac_cv_func_stime" = xyes
18408then :
18409  printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h
18410
18411fi
18412ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
18413if test "x$ac_cv_func_timegm" = xyes
18414then :
18415  printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
18416
18417fi
18418ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18419if test "x$ac_cv_func_strlcpy" = xyes
18420then :
18421  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
18422
18423fi
18424ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18425if test "x$ac_cv_func_strlcat" = xyes
18426then :
18427  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
18428
18429fi
18430
18431
18432# Bug 2713
18433LDADD_LIBUTIL=
18434
18435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
18436printf %s "checking for library containing snprintb... " >&6; }
18437if test ${ac_cv_search_snprintb+y}
18438then :
18439  printf %s "(cached) " >&6
18440else $as_nop
18441  ac_func_search_save_LIBS=$LIBS
18442cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18443/* end confdefs.h.  */
18444
18445/* Override any GCC internal prototype to avoid an error.
18446   Use char because int might match the return type of a GCC
18447   builtin and then its argument prototype would still apply.  */
18448char snprintb ();
18449int
18450main (void)
18451{
18452return snprintb ();
18453  ;
18454  return 0;
18455}
18456_ACEOF
18457for ac_lib in '' util
18458do
18459  if test -z "$ac_lib"; then
18460    ac_res="none required"
18461  else
18462    ac_res=-l$ac_lib
18463    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18464  fi
18465  if ac_fn_c_try_link "$LINENO"
18466then :
18467  ac_cv_search_snprintb=$ac_res
18468fi
18469rm -f core conftest.err conftest.$ac_objext conftest.beam \
18470    conftest$ac_exeext
18471  if test ${ac_cv_search_snprintb+y}
18472then :
18473  break
18474fi
18475done
18476if test ${ac_cv_search_snprintb+y}
18477then :
18478
18479else $as_nop
18480  ac_cv_search_snprintb=no
18481fi
18482rm conftest.$ac_ext
18483LIBS=$ac_func_search_save_LIBS
18484fi
18485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
18486printf "%s\n" "$ac_cv_search_snprintb" >&6; }
18487ac_res=$ac_cv_search_snprintb
18488if test "$ac_res" != no
18489then :
18490  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18491  case "$ac_cv_search_snprintb" in
18492 'none required') ;;
18493 no) ;;
18494 *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
18495 esac
18496
18497printf "%s\n" "#define USE_SNPRINTB 1" >>confdefs.h
18498
18499fi
18500
18501
18502#
18503ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
18504if test "x$ac_cv_header_errno_h" = xyes
18505then :
18506  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
18507
18508fi
18509ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
18510if test "x$ac_cv_header_sys_socket_h" = xyes
18511then :
18512  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
18513
18514fi
18515ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
18516if test "x$ac_cv_header_sys_types_h" = xyes
18517then :
18518  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
18519
18520fi
18521ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
18522if test "x$ac_cv_header_time_h" = xyes
18523then :
18524  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
18525
18526fi
18527
18528ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
18529    #ifdef HAVE_SYS_SOCKET_H
18530    # include <sys/socket.h>
18531    #endif
18532
18533"
18534if test "x$ac_cv_header_net_if_h" = xyes
18535then :
18536  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
18537
18538fi
18539
18540case "$host" in
18541 *-hp-hpux*)
18542    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
18543printf %s "checking if net/if.h requires mpinfou predeclaration... " >&6; }
18544if test ${ntp_cv_predecl_mpinfou+y}
18545then :
18546  printf %s "(cached) " >&6
18547else $as_nop
18548
18549	    np_cv_predecl_mpinfou=no
18550	    case "$ac_cv_header_net_if_h" in
18551	     no)
18552		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18553/* end confdefs.h.  */
18554
18555			    typedef union mpinfou {
18556				    struct pdk_mpinfo *pdkptr;
18557				    struct mpinfo *pikptr;
18558			    } mpinfou_t;
18559			    #ifdef HAVE_SYS_SOCKET_H
18560			    # include <sys/socket.h>
18561			    #endif
18562			    #include <net/if.h>
18563
18564int
18565main (void)
18566{
18567
18568
18569
18570  ;
18571  return 0;
18572}
18573_ACEOF
18574if ac_fn_c_try_compile "$LINENO"
18575then :
18576
18577			ntp_cv_predecl_mpinfou=yes
18578			ac_cv_header_net_if_h=yes
18579
18580
18581fi
18582rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18583	    esac
18584
18585
18586fi
18587{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
18588printf "%s\n" "$ntp_cv_predecl_mpinfou" >&6; }
18589    case "$ntp_cv_predecl_mpinfou" in
18590     yes)
18591	cat >>confdefs.h <<_ACEOF
18592#ifndef MPINFOU_PREDECLARED
18593# define MPINFOU_PREDECLARED
18594typedef union mpinfou {
18595	struct pdk_mpinfo *pdkptr;
18596	struct mpinfo *pikptr;
18597} mpinfou_t;
18598#endif
18599_ACEOF
18600
18601    esac
18602esac
18603
18604case "$host" in
18605 *-linux*)
18606    ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
18607	#ifdef HAVE_SYS_SOCKET_H
18608	# include <sys/socket.h>
18609	#endif
18610
18611"
18612if test "x$ac_cv_header_linux_if_addr_h" = xyes
18613then :
18614  printf "%s\n" "#define HAVE_LINUX_IF_ADDR_H 1" >>confdefs.h
18615
18616fi
18617
18618
18619printf "%s\n" "#define NEED_EARLY_FORK 1" >>confdefs.h
18620
18621esac
18622
18623ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
18624if test "x$ac_cv_header_arpa_nameser_h" = xyes
18625then :
18626  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
18627
18628fi
18629ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
18630if test "x$ac_cv_header_sys_param_h" = xyes
18631then :
18632  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
18633
18634fi
18635ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
18636if test "x$ac_cv_header_sys_time_h" = xyes
18637then :
18638  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
18639
18640fi
18641ac_fn_c_check_header_compile "$LINENO" "sys/timers.h" "ac_cv_header_sys_timers_h" "$ac_includes_default"
18642if test "x$ac_cv_header_sys_timers_h" = xyes
18643then :
18644  printf "%s\n" "#define HAVE_SYS_TIMERS_H 1" >>confdefs.h
18645
18646fi
18647
18648# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
18649ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
18650    #if defined HAVE_SYS_PARAM_H
18651    # include <sys/param.h>
18652    #endif
18653
18654"
18655if test "x$ac_cv_header_sys_sysctl_h" = xyes
18656then :
18657  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
18658
18659fi
18660
18661ac_fn_c_check_header_compile "$LINENO" "netinet/in_system.h" "ac_cv_header_netinet_in_system_h" "$ac_includes_default"
18662if test "x$ac_cv_header_netinet_in_system_h" = xyes
18663then :
18664  printf "%s\n" "#define HAVE_NETINET_IN_SYSTEM_H 1" >>confdefs.h
18665
18666fi
18667ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
18668if test "x$ac_cv_header_netinet_in_systm_h" = xyes
18669then :
18670  printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h
18671
18672fi
18673ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
18674if test "x$ac_cv_header_netinet_in_h" = xyes
18675then :
18676  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
18677
18678fi
18679
18680
18681ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
18682    #ifdef HAVE_SYS_TYPES_H
18683    # include <sys/types.h>
18684    #endif
18685    #ifdef HAVE_NETINET_IN_H
18686    # include <netinet/in.h>
18687    #endif
18688    #ifdef HAVE_ARPA_NAMESER_H
18689    # include <arpa/nameser.h>
18690    #endif
18691
18692"
18693if test "x$ac_cv_header_resolv_h" = xyes
18694then :
18695  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
18696
18697fi
18698
18699
18700ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
18701    #if HAVE_SYS_TYPES_H
18702    # include <sys/types.h>
18703    #endif
18704    #ifdef HAVE_SYS_SOCKET_H
18705    # include <sys/socket.h>
18706    #endif
18707    #ifdef HAVE_NETINET_IN_H
18708    # include <netinet/in.h>
18709    #endif
18710    #ifdef HAVE_NET_IF_H
18711    # include <net/if.h>
18712    #endif
18713
18714"
18715if test "x$ac_cv_header_net_if_var_h" = xyes
18716then :
18717  printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h
18718
18719fi
18720
18721
18722ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
18723    #ifdef HAVE_SYS_TYPES_H
18724    # include <sys/types.h>
18725    #endif
18726    #ifdef HAVE_SYS_SOCKET_H
18727    # include <sys/socket.h>
18728    #endif
18729    #ifdef HAVE_NET_IF_H
18730    # include <net/if.h>
18731    #endif
18732    #ifdef HAVE_NETINET_IN_H
18733    # include <netinet/in.h>
18734    #endif
18735    #ifdef HAVE_NET_IF_VAR_H
18736    # include <net/if_var.h>
18737    #endif
18738    #ifdef HAVE_NETINET_IN_SYSTM_H
18739    # include <netinet/in_systm.h>
18740    #endif
18741
18742"
18743if test "x$ac_cv_header_netinet_ip_h" = xyes
18744then :
18745  printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h
18746
18747fi
18748ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" "
18749    #ifdef HAVE_SYS_TYPES_H
18750    # include <sys/types.h>
18751    #endif
18752    #ifdef HAVE_SYS_SOCKET_H
18753    # include <sys/socket.h>
18754    #endif
18755    #ifdef HAVE_NET_IF_H
18756    # include <net/if.h>
18757    #endif
18758    #ifdef HAVE_NETINET_IN_H
18759    # include <netinet/in.h>
18760    #endif
18761    #ifdef HAVE_NET_IF_VAR_H
18762    # include <net/if_var.h>
18763    #endif
18764    #ifdef HAVE_NETINET_IN_SYSTM_H
18765    # include <netinet/in_systm.h>
18766    #endif
18767
18768"
18769if test "x$ac_cv_header_netinet_in_var_h" = xyes
18770then :
18771  printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h
18772
18773fi
18774
18775
18776# HMS: Do we need to check for -lsocket before or after these tests?
18777{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
18778printf %s "checking for library containing inet_pton... " >&6; }
18779if test ${ac_cv_search_inet_pton+y}
18780then :
18781  printf %s "(cached) " >&6
18782else $as_nop
18783  ac_func_search_save_LIBS=$LIBS
18784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18785/* end confdefs.h.  */
18786
18787/* Override any GCC internal prototype to avoid an error.
18788   Use char because int might match the return type of a GCC
18789   builtin and then its argument prototype would still apply.  */
18790char inet_pton ();
18791int
18792main (void)
18793{
18794return inet_pton ();
18795  ;
18796  return 0;
18797}
18798_ACEOF
18799for ac_lib in '' nsl
18800do
18801  if test -z "$ac_lib"; then
18802    ac_res="none required"
18803  else
18804    ac_res=-l$ac_lib
18805    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18806  fi
18807  if ac_fn_c_try_link "$LINENO"
18808then :
18809  ac_cv_search_inet_pton=$ac_res
18810fi
18811rm -f core conftest.err conftest.$ac_objext conftest.beam \
18812    conftest$ac_exeext
18813  if test ${ac_cv_search_inet_pton+y}
18814then :
18815  break
18816fi
18817done
18818if test ${ac_cv_search_inet_pton+y}
18819then :
18820
18821else $as_nop
18822  ac_cv_search_inet_pton=no
18823fi
18824rm conftest.$ac_ext
18825LIBS=$ac_func_search_save_LIBS
18826fi
18827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
18828printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
18829ac_res=$ac_cv_search_inet_pton
18830if test "$ac_res" != no
18831then :
18832  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18833  case "$ac_cv_search_inet_pton" in
18834 'none required') ;;
18835 no) ;;
18836 *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
18837 esac
18838
18839fi
18840
18841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
18842printf %s "checking for library containing inet_ntop... " >&6; }
18843if test ${ac_cv_search_inet_ntop+y}
18844then :
18845  printf %s "(cached) " >&6
18846else $as_nop
18847  ac_func_search_save_LIBS=$LIBS
18848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18849/* end confdefs.h.  */
18850
18851/* Override any GCC internal prototype to avoid an error.
18852   Use char because int might match the return type of a GCC
18853   builtin and then its argument prototype would still apply.  */
18854char inet_ntop ();
18855int
18856main (void)
18857{
18858return inet_ntop ();
18859  ;
18860  return 0;
18861}
18862_ACEOF
18863for ac_lib in '' resolv
18864do
18865  if test -z "$ac_lib"; then
18866    ac_res="none required"
18867  else
18868    ac_res=-l$ac_lib
18869    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
18870  fi
18871  if ac_fn_c_try_link "$LINENO"
18872then :
18873  ac_cv_search_inet_ntop=$ac_res
18874fi
18875rm -f core conftest.err conftest.$ac_objext conftest.beam \
18876    conftest$ac_exeext
18877  if test ${ac_cv_search_inet_ntop+y}
18878then :
18879  break
18880fi
18881done
18882if test ${ac_cv_search_inet_ntop+y}
18883then :
18884
18885else $as_nop
18886  ac_cv_search_inet_ntop=no
18887fi
18888rm conftest.$ac_ext
18889LIBS=$ac_func_search_save_LIBS
18890fi
18891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
18892printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
18893ac_res=$ac_cv_search_inet_ntop
18894if test "$ac_res" != no
18895then :
18896  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18897  case "$ac_cv_search_inet_ntop" in
18898 'none required') ;;
18899 no) ;;
18900 *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
18901 esac
18902
18903fi
18904
18905
18906# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
18907# avoid keying on the OS name:  If we find socket functions in
18908# libsocket, next try for them in libxnet without libsocket, if found,
18909# list both.  If we simply tested libxnet first, we would find the
18910# functions there and never add libsocket.  See also [Bug 660]
18911# http://bugs.ntp.org/show_bug.cgi?id=660#c9
18912saved_LIBS=$LIBS
18913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
18914printf %s "checking for library containing setsockopt... " >&6; }
18915if test ${ac_cv_search_setsockopt+y}
18916then :
18917  printf %s "(cached) " >&6
18918else $as_nop
18919  ac_func_search_save_LIBS=$LIBS
18920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18921/* end confdefs.h.  */
18922
18923/* Override any GCC internal prototype to avoid an error.
18924   Use char because int might match the return type of a GCC
18925   builtin and then its argument prototype would still apply.  */
18926char setsockopt ();
18927int
18928main (void)
18929{
18930return setsockopt ();
18931  ;
18932  return 0;
18933}
18934_ACEOF
18935for ac_lib in '' socket
18936do
18937  if test -z "$ac_lib"; then
18938    ac_res="none required"
18939  else
18940    ac_res=-l$ac_lib
18941    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18942  fi
18943  if ac_fn_c_try_link "$LINENO"
18944then :
18945  ac_cv_search_setsockopt=$ac_res
18946fi
18947rm -f core conftest.err conftest.$ac_objext conftest.beam \
18948    conftest$ac_exeext
18949  if test ${ac_cv_search_setsockopt+y}
18950then :
18951  break
18952fi
18953done
18954if test ${ac_cv_search_setsockopt+y}
18955then :
18956
18957else $as_nop
18958  ac_cv_search_setsockopt=no
18959fi
18960rm conftest.$ac_ext
18961LIBS=$ac_func_search_save_LIBS
18962fi
18963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
18964printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
18965ac_res=$ac_cv_search_setsockopt
18966if test "$ac_res" != no
18967then :
18968  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18969  case "$ac_cv_search_setsockopt" in
18970 'none required') ;;
18971 no) ;;
18972 *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
18973 esac
18974
18975fi
18976
18977case "$ac_cv_search_setsockopt" in
18978 -lsocket)
18979    LIBS="$saved_LIBS"
18980    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
18981printf %s "checking for library containing getsockopt... " >&6; }
18982if test ${ac_cv_search_getsockopt+y}
18983then :
18984  printf %s "(cached) " >&6
18985else $as_nop
18986  ac_func_search_save_LIBS=$LIBS
18987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18988/* end confdefs.h.  */
18989
18990/* Override any GCC internal prototype to avoid an error.
18991   Use char because int might match the return type of a GCC
18992   builtin and then its argument prototype would still apply.  */
18993char getsockopt ();
18994int
18995main (void)
18996{
18997return getsockopt ();
18998  ;
18999  return 0;
19000}
19001_ACEOF
19002for ac_lib in '' xnet
19003do
19004  if test -z "$ac_lib"; then
19005    ac_res="none required"
19006  else
19007    ac_res=-l$ac_lib
19008    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19009  fi
19010  if ac_fn_c_try_link "$LINENO"
19011then :
19012  ac_cv_search_getsockopt=$ac_res
19013fi
19014rm -f core conftest.err conftest.$ac_objext conftest.beam \
19015    conftest$ac_exeext
19016  if test ${ac_cv_search_getsockopt+y}
19017then :
19018  break
19019fi
19020done
19021if test ${ac_cv_search_getsockopt+y}
19022then :
19023
19024else $as_nop
19025  ac_cv_search_getsockopt=no
19026fi
19027rm conftest.$ac_ext
19028LIBS=$ac_func_search_save_LIBS
19029fi
19030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
19031printf "%s\n" "$ac_cv_search_getsockopt" >&6; }
19032ac_res=$ac_cv_search_getsockopt
19033if test "$ac_res" != no
19034then :
19035  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19036  case "$ac_cv_search_getsockopt" in
19037 'none required') ;;
19038 no) ;;
19039 *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
19040 esac
19041
19042fi
19043
19044    # XXX Possible trouble here - reading the comments above and looking at the
19045    # code below I wonder if we'll add -lxnet when we don't need it.
19046    # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
19047    # there when it is not needed?
19048    case "$ac_cv_search_getsockopt" in
19049     -lxnet)
19050	LIBS="-lxnet -lsocket $saved_LIBS"
19051	;;
19052     *) LIBS="-lsocket $saved_LIBS"
19053	;;
19054    esac
19055    ;;
19056esac
19057{ saved_LIBS=; unset saved_LIBS;}
19058
19059# Bug 2427 - look for recvmsg here.
19060ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
19061if test "x$ac_cv_func_recvmsg" = xyes
19062then :
19063  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
19064
19065fi
19066
19067
19068{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
19069printf %s "checking for inline... " >&6; }
19070if test ${ac_cv_c_inline+y}
19071then :
19072  printf %s "(cached) " >&6
19073else $as_nop
19074  ac_cv_c_inline=no
19075for ac_kw in inline __inline__ __inline; do
19076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19077/* end confdefs.h.  */
19078#ifndef __cplusplus
19079typedef int foo_t;
19080static $ac_kw foo_t static_foo (void) {return 0; }
19081$ac_kw foo_t foo (void) {return 0; }
19082#endif
19083
19084_ACEOF
19085if ac_fn_c_try_compile "$LINENO"
19086then :
19087  ac_cv_c_inline=$ac_kw
19088fi
19089rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19090  test "$ac_cv_c_inline" != no && break
19091done
19092
19093fi
19094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
19095printf "%s\n" "$ac_cv_c_inline" >&6; }
19096
19097case $ac_cv_c_inline in
19098  inline | yes) ;;
19099  *)
19100    case $ac_cv_c_inline in
19101      no) ac_val=;;
19102      *) ac_val=$ac_cv_c_inline;;
19103    esac
19104    cat >>confdefs.h <<_ACEOF
19105#ifndef __cplusplus
19106#define inline $ac_val
19107#endif
19108_ACEOF
19109    ;;
19110esac
19111
19112
19113case "$ac_cv_c_inline" in
19114 '')
19115    ;;
19116 *)
19117
19118printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
19119
19120
19121esac
19122
19123
19124# The cast to long int works around a bug in the HP C Compiler
19125# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19126# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19127# This bug is HP SR number 8606223364.
19128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
19129printf %s "checking size of time_t... " >&6; }
19130if test ${ac_cv_sizeof_time_t+y}
19131then :
19132  printf %s "(cached) " >&6
19133else $as_nop
19134  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"
19135then :
19136
19137else $as_nop
19138  if test "$ac_cv_type_time_t" = yes; then
19139     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19140printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19141as_fn_error 77 "cannot compute sizeof (time_t)
19142See \`config.log' for more details" "$LINENO" 5; }
19143   else
19144     ac_cv_sizeof_time_t=0
19145   fi
19146fi
19147
19148fi
19149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
19150printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
19151
19152
19153
19154printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
19155
19156
19157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
19158printf %s "checking whether char is unsigned... " >&6; }
19159if test ${ac_cv_c_char_unsigned+y}
19160then :
19161  printf %s "(cached) " >&6
19162else $as_nop
19163  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19164/* end confdefs.h.  */
19165$ac_includes_default
19166int
19167main (void)
19168{
19169static int test_array [1 - 2 * !(((char) -1) < 0)];
19170test_array [0] = 0;
19171return test_array [0];
19172
19173  ;
19174  return 0;
19175}
19176_ACEOF
19177if ac_fn_c_try_compile "$LINENO"
19178then :
19179  ac_cv_c_char_unsigned=no
19180else $as_nop
19181  ac_cv_c_char_unsigned=yes
19182fi
19183rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19184fi
19185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
19186printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
19187if test $ac_cv_c_char_unsigned = yes; then
19188  printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
19189
19190fi
19191		# The cast to long int works around a bug in the HP C Compiler
19192# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19193# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19194# This bug is HP SR number 8606223364.
19195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
19196printf %s "checking size of signed char... " >&6; }
19197if test ${ac_cv_sizeof_signed_char+y}
19198then :
19199  printf %s "(cached) " >&6
19200else $as_nop
19201  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"
19202then :
19203
19204else $as_nop
19205  if test "$ac_cv_type_signed_char" = yes; then
19206     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19207printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19208as_fn_error 77 "cannot compute sizeof (signed char)
19209See \`config.log' for more details" "$LINENO" 5; }
19210   else
19211     ac_cv_sizeof_signed_char=0
19212   fi
19213fi
19214
19215fi
19216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
19217printf "%s\n" "$ac_cv_sizeof_signed_char" >&6; }
19218
19219
19220
19221printf "%s\n" "#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char" >>confdefs.h
19222
19223
19224ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
19225if test "x$ac_cv_type_s_char" = xyes
19226then :
19227
19228printf "%s\n" "#define HAVE_S_CHAR 1" >>confdefs.h
19229
19230
19231fi
19232ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
19233if test "x$ac_cv_type_long_long" = xyes
19234then :
19235
19236printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
19237
19238
19239fi
19240
19241# The cast to long int works around a bug in the HP C Compiler
19242# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19243# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19244# This bug is HP SR number 8606223364.
19245{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
19246printf %s "checking size of short... " >&6; }
19247if test ${ac_cv_sizeof_short+y}
19248then :
19249  printf %s "(cached) " >&6
19250else $as_nop
19251  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
19252then :
19253
19254else $as_nop
19255  if test "$ac_cv_type_short" = yes; then
19256     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19257printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19258as_fn_error 77 "cannot compute sizeof (short)
19259See \`config.log' for more details" "$LINENO" 5; }
19260   else
19261     ac_cv_sizeof_short=0
19262   fi
19263fi
19264
19265fi
19266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
19267printf "%s\n" "$ac_cv_sizeof_short" >&6; }
19268
19269
19270
19271printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
19272
19273
19274# The cast to long int works around a bug in the HP C Compiler
19275# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19276# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19277# This bug is HP SR number 8606223364.
19278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
19279printf %s "checking size of int... " >&6; }
19280if test ${ac_cv_sizeof_int+y}
19281then :
19282  printf %s "(cached) " >&6
19283else $as_nop
19284  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
19285then :
19286
19287else $as_nop
19288  if test "$ac_cv_type_int" = yes; then
19289     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19290printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19291as_fn_error 77 "cannot compute sizeof (int)
19292See \`config.log' for more details" "$LINENO" 5; }
19293   else
19294     ac_cv_sizeof_int=0
19295   fi
19296fi
19297
19298fi
19299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
19300printf "%s\n" "$ac_cv_sizeof_int" >&6; }
19301
19302
19303
19304printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
19305
19306
19307# The cast to long int works around a bug in the HP C Compiler
19308# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19309# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19310# This bug is HP SR number 8606223364.
19311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
19312printf %s "checking size of long... " >&6; }
19313if test ${ac_cv_sizeof_long+y}
19314then :
19315  printf %s "(cached) " >&6
19316else $as_nop
19317  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
19318then :
19319
19320else $as_nop
19321  if test "$ac_cv_type_long" = yes; then
19322     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19323printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19324as_fn_error 77 "cannot compute sizeof (long)
19325See \`config.log' for more details" "$LINENO" 5; }
19326   else
19327     ac_cv_sizeof_long=0
19328   fi
19329fi
19330
19331fi
19332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
19333printf "%s\n" "$ac_cv_sizeof_long" >&6; }
19334
19335
19336
19337printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
19338
19339
19340
19341case "$ac_cv_type_long_long" in
19342 no)
19343    ;;
19344 *)
19345    # The cast to long int works around a bug in the HP C Compiler
19346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19348# This bug is HP SR number 8606223364.
19349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
19350printf %s "checking size of long long... " >&6; }
19351if test ${ac_cv_sizeof_long_long+y}
19352then :
19353  printf %s "(cached) " >&6
19354else $as_nop
19355  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"
19356then :
19357
19358else $as_nop
19359  if test "$ac_cv_type_long_long" = yes; then
19360     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19361printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19362as_fn_error 77 "cannot compute sizeof (long long)
19363See \`config.log' for more details" "$LINENO" 5; }
19364   else
19365     ac_cv_sizeof_long_long=0
19366   fi
19367fi
19368
19369fi
19370{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
19371printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
19372
19373
19374
19375printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
19376
19377
19378    ;;
19379esac
19380
19381case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
19382 *yes)
19383    # We have a typedef for s_char.  Might as well believe it...
19384    ;;
19385 no0no)
19386    # We have signed chars, can't say 'signed char', no s_char typedef.
19387
19388printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19389
19390    ;;
19391 no1no)
19392    # We have signed chars, can say 'signed char', no s_char typedef.
19393
19394printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19395
19396    ;;
19397 yes0no)
19398    # We have unsigned chars, can't say 'signed char', no s_char typedef.
19399    as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
19400    ;;
19401 yes1no)
19402    # We have unsigned chars, can say 'signed char', no s_char typedef.
19403
19404printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19405
19406    ;;
19407esac
19408
19409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
19410printf %s "checking for uid_t in sys/types.h... " >&6; }
19411if test ${ac_cv_type_uid_t+y}
19412then :
19413  printf %s "(cached) " >&6
19414else $as_nop
19415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19416/* end confdefs.h.  */
19417#include <sys/types.h>
19418
19419_ACEOF
19420if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19421  $EGREP "uid_t" >/dev/null 2>&1
19422then :
19423  ac_cv_type_uid_t=yes
19424else $as_nop
19425  ac_cv_type_uid_t=no
19426fi
19427rm -rf conftest*
19428
19429fi
19430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
19431printf "%s\n" "$ac_cv_type_uid_t" >&6; }
19432if test $ac_cv_type_uid_t = no; then
19433
19434printf "%s\n" "#define uid_t int" >>confdefs.h
19435
19436
19437printf "%s\n" "#define gid_t int" >>confdefs.h
19438
19439fi
19440
19441
19442
19443
19444
19445
19446{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
19447printf %s "checking if we're including debugging code... " >&6; }
19448# Check whether --enable-debugging was given.
19449if test ${enable_debugging+y}
19450then :
19451  enableval=$enable_debugging; ntp_ok=$enableval
19452else $as_nop
19453  ntp_ok=yes
19454
19455fi
19456
19457case "$ntp_ok" in
19458 yes)
19459
19460printf "%s\n" "#define DEBUG 1" >>confdefs.h
19461
19462esac
19463{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
19464printf "%s\n" "$ntp_ok" >&6; }
19465
19466
19467
19468# check if we can compile with pthreads
19469ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
19470if test "x$ac_cv_header_semaphore_h" = xyes
19471then :
19472  printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
19473
19474fi
19475
19476ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
19477if test "x$ac_cv_func_socketpair" = xyes
19478then :
19479  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
19480
19481fi
19482
19483# Check whether --enable-thread-support was given.
19484if test ${enable_thread_support+y}
19485then :
19486  enableval=$enable_thread_support;
19487else $as_nop
19488  enable_thread_support=yes
19489
19490fi
19491
19492have_pthreads=no
19493case "$enable_thread_support" in
19494 no) ;;
19495 *)
19496    ol_found_pthreads=no
19497
19498
19499
19500ac_ext=c
19501ac_cpp='$CPP $CPPFLAGS'
19502ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19503ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19504ac_compiler_gnu=$ac_cv_c_compiler_gnu
19505
19506# OpenLDAP --with-threads
19507
19508# Check whether --with-threads was given.
19509if test ${with_threads+y}
19510then :
19511  withval=$with_threads;
19512	ol_arg=invalid
19513	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
19514		if test "$withval" = "$ol_val" ; then
19515			ol_arg="$ol_val"
19516		fi
19517	done
19518	if test "$ol_arg" = "invalid" ; then
19519		as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
19520	fi
19521	ol_with_threads="$ol_arg"
19522
19523else $as_nop
19524  	ol_with_threads="auto"
19525fi
19526# end --with-threads
19527
19528
19529case "$ol_with_threads$host" in
19530 auto*-*-solaris2.[0-6])
19531        ol_with_threads=no
19532    ;;
19533esac
19534
19535
19536ol_aix_threads=no
19537case "$host" in
19538*-*-aix*) 	if test -z "$CC" ; then
19539		case "$ol_with_threads" in
19540		auto | yes |  posix) ol_aix_threads=yes ;;
19541		esac
19542	fi
19543;;
19544esac
19545
19546if test $ol_aix_threads = yes ; then
19547	if test -z "${CC}" ; then
19548		for ac_prog in cc_r xlc_r cc
19549do
19550  # Extract the first word of "$ac_prog", so it can be a program name with args.
19551set dummy $ac_prog; ac_word=$2
19552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19553printf %s "checking for $ac_word... " >&6; }
19554if test ${ac_cv_prog_CC+y}
19555then :
19556  printf %s "(cached) " >&6
19557else $as_nop
19558  if test -n "$CC"; then
19559  ac_cv_prog_CC="$CC" # Let the user override the test.
19560else
19561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19562for as_dir in $PATH
19563do
19564  IFS=$as_save_IFS
19565  case $as_dir in #(((
19566    '') as_dir=./ ;;
19567    */) ;;
19568    *) as_dir=$as_dir/ ;;
19569  esac
19570    for ac_exec_ext in '' $ac_executable_extensions; do
19571  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19572    ac_cv_prog_CC="$ac_prog"
19573    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19574    break 2
19575  fi
19576done
19577  done
19578IFS=$as_save_IFS
19579
19580fi
19581fi
19582CC=$ac_cv_prog_CC
19583if test -n "$CC"; then
19584  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19585printf "%s\n" "$CC" >&6; }
19586else
19587  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19588printf "%s\n" "no" >&6; }
19589fi
19590
19591
19592  test -n "$CC" && break
19593done
19594
19595
19596		if test "$CC" = cc ; then
19597						if test $ol_with_threads != auto ; then
19598				as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
19599			else
19600				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
19601printf "%s\n" "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
19602			fi
19603			ol_with_threads=no
19604  		fi
19605	fi
19606
19607	case ${CC} in cc_r | xlc_r)
19608		ol_with_threads=posix
19609		ol_cv_pthread_create=yes
19610		;;
19611	esac
19612fi
19613
19614ol_link_threads=no
19615# OpenLDAP --with-yielding_select
19616
19617# Check whether --with-yielding_select was given.
19618if test ${with_yielding_select+y}
19619then :
19620  withval=$with_yielding_select;
19621	ol_arg=invalid
19622	for ol_val in auto yes no manual  ; do
19623		if test "$withval" = "$ol_val" ; then
19624			ol_arg="$ol_val"
19625		fi
19626	done
19627	if test "$ol_arg" = "invalid" ; then
19628		as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
19629	fi
19630	ol_with_yielding_select="$ol_arg"
19631
19632else $as_nop
19633  	ol_with_yielding_select="auto"
19634fi
19635# end --with-yielding_select
19636
19637
19638case $ol_with_threads in auto | yes | nt)
19639
19640
19641	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
19642if test "x$ac_cv_func__beginthread" = xyes
19643then :
19644
19645fi
19646
19647
19648	if test $ac_cv_func__beginthread = yes ; then
19649
19650printf "%s\n" "#define HAVE_NT_THREADS 1" >>confdefs.h
19651
19652		ol_cv_nt_threads=yes
19653	fi
19654
19655
19656	if test "$ol_cv_nt_threads" = yes ; then
19657		ol_link_threads=nt
19658		ol_with_threads=found
19659		ol_with_yielding_select=yes
19660
19661
19662printf "%s\n" "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
19663
19664
19665printf "%s\n" "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
19666
19667	fi
19668
19669	if test $ol_with_threads = nt ; then
19670		as_fn_error $? "could not locate NT Threads" "$LINENO" 5
19671	fi
19672	;;
19673esac
19674
19675case $ol_with_threads in auto | yes | posix)
19676
19677	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19678if test "x$ac_cv_header_pthread_h" = xyes
19679then :
19680  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
19681
19682fi
19683
19684
19685	if test $ac_cv_header_pthread_h = yes ; then
19686		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
19687printf %s "checking POSIX thread version... " >&6; }
19688if test ${ol_cv_pthread_version+y}
19689then :
19690  printf %s "(cached) " >&6
19691else $as_nop
19692
19693	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19694/* end confdefs.h.  */
19695
19696#		include <pthread.h>
19697
19698int
19699main (void)
19700{
19701
19702		int i = PTHREAD_CREATE_JOINABLE;
19703
19704  ;
19705  return 0;
19706}
19707_ACEOF
19708if ac_fn_c_try_compile "$LINENO"
19709then :
19710
19711	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19712/* end confdefs.h.  */
19713#include <pthread.h>
19714
19715_ACEOF
19716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19717  $EGREP "pthread_detach" >/dev/null 2>&1
19718then :
19719  ol_cv_pthread_version=10
19720else $as_nop
19721  ol_cv_pthread_version=8
19722fi
19723rm -rf conftest*
19724
19725else $as_nop
19726
19727	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19728/* end confdefs.h.  */
19729
19730#		include <pthread.h>
19731#		ifdef PTHREAD_CREATE_UNDETACHED
19732		draft7
19733#		endif
19734
19735_ACEOF
19736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19737  $EGREP "draft7" >/dev/null 2>&1
19738then :
19739  ol_cv_pthread_version=7
19740else $as_nop
19741
19742	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19743/* end confdefs.h.  */
19744#include <pthread.h>
19745
19746_ACEOF
19747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19748  $EGREP "pthread_attr_init" >/dev/null 2>&1
19749then :
19750  ol_cv_pthread_version=6
19751else $as_nop
19752
19753	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19754/* end confdefs.h.  */
19755
19756#		include <pthread.h>
19757#ifdef		PTHREAD_MUTEX_INITIALIZER
19758		draft5
19759#endif
19760
19761_ACEOF
19762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19763  $EGREP "draft5" >/dev/null 2>&1
19764then :
19765  ol_cv_pthread_version=5
19766else $as_nop
19767  ol_cv_pthread_version=4
19768fi
19769rm -rf conftest*
19770
19771fi
19772rm -rf conftest*
19773
19774fi
19775rm -rf conftest*
19776
19777fi
19778rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19779
19780fi
19781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
19782printf "%s\n" "$ol_cv_pthread_version" >&6; }
19783
19784
19785		if test $ol_cv_pthread_version != 0 ; then
19786
19787printf "%s\n" "#define HAVE_PTHREADS $ol_cv_pthread_version" >>confdefs.h
19788
19789		else
19790			as_fn_error $? "unknown pthread version" "$LINENO" 5
19791		fi
19792
19793		# consider threads found
19794		ol_with_threads=found
19795
19796
19797	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19798printf %s "checking for LinuxThreads pthread.h... " >&6; }
19799if test ${ol_cv_header_linux_threads+y}
19800then :
19801  printf %s "(cached) " >&6
19802else $as_nop
19803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19804/* end confdefs.h.  */
19805#include <pthread.h>
19806_ACEOF
19807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19808  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
19809then :
19810  ol_cv_header_linux_threads=yes
19811else $as_nop
19812  ol_cv_header_linux_threads=no
19813fi
19814rm -rf conftest*
19815
19816
19817fi
19818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19819printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
19820	if test $ol_cv_header_linux_threads = yes; then
19821
19822printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19823
19824	fi
19825
19826
19827	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
19828printf %s "checking for GNU Pth pthread.h... " >&6; }
19829if test ${ol_cv_header_gnu_pth_pthread_h+y}
19830then :
19831  printf %s "(cached) " >&6
19832else $as_nop
19833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19834/* end confdefs.h.  */
19835#include <pthread.h>
19836#ifdef _POSIX_THREAD_IS_GNU_PTH
19837	__gnu_pth__;
19838#endif
19839
19840_ACEOF
19841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19842  $EGREP "__gnu_pth__" >/dev/null 2>&1
19843then :
19844  ol_cv_header_gnu_pth_pthread_h=yes
19845else $as_nop
19846  ol_cv_header_gnu_pth_pthread_h=no
19847fi
19848rm -rf conftest*
19849
19850
19851fi
19852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
19853printf "%s\n" "$ol_cv_header_gnu_pth_pthread_h" >&6; }
19854
19855
19856		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
19857			ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
19858if test "x$ac_cv_header_sched_h" = xyes
19859then :
19860  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
19861
19862fi
19863
19864		fi
19865
19866
19867				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
19868printf %s "checking for pthread_create in default libraries... " >&6; }
19869if test ${ol_cv_pthread_create+y}
19870then :
19871  printf %s "(cached) " >&6
19872else $as_nop
19873
19874			if test "$cross_compiling" = yes
19875then :
19876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19877/* end confdefs.h.  */
19878
19879/* pthread test headers */
19880#include <pthread.h>
19881#if HAVE_PTHREADS < 7
19882#include <errno.h>
19883#endif
19884#ifndef NULL
19885#define NULL (void*)0
19886#endif
19887
19888static void *task(p)
19889	void *p;
19890{
19891	return (void *) (p == NULL);
19892}
19893
19894int
19895main (void)
19896{
19897
19898	/* pthread test function */
19899#ifndef PTHREAD_CREATE_DETACHED
19900#define	PTHREAD_CREATE_DETACHED	1
19901#endif
19902	pthread_t t;
19903	int status;
19904	int detach = PTHREAD_CREATE_DETACHED;
19905
19906#if HAVE_PTHREADS > 4
19907	/* Final pthreads */
19908	pthread_attr_t attr;
19909
19910	status = pthread_attr_init(&attr);
19911	if( status ) return status;
19912
19913#if HAVE_PTHREADS < 7
19914	status = pthread_attr_setdetachstate(&attr, &detach);
19915	if( status < 0 ) status = errno;
19916#else
19917	status = pthread_attr_setdetachstate(&attr, detach);
19918#endif
19919	if( status ) return status;
19920	status = pthread_create( &t, &attr, task, NULL );
19921#if HAVE_PTHREADS < 7
19922	if( status < 0 ) status = errno;
19923#endif
19924	if( status ) return status;
19925#else
19926	/* Draft 4 pthreads */
19927	status = pthread_create( &t, pthread_attr_default, task, NULL );
19928	if( status ) return errno;
19929
19930	/* give thread a chance to complete */
19931	/* it should remain joinable and hence detachable */
19932	sleep( 1 );
19933
19934	status = pthread_detach( &t );
19935	if( status ) return errno;
19936#endif
19937
19938#ifdef HAVE_LINUX_THREADS
19939	pthread_kill_other_threads_np();
19940#endif
19941
19942	return 0;
19943
19944  ;
19945  return 0;
19946}
19947_ACEOF
19948if ac_fn_c_try_link "$LINENO"
19949then :
19950  ol_cv_pthread_create=yes
19951else $as_nop
19952  ol_cv_pthread_create=no
19953fi
19954rm -f core conftest.err conftest.$ac_objext conftest.beam \
19955    conftest$ac_exeext conftest.$ac_ext
19956else $as_nop
19957  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19958/* end confdefs.h.  */
19959
19960
19961/* pthread test headers */
19962#include <pthread.h>
19963#if HAVE_PTHREADS < 7
19964#include <errno.h>
19965#endif
19966#ifndef NULL
19967#define NULL (void*)0
19968#endif
19969
19970static void *task(p)
19971	void *p;
19972{
19973	return (void *) (p == NULL);
19974}
19975
19976
19977int main(argc, argv)
19978	int argc;
19979	char **argv;
19980{
19981
19982	/* pthread test function */
19983#ifndef PTHREAD_CREATE_DETACHED
19984#define	PTHREAD_CREATE_DETACHED	1
19985#endif
19986	pthread_t t;
19987	int status;
19988	int detach = PTHREAD_CREATE_DETACHED;
19989
19990#if HAVE_PTHREADS > 4
19991	/* Final pthreads */
19992	pthread_attr_t attr;
19993
19994	status = pthread_attr_init(&attr);
19995	if( status ) return status;
19996
19997#if HAVE_PTHREADS < 7
19998	status = pthread_attr_setdetachstate(&attr, &detach);
19999	if( status < 0 ) status = errno;
20000#else
20001	status = pthread_attr_setdetachstate(&attr, detach);
20002#endif
20003	if( status ) return status;
20004	status = pthread_create( &t, &attr, task, NULL );
20005#if HAVE_PTHREADS < 7
20006	if( status < 0 ) status = errno;
20007#endif
20008	if( status ) return status;
20009#else
20010	/* Draft 4 pthreads */
20011	status = pthread_create( &t, pthread_attr_default, task, NULL );
20012	if( status ) return errno;
20013
20014	/* give thread a chance to complete */
20015	/* it should remain joinable and hence detachable */
20016	sleep( 1 );
20017
20018	status = pthread_detach( &t );
20019	if( status ) return errno;
20020#endif
20021
20022#ifdef HAVE_LINUX_THREADS
20023	pthread_kill_other_threads_np();
20024#endif
20025
20026	return 0;
20027
20028}
20029
20030_ACEOF
20031if ac_fn_c_try_run "$LINENO"
20032then :
20033  ol_cv_pthread_create=yes
20034else $as_nop
20035  ol_cv_pthread_create=no
20036fi
20037rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20038  conftest.$ac_objext conftest.beam conftest.$ac_ext
20039fi
20040
20041fi
20042{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
20043printf "%s\n" "$ol_cv_pthread_create" >&6; }
20044
20045		if test $ol_cv_pthread_create != no ; then
20046			ol_link_threads=posix
20047			ol_link_pthreads=""
20048		fi
20049
20050		# Pthread try link: -kthread (ol_cv_pthread_kthread)
20051if test "$ol_link_threads" = no ; then
20052	# try -kthread
20053	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
20054printf %s "checking for pthread link with -kthread... " >&6; }
20055if test ${ol_cv_pthread_kthread+y}
20056then :
20057  printf %s "(cached) " >&6
20058else $as_nop
20059
20060		# save the flags
20061		ol_LIBS="$LIBS"
20062		LIBS="-kthread $LIBS"
20063
20064		if test "$cross_compiling" = yes
20065then :
20066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20067/* end confdefs.h.  */
20068
20069/* pthread test headers */
20070#include <pthread.h>
20071#if HAVE_PTHREADS < 7
20072#include <errno.h>
20073#endif
20074#ifndef NULL
20075#define NULL (void*)0
20076#endif
20077
20078static void *task(p)
20079	void *p;
20080{
20081	return (void *) (p == NULL);
20082}
20083
20084int
20085main (void)
20086{
20087
20088	/* pthread test function */
20089#ifndef PTHREAD_CREATE_DETACHED
20090#define	PTHREAD_CREATE_DETACHED	1
20091#endif
20092	pthread_t t;
20093	int status;
20094	int detach = PTHREAD_CREATE_DETACHED;
20095
20096#if HAVE_PTHREADS > 4
20097	/* Final pthreads */
20098	pthread_attr_t attr;
20099
20100	status = pthread_attr_init(&attr);
20101	if( status ) return status;
20102
20103#if HAVE_PTHREADS < 7
20104	status = pthread_attr_setdetachstate(&attr, &detach);
20105	if( status < 0 ) status = errno;
20106#else
20107	status = pthread_attr_setdetachstate(&attr, detach);
20108#endif
20109	if( status ) return status;
20110	status = pthread_create( &t, &attr, task, NULL );
20111#if HAVE_PTHREADS < 7
20112	if( status < 0 ) status = errno;
20113#endif
20114	if( status ) return status;
20115#else
20116	/* Draft 4 pthreads */
20117	status = pthread_create( &t, pthread_attr_default, task, NULL );
20118	if( status ) return errno;
20119
20120	/* give thread a chance to complete */
20121	/* it should remain joinable and hence detachable */
20122	sleep( 1 );
20123
20124	status = pthread_detach( &t );
20125	if( status ) return errno;
20126#endif
20127
20128#ifdef HAVE_LINUX_THREADS
20129	pthread_kill_other_threads_np();
20130#endif
20131
20132	return 0;
20133
20134  ;
20135  return 0;
20136}
20137_ACEOF
20138if ac_fn_c_try_link "$LINENO"
20139then :
20140  ol_cv_pthread_kthread=yes
20141else $as_nop
20142  ol_cv_pthread_kthread=no
20143fi
20144rm -f core conftest.err conftest.$ac_objext conftest.beam \
20145    conftest$ac_exeext conftest.$ac_ext
20146else $as_nop
20147  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20148/* end confdefs.h.  */
20149
20150
20151/* pthread test headers */
20152#include <pthread.h>
20153#if HAVE_PTHREADS < 7
20154#include <errno.h>
20155#endif
20156#ifndef NULL
20157#define NULL (void*)0
20158#endif
20159
20160static void *task(p)
20161	void *p;
20162{
20163	return (void *) (p == NULL);
20164}
20165
20166
20167int main(argc, argv)
20168	int argc;
20169	char **argv;
20170{
20171
20172	/* pthread test function */
20173#ifndef PTHREAD_CREATE_DETACHED
20174#define	PTHREAD_CREATE_DETACHED	1
20175#endif
20176	pthread_t t;
20177	int status;
20178	int detach = PTHREAD_CREATE_DETACHED;
20179
20180#if HAVE_PTHREADS > 4
20181	/* Final pthreads */
20182	pthread_attr_t attr;
20183
20184	status = pthread_attr_init(&attr);
20185	if( status ) return status;
20186
20187#if HAVE_PTHREADS < 7
20188	status = pthread_attr_setdetachstate(&attr, &detach);
20189	if( status < 0 ) status = errno;
20190#else
20191	status = pthread_attr_setdetachstate(&attr, detach);
20192#endif
20193	if( status ) return status;
20194	status = pthread_create( &t, &attr, task, NULL );
20195#if HAVE_PTHREADS < 7
20196	if( status < 0 ) status = errno;
20197#endif
20198	if( status ) return status;
20199#else
20200	/* Draft 4 pthreads */
20201	status = pthread_create( &t, pthread_attr_default, task, NULL );
20202	if( status ) return errno;
20203
20204	/* give thread a chance to complete */
20205	/* it should remain joinable and hence detachable */
20206	sleep( 1 );
20207
20208	status = pthread_detach( &t );
20209	if( status ) return errno;
20210#endif
20211
20212#ifdef HAVE_LINUX_THREADS
20213	pthread_kill_other_threads_np();
20214#endif
20215
20216	return 0;
20217
20218}
20219
20220_ACEOF
20221if ac_fn_c_try_run "$LINENO"
20222then :
20223  ol_cv_pthread_kthread=yes
20224else $as_nop
20225  ol_cv_pthread_kthread=no
20226fi
20227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20228  conftest.$ac_objext conftest.beam conftest.$ac_ext
20229fi
20230
20231
20232		# restore the LIBS
20233		LIBS="$ol_LIBS"
20234
20235fi
20236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
20237printf "%s\n" "$ol_cv_pthread_kthread" >&6; }
20238
20239	if test $ol_cv_pthread_kthread = yes ; then
20240		ol_link_pthreads="-kthread"
20241		ol_link_threads=posix
20242	fi
20243fi
20244
20245		# Pthread try link: -pthread (ol_cv_pthread_pthread)
20246if test "$ol_link_threads" = no ; then
20247	# try -pthread
20248	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
20249printf %s "checking for pthread link with -pthread... " >&6; }
20250if test ${ol_cv_pthread_pthread+y}
20251then :
20252  printf %s "(cached) " >&6
20253else $as_nop
20254
20255		# save the flags
20256		ol_LIBS="$LIBS"
20257		LIBS="-pthread $LIBS"
20258
20259		if test "$cross_compiling" = yes
20260then :
20261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20262/* end confdefs.h.  */
20263
20264/* pthread test headers */
20265#include <pthread.h>
20266#if HAVE_PTHREADS < 7
20267#include <errno.h>
20268#endif
20269#ifndef NULL
20270#define NULL (void*)0
20271#endif
20272
20273static void *task(p)
20274	void *p;
20275{
20276	return (void *) (p == NULL);
20277}
20278
20279int
20280main (void)
20281{
20282
20283	/* pthread test function */
20284#ifndef PTHREAD_CREATE_DETACHED
20285#define	PTHREAD_CREATE_DETACHED	1
20286#endif
20287	pthread_t t;
20288	int status;
20289	int detach = PTHREAD_CREATE_DETACHED;
20290
20291#if HAVE_PTHREADS > 4
20292	/* Final pthreads */
20293	pthread_attr_t attr;
20294
20295	status = pthread_attr_init(&attr);
20296	if( status ) return status;
20297
20298#if HAVE_PTHREADS < 7
20299	status = pthread_attr_setdetachstate(&attr, &detach);
20300	if( status < 0 ) status = errno;
20301#else
20302	status = pthread_attr_setdetachstate(&attr, detach);
20303#endif
20304	if( status ) return status;
20305	status = pthread_create( &t, &attr, task, NULL );
20306#if HAVE_PTHREADS < 7
20307	if( status < 0 ) status = errno;
20308#endif
20309	if( status ) return status;
20310#else
20311	/* Draft 4 pthreads */
20312	status = pthread_create( &t, pthread_attr_default, task, NULL );
20313	if( status ) return errno;
20314
20315	/* give thread a chance to complete */
20316	/* it should remain joinable and hence detachable */
20317	sleep( 1 );
20318
20319	status = pthread_detach( &t );
20320	if( status ) return errno;
20321#endif
20322
20323#ifdef HAVE_LINUX_THREADS
20324	pthread_kill_other_threads_np();
20325#endif
20326
20327	return 0;
20328
20329  ;
20330  return 0;
20331}
20332_ACEOF
20333if ac_fn_c_try_link "$LINENO"
20334then :
20335  ol_cv_pthread_pthread=yes
20336else $as_nop
20337  ol_cv_pthread_pthread=no
20338fi
20339rm -f core conftest.err conftest.$ac_objext conftest.beam \
20340    conftest$ac_exeext conftest.$ac_ext
20341else $as_nop
20342  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20343/* end confdefs.h.  */
20344
20345
20346/* pthread test headers */
20347#include <pthread.h>
20348#if HAVE_PTHREADS < 7
20349#include <errno.h>
20350#endif
20351#ifndef NULL
20352#define NULL (void*)0
20353#endif
20354
20355static void *task(p)
20356	void *p;
20357{
20358	return (void *) (p == NULL);
20359}
20360
20361
20362int main(argc, argv)
20363	int argc;
20364	char **argv;
20365{
20366
20367	/* pthread test function */
20368#ifndef PTHREAD_CREATE_DETACHED
20369#define	PTHREAD_CREATE_DETACHED	1
20370#endif
20371	pthread_t t;
20372	int status;
20373	int detach = PTHREAD_CREATE_DETACHED;
20374
20375#if HAVE_PTHREADS > 4
20376	/* Final pthreads */
20377	pthread_attr_t attr;
20378
20379	status = pthread_attr_init(&attr);
20380	if( status ) return status;
20381
20382#if HAVE_PTHREADS < 7
20383	status = pthread_attr_setdetachstate(&attr, &detach);
20384	if( status < 0 ) status = errno;
20385#else
20386	status = pthread_attr_setdetachstate(&attr, detach);
20387#endif
20388	if( status ) return status;
20389	status = pthread_create( &t, &attr, task, NULL );
20390#if HAVE_PTHREADS < 7
20391	if( status < 0 ) status = errno;
20392#endif
20393	if( status ) return status;
20394#else
20395	/* Draft 4 pthreads */
20396	status = pthread_create( &t, pthread_attr_default, task, NULL );
20397	if( status ) return errno;
20398
20399	/* give thread a chance to complete */
20400	/* it should remain joinable and hence detachable */
20401	sleep( 1 );
20402
20403	status = pthread_detach( &t );
20404	if( status ) return errno;
20405#endif
20406
20407#ifdef HAVE_LINUX_THREADS
20408	pthread_kill_other_threads_np();
20409#endif
20410
20411	return 0;
20412
20413}
20414
20415_ACEOF
20416if ac_fn_c_try_run "$LINENO"
20417then :
20418  ol_cv_pthread_pthread=yes
20419else $as_nop
20420  ol_cv_pthread_pthread=no
20421fi
20422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20423  conftest.$ac_objext conftest.beam conftest.$ac_ext
20424fi
20425
20426
20427		# restore the LIBS
20428		LIBS="$ol_LIBS"
20429
20430fi
20431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
20432printf "%s\n" "$ol_cv_pthread_pthread" >&6; }
20433
20434	if test $ol_cv_pthread_pthread = yes ; then
20435		ol_link_pthreads="-pthread"
20436		ol_link_threads=posix
20437	fi
20438fi
20439
20440		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
20441if test "$ol_link_threads" = no ; then
20442	# try -pthreads
20443	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
20444printf %s "checking for pthread link with -pthreads... " >&6; }
20445if test ${ol_cv_pthread_pthreads+y}
20446then :
20447  printf %s "(cached) " >&6
20448else $as_nop
20449
20450		# save the flags
20451		ol_LIBS="$LIBS"
20452		LIBS="-pthreads $LIBS"
20453
20454		if test "$cross_compiling" = yes
20455then :
20456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20457/* end confdefs.h.  */
20458
20459/* pthread test headers */
20460#include <pthread.h>
20461#if HAVE_PTHREADS < 7
20462#include <errno.h>
20463#endif
20464#ifndef NULL
20465#define NULL (void*)0
20466#endif
20467
20468static void *task(p)
20469	void *p;
20470{
20471	return (void *) (p == NULL);
20472}
20473
20474int
20475main (void)
20476{
20477
20478	/* pthread test function */
20479#ifndef PTHREAD_CREATE_DETACHED
20480#define	PTHREAD_CREATE_DETACHED	1
20481#endif
20482	pthread_t t;
20483	int status;
20484	int detach = PTHREAD_CREATE_DETACHED;
20485
20486#if HAVE_PTHREADS > 4
20487	/* Final pthreads */
20488	pthread_attr_t attr;
20489
20490	status = pthread_attr_init(&attr);
20491	if( status ) return status;
20492
20493#if HAVE_PTHREADS < 7
20494	status = pthread_attr_setdetachstate(&attr, &detach);
20495	if( status < 0 ) status = errno;
20496#else
20497	status = pthread_attr_setdetachstate(&attr, detach);
20498#endif
20499	if( status ) return status;
20500	status = pthread_create( &t, &attr, task, NULL );
20501#if HAVE_PTHREADS < 7
20502	if( status < 0 ) status = errno;
20503#endif
20504	if( status ) return status;
20505#else
20506	/* Draft 4 pthreads */
20507	status = pthread_create( &t, pthread_attr_default, task, NULL );
20508	if( status ) return errno;
20509
20510	/* give thread a chance to complete */
20511	/* it should remain joinable and hence detachable */
20512	sleep( 1 );
20513
20514	status = pthread_detach( &t );
20515	if( status ) return errno;
20516#endif
20517
20518#ifdef HAVE_LINUX_THREADS
20519	pthread_kill_other_threads_np();
20520#endif
20521
20522	return 0;
20523
20524  ;
20525  return 0;
20526}
20527_ACEOF
20528if ac_fn_c_try_link "$LINENO"
20529then :
20530  ol_cv_pthread_pthreads=yes
20531else $as_nop
20532  ol_cv_pthread_pthreads=no
20533fi
20534rm -f core conftest.err conftest.$ac_objext conftest.beam \
20535    conftest$ac_exeext conftest.$ac_ext
20536else $as_nop
20537  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20538/* end confdefs.h.  */
20539
20540
20541/* pthread test headers */
20542#include <pthread.h>
20543#if HAVE_PTHREADS < 7
20544#include <errno.h>
20545#endif
20546#ifndef NULL
20547#define NULL (void*)0
20548#endif
20549
20550static void *task(p)
20551	void *p;
20552{
20553	return (void *) (p == NULL);
20554}
20555
20556
20557int main(argc, argv)
20558	int argc;
20559	char **argv;
20560{
20561
20562	/* pthread test function */
20563#ifndef PTHREAD_CREATE_DETACHED
20564#define	PTHREAD_CREATE_DETACHED	1
20565#endif
20566	pthread_t t;
20567	int status;
20568	int detach = PTHREAD_CREATE_DETACHED;
20569
20570#if HAVE_PTHREADS > 4
20571	/* Final pthreads */
20572	pthread_attr_t attr;
20573
20574	status = pthread_attr_init(&attr);
20575	if( status ) return status;
20576
20577#if HAVE_PTHREADS < 7
20578	status = pthread_attr_setdetachstate(&attr, &detach);
20579	if( status < 0 ) status = errno;
20580#else
20581	status = pthread_attr_setdetachstate(&attr, detach);
20582#endif
20583	if( status ) return status;
20584	status = pthread_create( &t, &attr, task, NULL );
20585#if HAVE_PTHREADS < 7
20586	if( status < 0 ) status = errno;
20587#endif
20588	if( status ) return status;
20589#else
20590	/* Draft 4 pthreads */
20591	status = pthread_create( &t, pthread_attr_default, task, NULL );
20592	if( status ) return errno;
20593
20594	/* give thread a chance to complete */
20595	/* it should remain joinable and hence detachable */
20596	sleep( 1 );
20597
20598	status = pthread_detach( &t );
20599	if( status ) return errno;
20600#endif
20601
20602#ifdef HAVE_LINUX_THREADS
20603	pthread_kill_other_threads_np();
20604#endif
20605
20606	return 0;
20607
20608}
20609
20610_ACEOF
20611if ac_fn_c_try_run "$LINENO"
20612then :
20613  ol_cv_pthread_pthreads=yes
20614else $as_nop
20615  ol_cv_pthread_pthreads=no
20616fi
20617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20618  conftest.$ac_objext conftest.beam conftest.$ac_ext
20619fi
20620
20621
20622		# restore the LIBS
20623		LIBS="$ol_LIBS"
20624
20625fi
20626{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
20627printf "%s\n" "$ol_cv_pthread_pthreads" >&6; }
20628
20629	if test $ol_cv_pthread_pthreads = yes ; then
20630		ol_link_pthreads="-pthreads"
20631		ol_link_threads=posix
20632	fi
20633fi
20634
20635		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
20636if test "$ol_link_threads" = no ; then
20637	# try -mthreads
20638	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
20639printf %s "checking for pthread link with -mthreads... " >&6; }
20640if test ${ol_cv_pthread_mthreads+y}
20641then :
20642  printf %s "(cached) " >&6
20643else $as_nop
20644
20645		# save the flags
20646		ol_LIBS="$LIBS"
20647		LIBS="-mthreads $LIBS"
20648
20649		if test "$cross_compiling" = yes
20650then :
20651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20652/* end confdefs.h.  */
20653
20654/* pthread test headers */
20655#include <pthread.h>
20656#if HAVE_PTHREADS < 7
20657#include <errno.h>
20658#endif
20659#ifndef NULL
20660#define NULL (void*)0
20661#endif
20662
20663static void *task(p)
20664	void *p;
20665{
20666	return (void *) (p == NULL);
20667}
20668
20669int
20670main (void)
20671{
20672
20673	/* pthread test function */
20674#ifndef PTHREAD_CREATE_DETACHED
20675#define	PTHREAD_CREATE_DETACHED	1
20676#endif
20677	pthread_t t;
20678	int status;
20679	int detach = PTHREAD_CREATE_DETACHED;
20680
20681#if HAVE_PTHREADS > 4
20682	/* Final pthreads */
20683	pthread_attr_t attr;
20684
20685	status = pthread_attr_init(&attr);
20686	if( status ) return status;
20687
20688#if HAVE_PTHREADS < 7
20689	status = pthread_attr_setdetachstate(&attr, &detach);
20690	if( status < 0 ) status = errno;
20691#else
20692	status = pthread_attr_setdetachstate(&attr, detach);
20693#endif
20694	if( status ) return status;
20695	status = pthread_create( &t, &attr, task, NULL );
20696#if HAVE_PTHREADS < 7
20697	if( status < 0 ) status = errno;
20698#endif
20699	if( status ) return status;
20700#else
20701	/* Draft 4 pthreads */
20702	status = pthread_create( &t, pthread_attr_default, task, NULL );
20703	if( status ) return errno;
20704
20705	/* give thread a chance to complete */
20706	/* it should remain joinable and hence detachable */
20707	sleep( 1 );
20708
20709	status = pthread_detach( &t );
20710	if( status ) return errno;
20711#endif
20712
20713#ifdef HAVE_LINUX_THREADS
20714	pthread_kill_other_threads_np();
20715#endif
20716
20717	return 0;
20718
20719  ;
20720  return 0;
20721}
20722_ACEOF
20723if ac_fn_c_try_link "$LINENO"
20724then :
20725  ol_cv_pthread_mthreads=yes
20726else $as_nop
20727  ol_cv_pthread_mthreads=no
20728fi
20729rm -f core conftest.err conftest.$ac_objext conftest.beam \
20730    conftest$ac_exeext conftest.$ac_ext
20731else $as_nop
20732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20733/* end confdefs.h.  */
20734
20735
20736/* pthread test headers */
20737#include <pthread.h>
20738#if HAVE_PTHREADS < 7
20739#include <errno.h>
20740#endif
20741#ifndef NULL
20742#define NULL (void*)0
20743#endif
20744
20745static void *task(p)
20746	void *p;
20747{
20748	return (void *) (p == NULL);
20749}
20750
20751
20752int main(argc, argv)
20753	int argc;
20754	char **argv;
20755{
20756
20757	/* pthread test function */
20758#ifndef PTHREAD_CREATE_DETACHED
20759#define	PTHREAD_CREATE_DETACHED	1
20760#endif
20761	pthread_t t;
20762	int status;
20763	int detach = PTHREAD_CREATE_DETACHED;
20764
20765#if HAVE_PTHREADS > 4
20766	/* Final pthreads */
20767	pthread_attr_t attr;
20768
20769	status = pthread_attr_init(&attr);
20770	if( status ) return status;
20771
20772#if HAVE_PTHREADS < 7
20773	status = pthread_attr_setdetachstate(&attr, &detach);
20774	if( status < 0 ) status = errno;
20775#else
20776	status = pthread_attr_setdetachstate(&attr, detach);
20777#endif
20778	if( status ) return status;
20779	status = pthread_create( &t, &attr, task, NULL );
20780#if HAVE_PTHREADS < 7
20781	if( status < 0 ) status = errno;
20782#endif
20783	if( status ) return status;
20784#else
20785	/* Draft 4 pthreads */
20786	status = pthread_create( &t, pthread_attr_default, task, NULL );
20787	if( status ) return errno;
20788
20789	/* give thread a chance to complete */
20790	/* it should remain joinable and hence detachable */
20791	sleep( 1 );
20792
20793	status = pthread_detach( &t );
20794	if( status ) return errno;
20795#endif
20796
20797#ifdef HAVE_LINUX_THREADS
20798	pthread_kill_other_threads_np();
20799#endif
20800
20801	return 0;
20802
20803}
20804
20805_ACEOF
20806if ac_fn_c_try_run "$LINENO"
20807then :
20808  ol_cv_pthread_mthreads=yes
20809else $as_nop
20810  ol_cv_pthread_mthreads=no
20811fi
20812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20813  conftest.$ac_objext conftest.beam conftest.$ac_ext
20814fi
20815
20816
20817		# restore the LIBS
20818		LIBS="$ol_LIBS"
20819
20820fi
20821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
20822printf "%s\n" "$ol_cv_pthread_mthreads" >&6; }
20823
20824	if test $ol_cv_pthread_mthreads = yes ; then
20825		ol_link_pthreads="-mthreads"
20826		ol_link_threads=posix
20827	fi
20828fi
20829
20830		# Pthread try link: -thread (ol_cv_pthread_thread)
20831if test "$ol_link_threads" = no ; then
20832	# try -thread
20833	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
20834printf %s "checking for pthread link with -thread... " >&6; }
20835if test ${ol_cv_pthread_thread+y}
20836then :
20837  printf %s "(cached) " >&6
20838else $as_nop
20839
20840		# save the flags
20841		ol_LIBS="$LIBS"
20842		LIBS="-thread $LIBS"
20843
20844		if test "$cross_compiling" = yes
20845then :
20846  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847/* end confdefs.h.  */
20848
20849/* pthread test headers */
20850#include <pthread.h>
20851#if HAVE_PTHREADS < 7
20852#include <errno.h>
20853#endif
20854#ifndef NULL
20855#define NULL (void*)0
20856#endif
20857
20858static void *task(p)
20859	void *p;
20860{
20861	return (void *) (p == NULL);
20862}
20863
20864int
20865main (void)
20866{
20867
20868	/* pthread test function */
20869#ifndef PTHREAD_CREATE_DETACHED
20870#define	PTHREAD_CREATE_DETACHED	1
20871#endif
20872	pthread_t t;
20873	int status;
20874	int detach = PTHREAD_CREATE_DETACHED;
20875
20876#if HAVE_PTHREADS > 4
20877	/* Final pthreads */
20878	pthread_attr_t attr;
20879
20880	status = pthread_attr_init(&attr);
20881	if( status ) return status;
20882
20883#if HAVE_PTHREADS < 7
20884	status = pthread_attr_setdetachstate(&attr, &detach);
20885	if( status < 0 ) status = errno;
20886#else
20887	status = pthread_attr_setdetachstate(&attr, detach);
20888#endif
20889	if( status ) return status;
20890	status = pthread_create( &t, &attr, task, NULL );
20891#if HAVE_PTHREADS < 7
20892	if( status < 0 ) status = errno;
20893#endif
20894	if( status ) return status;
20895#else
20896	/* Draft 4 pthreads */
20897	status = pthread_create( &t, pthread_attr_default, task, NULL );
20898	if( status ) return errno;
20899
20900	/* give thread a chance to complete */
20901	/* it should remain joinable and hence detachable */
20902	sleep( 1 );
20903
20904	status = pthread_detach( &t );
20905	if( status ) return errno;
20906#endif
20907
20908#ifdef HAVE_LINUX_THREADS
20909	pthread_kill_other_threads_np();
20910#endif
20911
20912	return 0;
20913
20914  ;
20915  return 0;
20916}
20917_ACEOF
20918if ac_fn_c_try_link "$LINENO"
20919then :
20920  ol_cv_pthread_thread=yes
20921else $as_nop
20922  ol_cv_pthread_thread=no
20923fi
20924rm -f core conftest.err conftest.$ac_objext conftest.beam \
20925    conftest$ac_exeext conftest.$ac_ext
20926else $as_nop
20927  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20928/* end confdefs.h.  */
20929
20930
20931/* pthread test headers */
20932#include <pthread.h>
20933#if HAVE_PTHREADS < 7
20934#include <errno.h>
20935#endif
20936#ifndef NULL
20937#define NULL (void*)0
20938#endif
20939
20940static void *task(p)
20941	void *p;
20942{
20943	return (void *) (p == NULL);
20944}
20945
20946
20947int main(argc, argv)
20948	int argc;
20949	char **argv;
20950{
20951
20952	/* pthread test function */
20953#ifndef PTHREAD_CREATE_DETACHED
20954#define	PTHREAD_CREATE_DETACHED	1
20955#endif
20956	pthread_t t;
20957	int status;
20958	int detach = PTHREAD_CREATE_DETACHED;
20959
20960#if HAVE_PTHREADS > 4
20961	/* Final pthreads */
20962	pthread_attr_t attr;
20963
20964	status = pthread_attr_init(&attr);
20965	if( status ) return status;
20966
20967#if HAVE_PTHREADS < 7
20968	status = pthread_attr_setdetachstate(&attr, &detach);
20969	if( status < 0 ) status = errno;
20970#else
20971	status = pthread_attr_setdetachstate(&attr, detach);
20972#endif
20973	if( status ) return status;
20974	status = pthread_create( &t, &attr, task, NULL );
20975#if HAVE_PTHREADS < 7
20976	if( status < 0 ) status = errno;
20977#endif
20978	if( status ) return status;
20979#else
20980	/* Draft 4 pthreads */
20981	status = pthread_create( &t, pthread_attr_default, task, NULL );
20982	if( status ) return errno;
20983
20984	/* give thread a chance to complete */
20985	/* it should remain joinable and hence detachable */
20986	sleep( 1 );
20987
20988	status = pthread_detach( &t );
20989	if( status ) return errno;
20990#endif
20991
20992#ifdef HAVE_LINUX_THREADS
20993	pthread_kill_other_threads_np();
20994#endif
20995
20996	return 0;
20997
20998}
20999
21000_ACEOF
21001if ac_fn_c_try_run "$LINENO"
21002then :
21003  ol_cv_pthread_thread=yes
21004else $as_nop
21005  ol_cv_pthread_thread=no
21006fi
21007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21008  conftest.$ac_objext conftest.beam conftest.$ac_ext
21009fi
21010
21011
21012		# restore the LIBS
21013		LIBS="$ol_LIBS"
21014
21015fi
21016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
21017printf "%s\n" "$ol_cv_pthread_thread" >&6; }
21018
21019	if test $ol_cv_pthread_thread = yes ; then
21020		ol_link_pthreads="-thread"
21021		ol_link_threads=posix
21022	fi
21023fi
21024
21025
21026		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21027if test "$ol_link_threads" = no ; then
21028	# try -lpthread -lmach -lexc -lc_r
21029	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21030printf %s "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
21031if test ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+y}
21032then :
21033  printf %s "(cached) " >&6
21034else $as_nop
21035
21036		# save the flags
21037		ol_LIBS="$LIBS"
21038		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21039
21040		if test "$cross_compiling" = yes
21041then :
21042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21043/* end confdefs.h.  */
21044
21045/* pthread test headers */
21046#include <pthread.h>
21047#if HAVE_PTHREADS < 7
21048#include <errno.h>
21049#endif
21050#ifndef NULL
21051#define NULL (void*)0
21052#endif
21053
21054static void *task(p)
21055	void *p;
21056{
21057	return (void *) (p == NULL);
21058}
21059
21060int
21061main (void)
21062{
21063
21064	/* pthread test function */
21065#ifndef PTHREAD_CREATE_DETACHED
21066#define	PTHREAD_CREATE_DETACHED	1
21067#endif
21068	pthread_t t;
21069	int status;
21070	int detach = PTHREAD_CREATE_DETACHED;
21071
21072#if HAVE_PTHREADS > 4
21073	/* Final pthreads */
21074	pthread_attr_t attr;
21075
21076	status = pthread_attr_init(&attr);
21077	if( status ) return status;
21078
21079#if HAVE_PTHREADS < 7
21080	status = pthread_attr_setdetachstate(&attr, &detach);
21081	if( status < 0 ) status = errno;
21082#else
21083	status = pthread_attr_setdetachstate(&attr, detach);
21084#endif
21085	if( status ) return status;
21086	status = pthread_create( &t, &attr, task, NULL );
21087#if HAVE_PTHREADS < 7
21088	if( status < 0 ) status = errno;
21089#endif
21090	if( status ) return status;
21091#else
21092	/* Draft 4 pthreads */
21093	status = pthread_create( &t, pthread_attr_default, task, NULL );
21094	if( status ) return errno;
21095
21096	/* give thread a chance to complete */
21097	/* it should remain joinable and hence detachable */
21098	sleep( 1 );
21099
21100	status = pthread_detach( &t );
21101	if( status ) return errno;
21102#endif
21103
21104#ifdef HAVE_LINUX_THREADS
21105	pthread_kill_other_threads_np();
21106#endif
21107
21108	return 0;
21109
21110  ;
21111  return 0;
21112}
21113_ACEOF
21114if ac_fn_c_try_link "$LINENO"
21115then :
21116  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21117else $as_nop
21118  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21119fi
21120rm -f core conftest.err conftest.$ac_objext conftest.beam \
21121    conftest$ac_exeext conftest.$ac_ext
21122else $as_nop
21123  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21124/* end confdefs.h.  */
21125
21126
21127/* pthread test headers */
21128#include <pthread.h>
21129#if HAVE_PTHREADS < 7
21130#include <errno.h>
21131#endif
21132#ifndef NULL
21133#define NULL (void*)0
21134#endif
21135
21136static void *task(p)
21137	void *p;
21138{
21139	return (void *) (p == NULL);
21140}
21141
21142
21143int main(argc, argv)
21144	int argc;
21145	char **argv;
21146{
21147
21148	/* pthread test function */
21149#ifndef PTHREAD_CREATE_DETACHED
21150#define	PTHREAD_CREATE_DETACHED	1
21151#endif
21152	pthread_t t;
21153	int status;
21154	int detach = PTHREAD_CREATE_DETACHED;
21155
21156#if HAVE_PTHREADS > 4
21157	/* Final pthreads */
21158	pthread_attr_t attr;
21159
21160	status = pthread_attr_init(&attr);
21161	if( status ) return status;
21162
21163#if HAVE_PTHREADS < 7
21164	status = pthread_attr_setdetachstate(&attr, &detach);
21165	if( status < 0 ) status = errno;
21166#else
21167	status = pthread_attr_setdetachstate(&attr, detach);
21168#endif
21169	if( status ) return status;
21170	status = pthread_create( &t, &attr, task, NULL );
21171#if HAVE_PTHREADS < 7
21172	if( status < 0 ) status = errno;
21173#endif
21174	if( status ) return status;
21175#else
21176	/* Draft 4 pthreads */
21177	status = pthread_create( &t, pthread_attr_default, task, NULL );
21178	if( status ) return errno;
21179
21180	/* give thread a chance to complete */
21181	/* it should remain joinable and hence detachable */
21182	sleep( 1 );
21183
21184	status = pthread_detach( &t );
21185	if( status ) return errno;
21186#endif
21187
21188#ifdef HAVE_LINUX_THREADS
21189	pthread_kill_other_threads_np();
21190#endif
21191
21192	return 0;
21193
21194}
21195
21196_ACEOF
21197if ac_fn_c_try_run "$LINENO"
21198then :
21199  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21200else $as_nop
21201  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21202fi
21203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21204  conftest.$ac_objext conftest.beam conftest.$ac_ext
21205fi
21206
21207
21208		# restore the LIBS
21209		LIBS="$ol_LIBS"
21210
21211fi
21212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21213printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
21214
21215	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21216		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21217		ol_link_threads=posix
21218	fi
21219fi
21220
21221		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21222if test "$ol_link_threads" = no ; then
21223	# try -lpthread -lmach -lexc
21224	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
21225printf %s "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
21226if test ${ol_cv_pthread_lpthread_lmach_lexc+y}
21227then :
21228  printf %s "(cached) " >&6
21229else $as_nop
21230
21231		# save the flags
21232		ol_LIBS="$LIBS"
21233		LIBS="-lpthread -lmach -lexc $LIBS"
21234
21235		if test "$cross_compiling" = yes
21236then :
21237  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21238/* end confdefs.h.  */
21239
21240/* pthread test headers */
21241#include <pthread.h>
21242#if HAVE_PTHREADS < 7
21243#include <errno.h>
21244#endif
21245#ifndef NULL
21246#define NULL (void*)0
21247#endif
21248
21249static void *task(p)
21250	void *p;
21251{
21252	return (void *) (p == NULL);
21253}
21254
21255int
21256main (void)
21257{
21258
21259	/* pthread test function */
21260#ifndef PTHREAD_CREATE_DETACHED
21261#define	PTHREAD_CREATE_DETACHED	1
21262#endif
21263	pthread_t t;
21264	int status;
21265	int detach = PTHREAD_CREATE_DETACHED;
21266
21267#if HAVE_PTHREADS > 4
21268	/* Final pthreads */
21269	pthread_attr_t attr;
21270
21271	status = pthread_attr_init(&attr);
21272	if( status ) return status;
21273
21274#if HAVE_PTHREADS < 7
21275	status = pthread_attr_setdetachstate(&attr, &detach);
21276	if( status < 0 ) status = errno;
21277#else
21278	status = pthread_attr_setdetachstate(&attr, detach);
21279#endif
21280	if( status ) return status;
21281	status = pthread_create( &t, &attr, task, NULL );
21282#if HAVE_PTHREADS < 7
21283	if( status < 0 ) status = errno;
21284#endif
21285	if( status ) return status;
21286#else
21287	/* Draft 4 pthreads */
21288	status = pthread_create( &t, pthread_attr_default, task, NULL );
21289	if( status ) return errno;
21290
21291	/* give thread a chance to complete */
21292	/* it should remain joinable and hence detachable */
21293	sleep( 1 );
21294
21295	status = pthread_detach( &t );
21296	if( status ) return errno;
21297#endif
21298
21299#ifdef HAVE_LINUX_THREADS
21300	pthread_kill_other_threads_np();
21301#endif
21302
21303	return 0;
21304
21305  ;
21306  return 0;
21307}
21308_ACEOF
21309if ac_fn_c_try_link "$LINENO"
21310then :
21311  ol_cv_pthread_lpthread_lmach_lexc=yes
21312else $as_nop
21313  ol_cv_pthread_lpthread_lmach_lexc=no
21314fi
21315rm -f core conftest.err conftest.$ac_objext conftest.beam \
21316    conftest$ac_exeext conftest.$ac_ext
21317else $as_nop
21318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21319/* end confdefs.h.  */
21320
21321
21322/* pthread test headers */
21323#include <pthread.h>
21324#if HAVE_PTHREADS < 7
21325#include <errno.h>
21326#endif
21327#ifndef NULL
21328#define NULL (void*)0
21329#endif
21330
21331static void *task(p)
21332	void *p;
21333{
21334	return (void *) (p == NULL);
21335}
21336
21337
21338int main(argc, argv)
21339	int argc;
21340	char **argv;
21341{
21342
21343	/* pthread test function */
21344#ifndef PTHREAD_CREATE_DETACHED
21345#define	PTHREAD_CREATE_DETACHED	1
21346#endif
21347	pthread_t t;
21348	int status;
21349	int detach = PTHREAD_CREATE_DETACHED;
21350
21351#if HAVE_PTHREADS > 4
21352	/* Final pthreads */
21353	pthread_attr_t attr;
21354
21355	status = pthread_attr_init(&attr);
21356	if( status ) return status;
21357
21358#if HAVE_PTHREADS < 7
21359	status = pthread_attr_setdetachstate(&attr, &detach);
21360	if( status < 0 ) status = errno;
21361#else
21362	status = pthread_attr_setdetachstate(&attr, detach);
21363#endif
21364	if( status ) return status;
21365	status = pthread_create( &t, &attr, task, NULL );
21366#if HAVE_PTHREADS < 7
21367	if( status < 0 ) status = errno;
21368#endif
21369	if( status ) return status;
21370#else
21371	/* Draft 4 pthreads */
21372	status = pthread_create( &t, pthread_attr_default, task, NULL );
21373	if( status ) return errno;
21374
21375	/* give thread a chance to complete */
21376	/* it should remain joinable and hence detachable */
21377	sleep( 1 );
21378
21379	status = pthread_detach( &t );
21380	if( status ) return errno;
21381#endif
21382
21383#ifdef HAVE_LINUX_THREADS
21384	pthread_kill_other_threads_np();
21385#endif
21386
21387	return 0;
21388
21389}
21390
21391_ACEOF
21392if ac_fn_c_try_run "$LINENO"
21393then :
21394  ol_cv_pthread_lpthread_lmach_lexc=yes
21395else $as_nop
21396  ol_cv_pthread_lpthread_lmach_lexc=no
21397fi
21398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21399  conftest.$ac_objext conftest.beam conftest.$ac_ext
21400fi
21401
21402
21403		# restore the LIBS
21404		LIBS="$ol_LIBS"
21405
21406fi
21407{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
21408printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
21409
21410	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
21411		ol_link_pthreads="-lpthread -lmach -lexc"
21412		ol_link_threads=posix
21413	fi
21414fi
21415
21416
21417		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
21418if test "$ol_link_threads" = no ; then
21419	# try -lpthread -Wl,-woff,85
21420	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
21421printf %s "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
21422if test ${ol_cv_pthread_lib_lpthread_woff+y}
21423then :
21424  printf %s "(cached) " >&6
21425else $as_nop
21426
21427		# save the flags
21428		ol_LIBS="$LIBS"
21429		LIBS="-lpthread -Wl,-woff,85 $LIBS"
21430
21431		if test "$cross_compiling" = yes
21432then :
21433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21434/* end confdefs.h.  */
21435
21436/* pthread test headers */
21437#include <pthread.h>
21438#if HAVE_PTHREADS < 7
21439#include <errno.h>
21440#endif
21441#ifndef NULL
21442#define NULL (void*)0
21443#endif
21444
21445static void *task(p)
21446	void *p;
21447{
21448	return (void *) (p == NULL);
21449}
21450
21451int
21452main (void)
21453{
21454
21455	/* pthread test function */
21456#ifndef PTHREAD_CREATE_DETACHED
21457#define	PTHREAD_CREATE_DETACHED	1
21458#endif
21459	pthread_t t;
21460	int status;
21461	int detach = PTHREAD_CREATE_DETACHED;
21462
21463#if HAVE_PTHREADS > 4
21464	/* Final pthreads */
21465	pthread_attr_t attr;
21466
21467	status = pthread_attr_init(&attr);
21468	if( status ) return status;
21469
21470#if HAVE_PTHREADS < 7
21471	status = pthread_attr_setdetachstate(&attr, &detach);
21472	if( status < 0 ) status = errno;
21473#else
21474	status = pthread_attr_setdetachstate(&attr, detach);
21475#endif
21476	if( status ) return status;
21477	status = pthread_create( &t, &attr, task, NULL );
21478#if HAVE_PTHREADS < 7
21479	if( status < 0 ) status = errno;
21480#endif
21481	if( status ) return status;
21482#else
21483	/* Draft 4 pthreads */
21484	status = pthread_create( &t, pthread_attr_default, task, NULL );
21485	if( status ) return errno;
21486
21487	/* give thread a chance to complete */
21488	/* it should remain joinable and hence detachable */
21489	sleep( 1 );
21490
21491	status = pthread_detach( &t );
21492	if( status ) return errno;
21493#endif
21494
21495#ifdef HAVE_LINUX_THREADS
21496	pthread_kill_other_threads_np();
21497#endif
21498
21499	return 0;
21500
21501  ;
21502  return 0;
21503}
21504_ACEOF
21505if ac_fn_c_try_link "$LINENO"
21506then :
21507  ol_cv_pthread_lib_lpthread_woff=yes
21508else $as_nop
21509  ol_cv_pthread_lib_lpthread_woff=no
21510fi
21511rm -f core conftest.err conftest.$ac_objext conftest.beam \
21512    conftest$ac_exeext conftest.$ac_ext
21513else $as_nop
21514  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21515/* end confdefs.h.  */
21516
21517
21518/* pthread test headers */
21519#include <pthread.h>
21520#if HAVE_PTHREADS < 7
21521#include <errno.h>
21522#endif
21523#ifndef NULL
21524#define NULL (void*)0
21525#endif
21526
21527static void *task(p)
21528	void *p;
21529{
21530	return (void *) (p == NULL);
21531}
21532
21533
21534int main(argc, argv)
21535	int argc;
21536	char **argv;
21537{
21538
21539	/* pthread test function */
21540#ifndef PTHREAD_CREATE_DETACHED
21541#define	PTHREAD_CREATE_DETACHED	1
21542#endif
21543	pthread_t t;
21544	int status;
21545	int detach = PTHREAD_CREATE_DETACHED;
21546
21547#if HAVE_PTHREADS > 4
21548	/* Final pthreads */
21549	pthread_attr_t attr;
21550
21551	status = pthread_attr_init(&attr);
21552	if( status ) return status;
21553
21554#if HAVE_PTHREADS < 7
21555	status = pthread_attr_setdetachstate(&attr, &detach);
21556	if( status < 0 ) status = errno;
21557#else
21558	status = pthread_attr_setdetachstate(&attr, detach);
21559#endif
21560	if( status ) return status;
21561	status = pthread_create( &t, &attr, task, NULL );
21562#if HAVE_PTHREADS < 7
21563	if( status < 0 ) status = errno;
21564#endif
21565	if( status ) return status;
21566#else
21567	/* Draft 4 pthreads */
21568	status = pthread_create( &t, pthread_attr_default, task, NULL );
21569	if( status ) return errno;
21570
21571	/* give thread a chance to complete */
21572	/* it should remain joinable and hence detachable */
21573	sleep( 1 );
21574
21575	status = pthread_detach( &t );
21576	if( status ) return errno;
21577#endif
21578
21579#ifdef HAVE_LINUX_THREADS
21580	pthread_kill_other_threads_np();
21581#endif
21582
21583	return 0;
21584
21585}
21586
21587_ACEOF
21588if ac_fn_c_try_run "$LINENO"
21589then :
21590  ol_cv_pthread_lib_lpthread_woff=yes
21591else $as_nop
21592  ol_cv_pthread_lib_lpthread_woff=no
21593fi
21594rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21595  conftest.$ac_objext conftest.beam conftest.$ac_ext
21596fi
21597
21598
21599		# restore the LIBS
21600		LIBS="$ol_LIBS"
21601
21602fi
21603{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
21604printf "%s\n" "$ol_cv_pthread_lib_lpthread_woff" >&6; }
21605
21606	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
21607		ol_link_pthreads="-lpthread -Wl,-woff,85"
21608		ol_link_threads=posix
21609	fi
21610fi
21611
21612
21613		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
21614if test "$ol_link_threads" = no ; then
21615	# try -lpthread
21616	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
21617printf %s "checking for pthread link with -lpthread... " >&6; }
21618if test ${ol_cv_pthread_lpthread+y}
21619then :
21620  printf %s "(cached) " >&6
21621else $as_nop
21622
21623		# save the flags
21624		ol_LIBS="$LIBS"
21625		LIBS="-lpthread $LIBS"
21626
21627		if test "$cross_compiling" = yes
21628then :
21629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21630/* end confdefs.h.  */
21631
21632/* pthread test headers */
21633#include <pthread.h>
21634#if HAVE_PTHREADS < 7
21635#include <errno.h>
21636#endif
21637#ifndef NULL
21638#define NULL (void*)0
21639#endif
21640
21641static void *task(p)
21642	void *p;
21643{
21644	return (void *) (p == NULL);
21645}
21646
21647int
21648main (void)
21649{
21650
21651	/* pthread test function */
21652#ifndef PTHREAD_CREATE_DETACHED
21653#define	PTHREAD_CREATE_DETACHED	1
21654#endif
21655	pthread_t t;
21656	int status;
21657	int detach = PTHREAD_CREATE_DETACHED;
21658
21659#if HAVE_PTHREADS > 4
21660	/* Final pthreads */
21661	pthread_attr_t attr;
21662
21663	status = pthread_attr_init(&attr);
21664	if( status ) return status;
21665
21666#if HAVE_PTHREADS < 7
21667	status = pthread_attr_setdetachstate(&attr, &detach);
21668	if( status < 0 ) status = errno;
21669#else
21670	status = pthread_attr_setdetachstate(&attr, detach);
21671#endif
21672	if( status ) return status;
21673	status = pthread_create( &t, &attr, task, NULL );
21674#if HAVE_PTHREADS < 7
21675	if( status < 0 ) status = errno;
21676#endif
21677	if( status ) return status;
21678#else
21679	/* Draft 4 pthreads */
21680	status = pthread_create( &t, pthread_attr_default, task, NULL );
21681	if( status ) return errno;
21682
21683	/* give thread a chance to complete */
21684	/* it should remain joinable and hence detachable */
21685	sleep( 1 );
21686
21687	status = pthread_detach( &t );
21688	if( status ) return errno;
21689#endif
21690
21691#ifdef HAVE_LINUX_THREADS
21692	pthread_kill_other_threads_np();
21693#endif
21694
21695	return 0;
21696
21697  ;
21698  return 0;
21699}
21700_ACEOF
21701if ac_fn_c_try_link "$LINENO"
21702then :
21703  ol_cv_pthread_lpthread=yes
21704else $as_nop
21705  ol_cv_pthread_lpthread=no
21706fi
21707rm -f core conftest.err conftest.$ac_objext conftest.beam \
21708    conftest$ac_exeext conftest.$ac_ext
21709else $as_nop
21710  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21711/* end confdefs.h.  */
21712
21713
21714/* pthread test headers */
21715#include <pthread.h>
21716#if HAVE_PTHREADS < 7
21717#include <errno.h>
21718#endif
21719#ifndef NULL
21720#define NULL (void*)0
21721#endif
21722
21723static void *task(p)
21724	void *p;
21725{
21726	return (void *) (p == NULL);
21727}
21728
21729
21730int main(argc, argv)
21731	int argc;
21732	char **argv;
21733{
21734
21735	/* pthread test function */
21736#ifndef PTHREAD_CREATE_DETACHED
21737#define	PTHREAD_CREATE_DETACHED	1
21738#endif
21739	pthread_t t;
21740	int status;
21741	int detach = PTHREAD_CREATE_DETACHED;
21742
21743#if HAVE_PTHREADS > 4
21744	/* Final pthreads */
21745	pthread_attr_t attr;
21746
21747	status = pthread_attr_init(&attr);
21748	if( status ) return status;
21749
21750#if HAVE_PTHREADS < 7
21751	status = pthread_attr_setdetachstate(&attr, &detach);
21752	if( status < 0 ) status = errno;
21753#else
21754	status = pthread_attr_setdetachstate(&attr, detach);
21755#endif
21756	if( status ) return status;
21757	status = pthread_create( &t, &attr, task, NULL );
21758#if HAVE_PTHREADS < 7
21759	if( status < 0 ) status = errno;
21760#endif
21761	if( status ) return status;
21762#else
21763	/* Draft 4 pthreads */
21764	status = pthread_create( &t, pthread_attr_default, task, NULL );
21765	if( status ) return errno;
21766
21767	/* give thread a chance to complete */
21768	/* it should remain joinable and hence detachable */
21769	sleep( 1 );
21770
21771	status = pthread_detach( &t );
21772	if( status ) return errno;
21773#endif
21774
21775#ifdef HAVE_LINUX_THREADS
21776	pthread_kill_other_threads_np();
21777#endif
21778
21779	return 0;
21780
21781}
21782
21783_ACEOF
21784if ac_fn_c_try_run "$LINENO"
21785then :
21786  ol_cv_pthread_lpthread=yes
21787else $as_nop
21788  ol_cv_pthread_lpthread=no
21789fi
21790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21791  conftest.$ac_objext conftest.beam conftest.$ac_ext
21792fi
21793
21794
21795		# restore the LIBS
21796		LIBS="$ol_LIBS"
21797
21798fi
21799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
21800printf "%s\n" "$ol_cv_pthread_lpthread" >&6; }
21801
21802	if test $ol_cv_pthread_lpthread = yes ; then
21803		ol_link_pthreads="-lpthread"
21804		ol_link_threads=posix
21805	fi
21806fi
21807
21808		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
21809if test "$ol_link_threads" = no ; then
21810	# try -lc_r
21811	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
21812printf %s "checking for pthread link with -lc_r... " >&6; }
21813if test ${ol_cv_pthread_lc_r+y}
21814then :
21815  printf %s "(cached) " >&6
21816else $as_nop
21817
21818		# save the flags
21819		ol_LIBS="$LIBS"
21820		LIBS="-lc_r $LIBS"
21821
21822		if test "$cross_compiling" = yes
21823then :
21824  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21825/* end confdefs.h.  */
21826
21827/* pthread test headers */
21828#include <pthread.h>
21829#if HAVE_PTHREADS < 7
21830#include <errno.h>
21831#endif
21832#ifndef NULL
21833#define NULL (void*)0
21834#endif
21835
21836static void *task(p)
21837	void *p;
21838{
21839	return (void *) (p == NULL);
21840}
21841
21842int
21843main (void)
21844{
21845
21846	/* pthread test function */
21847#ifndef PTHREAD_CREATE_DETACHED
21848#define	PTHREAD_CREATE_DETACHED	1
21849#endif
21850	pthread_t t;
21851	int status;
21852	int detach = PTHREAD_CREATE_DETACHED;
21853
21854#if HAVE_PTHREADS > 4
21855	/* Final pthreads */
21856	pthread_attr_t attr;
21857
21858	status = pthread_attr_init(&attr);
21859	if( status ) return status;
21860
21861#if HAVE_PTHREADS < 7
21862	status = pthread_attr_setdetachstate(&attr, &detach);
21863	if( status < 0 ) status = errno;
21864#else
21865	status = pthread_attr_setdetachstate(&attr, detach);
21866#endif
21867	if( status ) return status;
21868	status = pthread_create( &t, &attr, task, NULL );
21869#if HAVE_PTHREADS < 7
21870	if( status < 0 ) status = errno;
21871#endif
21872	if( status ) return status;
21873#else
21874	/* Draft 4 pthreads */
21875	status = pthread_create( &t, pthread_attr_default, task, NULL );
21876	if( status ) return errno;
21877
21878	/* give thread a chance to complete */
21879	/* it should remain joinable and hence detachable */
21880	sleep( 1 );
21881
21882	status = pthread_detach( &t );
21883	if( status ) return errno;
21884#endif
21885
21886#ifdef HAVE_LINUX_THREADS
21887	pthread_kill_other_threads_np();
21888#endif
21889
21890	return 0;
21891
21892  ;
21893  return 0;
21894}
21895_ACEOF
21896if ac_fn_c_try_link "$LINENO"
21897then :
21898  ol_cv_pthread_lc_r=yes
21899else $as_nop
21900  ol_cv_pthread_lc_r=no
21901fi
21902rm -f core conftest.err conftest.$ac_objext conftest.beam \
21903    conftest$ac_exeext conftest.$ac_ext
21904else $as_nop
21905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21906/* end confdefs.h.  */
21907
21908
21909/* pthread test headers */
21910#include <pthread.h>
21911#if HAVE_PTHREADS < 7
21912#include <errno.h>
21913#endif
21914#ifndef NULL
21915#define NULL (void*)0
21916#endif
21917
21918static void *task(p)
21919	void *p;
21920{
21921	return (void *) (p == NULL);
21922}
21923
21924
21925int main(argc, argv)
21926	int argc;
21927	char **argv;
21928{
21929
21930	/* pthread test function */
21931#ifndef PTHREAD_CREATE_DETACHED
21932#define	PTHREAD_CREATE_DETACHED	1
21933#endif
21934	pthread_t t;
21935	int status;
21936	int detach = PTHREAD_CREATE_DETACHED;
21937
21938#if HAVE_PTHREADS > 4
21939	/* Final pthreads */
21940	pthread_attr_t attr;
21941
21942	status = pthread_attr_init(&attr);
21943	if( status ) return status;
21944
21945#if HAVE_PTHREADS < 7
21946	status = pthread_attr_setdetachstate(&attr, &detach);
21947	if( status < 0 ) status = errno;
21948#else
21949	status = pthread_attr_setdetachstate(&attr, detach);
21950#endif
21951	if( status ) return status;
21952	status = pthread_create( &t, &attr, task, NULL );
21953#if HAVE_PTHREADS < 7
21954	if( status < 0 ) status = errno;
21955#endif
21956	if( status ) return status;
21957#else
21958	/* Draft 4 pthreads */
21959	status = pthread_create( &t, pthread_attr_default, task, NULL );
21960	if( status ) return errno;
21961
21962	/* give thread a chance to complete */
21963	/* it should remain joinable and hence detachable */
21964	sleep( 1 );
21965
21966	status = pthread_detach( &t );
21967	if( status ) return errno;
21968#endif
21969
21970#ifdef HAVE_LINUX_THREADS
21971	pthread_kill_other_threads_np();
21972#endif
21973
21974	return 0;
21975
21976}
21977
21978_ACEOF
21979if ac_fn_c_try_run "$LINENO"
21980then :
21981  ol_cv_pthread_lc_r=yes
21982else $as_nop
21983  ol_cv_pthread_lc_r=no
21984fi
21985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21986  conftest.$ac_objext conftest.beam conftest.$ac_ext
21987fi
21988
21989
21990		# restore the LIBS
21991		LIBS="$ol_LIBS"
21992
21993fi
21994{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
21995printf "%s\n" "$ol_cv_pthread_lc_r" >&6; }
21996
21997	if test $ol_cv_pthread_lc_r = yes ; then
21998		ol_link_pthreads="-lc_r"
21999		ol_link_threads=posix
22000	fi
22001fi
22002
22003
22004		# Pthread try link: -threads (ol_cv_pthread_threads)
22005if test "$ol_link_threads" = no ; then
22006	# try -threads
22007	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
22008printf %s "checking for pthread link with -threads... " >&6; }
22009if test ${ol_cv_pthread_threads+y}
22010then :
22011  printf %s "(cached) " >&6
22012else $as_nop
22013
22014		# save the flags
22015		ol_LIBS="$LIBS"
22016		LIBS="-threads $LIBS"
22017
22018		if test "$cross_compiling" = yes
22019then :
22020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22021/* end confdefs.h.  */
22022
22023/* pthread test headers */
22024#include <pthread.h>
22025#if HAVE_PTHREADS < 7
22026#include <errno.h>
22027#endif
22028#ifndef NULL
22029#define NULL (void*)0
22030#endif
22031
22032static void *task(p)
22033	void *p;
22034{
22035	return (void *) (p == NULL);
22036}
22037
22038int
22039main (void)
22040{
22041
22042	/* pthread test function */
22043#ifndef PTHREAD_CREATE_DETACHED
22044#define	PTHREAD_CREATE_DETACHED	1
22045#endif
22046	pthread_t t;
22047	int status;
22048	int detach = PTHREAD_CREATE_DETACHED;
22049
22050#if HAVE_PTHREADS > 4
22051	/* Final pthreads */
22052	pthread_attr_t attr;
22053
22054	status = pthread_attr_init(&attr);
22055	if( status ) return status;
22056
22057#if HAVE_PTHREADS < 7
22058	status = pthread_attr_setdetachstate(&attr, &detach);
22059	if( status < 0 ) status = errno;
22060#else
22061	status = pthread_attr_setdetachstate(&attr, detach);
22062#endif
22063	if( status ) return status;
22064	status = pthread_create( &t, &attr, task, NULL );
22065#if HAVE_PTHREADS < 7
22066	if( status < 0 ) status = errno;
22067#endif
22068	if( status ) return status;
22069#else
22070	/* Draft 4 pthreads */
22071	status = pthread_create( &t, pthread_attr_default, task, NULL );
22072	if( status ) return errno;
22073
22074	/* give thread a chance to complete */
22075	/* it should remain joinable and hence detachable */
22076	sleep( 1 );
22077
22078	status = pthread_detach( &t );
22079	if( status ) return errno;
22080#endif
22081
22082#ifdef HAVE_LINUX_THREADS
22083	pthread_kill_other_threads_np();
22084#endif
22085
22086	return 0;
22087
22088  ;
22089  return 0;
22090}
22091_ACEOF
22092if ac_fn_c_try_link "$LINENO"
22093then :
22094  ol_cv_pthread_threads=yes
22095else $as_nop
22096  ol_cv_pthread_threads=no
22097fi
22098rm -f core conftest.err conftest.$ac_objext conftest.beam \
22099    conftest$ac_exeext conftest.$ac_ext
22100else $as_nop
22101  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22102/* end confdefs.h.  */
22103
22104
22105/* pthread test headers */
22106#include <pthread.h>
22107#if HAVE_PTHREADS < 7
22108#include <errno.h>
22109#endif
22110#ifndef NULL
22111#define NULL (void*)0
22112#endif
22113
22114static void *task(p)
22115	void *p;
22116{
22117	return (void *) (p == NULL);
22118}
22119
22120
22121int main(argc, argv)
22122	int argc;
22123	char **argv;
22124{
22125
22126	/* pthread test function */
22127#ifndef PTHREAD_CREATE_DETACHED
22128#define	PTHREAD_CREATE_DETACHED	1
22129#endif
22130	pthread_t t;
22131	int status;
22132	int detach = PTHREAD_CREATE_DETACHED;
22133
22134#if HAVE_PTHREADS > 4
22135	/* Final pthreads */
22136	pthread_attr_t attr;
22137
22138	status = pthread_attr_init(&attr);
22139	if( status ) return status;
22140
22141#if HAVE_PTHREADS < 7
22142	status = pthread_attr_setdetachstate(&attr, &detach);
22143	if( status < 0 ) status = errno;
22144#else
22145	status = pthread_attr_setdetachstate(&attr, detach);
22146#endif
22147	if( status ) return status;
22148	status = pthread_create( &t, &attr, task, NULL );
22149#if HAVE_PTHREADS < 7
22150	if( status < 0 ) status = errno;
22151#endif
22152	if( status ) return status;
22153#else
22154	/* Draft 4 pthreads */
22155	status = pthread_create( &t, pthread_attr_default, task, NULL );
22156	if( status ) return errno;
22157
22158	/* give thread a chance to complete */
22159	/* it should remain joinable and hence detachable */
22160	sleep( 1 );
22161
22162	status = pthread_detach( &t );
22163	if( status ) return errno;
22164#endif
22165
22166#ifdef HAVE_LINUX_THREADS
22167	pthread_kill_other_threads_np();
22168#endif
22169
22170	return 0;
22171
22172}
22173
22174_ACEOF
22175if ac_fn_c_try_run "$LINENO"
22176then :
22177  ol_cv_pthread_threads=yes
22178else $as_nop
22179  ol_cv_pthread_threads=no
22180fi
22181rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22182  conftest.$ac_objext conftest.beam conftest.$ac_ext
22183fi
22184
22185
22186		# restore the LIBS
22187		LIBS="$ol_LIBS"
22188
22189fi
22190{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
22191printf "%s\n" "$ol_cv_pthread_threads" >&6; }
22192
22193	if test $ol_cv_pthread_threads = yes ; then
22194		ol_link_pthreads="-threads"
22195		ol_link_threads=posix
22196	fi
22197fi
22198
22199
22200		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
22201if test "$ol_link_threads" = no ; then
22202	# try -lpthreads -lmach -lexc -lc_r
22203	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
22204printf %s "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
22205if test ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+y}
22206then :
22207  printf %s "(cached) " >&6
22208else $as_nop
22209
22210		# save the flags
22211		ol_LIBS="$LIBS"
22212		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
22213
22214		if test "$cross_compiling" = yes
22215then :
22216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22217/* end confdefs.h.  */
22218
22219/* pthread test headers */
22220#include <pthread.h>
22221#if HAVE_PTHREADS < 7
22222#include <errno.h>
22223#endif
22224#ifndef NULL
22225#define NULL (void*)0
22226#endif
22227
22228static void *task(p)
22229	void *p;
22230{
22231	return (void *) (p == NULL);
22232}
22233
22234int
22235main (void)
22236{
22237
22238	/* pthread test function */
22239#ifndef PTHREAD_CREATE_DETACHED
22240#define	PTHREAD_CREATE_DETACHED	1
22241#endif
22242	pthread_t t;
22243	int status;
22244	int detach = PTHREAD_CREATE_DETACHED;
22245
22246#if HAVE_PTHREADS > 4
22247	/* Final pthreads */
22248	pthread_attr_t attr;
22249
22250	status = pthread_attr_init(&attr);
22251	if( status ) return status;
22252
22253#if HAVE_PTHREADS < 7
22254	status = pthread_attr_setdetachstate(&attr, &detach);
22255	if( status < 0 ) status = errno;
22256#else
22257	status = pthread_attr_setdetachstate(&attr, detach);
22258#endif
22259	if( status ) return status;
22260	status = pthread_create( &t, &attr, task, NULL );
22261#if HAVE_PTHREADS < 7
22262	if( status < 0 ) status = errno;
22263#endif
22264	if( status ) return status;
22265#else
22266	/* Draft 4 pthreads */
22267	status = pthread_create( &t, pthread_attr_default, task, NULL );
22268	if( status ) return errno;
22269
22270	/* give thread a chance to complete */
22271	/* it should remain joinable and hence detachable */
22272	sleep( 1 );
22273
22274	status = pthread_detach( &t );
22275	if( status ) return errno;
22276#endif
22277
22278#ifdef HAVE_LINUX_THREADS
22279	pthread_kill_other_threads_np();
22280#endif
22281
22282	return 0;
22283
22284  ;
22285  return 0;
22286}
22287_ACEOF
22288if ac_fn_c_try_link "$LINENO"
22289then :
22290  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22291else $as_nop
22292  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22293fi
22294rm -f core conftest.err conftest.$ac_objext conftest.beam \
22295    conftest$ac_exeext conftest.$ac_ext
22296else $as_nop
22297  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22298/* end confdefs.h.  */
22299
22300
22301/* pthread test headers */
22302#include <pthread.h>
22303#if HAVE_PTHREADS < 7
22304#include <errno.h>
22305#endif
22306#ifndef NULL
22307#define NULL (void*)0
22308#endif
22309
22310static void *task(p)
22311	void *p;
22312{
22313	return (void *) (p == NULL);
22314}
22315
22316
22317int main(argc, argv)
22318	int argc;
22319	char **argv;
22320{
22321
22322	/* pthread test function */
22323#ifndef PTHREAD_CREATE_DETACHED
22324#define	PTHREAD_CREATE_DETACHED	1
22325#endif
22326	pthread_t t;
22327	int status;
22328	int detach = PTHREAD_CREATE_DETACHED;
22329
22330#if HAVE_PTHREADS > 4
22331	/* Final pthreads */
22332	pthread_attr_t attr;
22333
22334	status = pthread_attr_init(&attr);
22335	if( status ) return status;
22336
22337#if HAVE_PTHREADS < 7
22338	status = pthread_attr_setdetachstate(&attr, &detach);
22339	if( status < 0 ) status = errno;
22340#else
22341	status = pthread_attr_setdetachstate(&attr, detach);
22342#endif
22343	if( status ) return status;
22344	status = pthread_create( &t, &attr, task, NULL );
22345#if HAVE_PTHREADS < 7
22346	if( status < 0 ) status = errno;
22347#endif
22348	if( status ) return status;
22349#else
22350	/* Draft 4 pthreads */
22351	status = pthread_create( &t, pthread_attr_default, task, NULL );
22352	if( status ) return errno;
22353
22354	/* give thread a chance to complete */
22355	/* it should remain joinable and hence detachable */
22356	sleep( 1 );
22357
22358	status = pthread_detach( &t );
22359	if( status ) return errno;
22360#endif
22361
22362#ifdef HAVE_LINUX_THREADS
22363	pthread_kill_other_threads_np();
22364#endif
22365
22366	return 0;
22367
22368}
22369
22370_ACEOF
22371if ac_fn_c_try_run "$LINENO"
22372then :
22373  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22374else $as_nop
22375  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22376fi
22377rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22378  conftest.$ac_objext conftest.beam conftest.$ac_ext
22379fi
22380
22381
22382		# restore the LIBS
22383		LIBS="$ol_LIBS"
22384
22385fi
22386{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
22387printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
22388
22389	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
22390		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
22391		ol_link_threads=posix
22392	fi
22393fi
22394
22395		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
22396if test "$ol_link_threads" = no ; then
22397	# try -lpthreads -lmach -lexc
22398	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
22399printf %s "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
22400if test ${ol_cv_pthread_lpthreads_lmach_lexc+y}
22401then :
22402  printf %s "(cached) " >&6
22403else $as_nop
22404
22405		# save the flags
22406		ol_LIBS="$LIBS"
22407		LIBS="-lpthreads -lmach -lexc $LIBS"
22408
22409		if test "$cross_compiling" = yes
22410then :
22411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22412/* end confdefs.h.  */
22413
22414/* pthread test headers */
22415#include <pthread.h>
22416#if HAVE_PTHREADS < 7
22417#include <errno.h>
22418#endif
22419#ifndef NULL
22420#define NULL (void*)0
22421#endif
22422
22423static void *task(p)
22424	void *p;
22425{
22426	return (void *) (p == NULL);
22427}
22428
22429int
22430main (void)
22431{
22432
22433	/* pthread test function */
22434#ifndef PTHREAD_CREATE_DETACHED
22435#define	PTHREAD_CREATE_DETACHED	1
22436#endif
22437	pthread_t t;
22438	int status;
22439	int detach = PTHREAD_CREATE_DETACHED;
22440
22441#if HAVE_PTHREADS > 4
22442	/* Final pthreads */
22443	pthread_attr_t attr;
22444
22445	status = pthread_attr_init(&attr);
22446	if( status ) return status;
22447
22448#if HAVE_PTHREADS < 7
22449	status = pthread_attr_setdetachstate(&attr, &detach);
22450	if( status < 0 ) status = errno;
22451#else
22452	status = pthread_attr_setdetachstate(&attr, detach);
22453#endif
22454	if( status ) return status;
22455	status = pthread_create( &t, &attr, task, NULL );
22456#if HAVE_PTHREADS < 7
22457	if( status < 0 ) status = errno;
22458#endif
22459	if( status ) return status;
22460#else
22461	/* Draft 4 pthreads */
22462	status = pthread_create( &t, pthread_attr_default, task, NULL );
22463	if( status ) return errno;
22464
22465	/* give thread a chance to complete */
22466	/* it should remain joinable and hence detachable */
22467	sleep( 1 );
22468
22469	status = pthread_detach( &t );
22470	if( status ) return errno;
22471#endif
22472
22473#ifdef HAVE_LINUX_THREADS
22474	pthread_kill_other_threads_np();
22475#endif
22476
22477	return 0;
22478
22479  ;
22480  return 0;
22481}
22482_ACEOF
22483if ac_fn_c_try_link "$LINENO"
22484then :
22485  ol_cv_pthread_lpthreads_lmach_lexc=yes
22486else $as_nop
22487  ol_cv_pthread_lpthreads_lmach_lexc=no
22488fi
22489rm -f core conftest.err conftest.$ac_objext conftest.beam \
22490    conftest$ac_exeext conftest.$ac_ext
22491else $as_nop
22492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22493/* end confdefs.h.  */
22494
22495
22496/* pthread test headers */
22497#include <pthread.h>
22498#if HAVE_PTHREADS < 7
22499#include <errno.h>
22500#endif
22501#ifndef NULL
22502#define NULL (void*)0
22503#endif
22504
22505static void *task(p)
22506	void *p;
22507{
22508	return (void *) (p == NULL);
22509}
22510
22511
22512int main(argc, argv)
22513	int argc;
22514	char **argv;
22515{
22516
22517	/* pthread test function */
22518#ifndef PTHREAD_CREATE_DETACHED
22519#define	PTHREAD_CREATE_DETACHED	1
22520#endif
22521	pthread_t t;
22522	int status;
22523	int detach = PTHREAD_CREATE_DETACHED;
22524
22525#if HAVE_PTHREADS > 4
22526	/* Final pthreads */
22527	pthread_attr_t attr;
22528
22529	status = pthread_attr_init(&attr);
22530	if( status ) return status;
22531
22532#if HAVE_PTHREADS < 7
22533	status = pthread_attr_setdetachstate(&attr, &detach);
22534	if( status < 0 ) status = errno;
22535#else
22536	status = pthread_attr_setdetachstate(&attr, detach);
22537#endif
22538	if( status ) return status;
22539	status = pthread_create( &t, &attr, task, NULL );
22540#if HAVE_PTHREADS < 7
22541	if( status < 0 ) status = errno;
22542#endif
22543	if( status ) return status;
22544#else
22545	/* Draft 4 pthreads */
22546	status = pthread_create( &t, pthread_attr_default, task, NULL );
22547	if( status ) return errno;
22548
22549	/* give thread a chance to complete */
22550	/* it should remain joinable and hence detachable */
22551	sleep( 1 );
22552
22553	status = pthread_detach( &t );
22554	if( status ) return errno;
22555#endif
22556
22557#ifdef HAVE_LINUX_THREADS
22558	pthread_kill_other_threads_np();
22559#endif
22560
22561	return 0;
22562
22563}
22564
22565_ACEOF
22566if ac_fn_c_try_run "$LINENO"
22567then :
22568  ol_cv_pthread_lpthreads_lmach_lexc=yes
22569else $as_nop
22570  ol_cv_pthread_lpthreads_lmach_lexc=no
22571fi
22572rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22573  conftest.$ac_objext conftest.beam conftest.$ac_ext
22574fi
22575
22576
22577		# restore the LIBS
22578		LIBS="$ol_LIBS"
22579
22580fi
22581{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
22582printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
22583
22584	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
22585		ol_link_pthreads="-lpthreads -lmach -lexc"
22586		ol_link_threads=posix
22587	fi
22588fi
22589
22590		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
22591if test "$ol_link_threads" = no ; then
22592	# try -lpthreads -lexc
22593	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
22594printf %s "checking for pthread link with -lpthreads -lexc... " >&6; }
22595if test ${ol_cv_pthread_lpthreads_lexc+y}
22596then :
22597  printf %s "(cached) " >&6
22598else $as_nop
22599
22600		# save the flags
22601		ol_LIBS="$LIBS"
22602		LIBS="-lpthreads -lexc $LIBS"
22603
22604		if test "$cross_compiling" = yes
22605then :
22606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22607/* end confdefs.h.  */
22608
22609/* pthread test headers */
22610#include <pthread.h>
22611#if HAVE_PTHREADS < 7
22612#include <errno.h>
22613#endif
22614#ifndef NULL
22615#define NULL (void*)0
22616#endif
22617
22618static void *task(p)
22619	void *p;
22620{
22621	return (void *) (p == NULL);
22622}
22623
22624int
22625main (void)
22626{
22627
22628	/* pthread test function */
22629#ifndef PTHREAD_CREATE_DETACHED
22630#define	PTHREAD_CREATE_DETACHED	1
22631#endif
22632	pthread_t t;
22633	int status;
22634	int detach = PTHREAD_CREATE_DETACHED;
22635
22636#if HAVE_PTHREADS > 4
22637	/* Final pthreads */
22638	pthread_attr_t attr;
22639
22640	status = pthread_attr_init(&attr);
22641	if( status ) return status;
22642
22643#if HAVE_PTHREADS < 7
22644	status = pthread_attr_setdetachstate(&attr, &detach);
22645	if( status < 0 ) status = errno;
22646#else
22647	status = pthread_attr_setdetachstate(&attr, detach);
22648#endif
22649	if( status ) return status;
22650	status = pthread_create( &t, &attr, task, NULL );
22651#if HAVE_PTHREADS < 7
22652	if( status < 0 ) status = errno;
22653#endif
22654	if( status ) return status;
22655#else
22656	/* Draft 4 pthreads */
22657	status = pthread_create( &t, pthread_attr_default, task, NULL );
22658	if( status ) return errno;
22659
22660	/* give thread a chance to complete */
22661	/* it should remain joinable and hence detachable */
22662	sleep( 1 );
22663
22664	status = pthread_detach( &t );
22665	if( status ) return errno;
22666#endif
22667
22668#ifdef HAVE_LINUX_THREADS
22669	pthread_kill_other_threads_np();
22670#endif
22671
22672	return 0;
22673
22674  ;
22675  return 0;
22676}
22677_ACEOF
22678if ac_fn_c_try_link "$LINENO"
22679then :
22680  ol_cv_pthread_lpthreads_lexc=yes
22681else $as_nop
22682  ol_cv_pthread_lpthreads_lexc=no
22683fi
22684rm -f core conftest.err conftest.$ac_objext conftest.beam \
22685    conftest$ac_exeext conftest.$ac_ext
22686else $as_nop
22687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22688/* end confdefs.h.  */
22689
22690
22691/* pthread test headers */
22692#include <pthread.h>
22693#if HAVE_PTHREADS < 7
22694#include <errno.h>
22695#endif
22696#ifndef NULL
22697#define NULL (void*)0
22698#endif
22699
22700static void *task(p)
22701	void *p;
22702{
22703	return (void *) (p == NULL);
22704}
22705
22706
22707int main(argc, argv)
22708	int argc;
22709	char **argv;
22710{
22711
22712	/* pthread test function */
22713#ifndef PTHREAD_CREATE_DETACHED
22714#define	PTHREAD_CREATE_DETACHED	1
22715#endif
22716	pthread_t t;
22717	int status;
22718	int detach = PTHREAD_CREATE_DETACHED;
22719
22720#if HAVE_PTHREADS > 4
22721	/* Final pthreads */
22722	pthread_attr_t attr;
22723
22724	status = pthread_attr_init(&attr);
22725	if( status ) return status;
22726
22727#if HAVE_PTHREADS < 7
22728	status = pthread_attr_setdetachstate(&attr, &detach);
22729	if( status < 0 ) status = errno;
22730#else
22731	status = pthread_attr_setdetachstate(&attr, detach);
22732#endif
22733	if( status ) return status;
22734	status = pthread_create( &t, &attr, task, NULL );
22735#if HAVE_PTHREADS < 7
22736	if( status < 0 ) status = errno;
22737#endif
22738	if( status ) return status;
22739#else
22740	/* Draft 4 pthreads */
22741	status = pthread_create( &t, pthread_attr_default, task, NULL );
22742	if( status ) return errno;
22743
22744	/* give thread a chance to complete */
22745	/* it should remain joinable and hence detachable */
22746	sleep( 1 );
22747
22748	status = pthread_detach( &t );
22749	if( status ) return errno;
22750#endif
22751
22752#ifdef HAVE_LINUX_THREADS
22753	pthread_kill_other_threads_np();
22754#endif
22755
22756	return 0;
22757
22758}
22759
22760_ACEOF
22761if ac_fn_c_try_run "$LINENO"
22762then :
22763  ol_cv_pthread_lpthreads_lexc=yes
22764else $as_nop
22765  ol_cv_pthread_lpthreads_lexc=no
22766fi
22767rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22768  conftest.$ac_objext conftest.beam conftest.$ac_ext
22769fi
22770
22771
22772		# restore the LIBS
22773		LIBS="$ol_LIBS"
22774
22775fi
22776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
22777printf "%s\n" "$ol_cv_pthread_lpthreads_lexc" >&6; }
22778
22779	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
22780		ol_link_pthreads="-lpthreads -lexc"
22781		ol_link_threads=posix
22782	fi
22783fi
22784
22785
22786		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
22787if test "$ol_link_threads" = no ; then
22788	# try -lpthreads
22789	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
22790printf %s "checking for pthread link with -lpthreads... " >&6; }
22791if test ${ol_cv_pthread_lib_lpthreads+y}
22792then :
22793  printf %s "(cached) " >&6
22794else $as_nop
22795
22796		# save the flags
22797		ol_LIBS="$LIBS"
22798		LIBS="-lpthreads $LIBS"
22799
22800		if test "$cross_compiling" = yes
22801then :
22802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22803/* end confdefs.h.  */
22804
22805/* pthread test headers */
22806#include <pthread.h>
22807#if HAVE_PTHREADS < 7
22808#include <errno.h>
22809#endif
22810#ifndef NULL
22811#define NULL (void*)0
22812#endif
22813
22814static void *task(p)
22815	void *p;
22816{
22817	return (void *) (p == NULL);
22818}
22819
22820int
22821main (void)
22822{
22823
22824	/* pthread test function */
22825#ifndef PTHREAD_CREATE_DETACHED
22826#define	PTHREAD_CREATE_DETACHED	1
22827#endif
22828	pthread_t t;
22829	int status;
22830	int detach = PTHREAD_CREATE_DETACHED;
22831
22832#if HAVE_PTHREADS > 4
22833	/* Final pthreads */
22834	pthread_attr_t attr;
22835
22836	status = pthread_attr_init(&attr);
22837	if( status ) return status;
22838
22839#if HAVE_PTHREADS < 7
22840	status = pthread_attr_setdetachstate(&attr, &detach);
22841	if( status < 0 ) status = errno;
22842#else
22843	status = pthread_attr_setdetachstate(&attr, detach);
22844#endif
22845	if( status ) return status;
22846	status = pthread_create( &t, &attr, task, NULL );
22847#if HAVE_PTHREADS < 7
22848	if( status < 0 ) status = errno;
22849#endif
22850	if( status ) return status;
22851#else
22852	/* Draft 4 pthreads */
22853	status = pthread_create( &t, pthread_attr_default, task, NULL );
22854	if( status ) return errno;
22855
22856	/* give thread a chance to complete */
22857	/* it should remain joinable and hence detachable */
22858	sleep( 1 );
22859
22860	status = pthread_detach( &t );
22861	if( status ) return errno;
22862#endif
22863
22864#ifdef HAVE_LINUX_THREADS
22865	pthread_kill_other_threads_np();
22866#endif
22867
22868	return 0;
22869
22870  ;
22871  return 0;
22872}
22873_ACEOF
22874if ac_fn_c_try_link "$LINENO"
22875then :
22876  ol_cv_pthread_lib_lpthreads=yes
22877else $as_nop
22878  ol_cv_pthread_lib_lpthreads=no
22879fi
22880rm -f core conftest.err conftest.$ac_objext conftest.beam \
22881    conftest$ac_exeext conftest.$ac_ext
22882else $as_nop
22883  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22884/* end confdefs.h.  */
22885
22886
22887/* pthread test headers */
22888#include <pthread.h>
22889#if HAVE_PTHREADS < 7
22890#include <errno.h>
22891#endif
22892#ifndef NULL
22893#define NULL (void*)0
22894#endif
22895
22896static void *task(p)
22897	void *p;
22898{
22899	return (void *) (p == NULL);
22900}
22901
22902
22903int main(argc, argv)
22904	int argc;
22905	char **argv;
22906{
22907
22908	/* pthread test function */
22909#ifndef PTHREAD_CREATE_DETACHED
22910#define	PTHREAD_CREATE_DETACHED	1
22911#endif
22912	pthread_t t;
22913	int status;
22914	int detach = PTHREAD_CREATE_DETACHED;
22915
22916#if HAVE_PTHREADS > 4
22917	/* Final pthreads */
22918	pthread_attr_t attr;
22919
22920	status = pthread_attr_init(&attr);
22921	if( status ) return status;
22922
22923#if HAVE_PTHREADS < 7
22924	status = pthread_attr_setdetachstate(&attr, &detach);
22925	if( status < 0 ) status = errno;
22926#else
22927	status = pthread_attr_setdetachstate(&attr, detach);
22928#endif
22929	if( status ) return status;
22930	status = pthread_create( &t, &attr, task, NULL );
22931#if HAVE_PTHREADS < 7
22932	if( status < 0 ) status = errno;
22933#endif
22934	if( status ) return status;
22935#else
22936	/* Draft 4 pthreads */
22937	status = pthread_create( &t, pthread_attr_default, task, NULL );
22938	if( status ) return errno;
22939
22940	/* give thread a chance to complete */
22941	/* it should remain joinable and hence detachable */
22942	sleep( 1 );
22943
22944	status = pthread_detach( &t );
22945	if( status ) return errno;
22946#endif
22947
22948#ifdef HAVE_LINUX_THREADS
22949	pthread_kill_other_threads_np();
22950#endif
22951
22952	return 0;
22953
22954}
22955
22956_ACEOF
22957if ac_fn_c_try_run "$LINENO"
22958then :
22959  ol_cv_pthread_lib_lpthreads=yes
22960else $as_nop
22961  ol_cv_pthread_lib_lpthreads=no
22962fi
22963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22964  conftest.$ac_objext conftest.beam conftest.$ac_ext
22965fi
22966
22967
22968		# restore the LIBS
22969		LIBS="$ol_LIBS"
22970
22971fi
22972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
22973printf "%s\n" "$ol_cv_pthread_lib_lpthreads" >&6; }
22974
22975	if test $ol_cv_pthread_lib_lpthreads = yes ; then
22976		ol_link_pthreads="-lpthreads"
22977		ol_link_threads=posix
22978	fi
22979fi
22980
22981
22982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
22983printf "%s\n" "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
22984
22985		if test $ol_link_threads != no ; then
22986			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
22987
22988						save_CPPFLAGS="$CPPFLAGS"
22989			save_LIBS="$LIBS"
22990			LIBS="$LTHREAD_LIBS $LIBS"
22991
22992												ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
22993if test "x$ac_cv_func_sched_yield" = xyes
22994then :
22995  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
22996
22997fi
22998ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
22999if test "x$ac_cv_func_pthread_yield" = xyes
23000then :
23001  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
23002
23003fi
23004ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
23005if test "x$ac_cv_func_thr_yield" = xyes
23006then :
23007  printf "%s\n" "#define HAVE_THR_YIELD 1" >>confdefs.h
23008
23009fi
23010
23011
23012			if test $ac_cv_func_sched_yield = no &&
23013			   test $ac_cv_func_pthread_yield = no &&
23014			   test $ac_cv_func_thr_yield = no ; then
23015								{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
23016printf %s "checking for sched_yield in -lrt... " >&6; }
23017if test ${ac_cv_lib_rt_sched_yield+y}
23018then :
23019  printf %s "(cached) " >&6
23020else $as_nop
23021  ac_check_lib_save_LIBS=$LIBS
23022LIBS="-lrt  $LIBS"
23023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23024/* end confdefs.h.  */
23025
23026/* Override any GCC internal prototype to avoid an error.
23027   Use char because int might match the return type of a GCC
23028   builtin and then its argument prototype would still apply.  */
23029char sched_yield ();
23030int
23031main (void)
23032{
23033return sched_yield ();
23034  ;
23035  return 0;
23036}
23037_ACEOF
23038if ac_fn_c_try_link "$LINENO"
23039then :
23040  ac_cv_lib_rt_sched_yield=yes
23041else $as_nop
23042  ac_cv_lib_rt_sched_yield=no
23043fi
23044rm -f core conftest.err conftest.$ac_objext conftest.beam \
23045    conftest$ac_exeext conftest.$ac_ext
23046LIBS=$ac_check_lib_save_LIBS
23047fi
23048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
23049printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
23050if test "x$ac_cv_lib_rt_sched_yield" = xyes
23051then :
23052  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
23053
23054printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
23055
23056					ac_cv_func_sched_yield=yes
23057else $as_nop
23058  ac_cv_func_sched_yield=no
23059fi
23060
23061			fi
23062			if test $ac_cv_func_sched_yield = no &&
23063			   test $ac_cv_func_pthread_yield = no &&
23064			   test "$ac_cv_func_thr_yield" = no ; then
23065				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
23066printf "%s\n" "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
23067			fi
23068
23069						ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
23070if test "x$ac_cv_func_pthread_kill" = xyes
23071then :
23072  printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
23073
23074fi
23075
23076
23077									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
23078printf %s "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
23079if test ${ol_cv_func_pthread_rwlock_destroy+y}
23080then :
23081  printf %s "(cached) " >&6
23082else $as_nop
23083
23084								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23085/* end confdefs.h.  */
23086
23087#include <pthread.h>
23088pthread_rwlock_t rwlock;
23089
23090int
23091main (void)
23092{
23093pthread_rwlock_destroy(&rwlock);
23094  ;
23095  return 0;
23096}
23097_ACEOF
23098if ac_fn_c_try_link "$LINENO"
23099then :
23100  ol_cv_func_pthread_rwlock_destroy=yes
23101else $as_nop
23102  ol_cv_func_pthread_rwlock_destroy=no
23103fi
23104rm -f core conftest.err conftest.$ac_objext conftest.beam \
23105    conftest$ac_exeext conftest.$ac_ext
23106
23107fi
23108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
23109printf "%s\n" "$ol_cv_func_pthread_rwlock_destroy" >&6; }
23110			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
23111
23112printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
23113
23114			fi
23115
23116									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
23117printf %s "checking for pthread_detach with <pthread.h>... " >&6; }
23118if test ${ol_cv_func_pthread_detach+y}
23119then :
23120  printf %s "(cached) " >&6
23121else $as_nop
23122
23123								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23124/* end confdefs.h.  */
23125
23126#include <pthread.h>
23127#ifndef NULL
23128#define NULL (void*)0
23129#endif
23130
23131int
23132main (void)
23133{
23134pthread_detach(NULL);
23135  ;
23136  return 0;
23137}
23138_ACEOF
23139if ac_fn_c_try_link "$LINENO"
23140then :
23141  ol_cv_func_pthread_detach=yes
23142else $as_nop
23143  ol_cv_func_pthread_detach=no
23144fi
23145rm -f core conftest.err conftest.$ac_objext conftest.beam \
23146    conftest$ac_exeext conftest.$ac_ext
23147
23148fi
23149{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
23150printf "%s\n" "$ol_cv_func_pthread_detach" >&6; }
23151
23152			if test $ol_cv_func_pthread_detach = no ; then
23153				as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
23154			fi
23155
23156
23157printf "%s\n" "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
23158
23159
23160						ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
23161if test "x$ac_cv_func_pthread_setconcurrency" = xyes
23162then :
23163  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
23164
23165fi
23166ac_fn_c_check_func "$LINENO" "pthread_getconcurrency" "ac_cv_func_pthread_getconcurrency"
23167if test "x$ac_cv_func_pthread_getconcurrency" = xyes
23168then :
23169  printf "%s\n" "#define HAVE_PTHREAD_GETCONCURRENCY 1" >>confdefs.h
23170
23171fi
23172ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
23173if test "x$ac_cv_func_thr_setconcurrency" = xyes
23174then :
23175  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
23176
23177fi
23178ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
23179if test "x$ac_cv_func_thr_getconcurrency" = xyes
23180then :
23181  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
23182
23183fi
23184
23185
23186
23187	ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
23188if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes
23189then :
23190  printf "%s\n" "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h
23191
23192fi
23193
23194	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
23195printf %s "checking for LinuxThreads implementation... " >&6; }
23196if test ${ol_cv_sys_linux_threads+y}
23197then :
23198  printf %s "(cached) " >&6
23199else $as_nop
23200  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
23201fi
23202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
23203printf "%s\n" "$ol_cv_sys_linux_threads" >&6; }
23204
23205
23206
23207
23208	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
23209printf %s "checking for LinuxThreads consistency... " >&6; }
23210if test ${ol_cv_linux_threads+y}
23211then :
23212  printf %s "(cached) " >&6
23213else $as_nop
23214
23215		if test $ol_cv_header_linux_threads = yes &&
23216		   test $ol_cv_sys_linux_threads = yes; then
23217			ol_cv_linux_threads=yes
23218		elif test $ol_cv_header_linux_threads = no &&
23219		     test $ol_cv_sys_linux_threads = no; then
23220			ol_cv_linux_threads=no
23221		else
23222			ol_cv_linux_threads=error
23223		fi
23224
23225fi
23226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
23227printf "%s\n" "$ol_cv_linux_threads" >&6; }
23228
23229
23230			if test $ol_cv_linux_threads = error; then
23231				as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
23232			fi
23233
23234			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
23235printf %s "checking if pthread_create() works... " >&6; }
23236if test ${ol_cv_pthread_create_works+y}
23237then :
23238  printf %s "(cached) " >&6
23239else $as_nop
23240
23241			if test "$cross_compiling" = yes
23242then :
23243  				ol_cv_pthread_create_works=yes
23244else $as_nop
23245  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23246/* end confdefs.h.  */
23247
23248
23249/* pthread test headers */
23250#include <pthread.h>
23251#if HAVE_PTHREADS < 7
23252#include <errno.h>
23253#endif
23254#ifndef NULL
23255#define NULL (void*)0
23256#endif
23257
23258static void *task(p)
23259	void *p;
23260{
23261	return (void *) (p == NULL);
23262}
23263
23264
23265int main(argc, argv)
23266	int argc;
23267	char **argv;
23268{
23269
23270	/* pthread test function */
23271#ifndef PTHREAD_CREATE_DETACHED
23272#define	PTHREAD_CREATE_DETACHED	1
23273#endif
23274	pthread_t t;
23275	int status;
23276	int detach = PTHREAD_CREATE_DETACHED;
23277
23278#if HAVE_PTHREADS > 4
23279	/* Final pthreads */
23280	pthread_attr_t attr;
23281
23282	status = pthread_attr_init(&attr);
23283	if( status ) return status;
23284
23285#if HAVE_PTHREADS < 7
23286	status = pthread_attr_setdetachstate(&attr, &detach);
23287	if( status < 0 ) status = errno;
23288#else
23289	status = pthread_attr_setdetachstate(&attr, detach);
23290#endif
23291	if( status ) return status;
23292	status = pthread_create( &t, &attr, task, NULL );
23293#if HAVE_PTHREADS < 7
23294	if( status < 0 ) status = errno;
23295#endif
23296	if( status ) return status;
23297#else
23298	/* Draft 4 pthreads */
23299	status = pthread_create( &t, pthread_attr_default, task, NULL );
23300	if( status ) return errno;
23301
23302	/* give thread a chance to complete */
23303	/* it should remain joinable and hence detachable */
23304	sleep( 1 );
23305
23306	status = pthread_detach( &t );
23307	if( status ) return errno;
23308#endif
23309
23310#ifdef HAVE_LINUX_THREADS
23311	pthread_kill_other_threads_np();
23312#endif
23313
23314	return 0;
23315
23316}
23317
23318_ACEOF
23319if ac_fn_c_try_run "$LINENO"
23320then :
23321  ol_cv_pthread_create_works=yes
23322else $as_nop
23323  ol_cv_pthread_create_works=no
23324fi
23325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23326  conftest.$ac_objext conftest.beam conftest.$ac_ext
23327fi
23328
23329fi
23330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create_works" >&5
23331printf "%s\n" "$ol_cv_pthread_create_works" >&6; }
23332
23333			if test $ol_cv_pthread_create_works = no ; then
23334				as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
23335			fi
23336
23337			ol_replace_broken_yield=no
23338
23339			if test $ol_replace_broken_yield = yes ; then
23340
23341printf "%s\n" "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
23342
23343			fi
23344
23345						if test x$ol_with_yielding_select = xauto ; then
23346				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
23347printf %s "checking if select yields when using pthreads... " >&6; }
23348if test ${ol_cv_pthread_select_yields+y}
23349then :
23350  printf %s "(cached) " >&6
23351else $as_nop
23352
23353				if test "$cross_compiling" = yes
23354then :
23355  ol_cv_pthread_select_yields=cross
23356else $as_nop
23357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23358/* end confdefs.h.  */
23359
23360#include <sys/types.h>
23361#include <sys/time.h>
23362#include <unistd.h>
23363#include <pthread.h>
23364#ifndef NULL
23365#define NULL (void*) 0
23366#endif
23367
23368static int fildes[2];
23369
23370static void *task(p)
23371	void *p;
23372{
23373	int i;
23374	struct timeval tv;
23375
23376	fd_set rfds;
23377
23378	tv.tv_sec=10;
23379	tv.tv_usec=0;
23380
23381	FD_ZERO(&rfds);
23382	FD_SET(fildes[0], &rfds);
23383
23384	/* we're not interested in any fds */
23385	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
23386
23387	if(i < 0) {
23388		perror("select");
23389		exit(10);
23390	}
23391
23392	exit(0); /* if we exit here, the select blocked the whole process */
23393}
23394
23395int main(argc, argv)
23396	int argc;
23397	char **argv;
23398{
23399	pthread_t t;
23400
23401	/* create a pipe to select */
23402	if(pipe(&fildes[0])) {
23403		perror("select");
23404		exit(1);
23405	}
23406
23407#ifdef HAVE_PTHREAD_SETCONCURRENCY
23408	(void) pthread_setconcurrency(2);
23409#else
23410#ifdef HAVE_THR_SETCONCURRENCY
23411	/* Set Solaris LWP concurrency to 2 */
23412	thr_setconcurrency(2);
23413#endif
23414#endif
23415
23416#if HAVE_PTHREADS < 6
23417	pthread_create(&t, pthread_attr_default, task, NULL);
23418#else
23419	pthread_create(&t, NULL, task, NULL);
23420#endif
23421
23422	/* make sure task runs first */
23423#ifdef HAVE_THR_YIELD
23424	thr_yield();
23425#elif defined( HAVE_SCHED_YIELD )
23426	sched_yield();
23427#elif defined( HAVE_PTHREAD_YIELD )
23428	pthread_yield();
23429#endif
23430
23431	exit(2);
23432}
23433_ACEOF
23434if ac_fn_c_try_run "$LINENO"
23435then :
23436  ol_cv_pthread_select_yields=no
23437else $as_nop
23438  ol_cv_pthread_select_yields=yes
23439fi
23440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23441  conftest.$ac_objext conftest.beam conftest.$ac_ext
23442fi
23443
23444fi
23445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
23446printf "%s\n" "$ol_cv_pthread_select_yields" >&6; }
23447
23448				if test $ol_cv_pthread_select_yields = cross ; then
23449					as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
23450				fi
23451
23452				if test $ol_cv_pthread_select_yields = yes ; then
23453					ol_with_yielding_select=yes
23454				fi
23455			fi
23456
23457						CPPFLAGS="$save_CPPFLAGS"
23458			LIBS="$save_LIBS"
23459		else
23460			as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
23461		fi
23462	fi
23463
23464	if test $ol_with_threads = posix ; then
23465		as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
23466	fi
23467	;;
23468esac
23469
23470case $ol_with_threads in auto | yes | mach)
23471
23472		ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
23473if test "x$ac_cv_header_mach_cthreads_h" = xyes
23474then :
23475  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
23476
23477fi
23478ac_fn_c_check_header_compile "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
23479if test "x$ac_cv_header_cthreads_h" = xyes
23480then :
23481  printf "%s\n" "#define HAVE_CTHREADS_H 1" >>confdefs.h
23482
23483fi
23484
23485	if test $ac_cv_header_mach_cthreads_h = yes ; then
23486		ol_with_threads=found
23487
23488				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
23489if test "x$ac_cv_func_cthread_fork" = xyes
23490then :
23491  ol_link_threads=yes
23492fi
23493
23494
23495		if test $ol_link_threads = no ; then
23496									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
23497printf %s "checking for cthread_fork with -all_load... " >&6; }
23498if test ${ol_cv_cthread_all_load+y}
23499then :
23500  printf %s "(cached) " >&6
23501else $as_nop
23502
23503								save_LIBS="$LIBS"
23504				LIBS="-all_load $LIBS"
23505				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23506/* end confdefs.h.  */
23507#include <mach/cthreads.h>
23508int
23509main (void)
23510{
23511
23512					cthread_fork((void *)0, (void *)0);
23513
23514  ;
23515  return 0;
23516}
23517_ACEOF
23518if ac_fn_c_try_link "$LINENO"
23519then :
23520  ol_cv_cthread_all_load=yes
23521else $as_nop
23522  ol_cv_cthread_all_load=no
23523fi
23524rm -f core conftest.err conftest.$ac_objext conftest.beam \
23525    conftest$ac_exeext conftest.$ac_ext
23526								LIBS="$save_LIBS"
23527
23528fi
23529{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
23530printf "%s\n" "$ol_cv_cthread_all_load" >&6; }
23531
23532			if test $ol_cv_cthread_all_load = yes ; then
23533				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
23534				ol_link_threads=mach
23535				ol_with_threads=found
23536			fi
23537		fi
23538
23539	elif test $ac_cv_header_cthreads_h = yes ; then
23540
23541		ol_with_threads=found
23542
23543				save_LIBS="$LIBS"
23544		LIBS="$LIBS -lthreads"
23545		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
23546if test "x$ac_cv_func_cthread_fork" = xyes
23547then :
23548  ol_link_threads=yes
23549fi
23550
23551		LIBS="$save_LIBS"
23552
23553		if test $ol_link_threads = yes ; then
23554			LTHREAD_LIBS="-lthreads"
23555			ol_link_threads=mach
23556			ol_with_threads=found
23557		else
23558			as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
23559		fi
23560
23561	elif test $ol_with_threads = mach ; then
23562		as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
23563	fi
23564
23565	if test $ol_link_threads = mach ; then
23566
23567printf "%s\n" "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
23568
23569	elif test $ol_with_threads = found ; then
23570		as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
23571	fi
23572	;;
23573esac
23574
23575case $ol_with_threads in auto | yes | pth)
23576
23577	ac_fn_c_check_header_compile "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
23578if test "x$ac_cv_header_pth_h" = xyes
23579then :
23580  printf "%s\n" "#define HAVE_PTH_H 1" >>confdefs.h
23581
23582fi
23583
23584
23585	if test $ac_cv_header_pth_h = yes ; then
23586		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
23587printf %s "checking for pth_version in -lpth... " >&6; }
23588if test ${ac_cv_lib_pth_pth_version+y}
23589then :
23590  printf %s "(cached) " >&6
23591else $as_nop
23592  ac_check_lib_save_LIBS=$LIBS
23593LIBS="-lpth  $LIBS"
23594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23595/* end confdefs.h.  */
23596
23597/* Override any GCC internal prototype to avoid an error.
23598   Use char because int might match the return type of a GCC
23599   builtin and then its argument prototype would still apply.  */
23600char pth_version ();
23601int
23602main (void)
23603{
23604return pth_version ();
23605  ;
23606  return 0;
23607}
23608_ACEOF
23609if ac_fn_c_try_link "$LINENO"
23610then :
23611  ac_cv_lib_pth_pth_version=yes
23612else $as_nop
23613  ac_cv_lib_pth_pth_version=no
23614fi
23615rm -f core conftest.err conftest.$ac_objext conftest.beam \
23616    conftest$ac_exeext conftest.$ac_ext
23617LIBS=$ac_check_lib_save_LIBS
23618fi
23619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
23620printf "%s\n" "$ac_cv_lib_pth_pth_version" >&6; }
23621if test "x$ac_cv_lib_pth_pth_version" = xyes
23622then :
23623  have_pth=yes
23624else $as_nop
23625  have_pth=no
23626fi
23627
23628
23629		if test $have_pth = yes ; then
23630
23631printf "%s\n" "#define HAVE_GNU_PTH 1" >>confdefs.h
23632
23633			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
23634			ol_link_threads=pth
23635			ol_with_threads=found
23636
23637			if test x$ol_with_yielding_select = xauto ; then
23638				ol_with_yielding_select=yes
23639			fi
23640		fi
23641	fi
23642	;;
23643esac
23644
23645case $ol_with_threads in auto | yes | lwp)
23646
23647		ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
23648if test "x$ac_cv_header_thread_h" = xyes
23649then :
23650  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
23651
23652fi
23653ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
23654if test "x$ac_cv_header_synch_h" = xyes
23655then :
23656  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
23657
23658fi
23659
23660	if test $ac_cv_header_thread_h = yes &&
23661	   test $ac_cv_header_synch_h = yes ; then
23662		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
23663printf %s "checking for thr_create in -lthread... " >&6; }
23664if test ${ac_cv_lib_thread_thr_create+y}
23665then :
23666  printf %s "(cached) " >&6
23667else $as_nop
23668  ac_check_lib_save_LIBS=$LIBS
23669LIBS="-lthread  $LIBS"
23670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23671/* end confdefs.h.  */
23672
23673/* Override any GCC internal prototype to avoid an error.
23674   Use char because int might match the return type of a GCC
23675   builtin and then its argument prototype would still apply.  */
23676char thr_create ();
23677int
23678main (void)
23679{
23680return thr_create ();
23681  ;
23682  return 0;
23683}
23684_ACEOF
23685if ac_fn_c_try_link "$LINENO"
23686then :
23687  ac_cv_lib_thread_thr_create=yes
23688else $as_nop
23689  ac_cv_lib_thread_thr_create=no
23690fi
23691rm -f core conftest.err conftest.$ac_objext conftest.beam \
23692    conftest$ac_exeext conftest.$ac_ext
23693LIBS=$ac_check_lib_save_LIBS
23694fi
23695{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
23696printf "%s\n" "$ac_cv_lib_thread_thr_create" >&6; }
23697if test "x$ac_cv_lib_thread_thr_create" = xyes
23698then :
23699  have_thr=yes
23700else $as_nop
23701  have_thr=no
23702fi
23703
23704
23705		if test $have_thr = yes ; then
23706
23707printf "%s\n" "#define HAVE_THR 1" >>confdefs.h
23708
23709			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
23710			ol_link_threads=thr
23711
23712			if test x$ol_with_yielding_select = xauto ; then
23713				ol_with_yielding_select=yes
23714			fi
23715
23716						ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
23717if test "x$ac_cv_func_thr_setconcurrency" = xyes
23718then :
23719  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
23720
23721fi
23722ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
23723if test "x$ac_cv_func_thr_getconcurrency" = xyes
23724then :
23725  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
23726
23727fi
23728
23729		fi
23730	fi
23731
23732		ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23733if test "x$ac_cv_header_lwp_lwp_h" = xyes
23734then :
23735  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
23736
23737fi
23738
23739	if test $ac_cv_header_lwp_lwp_h = yes ; then
23740		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
23741printf %s "checking for lwp_create in -llwp... " >&6; }
23742if test ${ac_cv_lib_lwp_lwp_create+y}
23743then :
23744  printf %s "(cached) " >&6
23745else $as_nop
23746  ac_check_lib_save_LIBS=$LIBS
23747LIBS="-llwp  $LIBS"
23748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23749/* end confdefs.h.  */
23750
23751/* Override any GCC internal prototype to avoid an error.
23752   Use char because int might match the return type of a GCC
23753   builtin and then its argument prototype would still apply.  */
23754char lwp_create ();
23755int
23756main (void)
23757{
23758return lwp_create ();
23759  ;
23760  return 0;
23761}
23762_ACEOF
23763if ac_fn_c_try_link "$LINENO"
23764then :
23765  ac_cv_lib_lwp_lwp_create=yes
23766else $as_nop
23767  ac_cv_lib_lwp_lwp_create=no
23768fi
23769rm -f core conftest.err conftest.$ac_objext conftest.beam \
23770    conftest$ac_exeext conftest.$ac_ext
23771LIBS=$ac_check_lib_save_LIBS
23772fi
23773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
23774printf "%s\n" "$ac_cv_lib_lwp_lwp_create" >&6; }
23775if test "x$ac_cv_lib_lwp_lwp_create" = xyes
23776then :
23777  have_lwp=yes
23778else $as_nop
23779  have_lwp=no
23780fi
23781
23782
23783		if test $have_lwp = yes ; then
23784
23785printf "%s\n" "#define HAVE_LWP 1" >>confdefs.h
23786
23787			LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
23788			ol_link_threads=lwp
23789
23790			if test x$ol_with_yielding_select = xauto ; then
23791				ol_with_yielding_select=no
23792			fi
23793		fi
23794	fi
23795	;;
23796esac
23797
23798if test $ol_with_yielding_select = yes ; then
23799
23800printf "%s\n" "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
23801
23802fi
23803
23804if test $ol_with_threads = manual ; then
23805		ol_link_threads=yes
23806
23807	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
23808printf "%s\n" "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
23809
23810	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
23811if test "x$ac_cv_header_pthread_h" = xyes
23812then :
23813  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
23814
23815fi
23816ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
23817if test "x$ac_cv_header_sched_h" = xyes
23818then :
23819  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
23820
23821fi
23822
23823	ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
23824if test "x$ac_cv_func_sched_yield" = xyes
23825then :
23826  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
23827
23828fi
23829ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
23830if test "x$ac_cv_func_pthread_yield" = xyes
23831then :
23832  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
23833
23834fi
23835
23836
23837	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
23838printf %s "checking for LinuxThreads pthread.h... " >&6; }
23839if test ${ol_cv_header_linux_threads+y}
23840then :
23841  printf %s "(cached) " >&6
23842else $as_nop
23843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23844/* end confdefs.h.  */
23845#include <pthread.h>
23846_ACEOF
23847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23848  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
23849then :
23850  ol_cv_header_linux_threads=yes
23851else $as_nop
23852  ol_cv_header_linux_threads=no
23853fi
23854rm -rf conftest*
23855
23856
23857fi
23858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
23859printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
23860	if test $ol_cv_header_linux_threads = yes; then
23861
23862printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
23863
23864	fi
23865
23866
23867	ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
23868if test "x$ac_cv_header_mach_cthreads_h" = xyes
23869then :
23870  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
23871
23872fi
23873
23874	ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23875if test "x$ac_cv_header_lwp_lwp_h" = xyes
23876then :
23877  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
23878
23879fi
23880
23881	ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
23882if test "x$ac_cv_header_thread_h" = xyes
23883then :
23884  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
23885
23886fi
23887ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
23888if test "x$ac_cv_header_synch_h" = xyes
23889then :
23890  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
23891
23892fi
23893
23894fi
23895
23896if test $ol_link_threads != no && test $ol_link_threads != nt ; then
23897
23898printf "%s\n" "#define REENTRANT 1" >>confdefs.h
23899
23900
23901printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
23902
23903
23904printf "%s\n" "#define THREAD_SAFE 1" >>confdefs.h
23905
23906
23907printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
23908
23909
23910printf "%s\n" "#define THREADSAFE 1" >>confdefs.h
23911
23912
23913printf "%s\n" "#define _THREADSAFE 1" >>confdefs.h
23914
23915
23916printf "%s\n" "#define _SGI_MP_SOURCE 1" >>confdefs.h
23917
23918
23919			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
23920printf %s "checking for thread specific errno... " >&6; }
23921if test ${ol_cv_errno_thread_specific+y}
23922then :
23923  printf %s "(cached) " >&6
23924else $as_nop
23925
23926		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23927/* end confdefs.h.  */
23928#include <errno.h>
23929int
23930main (void)
23931{
23932errno = 0;
23933  ;
23934  return 0;
23935}
23936_ACEOF
23937if ac_fn_c_try_link "$LINENO"
23938then :
23939  ol_cv_errno_thread_specific=yes
23940else $as_nop
23941  ol_cv_errno_thread_specific=no
23942fi
23943rm -f core conftest.err conftest.$ac_objext conftest.beam \
23944    conftest$ac_exeext conftest.$ac_ext
23945
23946fi
23947{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
23948printf "%s\n" "$ol_cv_errno_thread_specific" >&6; }
23949
23950			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
23951printf %s "checking for thread specific h_errno... " >&6; }
23952if test ${ol_cv_h_errno_thread_specific+y}
23953then :
23954  printf %s "(cached) " >&6
23955else $as_nop
23956
23957		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23958/* end confdefs.h.  */
23959#include <netdb.h>
23960int
23961main (void)
23962{
23963h_errno = 0;
23964  ;
23965  return 0;
23966}
23967_ACEOF
23968if ac_fn_c_try_link "$LINENO"
23969then :
23970  ol_cv_h_errno_thread_specific=yes
23971else $as_nop
23972  ol_cv_h_errno_thread_specific=no
23973fi
23974rm -f core conftest.err conftest.$ac_objext conftest.beam \
23975    conftest$ac_exeext conftest.$ac_ext
23976
23977fi
23978{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
23979printf "%s\n" "$ol_cv_h_errno_thread_specific" >&6; }
23980
23981	if test $ol_cv_errno_thread_specific != yes ||
23982	   test $ol_cv_h_errno_thread_specific != yes ; then
23983		LIBS="$LTHREAD_LIBS $LIBS"
23984		LTHREAD_LIBS=""
23985	fi
23986
23987fi
23988
23989if test $ol_link_threads = no ; then
23990	if test $ol_with_threads = yes ; then
23991		as_fn_error $? "no suitable thread support" "$LINENO" 5
23992	fi
23993
23994	if test $ol_with_threads = auto ; then
23995		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
23996printf "%s\n" "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
23997		ol_with_threads=no
23998	fi
23999
24000
24001printf "%s\n" "#define NO_THREADS 1" >>confdefs.h
24002
24003	LTHREAD_LIBS=""
24004	BUILD_THREAD=no
24005else
24006	BUILD_THREAD=yes
24007fi
24008
24009if test $ol_link_threads != no ; then
24010
24011printf "%s\n" "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
24012
24013fi
24014
24015# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
24016case "$ol_with_threads" in
24017 no)
24018    ol_pthread_ok=no
24019
24020    ;;
24021 *)
24022    ol_found_pthreads=yes
24023    ;;
24024esac
24025
24026ac_ext=c
24027ac_cpp='$CPP $CPPFLAGS'
24028ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24029ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24030ac_compiler_gnu=$ac_cv_c_compiler_gnu
24031
24032
24033
24034
24035
24036
24037    case "$ol_found_pthreads" in
24038     yes)
24039	saved_LIBS="$LIBS"
24040	LIBS="$LTHREAD_LIBS $LIBS"
24041	saved_CFLAGS="$CFLAGS"
24042	CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
24043	ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
24044if test "x$ac_cv_func_sem_timedwait" = xyes
24045then :
24046  printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
24047
24048fi
24049
24050	LIBS="$saved_LIBS"
24051	{ saved_LIBS=; unset saved_LIBS;}
24052	CFLAGS="$saved_CFLAGS"
24053	{ saved_CFLAGS=; unset saved_CFLAGS;}
24054	case "$ac_cv_func_sem_timedwait" in
24055	 yes)
24056	    PTHREAD_LIBS="$LTHREAD_LIBS"
24057	    have_pthreads=yes
24058	esac
24059    esac
24060esac
24061
24062case "$have_pthreads" in
24063 yes)
24064    CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
24065    saved_LIBS="$LIBS"
24066    LIBS="$LTHREAD_LIBS $LIBS"
24067    saved_CFLAGS="$CFLAGS"
24068    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
24069    # The cast to long int works around a bug in the HP C Compiler
24070# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24071# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24072# This bug is HP SR number 8606223364.
24073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
24074printf %s "checking size of pthread_t... " >&6; }
24075if test ${ac_cv_sizeof_pthread_t+y}
24076then :
24077  printf %s "(cached) " >&6
24078else $as_nop
24079  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
24080	    $ac_includes_default
24081	    #include <pthread.h>
24082
24083
24084"
24085then :
24086
24087else $as_nop
24088  if test "$ac_cv_type_pthread_t" = yes; then
24089     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24090printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
24091as_fn_error 77 "cannot compute sizeof (pthread_t)
24092See \`config.log' for more details" "$LINENO" 5; }
24093   else
24094     ac_cv_sizeof_pthread_t=0
24095   fi
24096fi
24097
24098fi
24099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
24100printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
24101
24102
24103
24104printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
24105
24106
24107    LIBISC_PTHREADS_NOTHREADS=pthreads
24108
24109printf "%s\n" "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
24110
24111    #
24112    # We'd like to use sigwait() too
24113    #
24114    ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
24115if test "x$ac_cv_func_sigwait" = xyes
24116then :
24117  have_sigwait=yes
24118else $as_nop
24119  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
24120printf %s "checking for sigwait in -lc... " >&6; }
24121if test ${ac_cv_lib_c_sigwait+y}
24122then :
24123  printf %s "(cached) " >&6
24124else $as_nop
24125  ac_check_lib_save_LIBS=$LIBS
24126LIBS="-lc  $LIBS"
24127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24128/* end confdefs.h.  */
24129
24130/* Override any GCC internal prototype to avoid an error.
24131   Use char because int might match the return type of a GCC
24132   builtin and then its argument prototype would still apply.  */
24133char sigwait ();
24134int
24135main (void)
24136{
24137return sigwait ();
24138  ;
24139  return 0;
24140}
24141_ACEOF
24142if ac_fn_c_try_link "$LINENO"
24143then :
24144  ac_cv_lib_c_sigwait=yes
24145else $as_nop
24146  ac_cv_lib_c_sigwait=no
24147fi
24148rm -f core conftest.err conftest.$ac_objext conftest.beam \
24149    conftest$ac_exeext conftest.$ac_ext
24150LIBS=$ac_check_lib_save_LIBS
24151fi
24152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
24153printf "%s\n" "$ac_cv_lib_c_sigwait" >&6; }
24154if test "x$ac_cv_lib_c_sigwait" = xyes
24155then :
24156  have_sigwait=yes
24157else $as_nop
24158  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
24159printf %s "checking for sigwait in -lpthread... " >&6; }
24160if test ${ac_cv_lib_pthread_sigwait+y}
24161then :
24162  printf %s "(cached) " >&6
24163else $as_nop
24164  ac_check_lib_save_LIBS=$LIBS
24165LIBS="-lpthread  $LIBS"
24166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24167/* end confdefs.h.  */
24168
24169/* Override any GCC internal prototype to avoid an error.
24170   Use char because int might match the return type of a GCC
24171   builtin and then its argument prototype would still apply.  */
24172char sigwait ();
24173int
24174main (void)
24175{
24176return sigwait ();
24177  ;
24178  return 0;
24179}
24180_ACEOF
24181if ac_fn_c_try_link "$LINENO"
24182then :
24183  ac_cv_lib_pthread_sigwait=yes
24184else $as_nop
24185  ac_cv_lib_pthread_sigwait=no
24186fi
24187rm -f core conftest.err conftest.$ac_objext conftest.beam \
24188    conftest$ac_exeext conftest.$ac_ext
24189LIBS=$ac_check_lib_save_LIBS
24190fi
24191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
24192printf "%s\n" "$ac_cv_lib_pthread_sigwait" >&6; }
24193if test "x$ac_cv_lib_pthread_sigwait" = xyes
24194then :
24195  have_sigwait=yes
24196else $as_nop
24197  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
24198printf %s "checking for _Psigwait in -lpthread... " >&6; }
24199if test ${ac_cv_lib_pthread__Psigwait+y}
24200then :
24201  printf %s "(cached) " >&6
24202else $as_nop
24203  ac_check_lib_save_LIBS=$LIBS
24204LIBS="-lpthread  $LIBS"
24205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24206/* end confdefs.h.  */
24207
24208/* Override any GCC internal prototype to avoid an error.
24209   Use char because int might match the return type of a GCC
24210   builtin and then its argument prototype would still apply.  */
24211char _Psigwait ();
24212int
24213main (void)
24214{
24215return _Psigwait ();
24216  ;
24217  return 0;
24218}
24219_ACEOF
24220if ac_fn_c_try_link "$LINENO"
24221then :
24222  ac_cv_lib_pthread__Psigwait=yes
24223else $as_nop
24224  ac_cv_lib_pthread__Psigwait=no
24225fi
24226rm -f core conftest.err conftest.$ac_objext conftest.beam \
24227    conftest$ac_exeext conftest.$ac_ext
24228LIBS=$ac_check_lib_save_LIBS
24229fi
24230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
24231printf "%s\n" "$ac_cv_lib_pthread__Psigwait" >&6; }
24232if test "x$ac_cv_lib_pthread__Psigwait" = xyes
24233then :
24234  have_sigwait=yes
24235else $as_nop
24236  have_sigwait=no
24237
24238fi
24239
24240
24241fi
24242
24243
24244fi
24245
24246
24247fi
24248
24249    case "$host:$have_sigwait" in
24250     *-freebsd*:no)
24251	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
24252printf %s "checking for sigwait in -lc_r... " >&6; }
24253if test ${ac_cv_lib_c_r_sigwait+y}
24254then :
24255  printf %s "(cached) " >&6
24256else $as_nop
24257  ac_check_lib_save_LIBS=$LIBS
24258LIBS="-lc_r  $LIBS"
24259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24260/* end confdefs.h.  */
24261
24262/* Override any GCC internal prototype to avoid an error.
24263   Use char because int might match the return type of a GCC
24264   builtin and then its argument prototype would still apply.  */
24265char sigwait ();
24266int
24267main (void)
24268{
24269return sigwait ();
24270  ;
24271  return 0;
24272}
24273_ACEOF
24274if ac_fn_c_try_link "$LINENO"
24275then :
24276  ac_cv_lib_c_r_sigwait=yes
24277else $as_nop
24278  ac_cv_lib_c_r_sigwait=no
24279fi
24280rm -f core conftest.err conftest.$ac_objext conftest.beam \
24281    conftest$ac_exeext conftest.$ac_ext
24282LIBS=$ac_check_lib_save_LIBS
24283fi
24284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
24285printf "%s\n" "$ac_cv_lib_c_r_sigwait" >&6; }
24286if test "x$ac_cv_lib_c_r_sigwait" = xyes
24287then :
24288  have_sigwait=yes
24289
24290fi
24291
24292    esac
24293    case "$have_sigwait" in
24294     yes)
24295	ac_cv_func_sigwait=yes
24296
24297printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
24298
24299    esac
24300
24301    ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
24302if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes
24303then :
24304  printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1" >>confdefs.h
24305
24306fi
24307
24308    ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize"
24309if test "x$ac_cv_func_pthread_attr_setstacksize" = xyes
24310then :
24311  printf "%s\n" "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h
24312
24313fi
24314ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
24315if test "x$ac_cv_func_sysconf" = xyes
24316then :
24317  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
24318
24319fi
24320
24321
24322    case "$host" in
24323     *-freebsd5.[012]|*-freebsd5.[012].*)
24324	;;
24325     *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
24326
24327printf "%s\n" "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
24328
24329	;;
24330     *-bsdi3.*|*-bsdi4.0*)
24331
24332printf "%s\n" "#define NEED_PTHREAD_INIT 1" >>confdefs.h
24333
24334	;;
24335     *-linux*)
24336
24337printf "%s\n" "#define HAVE_LINUXTHREADS 1" >>confdefs.h
24338
24339	;;
24340     *-solaris*)
24341	printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
24342
24343	ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
24344if test "x$ac_cv_func_pthread_setconcurrency" = xyes
24345then :
24346  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
24347
24348fi
24349
24350	case "$ac_cv_func_pthread_setconcurrency" in
24351	 yes)
24352
24353printf "%s\n" "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
24354
24355	esac
24356	;;
24357     *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
24358
24359printf "%s\n" "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
24360
24361	;;
24362    esac
24363    hack_shutup_pthreadonceinit=no
24364    case "$host" in
24365     *-aix5.[123].*)
24366	hack_shutup_pthreadonceinit=yes
24367	;;
24368     *-solaris2.[89])
24369	hack_shutup_pthreadonceinit=yes
24370	;;
24371     *-solaris2.1[0-9])
24372	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
24373printf %s "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
24374if test ${ntp_cv_braces_around_pthread_once_init+y}
24375then :
24376  printf %s "(cached) " >&6
24377else $as_nop
24378  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24379/* end confdefs.h.  */
24380
24381			#include <pthread.h>
24382
24383int
24384main (void)
24385{
24386
24387		        static pthread_once_t once_test =
24388						PTHREAD_ONCE_INIT;
24389
24390
24391  ;
24392  return 0;
24393}
24394_ACEOF
24395if ac_fn_c_try_compile "$LINENO"
24396then :
24397  ntp_cv_braces_around_pthread_once_init=no
24398else $as_nop
24399  ntp_cv_braces_around_pthread_once_init=yes
24400
24401fi
24402rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24403
24404fi
24405{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
24406printf "%s\n" "$ntp_cv_braces_around_pthread_once_init" >&6; }
24407	case "$ntp_cv_braces_around_pthread_once_init" in
24408	 yes)
24409	    hack_shutup_pthreadonceinit=yes
24410	esac
24411	;;
24412    esac
24413    case "$hack_shutup_pthreadonceinit" in
24414     yes)
24415
24416printf "%s\n" "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
24417
24418    esac
24419    LIBS="$saved_LIBS"
24420    { saved_LIBS=; unset saved_LIBS;}
24421    CFLAGS="$saved_CFLAGS"
24422    { saved_CFLAGS=; unset saved_CFLAGS;}
24423    ;;
24424 *)
24425    LIBISC_PTHREADS_NOTHREADS=nothreads
24426    ;;
24427esac
24428
24429 if test "$have_pthreads" != "no"; then
24430  PTHREADS_TRUE=
24431  PTHREADS_FALSE='#'
24432else
24433  PTHREADS_TRUE='#'
24434  PTHREADS_FALSE=
24435fi
24436
24437
24438
24439
24440
24441
24442
24443case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
24444 no:yes)
24445    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
24446printf %s "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
24447if test ${ntp_cv_vsnprintf_percent_m+y}
24448then :
24449  printf %s "(cached) " >&6
24450else $as_nop
24451  if test "$cross_compiling" = yes
24452then :
24453  ntp_cv_vsnprintf_percent_m=no
24454
24455else $as_nop
24456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24457/* end confdefs.h.  */
24458
24459		    #include <stdarg.h>
24460		    #include <errno.h>
24461		    #include <stdio.h>
24462		    #include <string.h>
24463
24464		    int call_vsnprintf(
24465			    char *	dst,
24466			    size_t	sz,
24467			    const char *fmt,
24468			    ...
24469			    );
24470
24471		    int call_vsnprintf(
24472			    char *	dst,
24473			    size_t	sz,
24474			    const char *fmt,
24475			    ...
24476			    )
24477		    {
24478			    va_list	ap;
24479			    int		rc;
24480
24481			    va_start(ap, fmt);
24482			    rc = vsnprintf(dst, sz, fmt, ap);
24483			    va_end(ap);
24484
24485			    return rc;
24486		    }
24487
24488int
24489main (void)
24490{
24491
24492		    char	sbuf[512];
24493		    char	pbuf[512];
24494		    int		slen;
24495
24496		    strcpy(sbuf, strerror(ENOENT));
24497		    errno = ENOENT;
24498		    slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
24499					  "wrong");
24500		    return strcmp(sbuf, pbuf);
24501
24502
24503  ;
24504  return 0;
24505}
24506_ACEOF
24507if ac_fn_c_try_run "$LINENO"
24508then :
24509  ntp_cv_vsnprintf_percent_m=yes
24510else $as_nop
24511  ntp_cv_vsnprintf_percent_m=no
24512fi
24513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24514  conftest.$ac_objext conftest.beam conftest.$ac_ext
24515fi
24516
24517
24518fi
24519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
24520printf "%s\n" "$ntp_cv_vsnprintf_percent_m" >&6; }
24521    case "$ntp_cv_vsnprintf_percent_m" in
24522     yes)
24523
24524printf "%s\n" "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
24525
24526    esac
24527esac
24528
24529ac_fn_c_check_header_compile "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
24530if test "x$ac_cv_header_sys_clockctl_h" = xyes
24531then :
24532  printf "%s\n" "#define HAVE_SYS_CLOCKCTL_H 1" >>confdefs.h
24533
24534fi
24535
24536
24537# Check whether --enable-clockctl was given.
24538if test ${enable_clockctl+y}
24539then :
24540  enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
24541else $as_nop
24542  ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
24543
24544fi
24545
24546
24547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
24548printf %s "checking if we should use /dev/clockctl... " >&6; }
24549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
24550printf "%s\n" "$ntp_use_dev_clockctl" >&6; }
24551
24552
24553ac_fn_c_check_header_compile "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
24554if test "x$ac_cv_header_sys_capability_h" = xyes
24555then :
24556  printf "%s\n" "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
24557
24558fi
24559ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
24560if test "x$ac_cv_header_sys_prctl_h" = xyes
24561then :
24562  printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
24563
24564fi
24565
24566
24567{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
24568printf %s "checking if we have linux capabilities (libcap)... " >&6; }
24569
24570case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
24571 yesyes)
24572    case "$host" in
24573     mips-sgi-irix*)
24574	ntp_have_linuxcaps=no
24575	;;
24576     *) ntp_have_linuxcaps=yes
24577	;;
24578    esac
24579    ;;
24580 *)
24581    ntp_have_linuxcaps=no
24582    ;;
24583esac
24584
24585# Check whether --enable-linuxcaps was given.
24586if test ${enable_linuxcaps+y}
24587then :
24588  enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
24589
24590fi
24591
24592
24593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
24594printf "%s\n" "$ntp_have_linuxcaps" >&6; }
24595
24596case "$ntp_have_linuxcaps" in
24597 yes)
24598
24599printf "%s\n" "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
24600
24601    LIBS="$LIBS -lcap"
24602    ;;
24603esac
24604
24605
24606ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
24607if test "x$ac_cv_header_priv_h" = xyes
24608then :
24609  printf "%s\n" "#define HAVE_PRIV_H 1" >>confdefs.h
24610
24611fi
24612
24613case "$ac_cv_header_priv_h" in
24614 yes)
24615    case "$host" in
24616     *-solaris*)
24617	ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
24618if test "x$ac_cv_func_setppriv" = xyes
24619then :
24620  ntp_have_solarisprivs=yes
24621else $as_nop
24622  ntp_have_solarisprivs=no
24623
24624fi
24625
24626	;;
24627    esac
24628esac
24629
24630# Check whether --enable-solarisprivs was given.
24631if test ${enable_solarisprivs+y}
24632then :
24633  enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
24634
24635fi
24636
24637
24638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
24639printf %s "checking if we have solaris privileges... " >&6; }
24640
24641case "$ntp_have_solarisprivs" in
24642 yes)
24643
24644printf "%s\n" "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
24645
24646    ;;
24647 '') ntp_have_solarisprivs="no"
24648    ;;
24649esac
24650
24651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
24652printf "%s\n" "$ntp_have_solarisprivs" >&6; }
24653
24654ac_fn_c_check_header_compile "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
24655if test "x$ac_cv_header_sys_mac_h" = xyes
24656then :
24657  printf "%s\n" "#define HAVE_SYS_MAC_H 1" >>confdefs.h
24658
24659fi
24660
24661
24662# Check whether --enable-trustedbsd_mac was given.
24663if test ${enable_trustedbsd_mac+y}
24664then :
24665  enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
24666
24667fi
24668
24669
24670{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
24671printf %s "checking if we should use TrustedBSD MAC privileges... " >&6; }
24672
24673case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
24674 yesyes)
24675
24676printf "%s\n" "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
24677
24678    ;;
24679 *) ntp_use_trustedbsd_mac="no";
24680    ;;
24681esac
24682
24683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
24684printf "%s\n" "$ntp_use_trustedbsd_mac" >&6; }
24685
24686case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
24687 *yes*)
24688
24689printf "%s\n" "#define HAVE_DROPROOT 1" >>confdefs.h
24690
24691esac
24692
24693case "$host" in
24694 *-*-darwin*)
24695    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
24696printf %s "checking for library containing res_9_init... " >&6; }
24697if test ${ac_cv_search_res_9_init+y}
24698then :
24699  printf %s "(cached) " >&6
24700else $as_nop
24701  ac_func_search_save_LIBS=$LIBS
24702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24703/* end confdefs.h.  */
24704
24705/* Override any GCC internal prototype to avoid an error.
24706   Use char because int might match the return type of a GCC
24707   builtin and then its argument prototype would still apply.  */
24708char res_9_init ();
24709int
24710main (void)
24711{
24712return res_9_init ();
24713  ;
24714  return 0;
24715}
24716_ACEOF
24717for ac_lib in '' resolv
24718do
24719  if test -z "$ac_lib"; then
24720    ac_res="none required"
24721  else
24722    ac_res=-l$ac_lib
24723    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24724  fi
24725  if ac_fn_c_try_link "$LINENO"
24726then :
24727  ac_cv_search_res_9_init=$ac_res
24728fi
24729rm -f core conftest.err conftest.$ac_objext conftest.beam \
24730    conftest$ac_exeext
24731  if test ${ac_cv_search_res_9_init+y}
24732then :
24733  break
24734fi
24735done
24736if test ${ac_cv_search_res_9_init+y}
24737then :
24738
24739else $as_nop
24740  ac_cv_search_res_9_init=no
24741fi
24742rm conftest.$ac_ext
24743LIBS=$ac_func_search_save_LIBS
24744fi
24745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
24746printf "%s\n" "$ac_cv_search_res_9_init" >&6; }
24747ac_res=$ac_cv_search_res_9_init
24748if test "$ac_res" != no
24749then :
24750  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24751
24752fi
24753
24754    ;;
24755 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
24756printf %s "checking for library containing res_init... " >&6; }
24757if test ${ac_cv_search_res_init+y}
24758then :
24759  printf %s "(cached) " >&6
24760else $as_nop
24761  ac_func_search_save_LIBS=$LIBS
24762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24763/* end confdefs.h.  */
24764
24765/* Override any GCC internal prototype to avoid an error.
24766   Use char because int might match the return type of a GCC
24767   builtin and then its argument prototype would still apply.  */
24768char res_init ();
24769int
24770main (void)
24771{
24772return res_init ();
24773  ;
24774  return 0;
24775}
24776_ACEOF
24777for ac_lib in '' resolv
24778do
24779  if test -z "$ac_lib"; then
24780    ac_res="none required"
24781  else
24782    ac_res=-l$ac_lib
24783    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24784  fi
24785  if ac_fn_c_try_link "$LINENO"
24786then :
24787  ac_cv_search_res_init=$ac_res
24788fi
24789rm -f core conftest.err conftest.$ac_objext conftest.beam \
24790    conftest$ac_exeext
24791  if test ${ac_cv_search_res_init+y}
24792then :
24793  break
24794fi
24795done
24796if test ${ac_cv_search_res_init+y}
24797then :
24798
24799else $as_nop
24800  ac_cv_search_res_init=no
24801fi
24802rm conftest.$ac_ext
24803LIBS=$ac_func_search_save_LIBS
24804fi
24805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
24806printf "%s\n" "$ac_cv_search_res_init" >&6; }
24807ac_res=$ac_cv_search_res_init
24808if test "$ac_res" != no
24809then :
24810  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24811
24812fi
24813
24814    ;;
24815esac
24816ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_TYPES_H
24817#  include <sys/types.h>
24818#endif
24819#ifdef HAVE_NETINET_IN_H
24820#  include <netinet/in.h>   /* inet_ functions / structs */
24821#endif
24822#ifdef HAVE_ARPA_NAMESER_H
24823#  include <arpa/nameser.h> /* DNS HEADER struct */
24824#endif
24825#ifdef HAVE_NETDB_H
24826#  include <netdb.h>
24827#endif
24828"
24829if test "x$ac_cv_header_sys_types_h" = xyes
24830then :
24831  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
24832
24833fi
24834ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_TYPES_H
24835#  include <sys/types.h>
24836#endif
24837#ifdef HAVE_NETINET_IN_H
24838#  include <netinet/in.h>   /* inet_ functions / structs */
24839#endif
24840#ifdef HAVE_ARPA_NAMESER_H
24841#  include <arpa/nameser.h> /* DNS HEADER struct */
24842#endif
24843#ifdef HAVE_NETDB_H
24844#  include <netdb.h>
24845#endif
24846"
24847if test "x$ac_cv_header_netinet_in_h" = xyes
24848then :
24849  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
24850
24851fi
24852ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_TYPES_H
24853#  include <sys/types.h>
24854#endif
24855#ifdef HAVE_NETINET_IN_H
24856#  include <netinet/in.h>   /* inet_ functions / structs */
24857#endif
24858#ifdef HAVE_ARPA_NAMESER_H
24859#  include <arpa/nameser.h> /* DNS HEADER struct */
24860#endif
24861#ifdef HAVE_NETDB_H
24862#  include <netdb.h>
24863#endif
24864"
24865if test "x$ac_cv_header_arpa_nameser_h" = xyes
24866then :
24867  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
24868
24869fi
24870ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "#ifdef HAVE_SYS_TYPES_H
24871#  include <sys/types.h>
24872#endif
24873#ifdef HAVE_NETINET_IN_H
24874#  include <netinet/in.h>   /* inet_ functions / structs */
24875#endif
24876#ifdef HAVE_ARPA_NAMESER_H
24877#  include <arpa/nameser.h> /* DNS HEADER struct */
24878#endif
24879#ifdef HAVE_NETDB_H
24880#  include <netdb.h>
24881#endif
24882"
24883if test "x$ac_cv_header_netdb_h" = xyes
24884then :
24885  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
24886
24887fi
24888ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
24889#  include <sys/types.h>
24890#endif
24891#ifdef HAVE_NETINET_IN_H
24892#  include <netinet/in.h>   /* inet_ functions / structs */
24893#endif
24894#ifdef HAVE_ARPA_NAMESER_H
24895#  include <arpa/nameser.h> /* DNS HEADER struct */
24896#endif
24897#ifdef HAVE_NETDB_H
24898#  include <netdb.h>
24899#endif
24900"
24901if test "x$ac_cv_header_resolv_h" = xyes
24902then :
24903  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
24904
24905fi
24906
24907
24908#HMS: Why do we do this check so "early"?
24909
24910  for ac_func in res_init
24911do :
24912  ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
24913if test "x$ac_cv_func_res_init" = xyes
24914then :
24915  printf "%s\n" "#define HAVE_RES_INIT 1" >>confdefs.h
24916
24917else $as_nop
24918  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
24919if test "x$ac_cv_func___res_init" = xyes
24920then :
24921  printf "%s\n" "#define HAVE___RES_INIT 1" >>confdefs.h
24922
24923fi
24924
24925fi
24926
24927done
24928
24929# We also need -lsocket, but we have tested for that already.
24930ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
24931if test "x$ac_cv_func_inet_ntop" = xyes
24932then :
24933
24934else $as_nop
24935
24936printf "%s\n" "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
24937
24938fi
24939
24940ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
24941if test "x$ac_cv_func_inet_pton" = xyes
24942then :
24943
24944else $as_nop
24945
24946printf "%s\n" "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
24947
24948fi
24949
24950
24951ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
24952if test "x$ac_cv_type_uintptr_t" = xyes
24953then :
24954
24955printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
24956
24957
24958fi
24959ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
24960if test "x$ac_cv_type_int32" = xyes
24961then :
24962
24963printf "%s\n" "#define HAVE_INT32 1" >>confdefs.h
24964
24965
24966fi
24967ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
24968if test "x$ac_cv_type_u_int32" = xyes
24969then :
24970
24971printf "%s\n" "#define HAVE_U_INT32 1" >>confdefs.h
24972
24973
24974fi
24975
24976
24977
24978
24979ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
24980	#ifdef HAVE_SYS_TIME_H
24981	# include <sys/time.h>
24982	#endif
24983	#ifdef HAVE_ERRNO_H
24984	# include <errno.h>
24985	#endif
24986
24987
24988"
24989if test "x$ac_cv_header_sys_timepps_h" = xyes
24990then :
24991  printf "%s\n" "#define HAVE_SYS_TIMEPPS_H 1" >>confdefs.h
24992
24993fi
24994
24995
24996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
24997printf %s "checking for struct timespec... " >&6; }
24998if test ${ntp_cv_struct_timespec+y}
24999then :
25000  printf %s "(cached) " >&6
25001else $as_nop
25002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25003/* end confdefs.h.  */
25004
25005		#include <sys/time.h>
25006		/* Under SunOS, timespec is in sys/timepps.h,
25007		   which needs errno.h and FRAC */
25008		#ifdef HAVE_ERRNO_H
25009		# include <errno.h>
25010		#endif
25011		#ifdef HAVE_SYS_TIMEPPS_H
25012		# define FRAC 4294967296
25013		# include <sys/timepps.h>
25014		#endif
25015
25016int
25017main (void)
25018{
25019
25020		struct timespec n;
25021
25022
25023  ;
25024  return 0;
25025}
25026_ACEOF
25027if ac_fn_c_try_compile "$LINENO"
25028then :
25029  ntp_cv_struct_timespec=yes
25030else $as_nop
25031  ntp_cv_struct_timespec=no
25032
25033fi
25034rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25035
25036fi
25037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
25038printf "%s\n" "$ntp_cv_struct_timespec" >&6; }
25039case "$ntp_cv_struct_timespec" in
25040 yes)
25041
25042printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
25043
25044esac
25045
25046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
25047printf %s "checking for struct ntptimeval... " >&6; }
25048if test ${ntp_cv_struct_ntptimeval+y}
25049then :
25050  printf %s "(cached) " >&6
25051else $as_nop
25052  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25053/* end confdefs.h.  */
25054
25055		#include <sys/time.h>
25056		#include <sys/timex.h>
25057
25058int
25059main (void)
25060{
25061
25062		struct ntptimeval n;
25063
25064
25065  ;
25066  return 0;
25067}
25068_ACEOF
25069if ac_fn_c_try_compile "$LINENO"
25070then :
25071  ntp_cv_struct_ntptimeval=yes
25072else $as_nop
25073  ntp_cv_struct_ntptimeval=no
25074
25075fi
25076rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25077
25078fi
25079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
25080printf "%s\n" "$ntp_cv_struct_ntptimeval" >&6; }
25081case "$ntp_cv_struct_ntptimeval" in
25082 yes)
25083
25084printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
25085
25086esac
25087
25088ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
25089	#ifdef HAVE_SYS_TYPES_H
25090	# include <sys/types.h>
25091	#endif
25092
25093
25094"
25095if test "x$ac_cv_header_md5_h" = xyes
25096then :
25097  printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
25098
25099fi
25100
25101
25102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
25103printf %s "checking for library containing MD5Init... " >&6; }
25104if test ${ac_cv_search_MD5Init+y}
25105then :
25106  printf %s "(cached) " >&6
25107else $as_nop
25108  ac_func_search_save_LIBS=$LIBS
25109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25110/* end confdefs.h.  */
25111
25112/* Override any GCC internal prototype to avoid an error.
25113   Use char because int might match the return type of a GCC
25114   builtin and then its argument prototype would still apply.  */
25115char MD5Init ();
25116int
25117main (void)
25118{
25119return MD5Init ();
25120  ;
25121  return 0;
25122}
25123_ACEOF
25124for ac_lib in '' md5 md
25125do
25126  if test -z "$ac_lib"; then
25127    ac_res="none required"
25128  else
25129    ac_res=-l$ac_lib
25130    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25131  fi
25132  if ac_fn_c_try_link "$LINENO"
25133then :
25134  ac_cv_search_MD5Init=$ac_res
25135fi
25136rm -f core conftest.err conftest.$ac_objext conftest.beam \
25137    conftest$ac_exeext
25138  if test ${ac_cv_search_MD5Init+y}
25139then :
25140  break
25141fi
25142done
25143if test ${ac_cv_search_MD5Init+y}
25144then :
25145
25146else $as_nop
25147  ac_cv_search_MD5Init=no
25148fi
25149rm conftest.$ac_ext
25150LIBS=$ac_func_search_save_LIBS
25151fi
25152{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
25153printf "%s\n" "$ac_cv_search_MD5Init" >&6; }
25154ac_res=$ac_cv_search_MD5Init
25155if test "$ac_res" != no
25156then :
25157  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25158
25159fi
25160
25161ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
25162if test "x$ac_cv_func_MD5Init" = xyes
25163then :
25164  printf "%s\n" "#define HAVE_MD5INIT 1" >>confdefs.h
25165
25166fi
25167ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
25168if test "x$ac_cv_func_sysconf" = xyes
25169then :
25170  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
25171
25172fi
25173ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
25174if test "x$ac_cv_func_getdtablesize" = xyes
25175then :
25176  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
25177
25178fi
25179ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
25180if test "x$ac_cv_func_sigaction" = xyes
25181then :
25182  printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
25183
25184fi
25185ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
25186if test "x$ac_cv_func_sigset" = xyes
25187then :
25188  printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
25189
25190fi
25191ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
25192if test "x$ac_cv_func_sigvec" = xyes
25193then :
25194  printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
25195
25196fi
25197
25198
25199# HMS: does this need to be a cached variable?
25200# Check whether --enable-signalled-io was given.
25201if test ${enable_signalled_io+y}
25202then :
25203  enableval=$enable_signalled_io; use_signalled_io=$enableval
25204else $as_nop
25205  use_signalled_io=yes
25206
25207fi
25208
25209
25210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
25211printf %s "checking for SIGIO... " >&6; }
25212if test ${ntp_cv_hdr_def_sigio+y}
25213then :
25214  printf %s "(cached) " >&6
25215else $as_nop
25216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25217/* end confdefs.h.  */
25218
25219	    #include <signal.h>
25220
25221	    #ifndef SIGIO
25222	    # error
25223	    #endif
25224
25225_ACEOF
25226if ac_fn_c_try_cpp "$LINENO"
25227then :
25228  ntp_cv_hdr_def_sigio=yes
25229else $as_nop
25230  ntp_cv_hdr_def_sigio=no
25231
25232fi
25233rm -f conftest.err conftest.i conftest.$ac_ext
25234
25235fi
25236{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
25237printf "%s\n" "$ntp_cv_hdr_def_sigio" >&6; }
25238
25239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
25240printf %s "checking if we want to use SIGIO... " >&6; }
25241ans=no
25242case "$ntp_cv_hdr_def_sigio" in
25243 yes)
25244    ans=yes
25245    case "$host" in
25246     alpha*-dec-osf4*|alpha*-dec-osf5*)
25247	ans=no
25248	;;
25249     *-convex-*)
25250	ans=no
25251	;;
25252     *-dec-*)
25253	ans=no
25254	;;
25255     *-pc-cygwin*)
25256	ans=no
25257	;;
25258     *-sni-sysv*)
25259	ans=no
25260	;;
25261     *-stratus-vos)
25262	ans=no
25263	;;
25264     *-univel-sysv*)
25265	ans=no
25266	;;
25267     *-*-irix6*)
25268	ans=no
25269	;;
25270     *-*-freebsd*)
25271	ans=no
25272	;;
25273     *-*-*linux*)
25274	ans=no
25275	;;
25276     *-*-unicosmp*)
25277	ans=no
25278	;;
25279     *-*-kfreebsd*)
25280	ans=no
25281	;;
25282     m68k-*-mint*)
25283	ans=no
25284	;;
25285    esac
25286    case "$ans" in
25287     no)
25288	ans="Possible for $host but disabled because of reported problems"
25289	;;
25290    esac
25291    ;;
25292esac
25293case "$ans" in
25294 yes)
25295    case "$use_signalled_io" in
25296     yes)
25297
25298printf "%s\n" "#define HAVE_SIGNALED_IO 1" >>confdefs.h
25299
25300	;;
25301     *) ans="Allowed for $host but --disable-signalled-io was given"
25302	;;
25303    esac
25304esac
25305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25306printf "%s\n" "$ans" >&6; }
25307
25308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
25309printf %s "checking for SIGPOLL... " >&6; }
25310if test ${ntp_cv_hdr_def_sigpoll+y}
25311then :
25312  printf %s "(cached) " >&6
25313else $as_nop
25314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25315/* end confdefs.h.  */
25316
25317	    #include <signal.h>
25318
25319	    #ifndef SIGPOLL
25320	    # error
25321	    #endif
25322
25323_ACEOF
25324if ac_fn_c_try_cpp "$LINENO"
25325then :
25326  ntp_cv_hdr_def_sigpoll=yes
25327else $as_nop
25328  ntp_cv_hdr_def_sigpoll=no
25329
25330fi
25331rm -f conftest.err conftest.i conftest.$ac_ext
25332
25333fi
25334{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
25335printf "%s\n" "$ntp_cv_hdr_def_sigpoll" >&6; }
25336
25337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
25338printf %s "checking if we can use SIGPOLL for UDP I/O... " >&6; }
25339ans=no
25340case "$ntp_cv_hdr_def_sigpoll" in
25341 yes)
25342    case "$host" in
25343     mips-sgi-irix*)
25344	ans=no
25345	;;
25346     vax-dec-bsd)
25347	ans=no
25348	;;
25349     *-pc-cygwin*)
25350	ans=no
25351	;;
25352     *-sni-sysv*)
25353	ans=no
25354	;;
25355     *-stratus-vos)
25356	ans=no
25357	;;
25358     *-*-aix[4-9]*)
25359	# XXX Only verified thru AIX6
25360	ans=no
25361	;;
25362     *-*-hpux*)
25363	ans=no
25364	;;
25365     *-*-*linux*)
25366	ans=no
25367	;;
25368     *-*-osf*)
25369	ans=no
25370	;;
25371     *-*-qnx*)
25372	ans=no
25373	;;
25374     *-*-sunos*)
25375	ans=no
25376	;;
25377     *-*-solaris*)
25378	ans=no
25379	;;
25380     *-*-ultrix*)
25381	ans=no
25382	;;
25383     *-*-unicosmp*)
25384	ans=no
25385	;;
25386     *-*-kfreebsd*)
25387	ans=no
25388	;;
25389     *) ans=yes
25390	;;
25391    esac
25392    ;;
25393esac
25394case "$ans" in
25395 yes)
25396
25397printf "%s\n" "#define USE_UDP_SIGPOLL 1" >>confdefs.h
25398
25399esac
25400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25401printf "%s\n" "$ans" >&6; }
25402
25403{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
25404printf %s "checking if we can use SIGPOLL for TTY I/O... " >&6; }
25405ans=no
25406case "$ntp_cv_hdr_def_sigpoll" in
25407 yes)
25408    case "$host" in
25409     mips-sgi-irix*)
25410	ans=no
25411	;;
25412     vax-dec-bsd)
25413	ans=no
25414	;;
25415     *-pc-cygwin*)
25416	ans=no
25417	;;
25418     *-sni-sysv*)
25419	ans=no
25420	;;
25421     *-stratus-vos)
25422	ans=no
25423	;;
25424     *-*-aix[4-9]*)
25425	# XXX Only verified thru AIX6
25426	ans=no
25427	;;
25428     *-*-hpux*)
25429	ans=no
25430	;;
25431     *-*-*linux*)
25432	ans=no
25433	;;
25434     *-*-osf*)
25435	ans=no
25436	;;
25437     *-*-sunos*)
25438	ans=no
25439	;;
25440     *-*-ultrix*)
25441	ans=no
25442	;;
25443     *-*-qnx*)
25444	ans=no
25445	;;
25446     *-*-unicosmp*)
25447	ans=no
25448	;;
25449     *-*-kfreebsd*)
25450	ans=no
25451	;;
25452     *) ans=yes
25453	;;
25454    esac
25455    ;;
25456esac
25457case "$ans" in
25458 yes)
25459
25460printf "%s\n" "#define USE_TTY_SIGPOLL 1" >>confdefs.h
25461
25462esac
25463{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25464printf "%s\n" "$ans" >&6; }
25465
25466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
25467printf %s "checking number of arguments to gettimeofday()... " >&6; }
25468if test ${ntp_cv_func_Xettimeofday_nargs+y}
25469then :
25470  printf %s "(cached) " >&6
25471else $as_nop
25472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25473/* end confdefs.h.  */
25474
25475		#include <sys/time.h>
25476
25477int
25478main (void)
25479{
25480
25481		gettimeofday(0, 0);
25482		settimeofday(0, 0);
25483
25484
25485  ;
25486  return 0;
25487}
25488_ACEOF
25489if ac_fn_c_try_compile "$LINENO"
25490then :
25491  ntp_cv_func_Xettimeofday_nargs=2
25492else $as_nop
25493  ntp_cv_func_Xettimeofday_nargs=1
25494
25495fi
25496rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25497
25498fi
25499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
25500printf "%s\n" "$ntp_cv_func_Xettimeofday_nargs" >&6; }
25501case "$ntp_cv_func_Xettimeofday_nargs" in
25502 1)
25503
25504printf "%s\n" "#define SYSV_TIMEOFDAY 1" >>confdefs.h
25505
25506esac
25507
25508
25509  for ac_func in settimeofday
25510do :
25511  ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
25512if test "x$ac_cv_func_settimeofday" = xyes
25513then :
25514  printf "%s\n" "#define HAVE_SETTIMEOFDAY 1" >>confdefs.h
25515
25516else $as_nop
25517
25518    case "$host" in
25519     *-*-mpeix*) ac_cv_func_settimeofday=yes
25520    esac
25521
25522fi
25523
25524done
25525
25526{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
25527printf %s "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
25528ntp_warning='GRONK'
25529ans=none
25530case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
25531 yes*)
25532    ntp_warning=''
25533    ans='clock_settime()'
25534    ;;
25535 noyes*)
25536    ntp_warning='But clock_settime() would be better (if we had it)'
25537    ans='settimeofday()'
25538    ;;
25539 nonoyes)
25540    ntp_warning='Which is the worst of the three'
25541    ans='stime()'
25542    ;;
25543 *)
25544    case "$build" in
25545     $host)
25546	ntp_warning='Which leaves us with nothing to use!'
25547    esac
25548esac
25549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25550printf "%s\n" "$ans" >&6; }
25551case "$ntp_warning" in
25552 '')
25553    ;;
25554 *)
25555    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
25556printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
25557    ;;
25558esac
25559
25560 if test x"$enable_dependency_tracking" = x"yes"; then
25561  LIBNTP_SUBMAKES_TRUE=
25562  LIBNTP_SUBMAKES_FALSE='#'
25563else
25564  LIBNTP_SUBMAKES_TRUE='#'
25565  LIBNTP_SUBMAKES_FALSE=
25566fi
25567
25568
25569
25570
25571
25572# Check whether --with-crypto was given.
25573if test ${with_crypto+y}
25574then :
25575  withval=$with_crypto; 		case "$with_crypto" in
25576	 yes)
25577	    with_crypto=openssl,libcrypto
25578	esac
25579
25580else $as_nop
25581  with_crypto=openssl,libcrypto
25582fi
25583
25584
25585# Check whether --with-openssl-libdir was given.
25586if test ${with_openssl_libdir+y}
25587then :
25588  withval=$with_openssl_libdir;
25589fi
25590
25591
25592# Check whether --with-openssl-incdir was given.
25593if test ${with_openssl_incdir+y}
25594then :
25595  withval=$with_openssl_incdir;
25596fi
25597
25598# Check whether --enable-verbose-ssl was given.
25599if test ${enable_verbose_ssl+y}
25600then :
25601  enableval=$enable_verbose_ssl;
25602else $as_nop
25603  enable_verbose_ssl=no
25604fi
25605
25606
25607ntp_openssl=no
25608ntp_openssl_from_pkg_config=no
25609ntp_ssl_incdir=
25610ntp_ssl_cflags=
25611ntp_ssl_cppflags=
25612ntp_ssl_libdir=
25613ntp_ssl_libs_L=
25614ntp_ssl_libs_l=
25615ntp_ssl_libs=
25616ntp_ssl_ldflags=
25617
25618NTPSSL_SAVED_CFLAGS="$CFLAGS"
25619NTPSSL_SAVED_CPPFLAGS="$CPPFLAGS"
25620NTPSSL_SAVED_LIBS="$LIBS"
25621NTPSSL_SAVED_LDFLAGS="$LDFLAGS"
25622
25623# Extract the first word of "openssl", so it can be a program name with args.
25624set dummy openssl; ac_word=$2
25625{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25626printf %s "checking for $ac_word... " >&6; }
25627if test ${ac_cv_path_PATH_OPENSSL+y}
25628then :
25629  printf %s "(cached) " >&6
25630else $as_nop
25631  case $PATH_OPENSSL in
25632  [\\/]* | ?:[\\/]*)
25633  ac_cv_path_PATH_OPENSSL="$PATH_OPENSSL" # Let the user override the test with a path.
25634  ;;
25635  *)
25636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25637for as_dir in $PATH
25638do
25639  IFS=$as_save_IFS
25640  case $as_dir in #(((
25641    '') as_dir=./ ;;
25642    */) ;;
25643    *) as_dir=$as_dir/ ;;
25644  esac
25645    for ac_exec_ext in '' $ac_executable_extensions; do
25646  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25647    ac_cv_path_PATH_OPENSSL="$as_dir$ac_word$ac_exec_ext"
25648    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25649    break 2
25650  fi
25651done
25652  done
25653IFS=$as_save_IFS
25654
25655  ;;
25656esac
25657fi
25658PATH_OPENSSL=$ac_cv_path_PATH_OPENSSL
25659if test -n "$PATH_OPENSSL"; then
25660  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_OPENSSL" >&5
25661printf "%s\n" "$PATH_OPENSSL" >&6; }
25662else
25663  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25664printf "%s\n" "no" >&6; }
25665fi
25666
25667
25668
25669str="$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}"
25670	case "$enable_verbose_ssl" in
25671	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $str" >&5
25672printf "%s\n" "$as_me: $str" >&6;}
25673	esac
25674
25675
25676{ str=; unset str;}
25677
25678# Make sure neither/both --with_openssl-{inc,lib}dir are given
25679case "${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25680 notgiven:notgiven) ;;
25681 *notgiven*)
25682    as_fn_error $? "only one of --with-openssl-{inc,lib}dir=... given - provide both or neither" "$LINENO" 5
25683    ;;
25684esac
25685
25686# HMS: Today there are only 2 case options.  We probably want a third
25687# *:*:notgiven:notgiven
25688# and in that case we would validate the path in PKG_CONFIG_PATH.
25689# Unless we can do it with 2 cases, where the 2nd case is *:*:...
25690# and we do a reality check on execpath and the headers/libraries.
25691#
25692##
25693# if $with_crypto is not "no":
25694#   if --with-openssl-{inc,lib}dir are not given:
25695#     we should use pkg-config to find openssl
25696#     if we don't have pkg-config, if openssl is in the base OS, use that.
25697##
25698case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
25699 no:*) ;;
25700 *:notempty:notgiven:notgiven)
25701    # If PKG_CONFIG is notempty and we haven't been given openssl paths,
25702    # then let's make sure that the openssl executable's path corresponds
25703    # to the path in openssl.pc, and 'openssl version' matches the Version
25704    # in openssl.pc.  If $PKG_CONFIG tells us an INCPATH and/or a LIBPATH,
25705    # then should we reality check them?
25706    ## INCPATH
25707    # harlan@ntp-testbuild.tal1> openssl version
25708    # OpenSSL 1.1.1t  7 Feb 2023
25709    # harlan@ntp-testbuild.tal1> grep 1.1.1t /ntpbuild/include/openssl/*
25710    # /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
25711    # harlan@ntp-testbuild.tal1>
25712    ## LIBPATH
25713    # harlan@ntp-testbuild.tal1> strings -a /ntpbuild/lib/libcrypto.* | fgrep 1.1.1t
25714    # OpenSSL 1.1.1t  7 Feb 2023
25715    # OpenSSL 1.1.1t  7 Feb 2023
25716    # OpenSSL 1.1.1t  7 Feb 2023
25717    # harlan@ntp-testbuild.tal1> ls /ntpbuild/lib/libcrypto.*
25718    # /ntpbuild/lib/libcrypto.a       /ntpbuild/lib/libcrypto.so.1.1*
25719    # /ntpbuild/lib/libcrypto.so@
25720    # harlan@ntp-testbuild.tal1>
25721    ##
25722    # Having said this, do we really care if the openssl executable that
25723    # we have found is matched with the INCPATH and LIBPATH?
25724    # One answer: Probably not, but we should complain on a mismatch as
25725    # otherwise runtime differences could easily cause problems/drama.
25726
25727    ##BO
25728    # ntp_cv_build_framework_help=yes
25729    save_PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
25730    for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
25731        case "$pkg" in
25732	 openssl)
25733	    if $PKG_CONFIG --exists $pkg ; then
25734		# Found it - yay
25735		# Do we want to check we found the right one?
25736		# --modver
25737		# --variable={libdir,includedir} (varname)
25738		overf=`openssl version`
25739		overs=`echo $overf | awk '{print }'`
25740		case "$overs" in
25741		 0.*) ;;	# Should we squawk?
25742		 1.0.*) ;;	# Should we squawk?
25743		 1.1.*) ;;	# Should we squawk?
25744		 3.*)
25745		    oinc=`openssl --variable=includedir`
25746		    olib=`openssl --variable=libdir`
25747		    # How should we use these?
25748		    ;;
25749		 *) ;;	# Should we squawk?
25750		esac
25751		# /ntpbuild/include/openssl/opensslv.h:# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
25752		# grep 1.1.1t /ntpbuild/lib/libcrypto.a
25753		# strings -a /ntpbuild/lib/libcrypto.a | grep 1.1.1t
25754		# OpenSSL 1.1.1t  7 Feb 2023
25755		# harlan@ntp-testbuild.tal1>
25756		# which should match $overf
25757		##
25758		# harlan@ntp-testbuild.tal1> echo '"OpenSSL 1.1.1t  7 Feb 2023"' | cut -f 2 -d\"
25759		# OpenSSL 1.1.1t  7 Feb 2023
25760		# harlan@ntp-testbuild.tal1> grep OPENSSL_VERSION_TEXT /ntpbuild/include/openssl/opensslv.h
25761		# # define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1t  7 Feb 2023"
25762		# harlan@ntp-testbuild.tal1>
25763		##
25764
25765	    else
25766		# This is a hack, but it's reasonable.
25767		pkgpath="`echo $PATH_OPENSSL | sed -e 's:/bin/openssl$::'`/lib/pkgconfig"
25768		test -d "$pkgpath" || pkgpath=
25769		# echo "pkgpath is <$pkgpath>"
25770		# echo "PKG_CONFIG_PATH is <$PKG_CONFIG_PATH>"
25771		case "$pkgpath" in
25772		 '') ;;	# Nothing to see here...
25773		 *) case ":$PKG_CONFIG_PATH:" in
25774		     ::)
25775			PKG_CONFIG_PATH=$pkgpath
25776			export PKG_CONFIG_PATH
25777			;;
25778		     *:$pkgpath:*)
25779			# Already there...
25780			;;
25781		     *)
25782			PKG_CONFIG_PATH="$pkgpath:$PKG_CONFIG_PATH"
25783			export PKG_CONFIG_PATH
25784			;;
25785		    esac
25786		    ;;
25787		esac
25788	    fi
25789	    ;;
25790        esac
25791    done
25792    ##EO
25793
25794    for pkg in `echo $with_crypto | $SED -e 's/,/ /'`; do
25795	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
25796printf %s "checking pkg-config for $pkg... " >&6; }
25797	if $PKG_CONFIG --exists $pkg ; then
25798	    ntp_ssl_cppflags="`$PKG_CONFIG --cflags-only-I $pkg`"
25799	    case "$ntp_ssl_cppflags" in
25800	     '')
25801		ntp_ssl_incdir='not needed'
25802		;;
25803	     *)
25804		ntp_ssl_incdir="`echo $ntp_ssl_cppflags | $SED -e 's/-I//'`"
25805	    esac
25806	    ntp_ssl_cflags="`$PKG_CONFIG --cflags-only-other $pkg`"
25807	    ntp_ssl_libs_L="`$PKG_CONFIG --libs-only-L $pkg`"
25808	    case "$ntp_ssl_libs_L" in
25809	     '')
25810		ntp_ssl_libdir='not needed'
25811		;;
25812	     *)
25813		ntp_ssl_libdir="`echo $ntp_ssl_libs_L | $SED -e 's/-L//'`"
25814	    esac
25815	    ntp_ssl_libs_l="`$PKG_CONFIG --libs-only-l $pkg`"
25816	    ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
25817	    ntp_ssl_ldflags="`$PKG_CONFIG --libs-only-other $pkg`"
25818	    ntp_openssl=yes
25819	    ntp_openssl_from_pkg_config=yes
25820	    ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
25821	    case "$ntp_openssl_version" in
25822	     *.*) ;;
25823	     *) ntp_openssl_version='(unknown)' ;;
25824	    esac
25825	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
25826printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
25827
25828	    break
25829	fi
25830	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25831printf "%s\n" "no" >&6; }
25832    done
25833    { pkg=; unset pkg;}
25834esac
25835case "$with_crypto" in
25836 no) ;;
25837 *)
25838    case "$with_openssl_libdir" in
25839     '') ;;
25840     *)
25841	ntp_ssl_libdir="$with_openssl_libdir"
25842	ntp_ssl_libs_L="-L$with_openssl_libdir"
25843	ntp_ssl_libs_l="-lcrypto"
25844	ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
25845    esac
25846    case "$with_openssl_incdir" in
25847     '') ;;
25848     *)
25849	ntp_ssl_incdir="$with_openssl_incdir"
25850	ntp_ssl_cppflags="-I$with_openssl_incdir"
25851    esac
25852esac
25853
25854	case "$enable_verbose_ssl" in
25855	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase I checks:" >&5
25856printf "%s\n" "$as_me: OpenSSL Phase I checks:" >&6;}
25857	esac
25858
25859
25860	case "$enable_verbose_ssl" in
25861	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
25862printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
25863	esac
25864
25865
25866	case "$enable_verbose_ssl" in
25867	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP:   ($CFLAGS_NTP)" >&5
25868printf "%s\n" "$as_me: CFLAGS_NTP:   ($CFLAGS_NTP)" >&6;}
25869	esac
25870
25871
25872	case "$enable_verbose_ssl" in
25873	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP:    ($LDADD_NTP)" >&5
25874printf "%s\n" "$as_me: LDADD_NTP:    ($LDADD_NTP)" >&6;}
25875	esac
25876
25877
25878	case "$enable_verbose_ssl" in
25879	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&5
25880printf "%s\n" "$as_me: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&6;}
25881	esac
25882
25883
25884	case "$enable_verbose_ssl" in
25885	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&5
25886printf "%s\n" "$as_me: ntp_openssl_from_pkg_config: $ntp_openssl_from_pkg_config" >&6;}
25887	esac
25888
25889
25890	case "$enable_verbose_ssl" in
25891	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&5
25892printf "%s\n" "$as_me: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&6;}
25893	esac
25894
25895
25896	case "$enable_verbose_ssl" in
25897	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&5
25898printf "%s\n" "$as_me: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&6;}
25899	esac
25900
25901
25902	case "$enable_verbose_ssl" in
25903	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&5
25904printf "%s\n" "$as_me: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&6;}
25905	esac
25906
25907
25908	case "$enable_verbose_ssl" in
25909	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
25910printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
25911	esac
25912
25913
25914	case "$enable_verbose_ssl" in
25915	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&5
25916printf "%s\n" "$as_me: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&6;}
25917	esac
25918
25919
25920	case "$enable_verbose_ssl" in
25921	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&5
25922printf "%s\n" "$as_me: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&6;}
25923	esac
25924
25925
25926	case "$enable_verbose_ssl" in
25927	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs:     ($ntp_ssl_libs)" >&5
25928printf "%s\n" "$as_me: ntp_ssl_libs:     ($ntp_ssl_libs)" >&6;}
25929	esac
25930
25931
25932	case "$enable_verbose_ssl" in
25933	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&5
25934printf "%s\n" "$as_me: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&6;}
25935	esac
25936
25937
25938
25939case "$with_crypto" in
25940 no)
25941    ntp_openssl=no
25942    ;;
25943 *)
25944    ntp_ssl_libs_l="${ntp_ssl_libs_l:--lcrypto}"
25945    ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
25946    case "$ntp_ssl_libdir" in
25947     '')
25948
25949		{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
25950	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto without -L" >&5
25951printf "%s\n" "$as_me: Searching for libcrypto without -L" >&6;}
25952	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
25953printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
25954if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
25955then :
25956  printf %s "(cached) " >&6
25957else $as_nop
25958  ac_check_lib_save_LIBS=$LIBS
25959LIBS="-lcrypto  $LIBS"
25960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25961/* end confdefs.h.  */
25962
25963/* Override any GCC internal prototype to avoid an error.
25964   Use char because int might match the return type of a GCC
25965   builtin and then its argument prototype would still apply.  */
25966char EVP_MD_CTX_new ();
25967int
25968main (void)
25969{
25970return EVP_MD_CTX_new ();
25971  ;
25972  return 0;
25973}
25974_ACEOF
25975if ac_fn_c_try_link "$LINENO"
25976then :
25977  ac_cv_lib_crypto_EVP_MD_CTX_new=yes
25978else $as_nop
25979  ac_cv_lib_crypto_EVP_MD_CTX_new=no
25980fi
25981rm -f core conftest.err conftest.$ac_objext conftest.beam \
25982    conftest$ac_exeext conftest.$ac_ext
25983LIBS=$ac_check_lib_save_LIBS
25984fi
25985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
25986printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
25987if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
25988then :
25989  ntp_ssl_libdir='not needed'
25990
25991fi
25992
25993		{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
25994    esac
25995    case "$ntp_ssl_libdir" in
25996     '')
25997	ntp_ssl_libdir_search="/usr/lib /usr/lib/openssl /usr/sfw/lib"
25998	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/lib"
25999	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /usr/local/ssl/lib"
26000	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /opt/local/lib"
26001	ntp_ssl_libdir_search="$ntp_ssl_libdir_search /lib /lib64"
26002	;;
26003     *)
26004	ntp_ssl_libdir_search="$ntp_ssl_libdir"
26005    esac
26006    case $ntp_ssl_libdir_search in
26007     'not needed') ;;
26008     *)
26009	for i in $ntp_ssl_libdir_search not_found
26010	do
26011	    case "$i" in
26012	     not_found) ;;
26013	     *)
26014		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for libcrypto in $i" >&5
26015printf "%s\n" "$as_me: Searching for libcrypto in $i" >&6;}
26016		LIBS="-L$i $NTPSSL_SAVED_LIBS"
26017		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for EVP_MD_CTX_new in -lcrypto" >&5
26018printf %s "checking for EVP_MD_CTX_new in -lcrypto... " >&6; }
26019if test ${ac_cv_lib_crypto_EVP_MD_CTX_new+y}
26020then :
26021  printf %s "(cached) " >&6
26022else $as_nop
26023  ac_check_lib_save_LIBS=$LIBS
26024LIBS="-lcrypto  $LIBS"
26025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26026/* end confdefs.h.  */
26027
26028/* Override any GCC internal prototype to avoid an error.
26029   Use char because int might match the return type of a GCC
26030   builtin and then its argument prototype would still apply.  */
26031char EVP_MD_CTX_new ();
26032int
26033main (void)
26034{
26035return EVP_MD_CTX_new ();
26036  ;
26037  return 0;
26038}
26039_ACEOF
26040if ac_fn_c_try_link "$LINENO"
26041then :
26042  ac_cv_lib_crypto_EVP_MD_CTX_new=yes
26043else $as_nop
26044  ac_cv_lib_crypto_EVP_MD_CTX_new=no
26045fi
26046rm -f core conftest.err conftest.$ac_objext conftest.beam \
26047    conftest$ac_exeext conftest.$ac_ext
26048LIBS=$ac_check_lib_save_LIBS
26049fi
26050{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_EVP_MD_CTX_new" >&5
26051printf "%s\n" "$ac_cv_lib_crypto_EVP_MD_CTX_new" >&6; }
26052if test "x$ac_cv_lib_crypto_EVP_MD_CTX_new" = xyes
26053then :
26054  break
26055
26056fi
26057
26058				{ ac_cv_lib_crypto_EVP_MD_CTX_new=; unset ac_cv_lib_crypto_EVP_MD_CTX_new;}
26059	    esac
26060	done
26061	ntp_ssl_libdir="$i"
26062	ntp_ssl_libs_L="-L$i"
26063	ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
26064	LIBS="$NTPSSL_SAVED_LIBS"
26065	case "$ntp_ssl_libdir" in
26066	 not_found)
26067	    as_fn_error $? "You may want to use --without-crypto, or add
26068openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
26069--with-openssl-libdir=/some/path option to configure.
26070libcrypto not found in any of the following directories:
26071$ntp_ssl_libdir_search
26072	    " "$LINENO" 5
26073	esac
26074	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: libcrypto found in $ntp_ssl_libdir" >&5
26075printf "%s\n" "$as_me: libcrypto found in $ntp_ssl_libdir" >&6;}
26076    esac
26077
26078    case "$ntp_openssl_from_pkg_config:$ntp_ssl_incdir" in
26079     'yes:not needed' | no:)
26080	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h without -I" >&5
26081printf "%s\n" "$as_me: Searching for openssl/evp.h without -I" >&6;}
26082		{ ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
26083	ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
26084if test "x$ac_cv_header_openssl_evp_h" = xyes
26085then :
26086  ntp_ssl_incdir='not needed'
26087
26088fi
26089
26090    esac
26091    case "$ntp_ssl_incdir" in
26092     'not needed')
26093	ntp_ssl_incdir_search="$ntp_ssl_incdir"
26094	;;
26095     *)
26096	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl include directory" >&5
26097printf "%s\n" "$as_me: Searching for openssl include directory" >&6;}
26098	case "$with_openssl_incdir" in
26099	 '')
26100	    case "$ntp_ssl_incdir" in
26101	     '')
26102		ntp_ssl_incdir_search="/usr/include /usr/sfw/include"
26103		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/include"
26104		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /opt/local/include"
26105		ntp_ssl_incdir_search="$ntp_ssl_incdir_search /usr/local/ssl/include"
26106		;;
26107	     *)
26108	    esac
26109	    ;;
26110	 *)
26111	    ntp_ssl_incdir_search="$with_openssl_incdir"
26112	esac
26113	case $ntp_ssl_incdir_search in
26114	 'not needed') ;;
26115	 *)
26116	    for i in $ntp_ssl_incdir_search
26117	    do
26118		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Searching for openssl/evp.h in $i" >&5
26119printf "%s\n" "$as_me: Searching for openssl/evp.h in $i" >&6;}
26120		CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS -I$i"
26121				{ ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
26122		ac_fn_c_check_header_compile "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
26123if test "x$ac_cv_header_openssl_evp_h" = xyes
26124then :
26125  ntp_ssl_incdir="$i" ; break
26126
26127fi
26128
26129	    done
26130	    { ac_cv_header_openssl_evp_h=; unset ac_cv_header_openssl_evp_h;}
26131	    { i=; unset i;}
26132	    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
26133	    case "$ntp_ssl_incdir" in
26134	     '')
26135		as_fn_error $? "You may want to use --without-crypto, or add
26136openssl.pc/libcrypto.pc to PKG_CONFIG_PATH, or use the
26137-with-openssl-incdir=/some/path option to configure.
26138No usable openssl/evp.h found in any of the following direcotries:
26139$ntp_ssl_incdir_search
26140		" "$LINENO" 5
26141	    esac
26142	    ntp_ssl_cppflags="-I$ntp_ssl_incdir"
26143	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Found evp.h in $ntp_ssl_incdir/openssl" >&5
26144printf "%s\n" "$as_me: Found evp.h in $ntp_ssl_incdir/openssl" >&6;}
26145	esac
26146    esac
26147    ntp_openssl=yes
26148esac
26149case "$ntp_openssl:$ntp_ssl_libdir" in
26150 'yes:not needed')
26151    ;;
26152 yes:*)
26153    CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
26154    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
26155    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
26156    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
26157        { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto works without runpath" >&5
26158printf %s "checking if crypto works without runpath... " >&6; }
26159if test ${ntp_cv_ssl_without_runpath+y}
26160then :
26161  printf %s "(cached) " >&6
26162else $as_nop
26163  if test "$cross_compiling" = yes
26164then :
26165  ntp_cv_ssl_without_runpath=yes
26166else $as_nop
26167  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26168/* end confdefs.h.  */
26169
26170		    #include "openssl/evp.h"
26171
26172int
26173main (void)
26174{
26175
26176		    if (!EVP_MD_CTX_new()) {
26177			return 1;
26178		    }
26179
26180
26181  ;
26182  return 0;
26183}
26184_ACEOF
26185if ac_fn_c_try_run "$LINENO"
26186then :
26187  ntp_cv_ssl_without_runpath=yes
26188else $as_nop
26189  ntp_cv_ssl_without_runpath=no
26190fi
26191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26192  conftest.$ac_objext conftest.beam conftest.$ac_ext
26193fi
26194
26195
26196fi
26197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_without_runpath" >&5
26198printf "%s\n" "$ntp_cv_ssl_without_runpath" >&6; }
26199    case "$ntp_cv_ssl_without_runpath" in
26200     no)
26201	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir" >&5
26202printf %s "checking if crypto needs -Wl,-rpath,$ntp_ssl_libdir... " >&6; }
26203if test ${ntp_cv_ssl_needs_dashWl_rpath+y}
26204then :
26205  printf %s "(cached) " >&6
26206else $as_nop
26207
26208		LDFLAGS="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir $NTPSSL_SAVED_LDFLAGS"
26209		if test "$cross_compiling" = yes
26210then :
26211  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26212printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26213as_fn_error $? "cannot run test program while cross compiling
26214See \`config.log' for more details" "$LINENO" 5; }
26215else $as_nop
26216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26217/* end confdefs.h.  */
26218
26219			    #include "openssl/evp.h"
26220
26221int
26222main (void)
26223{
26224
26225			    if (!EVP_MD_CTX_new()) {
26226				return 1;
26227			    }
26228
26229
26230  ;
26231  return 0;
26232}
26233_ACEOF
26234if ac_fn_c_try_run "$LINENO"
26235then :
26236  ntp_cv_ssl_needs_dashWl_rpath=yes
26237else $as_nop
26238  ntp_cv_ssl_needs_dashWl_rpath=no
26239
26240fi
26241rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26242  conftest.$ac_objext conftest.beam conftest.$ac_ext
26243fi
26244
26245
26246
26247fi
26248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashWl_rpath" >&5
26249printf "%s\n" "$ntp_cv_ssl_needs_dashWl_rpath" >&6; }
26250	case "$ntp_cv_ssl_needs_dashWl_rpath" in
26251	 yes)
26252	    ntp_ssl_ldflags="$ntp_ssl_ldflags -Wl,-rpath,$ntp_ssl_libdir"
26253	    ;;
26254	 no)
26255	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if crypto needs -R$ntp_ssl_libdir" >&5
26256printf %s "checking if crypto needs -R$ntp_ssl_libdir... " >&6; }
26257if test ${ntp_cv_ssl_needs_dashR+y}
26258then :
26259  printf %s "(cached) " >&6
26260else $as_nop
26261
26262		    LDFLAGS="$NTPSSL_SAVED_LDFLAGS $ntp_ssl_ldflags -R$ntp_ssl_libdir"
26263		    if test "$cross_compiling" = yes
26264then :
26265  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26266printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26267as_fn_error $? "cannot run test program while cross compiling
26268See \`config.log' for more details" "$LINENO" 5; }
26269else $as_nop
26270  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26271/* end confdefs.h.  */
26272
26273				#include "openssl/evp.h"
26274
26275int
26276main (void)
26277{
26278
26279				if (!EVP_MD_CTX_new()) {
26280				    return 1;
26281				}
26282
26283
26284  ;
26285  return 0;
26286}
26287_ACEOF
26288if ac_fn_c_try_run "$LINENO"
26289then :
26290  ntp_cv_ssl_needs_dashR=yes
26291else $as_nop
26292  ntp_cv_ssl_needs_dashR=no
26293
26294fi
26295rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26296  conftest.$ac_objext conftest.beam conftest.$ac_ext
26297fi
26298
26299
26300
26301fi
26302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_needs_dashR" >&5
26303printf "%s\n" "$ntp_cv_ssl_needs_dashR" >&6; }
26304	    case "$ntp_cv_ssl_needs_dashR" in
26305	     yes)
26306		ntp_ssl_ldflags="$ntp_ssl_ldflags -R$ntp_ssl_libdir"
26307	    esac
26308	    case "$build:$ntp_cv_ssl_needs_dashR" in
26309	     $host:no)
26310		{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26311printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26312as_fn_error $? "Unable to run program using crypto, check openssl.pc
26313or libcrypto.pc are in PKG_CONFIG_PATH, or provide the
26314 --with-openssl-libdir=/some/path option to configure.
26315
26316See \`config.log' for more details" "$LINENO" 5; }
26317	    esac
26318	esac
26319    esac
26320esac
26321	case "$enable_verbose_ssl" in
26322	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL Phase II checks:" >&5
26323printf "%s\n" "$as_me: OpenSSL Phase II checks:" >&6;}
26324	esac
26325
26326
26327	case "$enable_verbose_ssl" in
26328	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&5
26329printf "%s\n" "$as_me: ntp_ssl_incdir:   ($ntp_ssl_incdir)" >&6;}
26330	esac
26331
26332
26333	case "$enable_verbose_ssl" in
26334	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&5
26335printf "%s\n" "$as_me: ntp_ssl_libdir:   ($ntp_ssl_libdir)" >&6;}
26336	esac
26337
26338
26339	case "$enable_verbose_ssl" in
26340	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&5
26341printf "%s\n" "$as_me: ntp_ssl_cflags:   ($ntp_ssl_cflags)" >&6;}
26342	esac
26343
26344
26345	case "$enable_verbose_ssl" in
26346	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&5
26347printf "%s\n" "$as_me: ntp_ssl_cppflags: ($ntp_ssl_cppflags)" >&6;}
26348	esac
26349
26350
26351	case "$enable_verbose_ssl" in
26352	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&5
26353printf "%s\n" "$as_me: ntp_ssl_libs_L:   ($ntp_ssl_libs_L)" >&6;}
26354	esac
26355
26356
26357	case "$enable_verbose_ssl" in
26358	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&5
26359printf "%s\n" "$as_me: ntp_ssl_libs_l:   ($ntp_ssl_libs_l)" >&6;}
26360	esac
26361
26362
26363	case "$enable_verbose_ssl" in
26364	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_libs:     ($ntp_ssl_libs)" >&5
26365printf "%s\n" "$as_me: ntp_ssl_libs:     ($ntp_ssl_libs)" >&6;}
26366	esac
26367
26368
26369	case "$enable_verbose_ssl" in
26370	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&5
26371printf "%s\n" "$as_me: ntp_ssl_ldflags:  ($ntp_ssl_ldflags)" >&6;}
26372	esac
26373
26374
26375
26376case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
26377 yes:no)
26378    CFLAGS="$NTPSSL_SAVED_CFLAGS $ntp_ssl_cflags"
26379    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
26380    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
26381    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
26382    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l alone works" >&5
26383printf %s "checking if linking with $ntp_ssl_libs_l alone works... " >&6; }
26384if test ${ntp_cv_bare_lcrypto+y}
26385then :
26386  printf %s "(cached) " >&6
26387else $as_nop
26388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26389/* end confdefs.h.  */
26390
26391		    #include "openssl/evp.h"
26392
26393int
26394main (void)
26395{
26396
26397		    EVP_MD_CTX_new();
26398
26399
26400  ;
26401  return 0;
26402}
26403_ACEOF
26404if ac_fn_c_try_link "$LINENO"
26405then :
26406  ntp_cv_bare_lcrypto=yes
26407else $as_nop
26408  ntp_cv_bare_lcrypto=no
26409
26410fi
26411rm -f core conftest.err conftest.$ac_objext conftest.beam \
26412    conftest$ac_exeext conftest.$ac_ext
26413
26414fi
26415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
26416printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
26417    case "$ntp_cv_bare_lcrypto" in
26418     no)
26419	LIBS="-$ntp_ssl_libs -lz $NTPSSL_SAVED_LIBS"
26420	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with $ntp_ssl_libs_l -lz works" >&5
26421printf %s "checking if linking with $ntp_ssl_libs_l -lz works... " >&6; }
26422if test ${ntp_cv_lcrypto_lz+y}
26423then :
26424  printf %s "(cached) " >&6
26425else $as_nop
26426  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26427/* end confdefs.h.  */
26428
26429			#include "openssl/evp.h"
26430
26431int
26432main (void)
26433{
26434
26435			EVP_MD_CTX_new();
26436
26437
26438  ;
26439  return 0;
26440}
26441_ACEOF
26442if ac_fn_c_try_link "$LINENO"
26443then :
26444  ntp_cv_lcrypto_lz=yes
26445else $as_nop
26446  ntp_cv_lcrypto_lz=no
26447
26448fi
26449rm -f core conftest.err conftest.$ac_objext conftest.beam \
26450    conftest$ac_exeext conftest.$ac_ext
26451
26452fi
26453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
26454printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
26455	case "$ntp_cv_lcrypto_lz" in
26456	 yes)
26457	     ntp_ssl_libs_l="$ntp_ssl_libs_l -lz"
26458	     ntp_ssl_libs="$ntp_ssl_libs_L $ntp_ssl_libs_l"
26459	esac
26460    esac	esac
26461case "$ntp_openssl:$GCC" in
26462 yes:yes)
26463    CFLAGS="$NTP_SAVED_CFLAGS $ntp_ssl_cflags -Werror"
26464    CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS $ntp_ssl_cppflags"
26465    LIBS="$ntp_ssl_libs $NTPSSL_SAVED_LIBS"
26466    LDFLAGS="$ntp_ssl_ldflags $NTPSSL_SAVED_LDFLAGS"
26467    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking If $CC supports -Werror" >&5
26468printf %s "checking If $CC supports -Werror... " >&6; }
26469if test ${ntp_cv_gcc_supports_Werror+y}
26470then :
26471  printf %s "(cached) " >&6
26472else $as_nop
26473  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26474/* end confdefs.h.  */
26475
26476int
26477main (void)
26478{
26479
26480  ;
26481  return 0;
26482}
26483_ACEOF
26484if ac_fn_c_try_compile "$LINENO"
26485then :
26486  ntp_cv_gcc_supports_Werror=yes
26487else $as_nop
26488  ntp_cv_gcc_supports_Werror=no
26489
26490fi
26491rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26492
26493fi
26494{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_supports_Werror" >&5
26495printf "%s\n" "$ntp_cv_gcc_supports_Werror" >&6; }
26496    case "ntp_cv_gcc_supports_Werror" in
26497     no)
26498	ntp_use_Wstrict_prototypes=yes
26499	;;
26500     yes)
26501	CFLAGS="$CFLAGS -Wstrict-prototypes"
26502	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if OpenSSL triggers warnings" >&5
26503printf %s "checking if OpenSSL triggers warnings... " >&6; }
26504if test ${ntp_cv_ssl_triggers_warnings+y}
26505then :
26506  printf %s "(cached) " >&6
26507else $as_nop
26508  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26509/* end confdefs.h.  */
26510
26511			#include "openssl/asn1_mac.h"
26512			#include "openssl/bn.h"
26513			#include "openssl/err.h"
26514			#include "openssl/evp.h"
26515			#include "openssl/pem.h"
26516			#include "openssl/rand.h"
26517			#include "openssl/x509v3.h"
26518
26519int
26520main (void)
26521{
26522
26523			/* empty body */
26524
26525
26526  ;
26527  return 0;
26528}
26529_ACEOF
26530if ac_fn_c_try_compile "$LINENO"
26531then :
26532  ntp_cv_ssl_triggers_warnings=no
26533else $as_nop
26534  ntp_cv_ssl_triggers_warnings=yes
26535
26536fi
26537rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26538
26539fi
26540{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_ssl_triggers_warnings" >&5
26541printf "%s\n" "$ntp_cv_ssl_triggers_warnings" >&6; }
26542	case "$ntp_cv_ssl_triggers_warnings" in
26543	 yes)
26544	    ntp_use_Wstrict_prototypes=no
26545	    ;;
26546	 *)
26547	    ntp_use_Wstrict_prototypes=yes
26548	esac
26549    esac
26550    case "$ntp_use_Wstrict_prototypes" in
26551     no)
26552	ntp_ssl_cflags="$ntp_ssl_cflags -Wno-strict-prototypes"
26553	;;
26554     *)
26555	ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
26556    esac
26557    ;;
26558 no:yes)
26559        ntp_ssl_cflags="$ntp_ssl_cflags -Wstrict-prototypes"
26560esac
26561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will link to ssl library" >&5
26562printf %s "checking if we will link to ssl library... " >&6; }
26563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
26564printf "%s\n" "$ntp_openssl" >&6; }
26565
26566case "$ntp_openssl" in
26567 yes)
26568    VER_SUFFIX=o
26569           for ac_header in openssl/cmac.h
26570do :
26571  ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
26572if test "x$ac_cv_header_openssl_cmac_h" = xyes
26573then :
26574  printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
26575 ntp_enable_cmac=yes
26576else $as_nop
26577  ntp_enable_cmac=no
26578
26579fi
26580
26581done
26582    case "$ntp_enable_cmac" in
26583     yes)
26584
26585printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
26586
26587    esac
26588
26589printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
26590
26591
26592printf "%s\n" "#define OPENSSL_SUPPRESS_DEPRECATED 1" >>confdefs.h
26593
26594        CFLAGS="$NTPSSL_SAVED_CFLAGS"
26595    ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
26596if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
26597then :
26598  printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
26599
26600fi
26601
26602    CPPFLAGS_NTP="$CPPFLAGS_NTP $ntp_ssl_cppflags"
26603    CFLAGS_NTP="$CFLAGS_NTP $ntp_ssl_cflags"
26604    LDADD_NTP="$ntp_ssl_libs $LDADD_NTP"
26605    LDFLAGS_NTP="$ntp_ssl_ldflags $LDFLAGS_NTP"
26606esac
26607
26608	case "$enable_verbose_ssl" in
26609	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL final checks:" >&5
26610printf "%s\n" "$as_me: OpenSSL final checks:" >&6;}
26611	esac
26612
26613
26614	case "$enable_verbose_ssl" in
26615	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ntp_openssl:  $ntp_openssl" >&5
26616printf "%s\n" "$as_me: ntp_openssl:  $ntp_openssl" >&6;}
26617	esac
26618
26619
26620	case "$enable_verbose_ssl" in
26621	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&5
26622printf "%s\n" "$as_me: CPPFLAGS_NTP: ($CPPFLAGS_NTP)" >&6;}
26623	esac
26624
26625
26626	case "$enable_verbose_ssl" in
26627	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS_NTP:   ($CFLAGS_NTP)" >&5
26628printf "%s\n" "$as_me: CFLAGS_NTP:   ($CFLAGS_NTP)" >&6;}
26629	esac
26630
26631
26632	case "$enable_verbose_ssl" in
26633	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDADD_NTP:    ($LDADD_NTP)" >&5
26634printf "%s\n" "$as_me: LDADD_NTP:    ($LDADD_NTP)" >&6;}
26635	esac
26636
26637
26638	case "$enable_verbose_ssl" in
26639	 yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&5
26640printf "%s\n" "$as_me: LDFLAGS_NTP:  ($LDFLAGS_NTP)" >&6;}
26641	esac
26642
26643
26644
26645CFLAGS="$NTPSSL_SAVED_CFLAGS"
26646CPPFLAGS="$NTPSSL_SAVED_CPPFLAGS"
26647LIBS="$NTPSSL_SAVED_LIBS"
26648LDFLAGS="$NTPSSL_SAVED_LDFLAGS"
26649
26650{ NTPSSL_SAVED_CFLAGS=; unset NTPSSL_SAVED_CFLAGS;}
26651{ NTPSSL_SAVED_CPPFLAGS=; unset NTPSSL_SAVED_CPPFLAGS;}
26652{ NTPSSL_SAVED_LIBS=; unset NTPSSL_SAVED_LIBS;}
26653{ NTPSSL_SAVED_LDFLAGS=; unset NTPSSL_SAVED_LDFLAGS;}
26654{ ntp_enable_cmac=; unset ntp_enable_cmac;}
26655{ ntp_use_Wstrict_prototypes=; unset ntp_use_Wstrict_prototypes;}
26656{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
26657{ ntp_openssl_version=; unset ntp_openssl_version;}
26658{ ntp_ssl_cflags=; unset ntp_ssl_cflags;}
26659{ ntp_ssl_cppflags=; unset ntp_ssl_cppflags;}
26660{ ntp_ssl_libdir_search=; unset ntp_ssl_libdir_search;}
26661{ ntp_ssl_incdir_search=; unset ntp_ssl_incdir_search;}
26662{ ntp_ssl_libdir=; unset ntp_ssl_libdir;}
26663{ ntp_ssl_incdir=; unset ntp_ssl_incdir;}
26664{ ntp_ssl_libs_l=; unset ntp_ssl_libs_l;}
26665{ ntp_ssl_libs_L=; unset ntp_ssl_libs_L;}
26666{ ntp_ssl_ldflags=; unset ntp_ssl_ldflags;}
26667
26668
26669
26670
26671
26672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SSL library's secure random numbers" >&5
26673printf %s "checking if we want to use SSL library's secure random numbers... " >&6; }
26674# Check whether --enable-openssl-random was given.
26675if test ${enable_openssl_random+y}
26676then :
26677  enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval ; ntp_ssl_random_mandatory=$enableval
26678else $as_nop
26679  ntp_use_openssl_random=yes ; ntp_ssl_random_mandatory=no
26680
26681fi
26682
26683{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
26684printf "%s\n" "$ntp_use_openssl_random" >&6; }
26685
26686# The following might need extra libraries
26687NTPO_SAVED_LIBS="$LIBS"
26688LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
26689ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
26690if test "x$ac_cv_func_RAND_bytes" = xyes
26691then :
26692  printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
26693
26694fi
26695ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
26696if test "x$ac_cv_func_RAND_poll" = xyes
26697then :
26698  printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
26699
26700fi
26701
26702LIBS="$NTPO_SAVED_LIBS"
26703case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
26704 yesyesyesyes)
26705    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using SSL library's secure random number generator" >&5
26706printf "%s\n" "$as_me: Using SSL library's secure random number generator" >&6;}
26707
26708printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
26709
26710    ;;
26711 *)
26712    ntp_use_openssl_random=no
26713    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: SSL library's secure random number generator unavailable." >&5
26714printf "%s\n" "$as_me: SSL library's secure random number generator unavailable." >&6;}
26715    case "$ntp_ssl_random_mandatory" in
26716     yes)
26717	as_fn_error $? "No suitable SSL library was found and
26718--enable-openssl-random was given..  Remove --enable-openssl-random
26719if you wish to build without a cryptographically secure random number
26720generator.
26721
26722WARNING: Use of ntp-keygen without a secure RNG may generate
26723-------  keys that are predictable.
26724	" "$LINENO" 5
26725	;;
26726     *)
26727	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
26728-------  keys that are predictable.
26729	" >&5
26730printf "%s\n" "$as_me: WARNING: WARNING: Use of ntp-keygen without a secure RNG may generate
26731-------  keys that are predictable.
26732	" >&2;}
26733    esac
26734esac
26735
26736{ ntp_ssl_random_mandatory=; unset ntp_ssl_random_mandatory;}
26737
26738
26739
26740LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
26741LIBS=$SAVED_LIBS
26742{ SAVED_LIBS=; unset SAVED_LIBS;}
26743
26744
26745
26746for ac_prog in gawk mawk nawk awk
26747do
26748  # Extract the first word of "$ac_prog", so it can be a program name with args.
26749set dummy $ac_prog; ac_word=$2
26750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26751printf %s "checking for $ac_word... " >&6; }
26752if test ${ac_cv_prog_AWK+y}
26753then :
26754  printf %s "(cached) " >&6
26755else $as_nop
26756  if test -n "$AWK"; then
26757  ac_cv_prog_AWK="$AWK" # Let the user override the test.
26758else
26759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26760for as_dir in $PATH
26761do
26762  IFS=$as_save_IFS
26763  case $as_dir in #(((
26764    '') as_dir=./ ;;
26765    */) ;;
26766    *) as_dir=$as_dir/ ;;
26767  esac
26768    for ac_exec_ext in '' $ac_executable_extensions; do
26769  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26770    ac_cv_prog_AWK="$ac_prog"
26771    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26772    break 2
26773  fi
26774done
26775  done
26776IFS=$as_save_IFS
26777
26778fi
26779fi
26780AWK=$ac_cv_prog_AWK
26781if test -n "$AWK"; then
26782  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
26783printf "%s\n" "$AWK" >&6; }
26784else
26785  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26786printf "%s\n" "no" >&6; }
26787fi
26788
26789
26790  test -n "$AWK" && break
26791done
26792
26793{ ac_cv_prog_AWK=; unset ac_cv_prog_AWK;}
26794				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
26795printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
26796set x ${MAKE-make}
26797ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
26798if eval test \${ac_cv_prog_make_${ac_make}_set+y}
26799then :
26800  printf %s "(cached) " >&6
26801else $as_nop
26802  cat >conftest.make <<\_ACEOF
26803SHELL = /bin/sh
26804all:
26805	@echo '@@@%%%=$(MAKE)=@@@%%%'
26806_ACEOF
26807# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
26808case `${MAKE-make} -f conftest.make 2>/dev/null` in
26809  *@@@%%%=?*=@@@%%%*)
26810    eval ac_cv_prog_make_${ac_make}_set=yes;;
26811  *)
26812    eval ac_cv_prog_make_${ac_make}_set=no;;
26813esac
26814rm -f conftest.make
26815fi
26816if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
26817  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26818printf "%s\n" "yes" >&6; }
26819  SET_MAKE=
26820else
26821  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26822printf "%s\n" "no" >&6; }
26823  SET_MAKE="MAKE=${MAKE-make}"
26824fi
26825
26826
26827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
26828printf %s "checking whether ln -s works... " >&6; }
26829LN_S=$as_ln_s
26830if test "$LN_S" = "ln -s"; then
26831  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26832printf "%s\n" "yes" >&6; }
26833else
26834  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
26835printf "%s\n" "no, using $LN_S" >&6; }
26836fi
26837
26838
26839
26840# Extract the first word of "perl", so it can be a program name with args.
26841set dummy perl; ac_word=$2
26842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26843printf %s "checking for $ac_word... " >&6; }
26844if test ${ac_cv_path_PATH_PERL+y}
26845then :
26846  printf %s "(cached) " >&6
26847else $as_nop
26848  case $PATH_PERL in
26849  [\\/]* | ?:[\\/]*)
26850  ac_cv_path_PATH_PERL="$PATH_PERL" # Let the user override the test with a path.
26851  ;;
26852  *)
26853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26854for as_dir in $PATH
26855do
26856  IFS=$as_save_IFS
26857  case $as_dir in #(((
26858    '') as_dir=./ ;;
26859    */) ;;
26860    *) as_dir=$as_dir/ ;;
26861  esac
26862    for ac_exec_ext in '' $ac_executable_extensions; do
26863  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26864    ac_cv_path_PATH_PERL="$as_dir$ac_word$ac_exec_ext"
26865    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26866    break 2
26867  fi
26868done
26869  done
26870IFS=$as_save_IFS
26871
26872  ;;
26873esac
26874fi
26875PATH_PERL=$ac_cv_path_PATH_PERL
26876if test -n "$PATH_PERL"; then
26877  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
26878printf "%s\n" "$PATH_PERL" >&6; }
26879else
26880  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26881printf "%s\n" "no" >&6; }
26882fi
26883
26884
26885{ ac_cv_path_PATH_PERL=; unset ac_cv_path_PATH_PERL;}
26886# Extract the first word of "test", so it can be a program name with args.
26887set dummy test; ac_word=$2
26888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26889printf %s "checking for $ac_word... " >&6; }
26890if test ${ac_cv_path_PATH_TEST+y}
26891then :
26892  printf %s "(cached) " >&6
26893else $as_nop
26894  case $PATH_TEST in
26895  [\\/]* | ?:[\\/]*)
26896  ac_cv_path_PATH_TEST="$PATH_TEST" # Let the user override the test with a path.
26897  ;;
26898  *)
26899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26900for as_dir in $PATH
26901do
26902  IFS=$as_save_IFS
26903  case $as_dir in #(((
26904    '') as_dir=./ ;;
26905    */) ;;
26906    *) as_dir=$as_dir/ ;;
26907  esac
26908    for ac_exec_ext in '' $ac_executable_extensions; do
26909  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26910    ac_cv_path_PATH_TEST="$as_dir$ac_word$ac_exec_ext"
26911    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26912    break 2
26913  fi
26914done
26915  done
26916IFS=$as_save_IFS
26917
26918  ;;
26919esac
26920fi
26921PATH_TEST=$ac_cv_path_PATH_TEST
26922if test -n "$PATH_TEST"; then
26923  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
26924printf "%s\n" "$PATH_TEST" >&6; }
26925else
26926  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26927printf "%s\n" "no" >&6; }
26928fi
26929
26930
26931{ ac_cv_path_PATH_TEST=; unset ac_cv_path_PATH_TEST;}
26932test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
26933
26934
26935# Check whether --with-net-snmp-config was given.
26936if test ${with_net_snmp_config+y}
26937then :
26938  withval=$with_net_snmp_config; ans=$withval
26939else $as_nop
26940  ans=yes
26941
26942fi
26943
26944case "$ans" in
26945 no)
26946    ;;
26947 yes)
26948    ans=net-snmp-config
26949    ;;
26950 /*)
26951    ;;
26952 */*)
26953    as_fn_error $? "--with-net-snmp-config takes either a name or an absolute path" "$LINENO" 5
26954    ;;
26955 *)
26956    ;;
26957esac
26958PROG_NET_SNMP_CONFIG=$ans
26959case "$PROG_NET_SNMP_CONFIG" in
26960 no) ;;
26961 /*)
26962    PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
26963    ;;
26964 *)
26965    # Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
26966set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
26967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26968printf %s "checking for $ac_word... " >&6; }
26969if test ${ac_cv_path_PATH_NET_SNMP_CONFIG+y}
26970then :
26971  printf %s "(cached) " >&6
26972else $as_nop
26973  case $PATH_NET_SNMP_CONFIG in
26974  [\\/]* | ?:[\\/]*)
26975  ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # Let the user override the test with a path.
26976  ;;
26977  *)
26978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26979for as_dir in $PATH
26980do
26981  IFS=$as_save_IFS
26982  case $as_dir in #(((
26983    '') as_dir=./ ;;
26984    */) ;;
26985    *) as_dir=$as_dir/ ;;
26986  esac
26987    for ac_exec_ext in '' $ac_executable_extensions; do
26988  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26989    ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir$ac_word$ac_exec_ext"
26990    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26991    break 2
26992  fi
26993done
26994  done
26995IFS=$as_save_IFS
26996
26997  ;;
26998esac
26999fi
27000PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
27001if test -n "$PATH_NET_SNMP_CONFIG"; then
27002  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
27003printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
27004else
27005  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
27006printf "%s\n" "no" >&6; }
27007fi
27008
27009
27010    { ac_cv_path_PATH_NET_SNMP_CONFIG=; unset ac_cv_path_PATH_NET_SNMP_CONFIG;}
27011;;
27012esac
27013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
27014printf %s "checking for net-snmp-config path... " >&6; }
27015{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
27016printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
27017
27018case "$PATH_NET_SNMP_CONFIG" in
27019 /*)	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp version" >&5
27020printf %s "checking for net-snmp version... " >&6; }
27021if test ${ntp_cv_net_snmp_version+y}
27022then :
27023  printf %s "(cached) " >&6
27024else $as_nop
27025  ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`
27026
27027fi
27028{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_net_snmp_version" >&5
27029printf "%s\n" "$ntp_cv_net_snmp_version" >&6; }
27030	;;
27031esac
27032
27033case "$host" in
27034 *-*-vxworks*)
27035    ac_link="$ac_link $VX_KERNEL"
27036    ;;
27037esac
27038
27039# HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
27040{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
27041printf %s "checking for library containing openlog... " >&6; }
27042if test ${ac_cv_search_openlog+y}
27043then :
27044  printf %s "(cached) " >&6
27045else $as_nop
27046  ac_func_search_save_LIBS=$LIBS
27047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27048/* end confdefs.h.  */
27049
27050/* Override any GCC internal prototype to avoid an error.
27051   Use char because int might match the return type of a GCC
27052   builtin and then its argument prototype would still apply.  */
27053char openlog ();
27054int
27055main (void)
27056{
27057return openlog ();
27058  ;
27059  return 0;
27060}
27061_ACEOF
27062for ac_lib in '' gen syslog
27063do
27064  if test -z "$ac_lib"; then
27065    ac_res="none required"
27066  else
27067    ac_res=-l$ac_lib
27068    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27069  fi
27070  if ac_fn_c_try_link "$LINENO"
27071then :
27072  ac_cv_search_openlog=$ac_res
27073fi
27074rm -f core conftest.err conftest.$ac_objext conftest.beam \
27075    conftest$ac_exeext
27076  if test ${ac_cv_search_openlog+y}
27077then :
27078  break
27079fi
27080done
27081if test ${ac_cv_search_openlog+y}
27082then :
27083
27084else $as_nop
27085  ac_cv_search_openlog=no
27086fi
27087rm conftest.$ac_ext
27088LIBS=$ac_func_search_save_LIBS
27089fi
27090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
27091printf "%s\n" "$ac_cv_search_openlog" >&6; }
27092ac_res=$ac_cv_search_openlog
27093if test "$ac_res" != no
27094then :
27095  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27096
27097fi
27098
27099# XXX library list will be in ac_cv_search_openlog
27100
27101# LIBSECCOMP is off by default -- needs testing with all the features
27102# Please send bug reports to loganaden@gmail.com
27103{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
27104printf %s "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
27105# Check whether --enable-libseccomp was given.
27106if test ${enable_libseccomp+y}
27107then :
27108  enableval=$enable_libseccomp; ntp_ok=$enableval
27109else $as_nop
27110  ntp_ok=no
27111
27112fi
27113
27114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
27115printf "%s\n" "$ntp_ok" >&6; }
27116case "$ntp_ok" in
27117 yes)
27118    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
27119printf %s "checking for library containing seccomp_init... " >&6; }
27120if test ${ac_cv_search_seccomp_init+y}
27121then :
27122  printf %s "(cached) " >&6
27123else $as_nop
27124  ac_func_search_save_LIBS=$LIBS
27125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27126/* end confdefs.h.  */
27127
27128/* Override any GCC internal prototype to avoid an error.
27129   Use char because int might match the return type of a GCC
27130   builtin and then its argument prototype would still apply.  */
27131char seccomp_init ();
27132int
27133main (void)
27134{
27135return seccomp_init ();
27136  ;
27137  return 0;
27138}
27139_ACEOF
27140for ac_lib in '' seccomp
27141do
27142  if test -z "$ac_lib"; then
27143    ac_res="none required"
27144  else
27145    ac_res=-l$ac_lib
27146    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27147  fi
27148  if ac_fn_c_try_link "$LINENO"
27149then :
27150  ac_cv_search_seccomp_init=$ac_res
27151fi
27152rm -f core conftest.err conftest.$ac_objext conftest.beam \
27153    conftest$ac_exeext
27154  if test ${ac_cv_search_seccomp_init+y}
27155then :
27156  break
27157fi
27158done
27159if test ${ac_cv_search_seccomp_init+y}
27160then :
27161
27162else $as_nop
27163  ac_cv_search_seccomp_init=no
27164fi
27165rm conftest.$ac_ext
27166LIBS=$ac_func_search_save_LIBS
27167fi
27168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
27169printf "%s\n" "$ac_cv_search_seccomp_init" >&6; }
27170ac_res=$ac_cv_search_seccomp_init
27171if test "$ac_res" != no
27172then :
27173  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27174
27175printf "%s\n" "#define LIBSECCOMP 1" >>confdefs.h
27176
27177
27178fi
27179
27180    if test "$cross_compiling" = yes
27181then :
27182  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27183printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
27184as_fn_error $? "cannot run test program while cross compiling
27185See \`config.log' for more details" "$LINENO" 5; }
27186else $as_nop
27187  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27188/* end confdefs.h.  */
27189
27190	#include <stdio.h>
27191	#include <stdlib.h>
27192	#include <errno.h>
27193	#include <sys/prctl.h>
27194	#include <linux/seccomp.h>
27195
27196	int main(void)
27197	{
27198		int ret;
27199		ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
27200		if (ret < 0) {
27201			switch (errno) {
27202			case ENOSYS:
27203				return 1;
27204			case EINVAL:
27205				return 1;
27206			default:
27207				return 1;
27208			}
27209		}
27210		ret =
27211		prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
27212		if (ret < 0) {
27213			switch (errno) {
27214			case EINVAL:
27215				return 1;
27216			case EFAULT:
27217				return 0;
27218			default:
27219				return 1;
27220		}
27221	}
27222return 1;
27223}
27224
27225
27226_ACEOF
27227if ac_fn_c_try_run "$LINENO"
27228then :
27229
27230printf "%s\n" "#define KERN_SECCOMP 1" >>confdefs.h
27231
27232
27233fi
27234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27235  conftest.$ac_objext conftest.beam conftest.$ac_ext
27236fi
27237
27238    ;;
27239esac
27240
27241
27242
27243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
27244printf %s "checking for facilitynames in syslog.h... " >&6; }
27245if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
27246then :
27247  printf %s "(cached) " >&6
27248else $as_nop
27249  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27250/* end confdefs.h.  */
27251
27252		#define SYSLOG_NAMES
27253		#include <stdlib.h>
27254		#include <syslog.h>
27255
27256int
27257main (void)
27258{
27259
27260		void *fnames = facilitynames;
27261
27262
27263  ;
27264  return 0;
27265}
27266	ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
27267_ACEOF
27268if ac_fn_c_try_compile "$LINENO"
27269then :
27270  ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
27271
27272fi
27273rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27274
27275fi
27276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
27277printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
27278case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
27279 yes)
27280
27281printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
27282
27283    ;;
27284 no)
27285    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
27286printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
27287esac
27288
27289
27290
27291case "$host" in
27292 *-*-*linux*) ;;
27293 *-*-osf4*) ;;
27294 *-*-osf5*) ;;
27295 *)
27296    # HMS: Make sure we check for -lrt for clock_* before this...
27297    case "$ac_cv_search_clock_gettime" in
27298     '') { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27299printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
27300as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!
27301See \`config.log' for more details" "$LINENO" 5; } ;;
27302    esac
27303    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
27304printf %s "checking for library containing sched_setscheduler... " >&6; }
27305if test ${ac_cv_search_sched_setscheduler+y}
27306then :
27307  printf %s "(cached) " >&6
27308else $as_nop
27309  ac_func_search_save_LIBS=$LIBS
27310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27311/* end confdefs.h.  */
27312
27313/* Override any GCC internal prototype to avoid an error.
27314   Use char because int might match the return type of a GCC
27315   builtin and then its argument prototype would still apply.  */
27316char sched_setscheduler ();
27317int
27318main (void)
27319{
27320return sched_setscheduler ();
27321  ;
27322  return 0;
27323}
27324_ACEOF
27325for ac_lib in '' rt posix4
27326do
27327  if test -z "$ac_lib"; then
27328    ac_res="none required"
27329  else
27330    ac_res=-l$ac_lib
27331    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27332  fi
27333  if ac_fn_c_try_link "$LINENO"
27334then :
27335  ac_cv_search_sched_setscheduler=$ac_res
27336fi
27337rm -f core conftest.err conftest.$ac_objext conftest.beam \
27338    conftest$ac_exeext
27339  if test ${ac_cv_search_sched_setscheduler+y}
27340then :
27341  break
27342fi
27343done
27344if test ${ac_cv_search_sched_setscheduler+y}
27345then :
27346
27347else $as_nop
27348  ac_cv_search_sched_setscheduler=no
27349fi
27350rm conftest.$ac_ext
27351LIBS=$ac_func_search_save_LIBS
27352fi
27353{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
27354printf "%s\n" "$ac_cv_search_sched_setscheduler" >&6; }
27355ac_res=$ac_cv_search_sched_setscheduler
27356if test "$ac_res" != no
27357then :
27358  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27359
27360fi
27361
27362    ;;
27363esac
27364
27365ac_fn_c_check_header_compile "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
27366if test "x$ac_cv_header_bstring_h" = xyes
27367then :
27368  printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h
27369
27370fi
27371ac_fn_c_check_header_compile "$LINENO" "sys/procctl.h" "ac_cv_header_sys_procctl_h" "$ac_includes_default"
27372if test "x$ac_cv_header_sys_procctl_h" = xyes
27373then :
27374  printf "%s\n" "#define HAVE_SYS_PROCCTL_H 1" >>confdefs.h
27375
27376fi
27377
27378ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
27379if test "x$ac_cv_header_dns_sd_h" = xyes
27380then :
27381  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
27382printf %s "checking for library containing DNSServiceRegister... " >&6; }
27383if test ${ac_cv_search_DNSServiceRegister+y}
27384then :
27385  printf %s "(cached) " >&6
27386else $as_nop
27387  ac_func_search_save_LIBS=$LIBS
27388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27389/* end confdefs.h.  */
27390
27391/* Override any GCC internal prototype to avoid an error.
27392   Use char because int might match the return type of a GCC
27393   builtin and then its argument prototype would still apply.  */
27394char DNSServiceRegister ();
27395int
27396main (void)
27397{
27398return DNSServiceRegister ();
27399  ;
27400  return 0;
27401}
27402_ACEOF
27403for ac_lib in '' dns_sd
27404do
27405  if test -z "$ac_lib"; then
27406    ac_res="none required"
27407  else
27408    ac_res=-l$ac_lib
27409    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27410  fi
27411  if ac_fn_c_try_link "$LINENO"
27412then :
27413  ac_cv_search_DNSServiceRegister=$ac_res
27414fi
27415rm -f core conftest.err conftest.$ac_objext conftest.beam \
27416    conftest$ac_exeext
27417  if test ${ac_cv_search_DNSServiceRegister+y}
27418then :
27419  break
27420fi
27421done
27422if test ${ac_cv_search_DNSServiceRegister+y}
27423then :
27424
27425else $as_nop
27426  ac_cv_search_DNSServiceRegister=no
27427fi
27428rm conftest.$ac_ext
27429LIBS=$ac_func_search_save_LIBS
27430fi
27431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
27432printf "%s\n" "$ac_cv_search_DNSServiceRegister" >&6; }
27433ac_res=$ac_cv_search_DNSServiceRegister
27434if test "$ac_res" != no
27435then :
27436  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27437
27438printf "%s\n" "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
27439
27440
27441fi
27442
27443
27444fi
27445
27446ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
27447if test "x$ac_cv_header_fcntl_h" = xyes
27448then :
27449  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
27450
27451fi
27452ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
27453if test "x$ac_cv_header_fnmatch_h" = xyes
27454then :
27455  printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h
27456
27457fi
27458ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
27459if test "x$ac_cv_header_ieeefp_h" = xyes
27460then :
27461  printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
27462
27463fi
27464ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
27465if test "x$ac_cv_header_inttypes_h" = xyes
27466then :
27467  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
27468
27469fi
27470ac_fn_c_check_header_compile "$LINENO" "kvm.h" "ac_cv_header_kvm_h" "$ac_includes_default"
27471if test "x$ac_cv_header_kvm_h" = xyes
27472then :
27473  printf "%s\n" "#define HAVE_KVM_H 1" >>confdefs.h
27474
27475fi
27476ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
27477if test "x$ac_cv_header_math_h" = xyes
27478then :
27479  printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
27480
27481fi
27482
27483
27484ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
27485if test "x$ac_cv_header_memory_h" = xyes
27486then :
27487  printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
27488
27489fi
27490ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
27491if test "x$ac_cv_header_netdb_h" = xyes
27492then :
27493  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
27494
27495fi
27496ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
27497if test "x$ac_cv_header_poll_h" = xyes
27498then :
27499  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
27500
27501fi
27502
27503ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
27504if test "x$ac_cv_header_sgtty_h" = xyes
27505then :
27506  printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
27507
27508fi
27509ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default"
27510if test "x$ac_cv_header_stdatomic_h" = xyes
27511then :
27512  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
27513
27514fi
27515
27516ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
27517if test "x$ac_cv_type__Bool" = xyes
27518then :
27519
27520printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
27521
27522
27523fi
27524
27525   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
27526printf %s "checking for stdbool.h that conforms to C99... " >&6; }
27527if test ${ac_cv_header_stdbool_h+y}
27528then :
27529  printf %s "(cached) " >&6
27530else $as_nop
27531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27532/* end confdefs.h.  */
27533#include <stdbool.h>
27534
27535             #ifndef __bool_true_false_are_defined
27536               #error "__bool_true_false_are_defined is not defined"
27537             #endif
27538             char a[__bool_true_false_are_defined == 1 ? 1 : -1];
27539
27540             /* Regardless of whether this is C++ or "_Bool" is a
27541                valid type name, "true" and "false" should be usable
27542                in #if expressions and integer constant expressions,
27543                and "bool" should be a valid type name.  */
27544
27545             #if !true
27546               #error "'true' is not true"
27547             #endif
27548             #if true != 1
27549               #error "'true' is not equal to 1"
27550             #endif
27551             char b[true == 1 ? 1 : -1];
27552             char c[true];
27553
27554             #if false
27555               #error "'false' is not false"
27556             #endif
27557             #if false != 0
27558               #error "'false' is not equal to 0"
27559             #endif
27560             char d[false == 0 ? 1 : -1];
27561
27562             enum { e = false, f = true, g = false * true, h = true * 256 };
27563
27564             char i[(bool) 0.5 == true ? 1 : -1];
27565             char j[(bool) 0.0 == false ? 1 : -1];
27566             char k[sizeof (bool) > 0 ? 1 : -1];
27567
27568             struct sb { bool s: 1; bool t; } s;
27569             char l[sizeof s.t > 0 ? 1 : -1];
27570
27571             /* The following fails for
27572                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
27573             bool m[h];
27574             char n[sizeof m == h * sizeof m[0] ? 1 : -1];
27575             char o[-1 - (bool) 0 < 0 ? 1 : -1];
27576             /* Catch a bug in an HP-UX C compiler.  See
27577         https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
27578         https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
27579              */
27580             bool p = true;
27581             bool *pp = &p;
27582
27583             /* C 1999 specifies that bool, true, and false are to be
27584                macros, but C++ 2011 and later overrule this.  */
27585             #if __cplusplus < 201103
27586              #ifndef bool
27587               #error "bool is not defined"
27588              #endif
27589              #ifndef false
27590               #error "false is not defined"
27591              #endif
27592              #ifndef true
27593               #error "true is not defined"
27594              #endif
27595             #endif
27596
27597             /* If _Bool is available, repeat with it all the tests
27598                above that used bool.  */
27599             #ifdef HAVE__BOOL
27600               struct sB { _Bool s: 1; _Bool t; } t;
27601
27602               char q[(_Bool) 0.5 == true ? 1 : -1];
27603               char r[(_Bool) 0.0 == false ? 1 : -1];
27604               char u[sizeof (_Bool) > 0 ? 1 : -1];
27605               char v[sizeof t.t > 0 ? 1 : -1];
27606
27607               _Bool w[h];
27608               char x[sizeof m == h * sizeof m[0] ? 1 : -1];
27609               char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
27610               _Bool z = true;
27611               _Bool *pz = &p;
27612             #endif
27613
27614int
27615main (void)
27616{
27617
27618             bool ps = &s;
27619             *pp |= p;
27620             *pp |= ! p;
27621
27622             #ifdef HAVE__BOOL
27623               _Bool pt = &t;
27624               *pz |= z;
27625               *pz |= ! z;
27626             #endif
27627
27628             /* Refer to every declared value, so they cannot be
27629                discarded as unused.  */
27630             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
27631                     + !l + !m + !n + !o + !p + !pp + !ps
27632             #ifdef HAVE__BOOL
27633                     + !q + !r + !u + !v + !w + !x + !y + !z + !pt
27634             #endif
27635                    );
27636
27637  ;
27638  return 0;
27639}
27640_ACEOF
27641if ac_fn_c_try_compile "$LINENO"
27642then :
27643  ac_cv_header_stdbool_h=yes
27644else $as_nop
27645  ac_cv_header_stdbool_h=no
27646fi
27647rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27648fi
27649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
27650printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
27651
27652if test $ac_cv_header_stdbool_h = yes; then
27653
27654printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
27655
27656fi
27657
27658ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
27659if test "x$ac_cv_header_stdlib_h" = xyes
27660then :
27661  printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
27662
27663fi
27664ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
27665if test "x$ac_cv_header_string_h" = xyes
27666then :
27667  printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
27668
27669fi
27670ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
27671if test "x$ac_cv_header_termio_h" = xyes
27672then :
27673  printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
27674
27675fi
27676
27677ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
27678if test "x$ac_cv_header_termios_h" = xyes
27679then :
27680  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
27681
27682fi
27683ac_fn_c_check_header_compile "$LINENO" "timepps.h" "ac_cv_header_timepps_h" "$ac_includes_default"
27684if test "x$ac_cv_header_timepps_h" = xyes
27685then :
27686  printf "%s\n" "#define HAVE_TIMEPPS_H 1" >>confdefs.h
27687
27688fi
27689ac_fn_c_check_header_compile "$LINENO" "timex.h" "ac_cv_header_timex_h" "$ac_includes_default"
27690if test "x$ac_cv_header_timex_h" = xyes
27691then :
27692  printf "%s\n" "#define HAVE_TIMEX_H 1" >>confdefs.h
27693
27694fi
27695ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
27696if test "x$ac_cv_header_unistd_h" = xyes
27697then :
27698  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
27699
27700fi
27701
27702
27703case "$host" in
27704 *-*-aix*)
27705    ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
27706if test "x$ac_cv_header_utmpx_h" = xyes
27707then :
27708  printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
27709
27710fi
27711
27712    case "$ac_cv_header_utmpx_h" in
27713     yes)
27714	;;
27715     *)
27716	ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
27717if test "x$ac_cv_header_utmp_h" = xyes
27718then :
27719  printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
27720
27721fi
27722
27723	;;
27724    esac
27725    ;;
27726 *)
27727    ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
27728if test "x$ac_cv_header_utmp_h" = xyes
27729then :
27730  printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
27731
27732fi
27733ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
27734if test "x$ac_cv_header_utmpx_h" = xyes
27735then :
27736  printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
27737
27738fi
27739
27740    ;;
27741esac
27742
27743#
27744# On Suns only (so far) getpass() truncates the typed password to 8
27745# characters, but getpassphrase() allows up to 257.  Most systems'
27746# getpass() does not truncate, at least not so as to affect ntpq and
27747# ntpdc password prompts.
27748#
27749# So check for getpassphrase(), but only on Sun operating systems.
27750#
27751case "$host" in
27752 *-*-sunos*|*-*-solaris*)
27753    ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
27754if test "x$ac_cv_func_getpassphrase" = xyes
27755then :
27756  printf "%s\n" "#define HAVE_GETPASSPHRASE 1" >>confdefs.h
27757
27758fi
27759
27760esac
27761
27762
27763ac_fn_c_check_header_compile "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
27764if test "x$ac_cv_header_net_if6_h" = xyes
27765then :
27766  printf "%s\n" "#define HAVE_NET_IF6_H 1" >>confdefs.h
27767
27768fi
27769
27770ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
27771    #include <sys/types.h>
27772    #include <sys/socket.h>
27773    #include <net/if.h>
27774
27775"
27776if test "x$ac_cv_header_net_route_h" = xyes
27777then :
27778  printf "%s\n" "#define HAVE_NET_ROUTE_H 1" >>confdefs.h
27779
27780fi
27781
27782
27783ac_fn_c_check_header_compile "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
27784if test "x$ac_cv_header_netinfo_ni_h" = xyes
27785then :
27786  printf "%s\n" "#define HAVE_NETINFO_NI_H 1" >>confdefs.h
27787
27788fi
27789
27790case "$ac_cv_header_netinfo_ni_h" in
27791 yes)
27792
27793printf "%s\n" "#define HAVE_NETINFO 1" >>confdefs.h
27794
27795esac
27796ac_fn_c_check_header_compile "$LINENO" "sun/audioio.h" "ac_cv_header_sun_audioio_h" "$ac_includes_default"
27797if test "x$ac_cv_header_sun_audioio_h" = xyes
27798then :
27799  printf "%s\n" "#define HAVE_SUN_AUDIOIO_H 1" >>confdefs.h
27800
27801fi
27802ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
27803if test "x$ac_cv_header_sys_audioio_h" = xyes
27804then :
27805  printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
27806
27807fi
27808ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
27809if test "x$ac_cv_header_sys_file_h" = xyes
27810then :
27811  printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
27812
27813fi
27814
27815case "$host" in
27816 *-*-sunos4*)
27817    ;;
27818 *)
27819    ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
27820if test "x$ac_cv_header_sys_ioctl_h" = xyes
27821then :
27822  printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
27823
27824fi
27825
27826    ;;
27827esac
27828ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
27829if test "x$ac_cv_header_sys_ipc_h" = xyes
27830then :
27831  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
27832
27833fi
27834ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
27835if test "x$ac_cv_header_sys_lock_h" = xyes
27836then :
27837  printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
27838
27839fi
27840ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
27841if test "x$ac_cv_header_sys_mman_h" = xyes
27842then :
27843  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
27844
27845fi
27846
27847# HMS: Check sys/proc.h and sys/resource.h after some others
27848ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
27849if test "x$ac_cv_header_sys_modem_h" = xyes
27850then :
27851  printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
27852
27853fi
27854ac_fn_c_check_header_compile "$LINENO" "sys/ppsclock.h" "ac_cv_header_sys_ppsclock_h" "$ac_includes_default"
27855if test "x$ac_cv_header_sys_ppsclock_h" = xyes
27856then :
27857  printf "%s\n" "#define HAVE_SYS_PPSCLOCK_H 1" >>confdefs.h
27858
27859fi
27860ac_fn_c_check_header_compile "$LINENO" "sys/ppstime.h" "ac_cv_header_sys_ppstime_h" "$ac_includes_default"
27861if test "x$ac_cv_header_sys_ppstime_h" = xyes
27862then :
27863  printf "%s\n" "#define HAVE_SYS_PPSTIME_H 1" >>confdefs.h
27864
27865fi
27866ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
27867if test "x$ac_cv_header_sched_h" = xyes
27868then :
27869  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
27870
27871fi
27872
27873case "$ac_cv_header_sched_h" in
27874 yes)
27875    ;;
27876 *)
27877    ac_fn_c_check_header_compile "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
27878if test "x$ac_cv_header_sys_sched_h" = xyes
27879then :
27880  printf "%s\n" "#define HAVE_SYS_SCHED_H 1" >>confdefs.h
27881
27882fi
27883
27884    ;;
27885esac
27886# HMS: Check sys/shm.h after some others
27887ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
27888if test "x$ac_cv_header_sys_select_h" = xyes
27889then :
27890  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
27891
27892fi
27893ac_fn_c_check_header_compile "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default"
27894if test "x$ac_cv_header_sys_signal_h" = xyes
27895then :
27896  printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h
27897
27898fi
27899ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
27900if test "x$ac_cv_header_sys_sockio_h" = xyes
27901then :
27902  printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
27903
27904fi
27905
27906# HMS: Checked sys/socket.h earlier
27907case "$host" in
27908 *-*-netbsd*)
27909    ;;
27910 *)
27911    ac_fn_c_check_header_compile "$LINENO" "machine/soundcard.h" "ac_cv_header_machine_soundcard_h" "$ac_includes_default"
27912if test "x$ac_cv_header_machine_soundcard_h" = xyes
27913then :
27914  printf "%s\n" "#define HAVE_MACHINE_SOUNDCARD_H 1" >>confdefs.h
27915
27916fi
27917ac_fn_c_check_header_compile "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
27918if test "x$ac_cv_header_sys_soundcard_h" = xyes
27919then :
27920  printf "%s\n" "#define HAVE_SYS_SOUNDCARD_H 1" >>confdefs.h
27921
27922fi
27923
27924    ;;
27925esac
27926ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
27927if test "x$ac_cv_header_sys_stat_h" = xyes
27928then :
27929  printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
27930
27931fi
27932ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
27933if test "x$ac_cv_header_sys_stream_h" = xyes
27934then :
27935  printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
27936
27937fi
27938ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
27939if test "x$ac_cv_header_stropts_h" = xyes
27940then :
27941  printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
27942
27943fi
27944ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
27945if test "x$ac_cv_header_sys_stropts_h" = xyes
27946then :
27947  printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
27948
27949fi
27950ac_fn_c_check_header_compile "$LINENO" "sys/syssgi.h" "ac_cv_header_sys_syssgi_h" "$ac_includes_default"
27951if test "x$ac_cv_header_sys_syssgi_h" = xyes
27952then :
27953  printf "%s\n" "#define HAVE_SYS_SYSSGI_H 1" >>confdefs.h
27954
27955fi
27956
27957ac_fn_c_check_header_compile "$LINENO" "sys/systune.h" "ac_cv_header_sys_systune_h" "$ac_includes_default"
27958if test "x$ac_cv_header_sys_systune_h" = xyes
27959then :
27960  printf "%s\n" "#define HAVE_SYS_SYSTUNE_H 1" >>confdefs.h
27961
27962fi
27963ac_fn_c_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default"
27964if test "x$ac_cv_header_sys_termios_h" = xyes
27965then :
27966  printf "%s\n" "#define HAVE_SYS_TERMIOS_H 1" >>confdefs.h
27967
27968fi
27969ac_fn_c_check_header_compile "$LINENO" "sys/tpro.h" "ac_cv_header_sys_tpro_h" "$ac_includes_default"
27970if test "x$ac_cv_header_sys_tpro_h" = xyes
27971then :
27972  printf "%s\n" "#define HAVE_SYS_TPRO_H 1" >>confdefs.h
27973
27974fi
27975ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
27976if test "x$ac_cv_header_sys_wait_h" = xyes
27977then :
27978  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
27979
27980fi
27981
27982ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
27983if test "x$ac_cv_func_waitpid" = xyes
27984then :
27985  printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
27986
27987fi
27988
27989case "$host" in
27990*-convex-*)
27991    ac_fn_c_check_header_compile "$LINENO" "/sys/sync/queue.h" "ac_cv_header__sys_sync_queue_h" "$ac_includes_default"
27992if test "x$ac_cv_header__sys_sync_queue_h" = xyes
27993then :
27994  printf "%s\n" "#define HAVE__SYS_SYNC_QUEUE_H 1" >>confdefs.h
27995
27996fi
27997ac_fn_c_check_header_compile "$LINENO" "/sys/sync/sema.h" "ac_cv_header__sys_sync_sema_h" "$ac_includes_default"
27998if test "x$ac_cv_header__sys_sync_sema_h" = xyes
27999then :
28000  printf "%s\n" "#define HAVE__SYS_SYNC_SEMA_H 1" >>confdefs.h
28001
28002fi
28003
28004    ;;
28005*-*-bsdi*)
28006    ac_fn_c_check_header_compile "$LINENO" "machine/inline.h" "ac_cv_header_machine_inline_h" "$ac_includes_default"
28007if test "x$ac_cv_header_machine_inline_h" = xyes
28008then :
28009  printf "%s\n" "#define HAVE_MACHINE_INLINE_H 1" >>confdefs.h
28010
28011fi
28012ac_fn_c_check_header_compile "$LINENO" "sys/pcl720.h" "ac_cv_header_sys_pcl720_h" "$ac_includes_default"
28013if test "x$ac_cv_header_sys_pcl720_h" = xyes
28014then :
28015  printf "%s\n" "#define HAVE_SYS_PCL720_H 1" >>confdefs.h
28016
28017fi
28018ac_fn_c_check_header_compile "$LINENO" "sys/i8253.h" "ac_cv_header_sys_i8253_h" "$ac_includes_default"
28019if test "x$ac_cv_header_sys_i8253_h" = xyes
28020then :
28021  printf "%s\n" "#define HAVE_SYS_I8253_H 1" >>confdefs.h
28022
28023fi
28024
28025    ;;
28026esac
28027
28028case "$ac_cv_header_stdatomic_h" in
28029 yes)
28030	ac_fn_c_check_func "$LINENO" "atomic_thread_fence" "ac_cv_func_atomic_thread_fence"
28031if test "x$ac_cv_func_atomic_thread_fence" = xyes
28032then :
28033  printf "%s\n" "#define HAVE_ATOMIC_THREAD_FENCE 1" >>confdefs.h
28034
28035fi
28036
28037	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_thread_fence()" >&5
28038printf %s "checking for atomic_thread_fence()... " >&6; }
28039if test ${ntp_cv_func_atomic_thread_fence+y}
28040then :
28041  printf %s "(cached) " >&6
28042else $as_nop
28043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28044/* end confdefs.h.  */
28045
28046			#include <stdatomic.h>
28047
28048int
28049main (void)
28050{
28051
28052			atomic_thread_fence(memory_order_seq_cst);
28053
28054
28055  ;
28056  return 0;
28057}
28058_ACEOF
28059if ac_fn_c_try_compile "$LINENO"
28060then :
28061  ntp_cv_func_atomic_thread_fence=yes
28062else $as_nop
28063  ntp_cv_func_atomic_thread_fence=no
28064
28065fi
28066rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28067
28068fi
28069{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_atomic_thread_fence" >&5
28070printf "%s\n" "$ntp_cv_func_atomic_thread_fence" >&6; }
28071    ;;
28072esac
28073
28074case "$host" in
28075 *-*-solaris2.6)
28076    # Broken...
28077    ;;
28078 *)
28079    ac_fn_c_check_func "$LINENO" "ntp_adjtime" "ac_cv_func_ntp_adjtime"
28080if test "x$ac_cv_func_ntp_adjtime" = xyes
28081then :
28082  printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
28083
28084fi
28085ac_fn_c_check_func "$LINENO" "ntp_gettime" "ac_cv_func_ntp_gettime"
28086if test "x$ac_cv_func_ntp_gettime" = xyes
28087then :
28088  printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
28089
28090fi
28091
28092    ;;
28093esac
28094
28095case "$host" in
28096 *-*-*linux*)
28097    case "$ac_cv_func_ntp_gettime" in
28098     yes)
28099	;;
28100     *)
28101	ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
28102if test "x$ac_cv_func___ntp_gettime" = xyes
28103then :
28104  printf "%s\n" "#define HAVE___NTP_GETTIME 1" >>confdefs.h
28105
28106fi
28107
28108	case "$ac_cv_func___ntp_gettime" in
28109	 yes)
28110
28111printf "%s\n" "#define ntp_gettime __ntp_gettime" >>confdefs.h
28112
28113
28114printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
28115
28116	esac
28117	;;
28118    esac
28119    ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
28120if test "x$ac_cv_func_adjtimex" = xyes
28121then :
28122  printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
28123
28124fi
28125
28126    case "$ac_cv_func_adjtimex" in
28127     yes)
28128
28129printf "%s\n" "#define ntp_adjtime adjtimex" >>confdefs.h
28130
28131
28132printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
28133
28134	have_adjtimex=1
28135	;;
28136     *)
28137	ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
28138if test "x$ac_cv_func___adjtimex" = xyes
28139then :
28140  printf "%s\n" "#define HAVE___ADJTIMEX 1" >>confdefs.h
28141
28142fi
28143
28144	case "$ac_cv_func___adjtimex" in
28145	 yes)
28146
28147printf "%s\n" "#define ntp_adjtime __adjtimex" >>confdefs.h
28148
28149
28150printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
28151
28152
28153printf "%s\n" "#define adjtimex __adjtimex" >>confdefs.h
28154
28155
28156printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
28157
28158	    have_adjtimex=1
28159	esac
28160	;;
28161    esac
28162esac
28163case "$have_adjtimex" in
28164 '')
28165    # nlist stuff is only needed for tickadj.
28166    saved_LIBS="$LIBS"
28167    LIBS=
28168    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
28169printf %s "checking for library containing nlist... " >&6; }
28170if test ${ac_cv_search_nlist+y}
28171then :
28172  printf %s "(cached) " >&6
28173else $as_nop
28174  ac_func_search_save_LIBS=$LIBS
28175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28176/* end confdefs.h.  */
28177
28178/* Override any GCC internal prototype to avoid an error.
28179   Use char because int might match the return type of a GCC
28180   builtin and then its argument prototype would still apply.  */
28181char nlist ();
28182int
28183main (void)
28184{
28185return nlist ();
28186  ;
28187  return 0;
28188}
28189_ACEOF
28190for ac_lib in '' elf ld mld
28191do
28192  if test -z "$ac_lib"; then
28193    ac_res="none required"
28194  else
28195    ac_res=-l$ac_lib
28196    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28197  fi
28198  if ac_fn_c_try_link "$LINENO"
28199then :
28200  ac_cv_search_nlist=$ac_res
28201fi
28202rm -f core conftest.err conftest.$ac_objext conftest.beam \
28203    conftest$ac_exeext
28204  if test ${ac_cv_search_nlist+y}
28205then :
28206  break
28207fi
28208done
28209if test ${ac_cv_search_nlist+y}
28210then :
28211
28212else $as_nop
28213  ac_cv_search_nlist=no
28214fi
28215rm conftest.$ac_ext
28216LIBS=$ac_func_search_save_LIBS
28217fi
28218{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
28219printf "%s\n" "$ac_cv_search_nlist" >&6; }
28220ac_res=$ac_cv_search_nlist
28221if test "$ac_res" != no
28222then :
28223  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28224
28225fi
28226
28227    # XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
28228    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
28229printf %s "checking for library containing kvm_open... " >&6; }
28230if test ${ac_cv_search_kvm_open+y}
28231then :
28232  printf %s "(cached) " >&6
28233else $as_nop
28234  ac_func_search_save_LIBS=$LIBS
28235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28236/* end confdefs.h.  */
28237
28238/* Override any GCC internal prototype to avoid an error.
28239   Use char because int might match the return type of a GCC
28240   builtin and then its argument prototype would still apply.  */
28241char kvm_open ();
28242int
28243main (void)
28244{
28245return kvm_open ();
28246  ;
28247  return 0;
28248}
28249_ACEOF
28250for ac_lib in '' kvm
28251do
28252  if test -z "$ac_lib"; then
28253    ac_res="none required"
28254  else
28255    ac_res=-l$ac_lib
28256    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
28257  fi
28258  if ac_fn_c_try_link "$LINENO"
28259then :
28260  ac_cv_search_kvm_open=$ac_res
28261fi
28262rm -f core conftest.err conftest.$ac_objext conftest.beam \
28263    conftest$ac_exeext
28264  if test ${ac_cv_search_kvm_open+y}
28265then :
28266  break
28267fi
28268done
28269if test ${ac_cv_search_kvm_open+y}
28270then :
28271
28272else $as_nop
28273  ac_cv_search_kvm_open=no
28274fi
28275rm conftest.$ac_ext
28276LIBS=$ac_func_search_save_LIBS
28277fi
28278{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
28279printf "%s\n" "$ac_cv_search_kvm_open" >&6; }
28280ac_res=$ac_cv_search_kvm_open
28281if test "$ac_res" != no
28282then :
28283  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28284
28285fi
28286	    # XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
28287    ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
28288if test "x$ac_cv_header_nlist_h" = xyes
28289then :
28290  printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h
28291
28292fi
28293ac_fn_c_check_header_compile "$LINENO" "sys/var.h" "ac_cv_header_sys_var_h" "$ac_includes_default"
28294if test "x$ac_cv_header_sys_var_h" = xyes
28295then :
28296  printf "%s\n" "#define HAVE_SYS_VAR_H 1" >>confdefs.h
28297
28298fi
28299
28300    case "$ac_cv_header_nlist_h" in
28301     yes)
28302
28303printf "%s\n" "#define NLIST_STRUCT 1" >>confdefs.h
28304
28305	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
28306printf %s "checking for n_un in struct nlist... " >&6; }
28307if test ${ntp_cv_struct_nlist_n_un+y}
28308then :
28309  printf %s "(cached) " >&6
28310else $as_nop
28311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28312/* end confdefs.h.  */
28313
28314			#include <nlist.h>
28315
28316int
28317main (void)
28318{
28319
28320			struct nlist n;
28321			n.n_un.n_name = 0;
28322
28323
28324  ;
28325  return 0;
28326}
28327_ACEOF
28328if ac_fn_c_try_compile "$LINENO"
28329then :
28330  ntp_cv_struct_nlist_n_un=yes
28331else $as_nop
28332  ntp_cv_struct_nlist_n_un=no
28333
28334fi
28335rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28336
28337fi
28338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
28339printf "%s\n" "$ntp_cv_struct_nlist_n_un" >&6; }
28340	case "$ntp_cv_struct_nlist_n_un" in
28341	 yes)
28342
28343printf "%s\n" "#define NLIST_NAME_UNION 1" >>confdefs.h
28344
28345	esac
28346    esac
28347
28348    LDADD_NLIST="$LIBS"
28349    LIBS="$saved_LIBS"
28350    { saved_LIBS=; unset saved_LIBS;}
28351esac
28352
28353ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
28354    #ifdef HAVE_SYS_TYPES_H
28355    # include <sys/types.h>
28356    #endif
28357    #ifdef HAVE_SYS_TIME_H
28358    # include <sys/time.h>
28359    #endif
28360
28361"
28362if test "x$ac_cv_header_sys_proc_h" = xyes
28363then :
28364  printf "%s\n" "#define HAVE_SYS_PROC_H 1" >>confdefs.h
28365
28366fi
28367
28368
28369ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
28370    #ifdef HAVE_SYS_TIME_H
28371    # include <sys/time.h>
28372    #endif
28373
28374"
28375if test "x$ac_cv_header_sys_resource_h" = xyes
28376then :
28377  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
28378
28379fi
28380
28381
28382ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
28383    #ifdef HAVE_SYS_TYPES_H
28384    # include <sys/types.h>
28385    #endif
28386    #ifdef HAVE_SYS_IPC_H
28387    # include <sys/ipc.h>
28388    #endif
28389
28390"
28391if test "x$ac_cv_header_sys_shm_h" = xyes
28392then :
28393  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
28394
28395fi
28396
28397
28398ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
28399    #ifdef HAVE_SYS_TIME_H
28400    # include <sys/time.h>
28401    #endif
28402
28403"
28404if test "x$ac_cv_header_sys_timex_h" = xyes
28405then :
28406  printf "%s\n" "#define HAVE_SYS_TIMEX_H 1" >>confdefs.h
28407
28408fi
28409
28410
28411
28412
28413# We could do a cv check here, but is it worth it?
28414
28415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28416/* end confdefs.h.  */
28417
28418    	#include <sys/socket.h>
28419	#ifndef AF_UNSPEC
28420	#include "Bletch: AF_UNSPEC is undefined!"
28421	#endif
28422	#if AF_UNSPEC != 0
28423	#include "Bletch: AF_UNSPEC != 0"
28424	#endif
28425
28426int
28427main (void)
28428{
28429{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: AF_UNSPEC is zero, as expected." >&5
28430printf "%s\n" "$as_me: AF_UNSPEC is zero, as expected." >&6;}
28431  ;
28432  return 0;
28433}
28434
28435_ACEOF
28436if ac_fn_c_try_compile "$LINENO"
28437then :
28438
28439fi
28440rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28441
28442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
28443printf %s "checking return type of signal handlers... " >&6; }
28444if test ${ac_cv_type_signal+y}
28445then :
28446  printf %s "(cached) " >&6
28447else $as_nop
28448  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28449/* end confdefs.h.  */
28450#include <sys/types.h>
28451#include <signal.h>
28452
28453int
28454main (void)
28455{
28456return *(signal (0, 0)) (0) == 1;
28457  ;
28458  return 0;
28459}
28460_ACEOF
28461if ac_fn_c_try_compile "$LINENO"
28462then :
28463  ac_cv_type_signal=int
28464else $as_nop
28465  ac_cv_type_signal=void
28466fi
28467rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28468fi
28469{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
28470printf "%s\n" "$ac_cv_type_signal" >&6; }
28471
28472printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
28473
28474
28475ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
28476if test "x$ac_cv_type_off_t" = xyes
28477then :
28478
28479else $as_nop
28480
28481printf "%s\n" "#define off_t long int" >>confdefs.h
28482
28483fi
28484
28485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
28486printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
28487if test ${ac_cv_struct_tm+y}
28488then :
28489  printf %s "(cached) " >&6
28490else $as_nop
28491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28492/* end confdefs.h.  */
28493#include <sys/types.h>
28494#include <time.h>
28495
28496int
28497main (void)
28498{
28499struct tm tm;
28500				     int *p = &tm.tm_sec;
28501				     return !p;
28502  ;
28503  return 0;
28504}
28505_ACEOF
28506if ac_fn_c_try_compile "$LINENO"
28507then :
28508  ac_cv_struct_tm=time.h
28509else $as_nop
28510  ac_cv_struct_tm=sys/time.h
28511fi
28512rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28513fi
28514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
28515printf "%s\n" "$ac_cv_struct_tm" >&6; }
28516if test $ac_cv_struct_tm = sys/time.h; then
28517
28518printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
28519
28520fi
28521
28522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
28523printf %s "checking for a fallback value for HZ... " >&6; }
28524if test ${ntp_cv_default_hz+y}
28525then :
28526  printf %s "(cached) " >&6
28527else $as_nop
28528
28529	ntp_cv_default_hz=100
28530	case "$host" in
28531	 alpha*-dec-osf4*|alpha*-dec-osf5*)
28532	    ntp_cv_default_hz=1024
28533	    ;;
28534	 mips-dec-ultrix4*)
28535	    ntp_cv_default_hz=256
28536	    ;;
28537	esac
28538
28539
28540fi
28541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
28542printf "%s\n" "$ntp_cv_default_hz" >&6; }
28543
28544printf "%s\n" "#define DEFAULT_HZ $ntp_cv_default_hz" >>confdefs.h
28545
28546
28547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
28548printf %s "checking if we need to override the system's value for HZ... " >&6; }
28549if test ${ntp_cv_override_hz+y}
28550then :
28551  printf %s "(cached) " >&6
28552else $as_nop
28553
28554	ntp_cv_override_hz=no
28555	case "$host" in
28556	 alpha*-dec-osf4*|alpha*-dec-osf5*)
28557	    ntp_cv_override_hz=yes
28558	    ;;
28559	 mips-dec-ultrix4*)
28560	    ntp_cv_override_hz=yes
28561	    ;;
28562	 *-*-freebsd*)
28563	    ntp_cv_override_hz=yes
28564	    ;;
28565	 *-*-sunos4*)
28566	    ntp_cv_override_hz=yes
28567	    ;;
28568	 *-*-kfreebsd*)
28569	    ntp_cv_override_hz=yes
28570	    ;;
28571	esac
28572
28573
28574fi
28575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
28576printf "%s\n" "$ntp_cv_override_hz" >&6; }
28577case "$ntp_cv_override_hz" in
28578 yes)
28579
28580printf "%s\n" "#define OVERRIDE_HZ 1" >>confdefs.h
28581
28582esac
28583
28584
28585
28586{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
28587printf %s "checking for struct rt_msghdr... " >&6; }
28588if test ${ntp_cv_struct_rt_msghdr+y}
28589then :
28590  printf %s "(cached) " >&6
28591else $as_nop
28592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28593/* end confdefs.h.  */
28594
28595		#include <sys/types.h>
28596		#include <sys/socket.h>
28597		#include <net/if.h>
28598		#include <net/route.h>
28599
28600int
28601main (void)
28602{
28603
28604		struct rt_msghdr p;
28605
28606
28607  ;
28608  return 0;
28609}
28610_ACEOF
28611if ac_fn_c_try_compile "$LINENO"
28612then :
28613  ntp_cv_struct_rt_msghdr=yes
28614else $as_nop
28615  ntp_cv_struct_rt_msghdr=no
28616
28617fi
28618rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28619
28620fi
28621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
28622printf "%s\n" "$ntp_cv_struct_rt_msghdr" >&6; }
28623
28624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
28625printf %s "checking for struct rtattr... " >&6; }
28626if test ${ntp_cv_rtattr+y}
28627then :
28628  printf %s "(cached) " >&6
28629else $as_nop
28630  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28631/* end confdefs.h.  */
28632
28633		#include <stddef.h>
28634		#include <sys/socket.h>
28635		#include <linux/rtnetlink.h>
28636
28637int
28638main (void)
28639{
28640
28641		struct rtattr p;
28642
28643
28644  ;
28645  return 0;
28646}
28647_ACEOF
28648if ac_fn_c_try_compile "$LINENO"
28649then :
28650  ntp_cv_rtattr=yes
28651else $as_nop
28652  ntp_cv_rtattr=no
28653
28654fi
28655rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28656
28657fi
28658{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
28659printf "%s\n" "$ntp_cv_rtattr" >&6; }
28660
28661case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
28662 *yes*)
28663
28664printf "%s\n" "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
28665
28666    case "$ntp_cv_rtattr" in
28667     yes)
28668
28669printf "%s\n" "#define HAVE_RTNETLINK 1" >>confdefs.h
28670
28671    esac
28672esac
28673
28674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
28675printf %s "checking struct sigaction for sa_sigaction... " >&6; }
28676if test ${ntp_cv_struct_sigaction_has_sa_sigaction+y}
28677then :
28678  printf %s "(cached) " >&6
28679else $as_nop
28680  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28681/* end confdefs.h.  */
28682
28683		#include <signal.h>
28684
28685int
28686main (void)
28687{
28688
28689		struct sigaction act;
28690		act.sa_sigaction = 0;
28691
28692
28693  ;
28694  return 0;
28695}
28696_ACEOF
28697if ac_fn_c_try_compile "$LINENO"
28698then :
28699  ntp_cv_struct_sigaction_has_sa_sigaction=yes
28700else $as_nop
28701  ntp_cv_struct_sigaction_has_sa_sigaction=no
28702
28703fi
28704rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28705
28706fi
28707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
28708printf "%s\n" "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
28709case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
28710 yes)
28711
28712printf "%s\n" "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
28713
28714esac
28715
28716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
28717printf %s "checking for struct ppsclockev... " >&6; }
28718if test ${ntp_cv_struct_ppsclockev+y}
28719then :
28720  printf %s "(cached) " >&6
28721else $as_nop
28722  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28723/* end confdefs.h.  */
28724
28725		#ifdef HAVE_SYS_TYPES_H
28726		# include <sys/types.h>
28727		#endif
28728		#ifdef HAVE_SYS_TERMIOS_H
28729		# include <sys/termios.h>
28730		#endif
28731		#ifdef HAVE_SYS_TIME_H
28732		# include <sys/time.h>
28733		#endif
28734		#ifdef HAVE_SYS_PPSCLOCK_H
28735		# include <sys/ppsclock.h>
28736		#endif
28737
28738int
28739main (void)
28740{
28741
28742		extern struct ppsclockev *pce;
28743		return pce->serial;
28744
28745
28746  ;
28747  return 0;
28748}
28749_ACEOF
28750if ac_fn_c_try_compile "$LINENO"
28751then :
28752  ntp_cv_struct_ppsclockev=yes
28753else $as_nop
28754  ntp_cv_struct_ppsclockev=no
28755
28756fi
28757rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28758
28759fi
28760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
28761printf "%s\n" "$ntp_cv_struct_ppsclockev" >&6; }
28762case "$ntp_cv_struct_ppsclockev" in
28763 yes)
28764
28765printf "%s\n" "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
28766
28767esac
28768
28769case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
28770  *yes*)
28771    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
28772printf %s "checking for struct snd_size... " >&6; }
28773if test ${ntp_cv_struct_snd_size+y}
28774then :
28775  printf %s "(cached) " >&6
28776else $as_nop
28777  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28778/* end confdefs.h.  */
28779
28780		    #ifdef HAVE_MACHINE_SOUNDCARD_H
28781		    # include <machine/soundcard.h>
28782		    #endif
28783		    #ifdef HAVE_SYS_SOUNDCARD_H
28784		    # include <sys/soundcard.h>
28785		    #endif
28786
28787int
28788main (void)
28789{
28790
28791		    extern struct snd_size *ss;
28792		    return ss->rec_size;
28793
28794
28795  ;
28796  return 0;
28797}
28798_ACEOF
28799if ac_fn_c_try_compile "$LINENO"
28800then :
28801  ntp_cv_struct_snd_size=yes
28802else $as_nop
28803  ntp_cv_struct_snd_size=no
28804
28805fi
28806rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28807
28808fi
28809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
28810printf "%s\n" "$ntp_cv_struct_snd_size" >&6; }
28811    case "$ntp_cv_struct_snd_size" in
28812     yes)
28813
28814printf "%s\n" "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
28815
28816    esac
28817esac
28818
28819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
28820printf %s "checking struct clockinfo for hz... " >&6; }
28821if test ${ntp_cv_struct_clockinfo_has_hz+y}
28822then :
28823  printf %s "(cached) " >&6
28824else $as_nop
28825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28826/* end confdefs.h.  */
28827
28828		#include <sys/time.h>
28829
28830int
28831main (void)
28832{
28833
28834		extern struct clockinfo *pc;
28835		return pc->hz;
28836
28837
28838  ;
28839  return 0;
28840}
28841_ACEOF
28842if ac_fn_c_try_compile "$LINENO"
28843then :
28844  ntp_cv_struct_clockinfo_has_hz=yes
28845else $as_nop
28846  ntp_cv_struct_clockinfo_has_hz=no
28847
28848fi
28849rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28850
28851fi
28852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
28853printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
28854case "$ntp_cv_struct_clockinfo_has_hz" in
28855 yes)
28856
28857printf "%s\n" "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
28858
28859esac
28860
28861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
28862printf %s "checking struct clockinfo for tickadj... " >&6; }
28863if test ${ntp_cv_struct_clockinfo_has_hz+y}
28864then :
28865  printf %s "(cached) " >&6
28866else $as_nop
28867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28868/* end confdefs.h.  */
28869
28870		#include <sys/time.h>
28871
28872int
28873main (void)
28874{
28875
28876		extern struct clockinfo *pc;
28877		return pc->tickadj;
28878
28879
28880  ;
28881  return 0;
28882}
28883_ACEOF
28884if ac_fn_c_try_compile "$LINENO"
28885then :
28886  ntp_cv_struct_clockinfo_has_hz=yes
28887else $as_nop
28888  ntp_cv_struct_clockinfo_has_hz=no
28889
28890fi
28891rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28892
28893fi
28894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
28895printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
28896case "$ntp_cv_struct_clockinfo_has_hz" in
28897 yes)
28898
28899printf "%s\n" "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
28900
28901esac
28902
28903case "$ntp_cv_struct_ntptimeval" in
28904 yes)
28905    ac_fn_c_check_member "$LINENO" "struct ntptimeval" "time.tv_nsec" "ac_cv_member_struct_ntptimeval_time_tv_nsec" "
28906	    #ifdef HAVE_SYS_TIME_H
28907	    # include <sys/time.h>
28908	    #else
28909	    # ifdef HAVE_TIME_H
28910	    #  include <time.h>
28911	    # endif
28912	    #endif
28913	    #ifdef HAVE_SYS_TIMEX_H
28914	    # include <sys/timex.h>
28915	    #else
28916	    # ifdef HAVE_TIMEX_H
28917	    #  include <timex.h>
28918	    # endif
28919	    #endif
28920
28921
28922"
28923if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes
28924then :
28925
28926printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1" >>confdefs.h
28927
28928
28929fi
28930
28931esac
28932
28933####
28934
28935ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
28936if test "x$ac_cv_func_arc4random_buf" = xyes
28937then :
28938  printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
28939
28940fi
28941
28942
28943####
28944
28945saved_LIBS="$LIBS"
28946LIBS="$LIBS $LDADD_LIBNTP"
28947ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
28948if test "x$ac_cv_func_daemon" = xyes
28949then :
28950  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
28951
28952fi
28953
28954# XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
28955LIBS="$saved_LIBS"
28956{ saved_LIBS=; unset saved_LIBS;}
28957
28958
28959  for ac_func in finite
28960do :
28961  ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
28962if test "x$ac_cv_func_finite" = xyes
28963then :
28964  printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
28965
28966else $as_nop
28967
28968  for ac_func in isfinite
28969do :
28970  ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
28971if test "x$ac_cv_func_isfinite" = xyes
28972then :
28973  printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
28974
28975else $as_nop
28976
28977	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
28978printf %s "checking for isfinite with <math.h>... " >&6; }
28979	    _libs=$LIBS
28980	    # XXX
28981	    LIBS="$LIBS -lm"
28982	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28983/* end confdefs.h.  */
28984
28985			#include <math.h>
28986
28987int
28988main (void)
28989{
28990
28991			float f = 0.0;
28992			isfinite(f);
28993
28994
28995  ;
28996  return 0;
28997}
28998_ACEOF
28999if ac_fn_c_try_link "$LINENO"
29000then :
29001  ans=yes
29002else $as_nop
29003  ans=no
29004
29005fi
29006rm -f core conftest.err conftest.$ac_objext conftest.beam \
29007    conftest$ac_exeext conftest.$ac_ext
29008	    LIBS=$_libs
29009	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29010printf "%s\n" "$ans" >&6; }
29011	    case "$ans" in
29012	     yes)
29013		printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
29014
29015	    esac
29016
29017
29018fi
29019
29020done
29021
29022fi
29023
29024done
29025
29026ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch"
29027if test "x$ac_cv_func_fnmatch" = xyes
29028then :
29029  printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h
29030
29031fi
29032ac_fn_c_check_func "$LINENO" "getbootfile" "ac_cv_func_getbootfile"
29033if test "x$ac_cv_func_getbootfile" = xyes
29034then :
29035  printf "%s\n" "#define HAVE_GETBOOTFILE 1" >>confdefs.h
29036
29037fi
29038ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
29039if test "x$ac_cv_func_getuid" = xyes
29040then :
29041  printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
29042
29043fi
29044ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
29045if test "x$ac_cv_func_getrusage" = xyes
29046then :
29047  printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
29048
29049fi
29050ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
29051if test "x$ac_cv_func_nanosleep" = xyes
29052then :
29053  printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
29054
29055fi
29056ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
29057if test "x$ac_cv_func_strsignal" = xyes
29058then :
29059  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
29060
29061fi
29062ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
29063if test "x$ac_cv_func_strsignal" = xyes
29064then :
29065  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
29066
29067fi
29068ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom"
29069if test "x$ac_cv_func_closefrom" = xyes
29070then :
29071  printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h
29072
29073fi
29074ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
29075if test "x$ac_cv_func_getdtablesize" = xyes
29076then :
29077  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
29078
29079fi
29080
29081
29082
29083# kvm_open() is only used by tickadj.  Also see above.
29084case "$ac_cv_header_kvm_h" in
29085 yes)
29086    ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
29087if test "x$ac_cv_func_kvm_open" = xyes
29088then :
29089  printf "%s\n" "#define HAVE_KVM_OPEN 1" >>confdefs.h
29090
29091fi
29092
29093    ;;
29094esac
29095
29096case "$host" in
29097 *-*-sco3.2v5.0.*)
29098    # Just stubs.  Sigh.
29099    ;;
29100 *) ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
29101if test "x$ac_cv_func_mkstemp" = xyes
29102then :
29103  printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h
29104
29105fi
29106
29107    ;;
29108esac
29109ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
29110if test "x$ac_cv_func_mktime" = xyes
29111then :
29112  printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
29113
29114fi
29115
29116case "$host" in
29117 *-*-aix[4-9]*)
29118    # XXX only verified thru AIX6.
29119    # Just a stub.  Sigh.
29120    ;;
29121 *-*-irix[45]*)
29122    # Just a stub in "old" Irix.  Sigh.
29123    ;;
29124# In the belief that the fix for bug 1223 fixes mlockall() under linux...
29125# *-*-*linux*)
29126#    # there, but more trouble than it is worth for now (resolver problems)
29127#    ;;
29128 *-*-qnx*)
29129    # Apparently there but not working in QNX.  Sigh?
29130    ;;
29131 *-*-sco3.2v5.0.*)
29132    # Just a stub.  Sigh.
29133    ;;
29134 alpha*-dec-osf4*|alpha*-dec-osf5*)
29135    # mlockall is there, as a #define calling memlk via <sys/mman.h>
29136    # Not easy to test for - cheat.
29137
29138  for ac_func in memlk
29139do :
29140  ac_fn_c_check_func "$LINENO" "memlk" "ac_cv_func_memlk"
29141if test "x$ac_cv_func_memlk" = xyes
29142then :
29143  printf "%s\n" "#define HAVE_MEMLK 1" >>confdefs.h
29144 ac_cv_func_mlockall=yes
29145fi
29146
29147done
29148    ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
29149if test "x$ac_cv_func_mlockall" = xyes
29150then :
29151  printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
29152
29153fi
29154
29155    ;;
29156 *) ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
29157if test "x$ac_cv_func_mlockall" = xyes
29158then :
29159  printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
29160
29161fi
29162
29163    ;;
29164esac
29165ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
29166if test "x$ac_cv_func_nice" = xyes
29167then :
29168  printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
29169
29170fi
29171ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
29172if test "x$ac_cv_func_plock" = xyes
29173then :
29174  printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
29175
29176fi
29177ac_fn_c_check_func "$LINENO" "pututline" "ac_cv_func_pututline"
29178if test "x$ac_cv_func_pututline" = xyes
29179then :
29180  printf "%s\n" "#define HAVE_PUTUTLINE 1" >>confdefs.h
29181
29182fi
29183ac_fn_c_check_func "$LINENO" "pututxline" "ac_cv_func_pututxline"
29184if test "x$ac_cv_func_pututxline" = xyes
29185then :
29186  printf "%s\n" "#define HAVE_PUTUTXLINE 1" >>confdefs.h
29187
29188fi
29189ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
29190if test "x$ac_cv_func_readlink" = xyes
29191then :
29192  printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
29193
29194fi
29195ac_fn_c_check_func "$LINENO" "rtprio" "ac_cv_func_rtprio"
29196if test "x$ac_cv_func_rtprio" = xyes
29197then :
29198  printf "%s\n" "#define HAVE_RTPRIO 1" >>confdefs.h
29199
29200fi
29201
29202
29203	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-2008 compliant realpath()" >&5
29204printf %s "checking for a POSIX-2008 compliant realpath()... " >&6; }
29205
29206
29207	ac_ext=c
29208ac_cpp='$CPP $CPPFLAGS'
29209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29211ac_compiler_gnu=$ac_cv_c_compiler_gnu
29212
29213
29214	if test "$cross_compiling" = yes
29215then :
29216  ans="CROSS COMPILE!"
29217
29218else $as_nop
29219  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29220/* end confdefs.h.  */
29221
29222			#include <sys/param.h>
29223			#include <stdlib.h>
29224			int main() { return (NULL == realpath(".", NULL)); }
29225
29226_ACEOF
29227if ac_fn_c_try_run "$LINENO"
29228then :
29229  ans="yes"
29230else $as_nop
29231  ans="no"
29232fi
29233rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29234  conftest.$ac_objext conftest.beam conftest.$ac_ext
29235fi
29236
29237	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29238printf "%s\n" "$ans" >&6; }
29239	case "$ans" in
29240	 yes)
29241
29242printf "%s\n" "#define HAVE_FUNC_POSIX_REALPATH 1" >>confdefs.h
29243
29244	    ;;
29245	esac
29246
29247	ac_ext=c
29248ac_cpp='$CPP $CPPFLAGS'
29249ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29250ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29251ac_compiler_gnu=$ac_cv_c_compiler_gnu
29252
29253
29254case "$host" in
29255 *-*-aix[4-9]*)
29256    # XXX only verified thru AIX6.
29257    # Just a stub in AIX 4.  Sigh.
29258    ;;
29259 *-*-solaris2.5*)
29260    # Just stubs in solaris2.5.  Sigh.
29261    ;;
29262 *) ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
29263if test "x$ac_cv_func_sched_setscheduler" = xyes
29264then :
29265  printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
29266
29267fi
29268
29269    ;;
29270esac
29271ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
29272if test "x$ac_cv_func_setlinebuf" = xyes
29273then :
29274  printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h
29275
29276fi
29277ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
29278if test "x$ac_cv_func_setpgid" = xyes
29279then :
29280  printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
29281
29282fi
29283ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
29284if test "x$ac_cv_func_setpriority" = xyes
29285then :
29286  printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
29287
29288fi
29289ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
29290if test "x$ac_cv_func_setsid" = xyes
29291then :
29292  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
29293
29294fi
29295ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
29296if test "x$ac_cv_func_setvbuf" = xyes
29297then :
29298  printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
29299
29300fi
29301
29302ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
29303if test "x$ac_cv_func_strdup" = xyes
29304then :
29305  printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
29306
29307fi
29308ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
29309if test "x$ac_cv_func_strnlen" = xyes
29310then :
29311  printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
29312
29313fi
29314ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
29315if test "x$ac_cv_func_memchr" = xyes
29316then :
29317  printf "%s\n" "#define HAVE_MEMCHR 1" >>confdefs.h
29318
29319fi
29320ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
29321if test "x$ac_cv_func_strerror" = xyes
29322then :
29323  printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
29324
29325fi
29326ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
29327if test "x$ac_cv_func_setrlimit" = xyes
29328then :
29329  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
29330
29331fi
29332ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
29333if test "x$ac_cv_func_strchr" = xyes
29334then :
29335  printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
29336
29337fi
29338
29339case "$host" in
29340 *-*-aix[4-9]*)
29341    # XXX only verified thru AIX6.
29342    # Just stubs.  Sigh.
29343    ;;
29344 *-*-netbsd1*)
29345    # Just stubs.  Sigh.
29346    ;;
29347 *-*-netbsdelf1*)
29348    # Just stubs.  Sigh.
29349    ;;
29350 *-*-openbsd*)
29351    # Just stubs.  Sigh.
29352    ;;
29353 *)
29354    ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
29355if test "x$ac_cv_func_timer_create" = xyes
29356then :
29357  printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
29358
29359fi
29360
29361    ;;
29362esac
29363
29364
29365
29366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
29367printf %s "checking for RLIMIT_MEMLOCK... " >&6; }
29368if test ${ntp_cv_rlimit_memlock+y}
29369then :
29370  printf %s "(cached) " >&6
29371else $as_nop
29372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29373/* end confdefs.h.  */
29374
29375		#ifdef HAVE_SYS_TYPES_H
29376		# include <sys/types.h>
29377		#endif
29378		#ifdef HAVE_SYS_TIME_H
29379		# include <sys/time.h>
29380		#endif
29381		#ifdef HAVE_SYS_RESOURCE_H
29382		# include <sys/resource.h>
29383		#endif
29384
29385int
29386main (void)
29387{
29388
29389		getrlimit(RLIMIT_MEMLOCK, 0);
29390
29391
29392  ;
29393  return 0;
29394}
29395_ACEOF
29396if ac_fn_c_try_compile "$LINENO"
29397then :
29398  ntp_cv_rlimit_memlock=yes
29399else $as_nop
29400  ntp_cv_rlimit_memlock=no
29401
29402fi
29403rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29404
29405fi
29406{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
29407printf "%s\n" "$ntp_cv_rlimit_memlock" >&6; }
29408case "$host" in
29409 *-*-*linux*)
29410    ntp_dflt_rlimit_memlock="-1" ;;
29411 *) ntp_dflt_rlimit_memlock="32" ;;
29412esac
29413case "$ntp_cv_rlimit_memlock" in
29414 yes)
29415
29416    HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock"  ;;
29417esac
29418
29419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
29420printf %s "checking for RLIMIT_STACK... " >&6; }
29421if test ${ntp_cv_rlimit_stack+y}
29422then :
29423  printf %s "(cached) " >&6
29424else $as_nop
29425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29426/* end confdefs.h.  */
29427
29428		#ifdef HAVE_SYS_TYPES_H
29429		# include <sys/types.h>
29430		#endif
29431		#ifdef HAVE_SYS_TIME_H
29432		# include <sys/time.h>
29433		#endif
29434		#ifdef HAVE_SYS_RESOURCE_H
29435		# include <sys/resource.h>
29436		#endif
29437
29438int
29439main (void)
29440{
29441
29442		getrlimit(RLIMIT_STACK, 0);
29443
29444
29445  ;
29446  return 0;
29447}
29448_ACEOF
29449if ac_fn_c_try_compile "$LINENO"
29450then :
29451  ntp_cv_rlimit_stack=yes
29452else $as_nop
29453  ntp_cv_rlimit_stack=no
29454
29455fi
29456rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29457
29458fi
29459{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
29460printf "%s\n" "$ntp_cv_rlimit_stack" >&6; }
29461case "$ntp_cv_rlimit_stack" in
29462 yes)
29463
29464    HAVE_RLIMIT_STACK=" stacksize 50"
29465esac
29466
29467# HMS: Only if we are doing the MLOCKALL stuff...
29468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
29469printf %s "checking for the default number of 4k stack pages... " >&6; }
29470
29471# Check whether --with-stack-limit was given.
29472if test ${with_stack_limit+y}
29473then :
29474  withval=$with_stack_limit; ans=$withval
29475else $as_nop
29476  ans=yes
29477
29478fi
29479
29480case "$ans" in
29481 yes | no)
29482    case "$host" in
29483     *-*-openbsd*)
29484	ans=200
29485	;;
29486     *) ans=50
29487        ;;
29488    esac
29489    ;;
29490 [1-9][0-9]*)
29491    ;;
29492 *) as_fn_error $? "\"--with-stack-limit requires an integer argument.\"" "$LINENO" 5
29493    ;;
29494esac
29495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29496printf "%s\n" "$ans" >&6; }
29497
29498printf "%s\n" "#define DFLT_RLIMIT_STACK $ans" >>confdefs.h
29499
29500
29501# HMS: only if we have RLIMIT_MEMLOCK
29502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
29503printf %s "checking for the default number of megabytes to MEMLOCK... " >&6; }
29504
29505# Check whether --with-memlock was given.
29506if test ${with_memlock+y}
29507then :
29508  withval=$with_memlock; ans=$withval
29509else $as_nop
29510  ans=yes
29511
29512fi
29513
29514case "$ans" in
29515 yes | no)
29516    ans=$ntp_dflt_rlimit_memlock
29517    ;;
29518 [1-9][0-9]*) ;;
29519 *) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
29520     ;;
29521esac
29522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29523printf "%s\n" "$ans" >&6; }
29524
29525printf "%s\n" "#define DFLT_RLIMIT_MEMLOCK $ans" >>confdefs.h
29526
29527
29528
29529
29530# some OSes prefer _exit() in forked children to exit()
29531ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
29532if test "x$ac_cv_func__exit" = xyes
29533then :
29534  printf "%s\n" "#define HAVE__EXIT 1" >>confdefs.h
29535
29536fi
29537
29538ntp_worker_child_exit=exit
29539case "$ac_cv_func__exit::$host_os" in
29540 yes::netbsd*)
29541    ntp_worker_child_exit=_exit
29542    ;;
29543 yes::openbsd*)
29544    ntp_worker_child_exit=_exit
29545    ;;
29546esac
29547
29548printf "%s\n" "#define WORKER_CHILD_EXIT $ntp_worker_child_exit" >>confdefs.h
29549
29550
29551ac_fn_c_check_func "$LINENO" "umask" "ac_cv_func_umask"
29552if test "x$ac_cv_func_umask" = xyes
29553then :
29554  printf "%s\n" "#define HAVE_UMASK 1" >>confdefs.h
29555
29556fi
29557ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
29558if test "x$ac_cv_func_uname" = xyes
29559then :
29560  printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
29561
29562fi
29563ac_fn_c_check_func "$LINENO" "updwtmp" "ac_cv_func_updwtmp"
29564if test "x$ac_cv_func_updwtmp" = xyes
29565then :
29566  printf "%s\n" "#define HAVE_UPDWTMP 1" >>confdefs.h
29567
29568fi
29569ac_fn_c_check_func "$LINENO" "updwtmpx" "ac_cv_func_updwtmpx"
29570if test "x$ac_cv_func_updwtmpx" = xyes
29571then :
29572  printf "%s\n" "#define HAVE_UPDWTMPX 1" >>confdefs.h
29573
29574fi
29575
29576
29577###
29578
29579# http://bugs.ntp.org/737
29580case "$ac_cv_func_recvmsg" in
29581 yes)
29582    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need extra help to define struct iovec" >&5
29583printf %s "checking if we need extra help to define struct iovec... " >&6; }
29584if test ${ntp_cv_struct_iovec_help+y}
29585then :
29586  printf %s "(cached) " >&6
29587else $as_nop
29588
29589	    compiled=no
29590	    for ntp_cv_struct_iovec_help in '0' '1'; do
29591		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29592/* end confdefs.h.  */
29593
29594			    #ifdef HAVE_SYS_TYPES_H
29595			    # include <sys/types.h>
29596			    #endif
29597			    #ifdef HAVE_SYS_SOCKET_H
29598			    # include <sys/socket.h>
29599			    #endif
29600			    #if $ntp_cv_struct_iovec_help
29601			    # include <sys/uio.h>
29602			    #endif
29603
29604int
29605main (void)
29606{
29607
29608			    void foo(void) {
29609				ssize_t x;
29610				int s = 0;
29611				struct iovec iov;
29612				struct msghdr mh;
29613				int flags = 0;
29614
29615				mh.msg_iov = &iov;
29616				x = recvmsg(s, &mh, flags);
29617			    }
29618
29619
29620  ;
29621  return 0;
29622}
29623_ACEOF
29624if ac_fn_c_try_compile "$LINENO"
29625then :
29626  compiled=yes ; break 1
29627fi
29628rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29629	    done
29630	    case "$compiled" in
29631	     no)
29632		ntp_cv_struct_iovec_help=0
29633	    esac
29634	    { compiled=; unset compiled;}
29635
29636
29637fi
29638{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_iovec_help" >&5
29639printf "%s\n" "$ntp_cv_struct_iovec_help" >&6; }
29640    case "$ntp_cv_struct_iovec_help" in
29641     1)
29642
29643printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
29644
29645    esac
29646esac
29647
29648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
29649printf %s "checking number of arguments taken by setpgrp()... " >&6; }
29650if test ${ntp_cv_func_setpgrp_nargs+y}
29651then :
29652  printf %s "(cached) " >&6
29653else $as_nop
29654  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29655/* end confdefs.h.  */
29656
29657		#ifdef HAVE_SYS_TYPES_H
29658		# include <sys/types.h>
29659		#endif
29660		#ifdef HAVE_UNISTD_H
29661		# include <unistd.h>
29662		#endif
29663
29664int
29665main (void)
29666{
29667
29668		setpgrp(0, 0);
29669
29670
29671  ;
29672  return 0;
29673}
29674_ACEOF
29675if ac_fn_c_try_compile "$LINENO"
29676then :
29677  ntp_cv_func_setpgrp_nargs=2
29678else $as_nop
29679  ntp_cv_func_setpgrp_nargs=0
29680
29681fi
29682rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29683
29684fi
29685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_setpgrp_nargs" >&5
29686printf "%s\n" "$ntp_cv_func_setpgrp_nargs" >&6; }
29687case "$ntp_cv_func_setpgrp_nargs" in
29688 0)
29689
29690printf "%s\n" "#define HAVE_SETPGRP_0 1" >>confdefs.h
29691
29692esac
29693
29694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
29695printf %s "checking if we need to declare 'errno'... " >&6; }
29696if test ${ntp_cv_decl_errno+y}
29697then :
29698  printf %s "(cached) " >&6
29699else $as_nop
29700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29701/* end confdefs.h.  */
29702
29703		#ifdef HAVE_ERRNO_H
29704		# include <errno.h>
29705		#endif
29706
29707int
29708main (void)
29709{
29710
29711		errno = 0;
29712
29713
29714  ;
29715  return 0;
29716}
29717_ACEOF
29718if ac_fn_c_try_compile "$LINENO"
29719then :
29720  ntp_cv_decl_errno=no
29721else $as_nop
29722  ntp_cv_decl_errno=yes
29723
29724fi
29725rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29726
29727fi
29728{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_errno" >&5
29729printf "%s\n" "$ntp_cv_decl_errno" >&6; }
29730case "$ntp_cv_decl_errno" in
29731 yes)
29732
29733printf "%s\n" "#define DECL_ERRNO 1" >>confdefs.h
29734
29735esac
29736
29737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we may declare 'h_errno'" >&5
29738printf %s "checking if we may declare 'h_errno'... " >&6; }
29739if test ${ntp_cv_decl_h_errno+y}
29740then :
29741  printf %s "(cached) " >&6
29742else $as_nop
29743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29744/* end confdefs.h.  */
29745
29746		#include <sys/types.h>
29747		#ifdef HAVE_NETINET_IN_H
29748		# include <netinet/in.h>
29749		#endif
29750		#ifdef HAVE_ARPA_NAMESER_H
29751		# include <arpa/nameser.h>
29752		#endif
29753		#ifdef HAVE_NETDB_H
29754		# include <netdb.h>
29755		#endif
29756		#ifdef HAVE_RESOLV_H
29757		# include <resolv.h>
29758		#endif
29759
29760int
29761main (void)
29762{
29763
29764		extern int h_errno;
29765
29766
29767  ;
29768  return 0;
29769}
29770_ACEOF
29771if ac_fn_c_try_compile "$LINENO"
29772then :
29773  ntp_cv_decl_h_errno=yes
29774else $as_nop
29775  ntp_cv_decl_h_errno=no
29776
29777fi
29778rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29779
29780fi
29781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_h_errno" >&5
29782printf "%s\n" "$ntp_cv_decl_h_errno" >&6; }
29783case "$ntp_cv_decl_h_errno" in
29784 yes)
29785
29786printf "%s\n" "#define DECL_H_ERRNO 1" >>confdefs.h
29787
29788esac
29789
29790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if declaring 'syscall()' is ok" >&5
29791printf %s "checking if declaring 'syscall()' is ok... " >&6; }
29792if test ${ntp_cv_decl_syscall+y}
29793then :
29794  printf %s "(cached) " >&6
29795else $as_nop
29796  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29797/* end confdefs.h.  */
29798
29799		#ifdef HAVE_SYS_TYPES_H
29800		# include <sys/types.h>
29801		#endif
29802		#ifdef HAVE_UNISTD_H
29803		# include <unistd.h>
29804		#endif
29805
29806int
29807main (void)
29808{
29809
29810		extern int syscall (int, ...);
29811
29812
29813  ;
29814  return 0;
29815}
29816_ACEOF
29817if ac_fn_c_try_compile "$LINENO"
29818then :
29819  ntp_cv_decl_syscall=yes
29820else $as_nop
29821  ntp_cv_decl_syscall=no
29822
29823fi
29824rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
29825
29826fi
29827{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_syscall" >&5
29828printf "%s\n" "$ntp_cv_decl_syscall" >&6; }
29829case "$ntp_cv_decl_syscall" in
29830 yes)
29831
29832printf "%s\n" "#define DECL_SYSCALL 1" >>confdefs.h
29833
29834esac
29835
29836case "$host" in
29837 *-*-aix4.3.*)
29838
29839printf "%s\n" "#define DECL_HSTRERROR_0 1" >>confdefs.h
29840		# Needed for XLC under AIX 4.3.2
29841    ;;
29842 *-*-mpeix*)
29843
29844printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29845
29846
29847printf "%s\n" "#define DECL_INET_NTOA_0 1" >>confdefs.h
29848
29849
29850printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29851
29852
29853printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29854
29855
29856printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29857
29858
29859printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29860
29861
29862printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29863
29864    ;;
29865 *-*-osf[45]*)
29866
29867printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
29868
29869
29870printf "%s\n" "#define DECL_STIME_1 1" >>confdefs.h
29871
29872    ;;
29873 *-*-qnx*)
29874
29875printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29876
29877    ;;
29878 *-*-riscos4*)
29879
29880printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29881
29882
29883printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
29884
29885
29886printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
29887
29888
29889printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
29890
29891
29892printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
29893
29894
29895printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29896
29897
29898printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
29899
29900
29901printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29902
29903
29904printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29905
29906
29907printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
29908
29909
29910printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
29911
29912
29913printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
29914
29915
29916printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29917
29918
29919printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
29920
29921
29922printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29923
29924
29925printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
29926
29927    ;;
29928 *-*-solaris2*)
29929
29930printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
29931
29932
29933printf "%s\n" "#define DECL_SETPRIORITY_1 1" >>confdefs.h
29934
29935    case "$host" in
29936     *-*-solaris2.4)
29937
29938printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29939
29940	;;
29941    esac
29942    ;;
29943 *-*-sunos4*)
29944
29945printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29946
29947
29948printf "%s\n" "#define DECL_BCOPY_0 1" >>confdefs.h
29949
29950
29951printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
29952
29953
29954printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
29955
29956
29957printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
29958
29959
29960printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
29961
29962
29963printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29964
29965
29966printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
29967
29968
29969printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
29970
29971
29972printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29973
29974
29975printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29976
29977
29978printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
29979
29980
29981printf "%s\n" "#define DECL_SIGVEC_0 1" >>confdefs.h
29982
29983    case "`basename $ac_cv_prog_CC`" in
29984     acc*) ;;
29985     *)
29986printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
29987
29988	;;
29989    esac
29990
29991printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
29992
29993
29994printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29995
29996
29997printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
29998
29999
30000printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
30001
30002
30003printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
30004
30005
30006printf "%s\n" "#define DECL_TOUPPER_0 1" >>confdefs.h
30007
30008
30009printf "%s\n" "#define DECL_STRERROR_0 1" >>confdefs.h
30010
30011    ;;
30012 *-*-ultrix4*)
30013
30014printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
30015
30016
30017printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
30018
30019
30020printf "%s\n" "#define DECL_CFSETISPEED_0 1" >>confdefs.h
30021
30022
30023printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
30024
30025
30026printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
30027
30028
30029printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
30030
30031
30032printf "%s\n" "#define DECL_NLIST_0 1" >>confdefs.h
30033
30034
30035printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
30036
30037
30038printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
30039
30040
30041printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
30042
30043
30044printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
30045
30046
30047printf "%s\n" "#define DECL_STIME_0 1" >>confdefs.h
30048
30049
30050printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
30051
30052
30053printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
30054
30055    ;;
30056esac
30057
30058case "$host" in
30059 *-*-sco3.2*)
30060
30061printf "%s\n" "#define TERMIOS_NEEDS__SVID3 1" >>confdefs.h
30062
30063    ;;
30064esac
30065
30066case "$host" in
30067 *-*-hpux[567]*)
30068
30069printf "%s\n" "#define NEED_RCVBUF_SLOP 1" >>confdefs.h
30070
30071esac
30072
30073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will open the broadcast socket" >&5
30074printf %s "checking if we will open the broadcast socket... " >&6; }
30075if test ${ntp_cv_var_open_bcast_socket+y}
30076then :
30077  printf %s "(cached) " >&6
30078else $as_nop
30079
30080	ans=yes
30081	case "$host" in
30082	 *-*-domainos)
30083	    ans=no
30084	esac
30085	ntp_cv_var_open_bcast_socket=$ans
30086
30087
30088fi
30089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_open_bcast_socket" >&5
30090printf "%s\n" "$ntp_cv_var_open_bcast_socket" >&6; }
30091case "$ntp_cv_var_open_bcast_socket" in
30092 yes)
30093
30094printf "%s\n" "#define OPEN_BCAST_SOCKET 1" >>confdefs.h
30095
30096esac
30097
30098case "$host" in
30099 *-*-hpux*)
30100
30101printf "%s\n" "#define NEED_HPUX_FINDCONFIG 1" >>confdefs.h
30102
30103esac
30104
30105{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if process groups are set with -pid" >&5
30106printf %s "checking if process groups are set with -pid... " >&6; }
30107if test ${ntp_cv_arg_setpgrp_negpid+y}
30108then :
30109  printf %s "(cached) " >&6
30110else $as_nop
30111
30112	case "$host" in
30113	 *-*-hpux[567]*)
30114	    ans=no
30115	    ;;
30116	 *-*-hpux*)
30117	    ans=yes
30118	    ;;
30119	 *-*-*linux*)
30120	    ans=yes
30121	    ;;
30122	 *-*-sunos3*)
30123	    ans=yes
30124	    ;;
30125	 *-*-ultrix2*)
30126	    ans=yes
30127	    ;;
30128	 *)
30129	    ans=no
30130	    ;;
30131	esac
30132	ntp_cv_arg_setpgrp_negpid=$ans
30133
30134
30135fi
30136{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_arg_setpgrp_negpid" >&5
30137printf "%s\n" "$ntp_cv_arg_setpgrp_negpid" >&6; }
30138case "$ntp_cv_arg_setpgrp_negpid" in
30139 yes)
30140
30141printf "%s\n" "#define UDP_BACKWARDS_SETOWN 1" >>confdefs.h
30142
30143esac
30144
30145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need a ctty for F_SETOWN" >&5
30146printf %s "checking if we need a ctty for F_SETOWN... " >&6; }
30147if test ${ntp_cv_func_ctty_for_f_setown+y}
30148then :
30149  printf %s "(cached) " >&6
30150else $as_nop
30151
30152	case "$host" in
30153	 *-*-bsdi[23]*)
30154	    ans=yes
30155	    ;;
30156	 *-*-freebsd*)
30157	    ans=yes
30158	    ;;
30159	# NetBSD versions prior to 3.99.8 require a CTTY for F_SETOWN,
30160	# while later versions will fail a ioctl(TIOCSCTTY, 0) call in
30161	# some cases and so should not have USE_FSETOWNCTTY.  "netbsd"
30162	# in $host may be followed by "aout", "ecoff", or "elf".
30163	 *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
30164	    ans=yes
30165	    ;;
30166	 *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
30167	    ans=yes
30168	    ;;
30169	 *-*-openbsd*)
30170	    ans=yes
30171	    ;;
30172	 *-*-osf*)
30173	    ans=yes
30174	    ;;
30175	 *-*-darwin*)
30176	    ans=yes
30177	    ;;
30178	 *)
30179	    ans=no
30180	    ;;
30181	esac
30182	ntp_cv_func_ctty_for_f_setown=$ans
30183
30184
30185fi
30186{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_ctty_for_f_setown" >&5
30187printf "%s\n" "$ntp_cv_func_ctty_for_f_setown" >&6; }
30188case "$ntp_cv_func_ctty_for_f_setown" in
30189 yes)
30190
30191printf "%s\n" "#define USE_FSETOWNCTTY 1" >>confdefs.h
30192
30193esac
30194
30195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the OS clears cached routes when more specifics become available" >&5
30196printf %s "checking if the OS clears cached routes when more specifics become available... " >&6; }
30197if test ${ntp_cv_os_routeupdates+y}
30198then :
30199  printf %s "(cached) " >&6
30200else $as_nop
30201
30202	case "$host" in
30203	 *-*-netbsd*)
30204	    ans=yes
30205	    ;;
30206	 *)
30207	    ans=no
30208	    ;;
30209	esac
30210	ntp_cv_os_routeupdates=$ans
30211
30212
30213fi
30214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_routeupdates" >&5
30215printf "%s\n" "$ntp_cv_os_routeupdates" >&6; }
30216case "$ntp_cv_os_routeupdates" in
30217 yes)
30218
30219printf "%s\n" "#define OS_MISSES_SPECIFIC_ROUTE_UPDATES 1" >>confdefs.h
30220
30221esac
30222
30223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the wildcard socket needs REUSEADDR to bind other addresses" >&5
30224printf %s "checking if the wildcard socket needs REUSEADDR to bind other addresses... " >&6; }
30225if test ${ntp_cv_os_wildcardreuse+y}
30226then :
30227  printf %s "(cached) " >&6
30228else $as_nop
30229
30230	case "$host" in
30231	 *-*-*linux*)
30232	    ans=yes
30233	    ;;
30234	 *) ans=no
30235	    ;;
30236	esac
30237	ntp_cv_os_wildcardreuse=$ans
30238
30239
30240fi
30241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_wildcardreuse" >&5
30242printf "%s\n" "$ntp_cv_os_wildcardreuse" >&6; }
30243case "$ntp_cv_os_wildcardreuse" in
30244 yes)
30245
30246printf "%s\n" "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
30247
30248esac
30249
30250case "$host" in
30251 *-*-aix*)
30252
30253printf "%s\n" "#define NLIST_EXTRA_INDIRECTION 1" >>confdefs.h
30254
30255esac
30256
30257{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a minimum recommended value of tickadj" >&5
30258printf %s "checking for a minimum recommended value of tickadj... " >&6; }
30259if test ${ntp_cv_var_min_rec_tickadj+y}
30260then :
30261  printf %s "(cached) " >&6
30262else $as_nop
30263
30264	ans=no
30265	case "$host" in
30266	 *-*-aix*)
30267	    ans=40
30268	    ;;
30269	esac
30270	ntp_cv_var_min_rec_tickadj=$ans
30271
30272
30273fi
30274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_min_rec_tickadj" >&5
30275printf "%s\n" "$ntp_cv_var_min_rec_tickadj" >&6; }
30276case "$ntp_cv_var_min_rec_tickadj" in
30277 ''|no)
30278    ;;
30279 *)
30280
30281printf "%s\n" "#define MIN_REC_TICKADJ $ntp_cv_var_min_rec_tickadj" >>confdefs.h
30282
30283esac
30284
30285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the TTY code permits PARENB and IGNPAR" >&5
30286printf %s "checking if the TTY code permits PARENB and IGNPAR... " >&6; }
30287if test ${ntp_cv_no_parenb_ignpar+y}
30288then :
30289  printf %s "(cached) " >&6
30290else $as_nop
30291
30292	ans=no
30293	case "$host" in
30294	 i?86-*-*linux*)
30295	    ans=yes
30296	    ;;
30297	 mips-sgi-irix*)
30298	    ans=yes
30299	    ;;
30300	 i?86-*-freebsd[123].*)
30301	    ;;
30302	 i?86-*-freebsd*)
30303	    ans=yes
30304	    ;;
30305	 *-*-unicosmp*)
30306	    ans=yes
30307	    ;;
30308	esac
30309	ntp_cv_no_parenb_ignpar=$ans
30310
30311
30312fi
30313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_no_parenb_ignpar" >&5
30314printf "%s\n" "$ntp_cv_no_parenb_ignpar" >&6; }
30315case "$ntp_cv_no_parenb_ignpar" in
30316 yes)
30317
30318printf "%s\n" "#define NO_PARENB_IGNPAR 1" >>confdefs.h
30319
30320esac
30321
30322{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
30323printf %s "checking if we're including processing time debugging code... " >&6; }
30324# Check whether --enable-debug-timing was given.
30325if test ${enable_debug_timing+y}
30326then :
30327  enableval=$enable_debug_timing; ntp_ok=$enableval
30328else $as_nop
30329  ntp_ok=no
30330
30331fi
30332
30333case "$ntp_ok" in
30334 yes)
30335
30336printf "%s\n" "#define DEBUG_TIMING 1" >>confdefs.h
30337
30338esac
30339{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30340printf "%s\n" "$ntp_ok" >&6; }
30341
30342{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a the number of minutes in a DST adjustment" >&5
30343printf %s "checking for a the number of minutes in a DST adjustment... " >&6; }
30344# Check whether --enable-dst-minutes was given.
30345if test ${enable_dst_minutes+y}
30346then :
30347  enableval=$enable_dst_minutes; ans=$enableval
30348else $as_nop
30349  ans=60
30350
30351fi
30352
30353
30354printf "%s\n" "#define DSTMINUTES $ans" >>confdefs.h
30355
30356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30357printf "%s\n" "$ans" >&6; }
30358
30359{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpd will retry permanent DNS failures" >&5
30360printf %s "checking if ntpd will retry permanent DNS failures... " >&6; }
30361# Check whether --enable-ignore-dns-errors was given.
30362if test ${enable_ignore_dns_errors+y}
30363then :
30364  enableval=$enable_ignore_dns_errors; ans=$enableval
30365else $as_nop
30366  ans=no
30367
30368fi
30369
30370case "$ans" in
30371 yes)
30372
30373printf "%s\n" "#define IGNORE_DNS_ERRORS 1" >>confdefs.h
30374
30375esac
30376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30377printf "%s\n" "$ans" >&6; }
30378
30379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
30380printf %s "checking availability of ntp_{adj,get}time()... " >&6; }
30381if test ${ntp_cv_var_ntp_syscalls+y}
30382then :
30383  printf %s "(cached) " >&6
30384else $as_nop
30385
30386	ntp_cv_var_ntp_syscalls=no
30387	case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
30388	 yesyes*)
30389	    ntp_cv_var_ntp_syscalls=libc
30390	    ;;
30391	 *yes)
30392	    ntp_cv_var_ntp_syscalls=inline
30393	    ;;
30394	 *)
30395	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396/* end confdefs.h.  */
30397
30398			#include <sys/syscall.h>
30399			#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
30400			# error
30401			#endif
30402
30403_ACEOF
30404if ac_fn_c_try_cpp "$LINENO"
30405then :
30406  ntp_cv_var_ntp_syscalls=kernel
30407
30408fi
30409rm -f conftest.err conftest.i conftest.$ac_ext
30410	    ;;
30411	 esac
30412
30413
30414fi
30415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_ntp_syscalls" >&5
30416printf "%s\n" "$ntp_cv_var_ntp_syscalls" >&6; }
30417case "$ntp_cv_var_ntp_syscalls" in
30418 libc)
30419
30420printf "%s\n" "#define NTP_SYSCALLS_LIBC 1" >>confdefs.h
30421
30422    ;;
30423 kernel)
30424
30425printf "%s\n" "#define NTP_SYSCALLS_STD 1" >>confdefs.h
30426
30427    ;;
30428esac
30429
30430{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sys/timex.h has STA_FLL" >&5
30431printf %s "checking if sys/timex.h has STA_FLL... " >&6; }
30432if test ${ntp_cv_var_sta_fll+y}
30433then :
30434  printf %s "(cached) " >&6
30435else $as_nop
30436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30437/* end confdefs.h.  */
30438
30439		#include <sys/timex.h>
30440		#ifndef STA_FLL
30441		# error
30442		#endif
30443
30444_ACEOF
30445if ac_fn_c_try_cpp "$LINENO"
30446then :
30447  ntp_cv_var_sta_fll=yes
30448else $as_nop
30449  ntp_cv_var_sta_fll=no
30450
30451fi
30452rm -f conftest.err conftest.i conftest.$ac_ext
30453
30454fi
30455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
30456printf "%s\n" "$ntp_cv_var_sta_fll" >&6; }
30457
30458{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have kernel PLL support" >&5
30459printf %s "checking if we have kernel PLL support... " >&6; }
30460if test ${ntp_cv_var_kernel_pll+y}
30461then :
30462  printf %s "(cached) " >&6
30463else $as_nop
30464  	case "$ac_cv_header_sys_timex_h$ntp_cv_struct_ntptimeval$ntp_cv_var_sta_fll$ntp_cv_var_ntp_syscalls" in
30465	 *no*)
30466	    ntp_cv_var_kernel_pll=no
30467	    ;;
30468	 *) ntp_cv_var_kernel_pll=yes
30469	    ;;
30470	esac
30471
30472
30473fi
30474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_kernel_pll" >&5
30475printf "%s\n" "$ntp_cv_var_kernel_pll" >&6; }
30476case "$ntp_cv_var_kernel_pll" in
30477 yes)
30478
30479printf "%s\n" "#define KERNEL_PLL 1" >>confdefs.h
30480
30481esac
30482
30483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
30484printf %s "checking if SIOCGIFCONF returns buffer size in the buffer... " >&6; }
30485if test ${ntp_cv_size_returned_in_buffer+y}
30486then :
30487  printf %s "(cached) " >&6
30488else $as_nop
30489
30490	ans=no
30491	case "$host" in
30492	 *-fujitsu-uxp*)
30493	    ans=yes
30494	    ;;
30495	 *-ncr-sysv4*)
30496	    ans=yes
30497	    ;;
30498	 *-univel-sysv*)
30499	    ans=yes
30500	    ;;
30501	esac
30502	ntp_cv_size_returned_in_buffer=$ans
30503
30504
30505fi
30506{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_size_returned_in_buffer" >&5
30507printf "%s\n" "$ntp_cv_size_returned_in_buffer" >&6; }
30508case "$ntp_cv_size_returned_in_buffer" in
30509 yes)
30510
30511printf "%s\n" "#define SIZE_RETURNED_IN_BUFFER 1" >>confdefs.h
30512
30513esac
30514
30515# Check for ioctls TIOCGPPSEV
30516{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCGPPSEV" >&5
30517printf %s "checking for TTY PPS ioctl TIOCGPPSEV... " >&6; }
30518case "$ac_cv_header_termios_h" in
30519 yes)
30520    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30521/* end confdefs.h.  */
30522
30523	    #include <termios.h>
30524	    #ifndef TIOCGPPSEV
30525	    # error
30526	    #endif
30527
30528_ACEOF
30529if ac_fn_c_try_cpp "$LINENO"
30530then :
30531  ntp_ok=yes
30532else $as_nop
30533  ntp_ok=no
30534
30535fi
30536rm -f conftest.err conftest.i conftest.$ac_ext
30537    ;;
30538 *)
30539    ntp_ok=no
30540    ;;
30541esac
30542case "$ntp_ok" in
30543 yes)
30544
30545printf "%s\n" "#define HAVE_TIOCGPPSEV 1" >>confdefs.h
30546
30547esac
30548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30549printf "%s\n" "$ntp_ok" >&6; }
30550
30551# Check for ioctls TIOCSPPS
30552{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCSPPS" >&5
30553printf %s "checking for TTY PPS ioctl TIOCSPPS... " >&6; }
30554case "$ac_cv_header_termios_h" in
30555 yes)
30556    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30557/* end confdefs.h.  */
30558
30559	    #include <termios.h>
30560	    #ifndef TIOCSPPS
30561	    # error
30562	    #endif
30563
30564_ACEOF
30565if ac_fn_c_try_cpp "$LINENO"
30566then :
30567  ntp_ok=yes
30568else $as_nop
30569  ntp_ok=no
30570
30571fi
30572rm -f conftest.err conftest.i conftest.$ac_ext
30573    ;;
30574 *)
30575    ntp_ok=no
30576    ;;
30577esac
30578case "$ntp_ok" in
30579 yes)
30580
30581printf "%s\n" "#define HAVE_TIOCSPPS 1" >>confdefs.h
30582
30583esac
30584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30585printf "%s\n" "$ntp_ok" >&6; }
30586
30587# Check for ioctls CIOGETEV
30588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl CIOGETEV" >&5
30589printf %s "checking for TTY PPS ioctl CIOGETEV... " >&6; }
30590case "$ac_cv_header_sys_ppsclock_h" in
30591 yes)
30592    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30593/* end confdefs.h.  */
30594
30595	    #include <sys/ppsclock.h>
30596	    #ifndef CIOGETEV
30597	    # error
30598	    #endif
30599
30600_ACEOF
30601if ac_fn_c_try_cpp "$LINENO"
30602then :
30603  ntp_ok=yes
30604else $as_nop
30605  ntp_ok=no
30606
30607fi
30608rm -f conftest.err conftest.i conftest.$ac_ext
30609    ;;
30610 *)
30611    ntp_ok=no
30612    ;;
30613esac
30614case "$ntp_ok" in
30615 yes)
30616
30617printf "%s\n" "#define HAVE_CIOGETEV 1" >>confdefs.h
30618
30619esac
30620{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30621printf "%s\n" "$ntp_ok" >&6; }
30622
30623# ATOM/PPSAPI stuff.
30624
30625ntp_atom_ok=yes
30626
30627# Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
30628
30629# The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
30630# The PPSAPI needs struct timespec.
30631# The PPSAPI also needs a timepps header.
30632
30633case "$ac_cv_c_inline$ntp_cv_struct_timespec" in
30634 inlineyes)
30635    case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
30636     *yes* | *sunos* | *solaris* | *sco* | *netbsd* )
30637
30638printf "%s\n" "#define HAVE_PPSAPI 1" >>confdefs.h
30639
30640	ntp_jupiter_ok=yes
30641	ntp_oncore_ok=yes
30642	ntp_parse_ok=yes
30643	ntp_ripe_ncc_ok=yes
30644	;;
30645    esac
30646    ;;
30647esac
30648
30649# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
30650ac_fn_c_check_header_compile "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default"
30651if test "x$ac_cv_header_linux_serial_h" = xyes
30652then :
30653
30654fi
30655
30656case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
30657  yesyes)
30658    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG" >&5
30659printf %s "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG... " >&6; }
30660    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30661/* end confdefs.h.  */
30662
30663	    #include <sys/time.h>
30664	    typedef int u_int;
30665	    #include <sys/ppsclock.h>
30666	    #include <linux/serial.h>
30667
30668	    #ifndef TIOCGSERIAL
30669	    # error
30670	    #endif
30671	    #ifndef TIOCSSERIAL
30672	    # error
30673	    #endif
30674	    #ifndef ASYNC_PPS_CD_POS
30675	    # error
30676	    #endif
30677	    #ifndef ASYNC_PPS_CD_NEG
30678	    # error
30679	    #endif
30680	    #ifndef CIOGETEV
30681	    # error
30682	    #endif
30683
30684_ACEOF
30685if ac_fn_c_try_cpp "$LINENO"
30686then :
30687  ntp_ok=yes
30688else $as_nop
30689  ntp_ok=no
30690
30691fi
30692rm -f conftest.err conftest.i conftest.$ac_ext
30693    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30694printf "%s\n" "$ntp_ok" >&6; }
30695    ;;
30696  *)
30697    ntp_ok=no
30698    ;;
30699esac
30700case "$ntp_ok" in
30701 yes)
30702
30703printf "%s\n" "#define HAVE_TIO_SERIAL_STUFF 1" >>confdefs.h
30704
30705esac
30706
30707# Check for SHMEM_STATUS support
30708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHMEM_STATUS support" >&5
30709printf %s "checking SHMEM_STATUS support... " >&6; }
30710case "$ac_cv_header_sys_mman_h" in
30711 yes)
30712    ntp_ok=yes
30713    ;;
30714 *)
30715    ntp_ok=no
30716    ;;
30717esac
30718case "$ntp_ok" in
30719 yes)
30720
30721printf "%s\n" "#define ONCORE_SHMEM_STATUS 1" >>confdefs.h
30722
30723esac
30724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30725printf "%s\n" "$ntp_ok" >&6; }
30726
30727ntp_refclock=no
30728
30729# HPUX only, and by explicit request
30730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum/Bancomm bc635/VME interface" >&5
30731printf %s "checking Datum/Bancomm bc635/VME interface... " >&6; }
30732# Check whether --enable-BANCOMM was given.
30733if test ${enable_BANCOMM+y}
30734then :
30735  enableval=$enable_BANCOMM; ntp_ok=$enableval
30736else $as_nop
30737  ntp_ok=no
30738
30739fi
30740
30741case "$ntp_ok" in
30742 yes)
30743    ntp_refclock=yes
30744
30745printf "%s\n" "#define CLOCK_BANC 1" >>confdefs.h
30746
30747    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing bcStartPci" >&5
30748printf %s "checking for library containing bcStartPci... " >&6; }
30749if test ${ac_cv_search_bcStartPci+y}
30750then :
30751  printf %s "(cached) " >&6
30752else $as_nop
30753  ac_func_search_save_LIBS=$LIBS
30754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30755/* end confdefs.h.  */
30756
30757/* Override any GCC internal prototype to avoid an error.
30758   Use char because int might match the return type of a GCC
30759   builtin and then its argument prototype would still apply.  */
30760char bcStartPci ();
30761int
30762main (void)
30763{
30764return bcStartPci ();
30765  ;
30766  return 0;
30767}
30768_ACEOF
30769for ac_lib in '' bcsdk
30770do
30771  if test -z "$ac_lib"; then
30772    ac_res="none required"
30773  else
30774    ac_res=-l$ac_lib
30775    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
30776  fi
30777  if ac_fn_c_try_link "$LINENO"
30778then :
30779  ac_cv_search_bcStartPci=$ac_res
30780fi
30781rm -f core conftest.err conftest.$ac_objext conftest.beam \
30782    conftest$ac_exeext
30783  if test ${ac_cv_search_bcStartPci+y}
30784then :
30785  break
30786fi
30787done
30788if test ${ac_cv_search_bcStartPci+y}
30789then :
30790
30791else $as_nop
30792  ac_cv_search_bcStartPci=no
30793fi
30794rm conftest.$ac_ext
30795LIBS=$ac_func_search_save_LIBS
30796fi
30797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bcStartPci" >&5
30798printf "%s\n" "$ac_cv_search_bcStartPci" >&6; }
30799ac_res=$ac_cv_search_bcStartPci
30800if test "$ac_res" != no
30801then :
30802  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
30803
30804fi
30805
30806    ;;
30807esac
30808{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30809printf "%s\n" "$ntp_ok" >&6; }
30810case "$ntp_ok$host" in
30811 yes*-*-hpux*) ;;
30812 yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30813printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
30814esac
30815
30816#HPUX only, and only by explicit request
30817{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime GPS receiver/VME interface" >&5
30818printf %s "checking TrueTime GPS receiver/VME interface... " >&6; }
30819# Check whether --enable-GPSVME was given.
30820if test ${enable_GPSVME+y}
30821then :
30822  enableval=$enable_GPSVME; ntp_ok=$enableval
30823else $as_nop
30824  ntp_ok=no
30825
30826fi
30827
30828case "$ntp_ok" in
30829 yes)
30830    ntp_refclock=yes
30831
30832printf "%s\n" "#define CLOCK_GPSVME 1" >>confdefs.h
30833
30834    ;;
30835esac
30836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30837printf "%s\n" "$ntp_ok" >&6; }
30838case "$ntp_ok$host" in
30839 yes*-*-hpux*) ;;
30840 yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30841printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
30842esac
30843
30844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCL720 clock support" >&5
30845printf %s "checking for PCL720 clock support... " >&6; }
30846case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
30847 yesyesyes)
30848
30849printf "%s\n" "#define CLOCK_PPS720 1" >>confdefs.h
30850
30851    ans=yes
30852    ;;
30853 *)
30854    ans=no
30855    ;;
30856esac
30857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
30858printf "%s\n" "$ans" >&6; }
30859
30860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable non-PARSE clocks" >&5
30861printf %s "checking for default inclusion of all suitable non-PARSE clocks... " >&6; }
30862# Check whether --enable-all-clocks was given.
30863if test ${enable_all_clocks+y}
30864then :
30865  enableval=$enable_all_clocks; ntp_eac=$enableval
30866else $as_nop
30867  ntp_eac=yes
30868
30869fi
30870
30871{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eac" >&5
30872printf "%s\n" "$ntp_eac" >&6; }
30873
30874# HMS: Should we also require ntp_parse_ok?
30875{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for PARSE clocks" >&5
30876printf %s "checking if we have support for PARSE clocks... " >&6; }
30877case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
30878 yes*yes*)
30879    ntp_canparse=yes
30880    ;;
30881 *) ntp_canparse=no
30882    ;;
30883esac
30884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canparse" >&5
30885printf "%s\n" "$ntp_canparse" >&6; }
30886
30887{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for audio clocks" >&5
30888printf %s "checking if we have support for audio clocks... " >&6; }
30889case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
30890 *yes*)
30891    ntp_canaudio=yes
30892
30893printf "%s\n" "#define HAVE_AUDIO /**/" >>confdefs.h
30894
30895    ;;
30896 *) ntp_canaudio=no ;;
30897esac
30898{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canaudio" >&5
30899printf "%s\n" "$ntp_canaudio" >&6; }
30900
30901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for the SHM refclock interface" >&5
30902printf %s "checking if we have support for the SHM refclock interface... " >&6; }
30903case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
30904 yesyes)
30905    ntp_canshm=yes
30906    ;;
30907 *) ntp_canshm=no ;;
30908esac
30909{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canshm" >&5
30910printf "%s\n" "$ntp_canshm" >&6; }
30911
30912# Test for termios TIOCMBIS modem control (ACTS, Heath, Palisade)
30913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for termios modem control" >&5
30914printf %s "checking for termios modem control... " >&6; }
30915if test ${ntp_cv_modem_control+y}
30916then :
30917  printf %s "(cached) " >&6
30918else $as_nop
30919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30920/* end confdefs.h.  */
30921
30922		#ifdef HAVE_UNISTD_H
30923		# include <unistd.h>
30924		#endif
30925		#ifdef HAVE_TERMIOS_H
30926		# include <termios.h>
30927		#endif
30928		#ifdef HAVE_SYS_IOCTL_H
30929		# include <sys/ioctl.h>
30930		#endif
30931
30932int
30933main (void)
30934{
30935
30936		int	dtr = TIOCM_DTR;
30937
30938		ioctl(1, TIOCMBIS, (char *)&dtr);
30939
30940
30941  ;
30942  return 0;
30943}
30944_ACEOF
30945if ac_fn_c_try_compile "$LINENO"
30946then :
30947  ntp_cv_modem_control=yes
30948else $as_nop
30949  ntp_cv_modem_control=no
30950
30951fi
30952rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30953
30954fi
30955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_modem_control" >&5
30956printf "%s\n" "$ntp_cv_modem_control" >&6; }
30957case "$ntp_eac::$ntp_cv_modem_control" in
30958 yes::yes)
30959    ntp_enable_all_modem_control_clocks=yes
30960    ;;
30961 *)
30962    ntp_enable_all_modem_control_clocks=no
30963    ;;
30964esac
30965
30966# Requires modem control
30967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ACTS modem service" >&5
30968printf %s "checking ACTS modem service... " >&6; }
30969# Check whether --enable-ACTS was given.
30970if test ${enable_ACTS+y}
30971then :
30972  enableval=$enable_ACTS; ntp_ok=$enableval
30973else $as_nop
30974  ntp_ok=$ntp_enable_all_modem_control_clocks
30975
30976fi
30977
30978case "$ntp_ok" in
30979 yes)
30980    ntp_refclock=yes
30981
30982printf "%s\n" "#define CLOCK_ACTS 1" >>confdefs.h
30983
30984    ;;
30985esac
30986{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30987printf "%s\n" "$ntp_ok" >&6; }
30988
30989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arbiter 1088A/B GPS receiver" >&5
30990printf %s "checking Arbiter 1088A/B GPS receiver... " >&6; }
30991# Check whether --enable-ARBITER was given.
30992if test ${enable_ARBITER+y}
30993then :
30994  enableval=$enable_ARBITER; ntp_ok=$enableval
30995else $as_nop
30996  ntp_ok=$ntp_eac
30997
30998fi
30999
31000case "$ntp_ok" in
31001 yes)
31002    ntp_refclock=yes
31003
31004printf "%s\n" "#define CLOCK_ARBITER 1" >>confdefs.h
31005
31006    ;;
31007esac
31008{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31009printf "%s\n" "$ntp_ok" >&6; }
31010
31011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arcron MSF receiver" >&5
31012printf %s "checking Arcron MSF receiver... " >&6; }
31013# Check whether --enable-ARCRON_MSF was given.
31014if test ${enable_ARCRON_MSF+y}
31015then :
31016  enableval=$enable_ARCRON_MSF; ntp_ok=$enableval
31017else $as_nop
31018  ntp_ok=$ntp_eac
31019
31020fi
31021
31022case "$ntp_ok" in
31023 yes)
31024    ntp_refclock=yes
31025
31026printf "%s\n" "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
31027
31028    ;;
31029esac
31030{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31031printf "%s\n" "$ntp_ok" >&6; }
31032
31033{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Austron 2200A/2201A GPS receiver" >&5
31034printf %s "checking Austron 2200A/2201A GPS receiver... " >&6; }
31035# Check whether --enable-AS2201 was given.
31036if test ${enable_AS2201+y}
31037then :
31038  enableval=$enable_AS2201; ntp_ok=$enableval
31039else $as_nop
31040  ntp_ok=$ntp_eac
31041
31042fi
31043
31044case "$ntp_ok" in
31045 yes)
31046    ntp_refclock=yes
31047
31048printf "%s\n" "#define CLOCK_AS2201 1" >>confdefs.h
31049
31050    ;;
31051esac
31052{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31053printf "%s\n" "$ntp_ok" >&6; }
31054
31055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ATOM PPS interface" >&5
31056printf %s "checking ATOM PPS interface... " >&6; }
31057# Check whether --enable-ATOM was given.
31058if test ${enable_ATOM+y}
31059then :
31060  enableval=$enable_ATOM; ntp_ok=$enableval
31061else $as_nop
31062  ntp_ok=$ntp_eac
31063
31064fi
31065
31066case "$ntp_atom_ok" in
31067 no) ntp_ok=no ;;
31068esac
31069case "$ntp_ok" in
31070 yes)
31071    ntp_refclock=yes
31072
31073printf "%s\n" "#define CLOCK_ATOM 1" >>confdefs.h
31074
31075    ;;
31076esac
31077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31078printf "%s\n" "$ntp_ok" >&6; }
31079
31080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Chrono-log K-series WWVB receiver" >&5
31081printf %s "checking Chrono-log K-series WWVB receiver... " >&6; }
31082# Check whether --enable-CHRONOLOG was given.
31083if test ${enable_CHRONOLOG+y}
31084then :
31085  enableval=$enable_CHRONOLOG; ntp_ok=$enableval
31086else $as_nop
31087  ntp_ok=$ntp_eac
31088
31089fi
31090
31091case "$ntp_ok" in
31092 yes)
31093    ntp_refclock=yes
31094
31095printf "%s\n" "#define CLOCK_CHRONOLOG 1" >>confdefs.h
31096
31097    ;;
31098esac
31099{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31100printf "%s\n" "$ntp_ok" >&6; }
31101
31102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU modem/decoder" >&5
31103printf %s "checking CHU modem/decoder... " >&6; }
31104# Check whether --enable-CHU was given.
31105if test ${enable_CHU+y}
31106then :
31107  enableval=$enable_CHU; ntp_ok=$enableval
31108else $as_nop
31109  ntp_ok=$ntp_eac
31110
31111fi
31112
31113case "$ntp_ok" in
31114 yes)
31115    ntp_refclock=yes
31116
31117printf "%s\n" "#define CLOCK_CHU 1" >>confdefs.h
31118
31119    ;;
31120esac
31121{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31122printf "%s\n" "$ntp_ok" >&6; }
31123ntp_refclock_chu=$ntp_ok
31124
31125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU audio/decoder" >&5
31126printf %s "checking CHU audio/decoder... " >&6; }
31127# Check whether --enable-AUDIO-CHU was given.
31128if test ${enable_AUDIO_CHU+y}
31129then :
31130  enableval=$enable_AUDIO_CHU; ntp_ok=$enableval
31131else $as_nop
31132
31133	case "$ntp_eac$ntp_refclock_chu$ntp_canaudio" in
31134	 *no*)	ntp_ok=no  ;;
31135	 *)	ntp_ok=yes ;;
31136	esac
31137
31138
31139fi
31140
31141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31142printf "%s\n" "$ntp_ok" >&6; }
31143# We used to check for sunos/solaris target...
31144case "$ntp_ok$ntp_refclock_chu$ntp_canaudio" in
31145 yes*no*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is...no ***" >&5
31146printf "%s\n" "$as_me: WARNING: *** But the expected answer is...no ***" >&2;}
31147esac
31148
31149# Not under HP-UX
31150{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum Programmable Time System" >&5
31151printf %s "checking Datum Programmable Time System... " >&6; }
31152# Check whether --enable-DATUM was given.
31153if test ${enable_DATUM+y}
31154then :
31155  enableval=$enable_DATUM; ntp_ok=$enableval
31156else $as_nop
31157
31158	case "$ac_cv_header_termios_h" in
31159	 yes)
31160	    ntp_ok=$ntp_eac
31161	    ;;
31162	 *) ntp_ok=no
31163	    ;;
31164	esac
31165
31166
31167fi
31168
31169case "$ntp_ok" in
31170 yes)
31171    ntp_refclock=yes
31172
31173printf "%s\n" "#define CLOCK_DATUM 1" >>confdefs.h
31174
31175    ;;
31176esac
31177{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31178printf "%s\n" "$ntp_ok" >&6; }
31179
31180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Dumb generic hh:mm:ss local clock" >&5
31181printf %s "checking Dumb generic hh:mm:ss local clock... " >&6; }
31182# Check whether --enable-DUMBCLOCK was given.
31183if test ${enable_DUMBCLOCK+y}
31184then :
31185  enableval=$enable_DUMBCLOCK; ntp_ok=$enableval
31186else $as_nop
31187  ntp_ok=$ntp_eac
31188
31189fi
31190
31191case "$ntp_ok" in
31192 yes)
31193    ntp_refclock=yes
31194
31195printf "%s\n" "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
31196
31197    ;;
31198esac
31199{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31200printf "%s\n" "$ntp_ok" >&6; }
31201
31202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Forum Graphic GPS" >&5
31203printf %s "checking Forum Graphic GPS... " >&6; }
31204# Check whether --enable-FG was given.
31205if test ${enable_FG+y}
31206then :
31207  enableval=$enable_FG; ntp_ok=$enableval
31208else $as_nop
31209  ntp_ok=$ntp_eac
31210
31211fi
31212
31213case "$ntp_ok" in
31214 yes)
31215    ntp_refclock=yes
31216
31217printf "%s\n" "#define CLOCK_FG 1" >>confdefs.h
31218
31219    ;;
31220esac
31221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31222printf "%s\n" "$ntp_ok" >&6; }
31223
31224# Requires modem control
31225{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Heath GC-1000 WWV/WWVH receiver" >&5
31226printf %s "checking Heath GC-1000 WWV/WWVH receiver... " >&6; }
31227# Check whether --enable-HEATH was given.
31228if test ${enable_HEATH+y}
31229then :
31230  enableval=$enable_HEATH; ntp_ok=$enableval
31231else $as_nop
31232  ntp_ok=$ntp_enable_all_modem_control_clocks
31233
31234fi
31235
31236case "$ntp_ok" in
31237 yes)
31238    ntp_refclock=yes
31239
31240printf "%s\n" "#define CLOCK_HEATH 1" >>confdefs.h
31241
31242    ;;
31243esac
31244{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31245printf "%s\n" "$ntp_ok" >&6; }
31246
31247{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf serial clock device" >&5
31248printf %s "checking for hopf serial clock device... " >&6; }
31249# Check whether --enable-HOPFSERIAL was given.
31250if test ${enable_HOPFSERIAL+y}
31251then :
31252  enableval=$enable_HOPFSERIAL; ntp_ok=$enableval
31253else $as_nop
31254  ntp_ok=$ntp_eac
31255
31256fi
31257
31258case "$ntp_ok" in
31259 yes)
31260    ntp_refclock=yes
31261
31262printf "%s\n" "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
31263
31264    ;;
31265esac
31266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31267printf "%s\n" "$ntp_ok" >&6; }
31268
31269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf PCI clock 6039" >&5
31270printf %s "checking for hopf PCI clock 6039... " >&6; }
31271# Check whether --enable-HOPFPCI was given.
31272if test ${enable_HOPFPCI+y}
31273then :
31274  enableval=$enable_HOPFPCI; ntp_ok=$enableval
31275else $as_nop
31276  ntp_ok=$ntp_eac
31277
31278fi
31279
31280case "$ntp_ok" in
31281 yes)
31282    ntp_refclock=yes
31283
31284printf "%s\n" "#define CLOCK_HOPF_PCI 1" >>confdefs.h
31285
31286    ;;
31287esac
31288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31289printf "%s\n" "$ntp_ok" >&6; }
31290
31291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HP 58503A GPS receiver" >&5
31292printf %s "checking HP 58503A GPS receiver... " >&6; }
31293# Check whether --enable-HPGPS was given.
31294if test ${enable_HPGPS+y}
31295then :
31296  enableval=$enable_HPGPS; ntp_ok=$enableval
31297else $as_nop
31298  ntp_ok=$ntp_eac
31299
31300fi
31301
31302case "$ntp_ok" in
31303 yes)
31304    ntp_refclock=yes
31305
31306printf "%s\n" "#define CLOCK_HPGPS 1" >>confdefs.h
31307
31308    ;;
31309esac
31310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31311printf "%s\n" "$ntp_ok" >&6; }
31312
31313{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking IRIG audio decoder" >&5
31314printf %s "checking IRIG audio decoder... " >&6; }
31315# Check whether --enable-IRIG was given.
31316if test ${enable_IRIG+y}
31317then :
31318  enableval=$enable_IRIG; ntp_ok=$enableval
31319else $as_nop
31320
31321	case "$ntp_eac$ntp_canaudio" in
31322	 *no*)	ntp_ok=no  ;;
31323	 *)	ntp_ok=yes ;;
31324	esac
31325
31326
31327fi
31328
31329case "$ntp_ok" in
31330 yes)
31331    ntp_refclock=yes
31332
31333printf "%s\n" "#define CLOCK_IRIG 1" >>confdefs.h
31334
31335    ;;
31336esac
31337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31338printf "%s\n" "$ntp_ok" >&6; }
31339case "$ntp_ok$ntp_canaudio" in
31340 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
31341printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
31342esac
31343
31344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JJY receiver" >&5
31345printf %s "checking for JJY receiver... " >&6; }
31346# Check whether --enable-JJY was given.
31347if test ${enable_JJY+y}
31348then :
31349  enableval=$enable_JJY; ntp_ok=$enableval
31350else $as_nop
31351  ntp_ok=$ntp_eac
31352
31353fi
31354
31355case "$ntp_ok" in
31356 yes)
31357    ntp_refclock=yes
31358
31359printf "%s\n" "#define CLOCK_JJY 1" >>confdefs.h
31360
31361    ;;
31362esac
31363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31364printf "%s\n" "$ntp_ok" >&6; }
31365
31366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Rockwell Jupiter GPS receiver" >&5
31367printf %s "checking Rockwell Jupiter GPS receiver... " >&6; }
31368# Check whether --enable-JUPITER was given.
31369if test ${enable_JUPITER+y}
31370then :
31371  enableval=$enable_JUPITER; ntp_ok=$enableval
31372else $as_nop
31373  ntp_ok=$ntp_eac
31374fi
31375
31376case "$ntp_jupiter_ok" in
31377 no) ntp_ok=no ;;
31378esac
31379case "$ntp_ok" in
31380 yes)
31381    ntp_refclock=yes
31382
31383printf "%s\n" "#define CLOCK_JUPITER 1" >>confdefs.h
31384
31385    ;;
31386esac
31387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31388printf "%s\n" "$ntp_ok" >&6; }
31389
31390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Leitch CSD 5300 Master Clock System Driver" >&5
31391printf %s "checking Leitch CSD 5300 Master Clock System Driver... " >&6; }
31392# Check whether --enable-LEITCH was given.
31393if test ${enable_LEITCH+y}
31394then :
31395  enableval=$enable_LEITCH; ntp_ok=$enableval
31396else $as_nop
31397  ntp_ok=$ntp_eac
31398
31399fi
31400
31401case "$ntp_ok" in
31402 yes)
31403    ntp_refclock=yes
31404
31405printf "%s\n" "#define CLOCK_LEITCH 1" >>confdefs.h
31406
31407    ;;
31408esac
31409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31410printf "%s\n" "$ntp_ok" >&6; }
31411
31412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking local clock reference" >&5
31413printf %s "checking local clock reference... " >&6; }
31414# Check whether --enable-LOCAL-CLOCK was given.
31415if test ${enable_LOCAL_CLOCK+y}
31416then :
31417  enableval=$enable_LOCAL_CLOCK; ntp_ok=$enableval
31418else $as_nop
31419  ntp_ok=$ntp_eac
31420
31421fi
31422
31423case "$ntp_ok" in
31424 yes)
31425    ntp_refclock=yes
31426
31427printf "%s\n" "#define CLOCK_LOCAL 1" >>confdefs.h
31428
31429    ;;
31430esac
31431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31432printf "%s\n" "$ntp_ok" >&6; }
31433
31434
31435# Not Ultrix
31436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Magnavox MX4200 GPS receiver" >&5
31437printf %s "checking Magnavox MX4200 GPS receiver... " >&6; }
31438# Check whether --enable-MX4200 was given.
31439if test ${enable_MX4200+y}
31440then :
31441  enableval=$enable_MX4200; ntp_ok=$enableval
31442else $as_nop
31443
31444	case "$ac_cv_var_ppsclock" in
31445	 yes)
31446	    ntp_ok=$ntp_eac
31447	    ;;
31448	 *)
31449	    ntp_ok=no
31450	    ;;
31451	esac
31452
31453
31454fi
31455
31456case "$ntp_ok" in
31457 yes)
31458    ntp_refclock=yes
31459
31460printf "%s\n" "#define CLOCK_MX4200 1" >>confdefs.h
31461
31462    ;;
31463esac
31464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31465printf "%s\n" "$ntp_ok" >&6; }
31466case "$ntp_ok$host" in
31467 yes*-*-ultrix*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
31468printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
31469esac
31470
31471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NeoClock4X receiver" >&5
31472printf %s "checking for NeoClock4X receiver... " >&6; }
31473# Check whether --enable-NEOCLOCK4X was given.
31474if test ${enable_NEOCLOCK4X+y}
31475then :
31476  enableval=$enable_NEOCLOCK4X; ntp_ok=$enableval
31477else $as_nop
31478  ntp_ok=$ntp_eac
31479
31480fi
31481
31482case "$ntp_ok" in
31483 yes)
31484    ntp_refclock=yes
31485
31486printf "%s\n" "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
31487
31488    ;;
31489esac
31490{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31491printf "%s\n" "$ntp_ok" >&6; }
31492
31493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking NMEA GPS receiver" >&5
31494printf %s "checking NMEA GPS receiver... " >&6; }
31495# Check whether --enable-NMEA was given.
31496if test ${enable_NMEA+y}
31497then :
31498  enableval=$enable_NMEA; ntp_ok=$enableval
31499else $as_nop
31500  ntp_ok=$ntp_eac
31501
31502fi
31503
31504case "$ntp_ok" in
31505 yes)
31506    ntp_refclock=yes
31507
31508printf "%s\n" "#define CLOCK_NMEA 1" >>confdefs.h
31509
31510    ;;
31511esac
31512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31513printf "%s\n" "$ntp_ok" >&6; }
31514
31515ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
31516if test "x$ac_cv_func_strtoll" = xyes
31517then :
31518  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
31519
31520fi
31521
31522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
31523printf %s "checking for GPSD JSON receiver... " >&6; }
31524# Check whether --enable-GPSD was given.
31525if test ${enable_GPSD+y}
31526then :
31527  enableval=$enable_GPSD; ntp_ok=$enableval
31528else $as_nop
31529  case "$ac_cv_func_strtoll" in
31530     yes) ntp_ok=$ntp_eac ;;
31531     *)   ntp_ok="no" ;;
31532    esac
31533
31534fi
31535
31536case "$ntp_ok" in
31537 yes)
31538    ntp_refclock=yes
31539
31540printf "%s\n" "#define CLOCK_GPSDJSON 1" >>confdefs.h
31541
31542    ;;
31543esac
31544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31545printf "%s\n" "$ntp_ok" >&6; }
31546
31547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
31548printf %s "checking for ONCORE Motorola VP/UT Oncore GPS... " >&6; }
31549# Check whether --enable-ONCORE was given.
31550if test ${enable_ONCORE+y}
31551then :
31552  enableval=$enable_ONCORE; ntp_ok=$enableval
31553else $as_nop
31554  ntp_ok=$ntp_eac
31555
31556fi
31557
31558case "$ntp_oncore_ok" in
31559 no) ntp_ok=no ;;
31560esac
31561case "$ntp_ok" in
31562 yes)
31563    ntp_refclock=yes
31564
31565printf "%s\n" "#define CLOCK_ONCORE 1" >>confdefs.h
31566
31567    ;;
31568esac
31569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31570printf "%s\n" "$ntp_ok" >&6; }
31571
31572# Requires modem control
31573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Palisade clock" >&5
31574printf %s "checking for Palisade clock... " >&6; }
31575# Check whether --enable-PALISADE was given.
31576if test ${enable_PALISADE+y}
31577then :
31578  enableval=$enable_PALISADE; ntp_ok=$enableval
31579else $as_nop
31580  ntp_ok=$ntp_enable_all_modem_control_clocks
31581
31582fi
31583
31584case "$ntp_ok" in
31585 yes)
31586    ntp_refclock=yes
31587
31588printf "%s\n" "#define CLOCK_PALISADE 1" >>confdefs.h
31589
31590    ;;
31591esac
31592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31593printf "%s\n" "$ntp_ok" >&6; }
31594
31595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Conrad parallel port radio clock" >&5
31596printf %s "checking Conrad parallel port radio clock... " >&6; }
31597# Check whether --enable-PCF was given.
31598if test ${enable_PCF+y}
31599then :
31600  enableval=$enable_PCF; ntp_ok=$enableval
31601else $as_nop
31602  ntp_ok=$ntp_eac
31603
31604fi
31605
31606case "$ntp_ok" in
31607 yes)
31608    ntp_refclock=yes
31609
31610printf "%s\n" "#define CLOCK_PCF 1" >>confdefs.h
31611
31612    ;;
31613esac
31614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31615printf "%s\n" "$ntp_ok" >&6; }
31616
31617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
31618printf %s "checking PST/Traconex 1020 WWV/WWVH receiver... " >&6; }
31619# Check whether --enable-PST was given.
31620if test ${enable_PST+y}
31621then :
31622  enableval=$enable_PST; ntp_ok=$enableval
31623else $as_nop
31624  ntp_ok=$ntp_eac
31625
31626fi
31627
31628case "$ntp_ok" in
31629 yes)
31630    ntp_refclock=yes
31631
31632printf "%s\n" "#define CLOCK_PST 1" >>confdefs.h
31633
31634    ;;
31635esac
31636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31637printf "%s\n" "$ntp_ok" >&6; }
31638
31639{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RIPENCC specific Trimble driver" >&5
31640printf %s "checking RIPENCC specific Trimble driver... " >&6; }
31641# Check whether --enable-RIPENCC was given.
31642if test ${enable_RIPENCC+y}
31643then :
31644  enableval=$enable_RIPENCC; ntp_ok=$enableval
31645else $as_nop
31646  ntp_ok=no
31647
31648fi
31649
31650# 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
31651case "$ntp_ripe_ncc_ok" in
31652 no) ntp_ok=no ;;
31653esac
31654case "$ntp_ok" in
31655 yes)
31656    ntp_refclock=yes
31657
31658printf "%s\n" "#define CLOCK_RIPENCC /**/" >>confdefs.h
31659
31660    ;;
31661esac
31662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31663printf "%s\n" "$ntp_ok" >&6; }
31664
31665# Danny Meyer says SHM compiles (with a few warnings) under Win32.
31666# For *IX, we need sys/ipc.h and sys/shm.h.
31667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHM clock attached thru shared memory" >&5
31668printf %s "checking for SHM clock attached thru shared memory... " >&6; }
31669# Check whether --enable-SHM was given.
31670if test ${enable_SHM+y}
31671then :
31672  enableval=$enable_SHM; ntp_ok=$enableval
31673else $as_nop
31674
31675	case "$ntp_eac$ntp_canshm" in
31676	 *no*)	ntp_ok=no  ;;
31677	 *)	ntp_ok=yes ;;
31678	esac
31679
31680
31681fi
31682
31683case "$ntp_ok" in
31684 yes)
31685    ntp_refclock=yes
31686
31687printf "%s\n" "#define CLOCK_SHM 1" >>confdefs.h
31688
31689    ;;
31690esac
31691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31692printf "%s\n" "$ntp_ok" >&6; }
31693
31694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
31695printf %s "checking Spectracom 8170/Netclock/2 WWVB receiver... " >&6; }
31696# Check whether --enable-SPECTRACOM was given.
31697if test ${enable_SPECTRACOM+y}
31698then :
31699  enableval=$enable_SPECTRACOM; ntp_ok=$enableval
31700else $as_nop
31701  ntp_ok=$ntp_eac
31702
31703fi
31704
31705case "$ntp_ok" in
31706 yes)
31707    ntp_refclock=yes
31708
31709printf "%s\n" "#define CLOCK_SPECTRACOM 1" >>confdefs.h
31710
31711    ;;
31712esac
31713{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31714printf "%s\n" "$ntp_ok" >&6; }
31715
31716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
31717printf %s "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... " >&6; }
31718# Check whether --enable-TPRO was given.
31719if test ${enable_TPRO+y}
31720then :
31721  enableval=$enable_TPRO; ntp_ok=$enableval
31722else $as_nop
31723
31724	case "$ac_cv_header_sys_tpro_h" in
31725	 yes)
31726	    ntp_ok=$ntp_eac
31727	    ;;
31728	 *)
31729	    ntp_ok=no
31730	    ;;
31731	esac
31732
31733
31734fi
31735
31736case "$ntp_ok" in
31737 yes)
31738    ntp_refclock=yes
31739
31740printf "%s\n" "#define CLOCK_TPRO 1" >>confdefs.h
31741
31742    ;;
31743esac
31744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31745printf "%s\n" "$ntp_ok" >&6; }
31746case "$ntp_ok$ac_cv_header_sys_tpro" in
31747 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
31748printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
31749esac
31750
31751# Not on a vax-dec-bsd
31752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
31753printf %s "checking Kinemetrics/TrueTime receivers... " >&6; }
31754# Check whether --enable-TRUETIME was given.
31755if test ${enable_TRUETIME+y}
31756then :
31757  enableval=$enable_TRUETIME; ntp_ok=$enableval
31758else $as_nop
31759
31760	case "$host" in
31761	 vax-dec-bsd)
31762	    ntp_ok=no
31763	    ;;
31764	 *)
31765	    ntp_ok=$ntp_eac
31766	    ;;
31767	esac
31768
31769
31770fi
31771
31772case "$ntp_ok" in
31773 yes)
31774    ntp_refclock=yes
31775
31776printf "%s\n" "#define CLOCK_TRUETIME 1" >>confdefs.h
31777
31778    ;;
31779esac
31780{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31781printf "%s\n" "$ntp_ok" >&6; }
31782case "$ntp_ok$host" in
31783 yesvax-dec-bsd) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
31784printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
31785esac
31786
31787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime 560 IRIG-B decoder" >&5
31788printf %s "checking TrueTime 560 IRIG-B decoder... " >&6; }
31789# Check whether --enable-TT560 was given.
31790if test ${enable_TT560+y}
31791then :
31792  enableval=$enable_TT560; ntp_ok=$enableval
31793else $as_nop
31794  ntp_ok=no
31795
31796fi
31797
31798case "$ntp_ok" in
31799 yes)
31800    ntp_refclock=yes
31801
31802printf "%s\n" "#define CLOCK_TT560 /**/" >>confdefs.h
31803
31804    ;;
31805esac
31806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31807printf "%s\n" "$ntp_ok" >&6; }
31808
31809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ultralink M320 WWVB receiver" >&5
31810printf %s "checking Ultralink M320 WWVB receiver... " >&6; }
31811# Check whether --enable-ULINK was given.
31812if test ${enable_ULINK+y}
31813then :
31814  enableval=$enable_ULINK; ntp_ok=$enableval
31815else $as_nop
31816  ntp_ok=$ntp_eac
31817
31818fi
31819
31820case "$ntp_ok" in
31821 yes)
31822    ntp_refclock=yes
31823
31824printf "%s\n" "#define CLOCK_ULINK 1" >>confdefs.h
31825
31826    ;;
31827esac
31828{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31829printf "%s\n" "$ntp_ok" >&6; }
31830
31831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
31832printf %s "checking Spectracom TSYNC PCI timing board... " >&6; }
31833# Check whether --enable-TSYNCPCI was given.
31834if test ${enable_TSYNCPCI+y}
31835then :
31836  enableval=$enable_TSYNCPCI; ntp_ok=$enableval
31837else $as_nop
31838
31839	case "$host" in
31840	 *-*-*linux*)
31841	    ntp_ok=$ntp_eac
31842	    ;;
31843	 *)
31844	    ntp_ok=no
31845	esac
31846
31847
31848fi
31849
31850case "$ntp_ok" in
31851 yes)
31852    ntp_refclock=yes
31853
31854printf "%s\n" "#define CLOCK_TSYNCPCI 1" >>confdefs.h
31855
31856    ;;
31857esac
31858{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31859printf "%s\n" "$ntp_ok" >&6; }
31860
31861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WWV receiver" >&5
31862printf %s "checking WWV receiver... " >&6; }
31863# Check whether --enable-WWV was given.
31864if test ${enable_WWV+y}
31865then :
31866  enableval=$enable_WWV; ntp_ok=$enableval
31867else $as_nop
31868
31869	case "$ntp_eac$ntp_canaudio" in
31870	 *no*)	ntp_ok=no  ;;
31871	 *)	ntp_ok=yes ;;
31872	esac
31873
31874
31875fi
31876
31877case "$ntp_ok" in
31878 yes)
31879    ntp_refclock=yes
31880
31881printf "%s\n" "#define CLOCK_WWV 1" >>confdefs.h
31882
31883    ;;
31884esac
31885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31886printf "%s\n" "$ntp_ok" >&6; }
31887case "$ntp_ok$ntp_canaudio" in
31888 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
31889printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
31890esac
31891
31892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Zyfer receiver" >&5
31893printf %s "checking for Zyfer receiver... " >&6; }
31894# Check whether --enable-ZYFER was given.
31895if test ${enable_ZYFER+y}
31896then :
31897  enableval=$enable_ZYFER; ntp_ok=$enableval
31898else $as_nop
31899  ntp_ok=$ntp_eac
31900
31901fi
31902
31903case "$ntp_ok" in
31904 yes)
31905    ntp_refclock=yes
31906
31907printf "%s\n" "#define CLOCK_ZYFER 1" >>confdefs.h
31908
31909    ;;
31910esac
31911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31912printf "%s\n" "$ntp_ok" >&6; }
31913
31914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable PARSE clocks" >&5
31915printf %s "checking for default inclusion of all suitable PARSE clocks... " >&6; }
31916# Check whether --enable-parse-clocks was given.
31917if test ${enable_parse_clocks+y}
31918then :
31919  enableval=$enable_parse_clocks; ntp_eapc=$enableval
31920else $as_nop
31921
31922	case "$ntp_eac" in
31923	 yes)	ntp_eapc=$ntp_canparse ;;
31924	 *)	ntp_eapc=no ;;
31925	esac
31926	# Delete the next line one of these days
31927	ntp_eapc=no
31928
31929
31930fi
31931
31932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eapc" >&5
31933printf "%s\n" "$ntp_eapc" >&6; }
31934
31935case "$ntp_eac$ntp_eapc$ntp_canparse" in
31936 noyes*)
31937    as_fn_error $? "\"--enable-parse-clocks\" requires \"--enable-all-clocks\"." "$LINENO" 5
31938    ;;
31939 yesyesno)
31940    as_fn_error $? "You said \"--enable-parse-clocks\" but PARSE isn't supported on this platform!" "$LINENO" 5
31941    ;;
31942esac
31943
31944ntp_libparse=no
31945ntp_parseutil=no
31946ntp_rawdcf=no
31947
31948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Diem Computime Radio Clock" >&5
31949printf %s "checking Diem Computime Radio Clock... " >&6; }
31950# Check whether --enable-COMPUTIME was given.
31951if test ${enable_COMPUTIME+y}
31952then :
31953  enableval=$enable_COMPUTIME; ntp_ok=$enableval
31954else $as_nop
31955  ntp_ok=$ntp_eapc
31956
31957fi
31958
31959case "$ntp_ok" in
31960 yes)
31961    ntp_libparse=yes
31962    ntp_refclock=yes
31963
31964printf "%s\n" "#define CLOCK_COMPUTIME 1" >>confdefs.h
31965
31966    ;;
31967esac
31968{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31969printf "%s\n" "$ntp_ok" >&6; }
31970case "$ntp_ok$ntp_canparse" in
31971 yesno)
31972    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31973esac
31974
31975{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ELV/DCF7000 clock" >&5
31976printf %s "checking ELV/DCF7000 clock... " >&6; }
31977# Check whether --enable-DCF7000 was given.
31978if test ${enable_DCF7000+y}
31979then :
31980  enableval=$enable_DCF7000; ntp_ok=$enableval
31981else $as_nop
31982  ntp_ok=$ntp_eapc
31983
31984fi
31985
31986case "$ntp_ok" in
31987 yes)
31988    ntp_libparse=yes
31989    ntp_refclock=yes
31990
31991printf "%s\n" "#define CLOCK_DCF7000 1" >>confdefs.h
31992
31993    ;;
31994esac
31995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31996printf "%s\n" "$ntp_ok" >&6; }
31997case "$ntp_ok$ntp_canparse" in
31998 yesno)
31999    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32000esac
32001
32002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOPF 6021 clock" >&5
32003printf %s "checking HOPF 6021 clock... " >&6; }
32004# Check whether --enable-HOPF6021 was given.
32005if test ${enable_HOPF6021+y}
32006then :
32007  enableval=$enable_HOPF6021; ntp_ok=$enableval
32008else $as_nop
32009  ntp_ok=$ntp_eapc
32010
32011fi
32012
32013case "$ntp_ok" in
32014 yes)
32015    ntp_libparse=yes
32016    ntp_refclock=yes
32017
32018printf "%s\n" "#define CLOCK_HOPF6021 1" >>confdefs.h
32019
32020    ;;
32021esac
32022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32023printf "%s\n" "$ntp_ok" >&6; }
32024case "$ntp_ok$ntp_canparse" in
32025 yesno)
32026    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32027esac
32028
32029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Meinberg clocks" >&5
32030printf %s "checking Meinberg clocks... " >&6; }
32031# Check whether --enable-MEINBERG was given.
32032if test ${enable_MEINBERG+y}
32033then :
32034  enableval=$enable_MEINBERG; ntp_ok=$enableval
32035else $as_nop
32036  ntp_ok=$ntp_eapc
32037
32038fi
32039
32040case "$ntp_ok" in
32041 yes)
32042    ntp_libparse=yes
32043    ntp_refclock=yes
32044
32045printf "%s\n" "#define CLOCK_MEINBERG 1" >>confdefs.h
32046
32047    ;;
32048esac
32049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32050printf "%s\n" "$ntp_ok" >&6; }
32051case "$ntp_ok$ntp_canparse" in
32052 yesno)
32053    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32054esac
32055
32056{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DCF77 raw time code" >&5
32057printf %s "checking DCF77 raw time code... " >&6; }
32058# Check whether --enable-RAWDCF was given.
32059if test ${enable_RAWDCF+y}
32060then :
32061  enableval=$enable_RAWDCF; ntp_ok=$enableval
32062else $as_nop
32063  ntp_ok=$ntp_eapc
32064
32065fi
32066
32067case "$ntp_ok" in
32068 yes)
32069    ntp_libparse=yes
32070    ntp_parseutil=yes
32071    ntp_refclock=yes
32072    ntp_rawdcf=yes
32073
32074printf "%s\n" "#define CLOCK_RAWDCF 1" >>confdefs.h
32075
32076    ;;
32077esac
32078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32079printf "%s\n" "$ntp_ok" >&6; }
32080case "$ntp_ok$ntp_canparse" in
32081 yesno)
32082    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32083esac
32084
32085case "$ntp_rawdcf" in
32086 yes)
32087    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we must enable parity for RAWDCF" >&5
32088printf %s "checking if we must enable parity for RAWDCF... " >&6; }
32089if test ${ntp_cv_rawdcf_parity+y}
32090then :
32091  printf %s "(cached) " >&6
32092else $as_nop
32093
32094	    ans=no
32095	    case "$host" in
32096	     *-*-*linux*)
32097		ans=yes
32098		;;
32099	    esac
32100	    ntp_cv_rawdcf_parity=$ans
32101
32102
32103fi
32104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rawdcf_parity" >&5
32105printf "%s\n" "$ntp_cv_rawdcf_parity" >&6; }
32106    case "$ntp_cv_rawdcf_parity" in
32107     yes)
32108
32109printf "%s\n" "#define RAWDCF_NO_IGNPAR 1" >>confdefs.h
32110 ;;
32111    esac
32112esac
32113
32114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RCC 8000 clock" >&5
32115printf %s "checking RCC 8000 clock... " >&6; }
32116# Check whether --enable-RCC8000 was given.
32117if test ${enable_RCC8000+y}
32118then :
32119  enableval=$enable_RCC8000; ntp_ok=$enableval
32120else $as_nop
32121  ntp_ok=$ntp_eapc
32122
32123fi
32124
32125case "$ntp_ok" in
32126 yes)
32127    ntp_libparse=yes
32128    ntp_refclock=yes
32129
32130printf "%s\n" "#define CLOCK_RCC8000 1" >>confdefs.h
32131
32132    ;;
32133esac
32134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32135printf "%s\n" "$ntp_ok" >&6; }
32136case "$ntp_ok$ntp_canparse" in
32137 yesno)
32138    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32139esac
32140
32141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Schmid DCF77 clock" >&5
32142printf %s "checking Schmid DCF77 clock... " >&6; }
32143# Check whether --enable-SCHMID was given.
32144if test ${enable_SCHMID+y}
32145then :
32146  enableval=$enable_SCHMID; ntp_ok=$enableval
32147else $as_nop
32148  ntp_ok=$ntp_eapc
32149
32150fi
32151
32152case "$ntp_ok" in
32153 yes)
32154    ntp_libparse=yes
32155    ntp_refclock=yes
32156
32157printf "%s\n" "#define CLOCK_SCHMID 1" >>confdefs.h
32158
32159    ;;
32160esac
32161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32162printf "%s\n" "$ntp_ok" >&6; }
32163case "$ntp_ok$ntp_canparse" in
32164 yesno)
32165    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32166esac
32167
32168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TAIP protocol" >&5
32169printf %s "checking Trimble GPS receiver/TAIP protocol... " >&6; }
32170# Check whether --enable-TRIMTAIP was given.
32171if test ${enable_TRIMTAIP+y}
32172then :
32173  enableval=$enable_TRIMTAIP; ntp_ok=$enableval
32174else $as_nop
32175  ntp_ok=$ntp_eapc
32176
32177fi
32178
32179case "$ntp_ok" in
32180 yes)
32181    ntp_libparse=yes
32182    ntp_refclock=yes
32183
32184printf "%s\n" "#define CLOCK_TRIMTAIP 1" >>confdefs.h
32185
32186    ;;
32187esac
32188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32189printf "%s\n" "$ntp_ok" >&6; }
32190case "$ntp_ok$ntp_canparse" in
32191 yesno)
32192    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32193esac
32194
32195{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TSIP protocol" >&5
32196printf %s "checking Trimble GPS receiver/TSIP protocol... " >&6; }
32197# Check whether --enable-TRIMTSIP was given.
32198if test ${enable_TRIMTSIP+y}
32199then :
32200  enableval=$enable_TRIMTSIP; ntp_ok=$enableval
32201else $as_nop
32202  ntp_ok=$ntp_eapc
32203
32204fi
32205
32206case "$ntp_ok" in
32207 yes)
32208    ntp_libparse=yes
32209    ntp_refclock=yes
32210
32211printf "%s\n" "#define CLOCK_TRIMTSIP 1" >>confdefs.h
32212
32213    ;;
32214esac
32215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32216printf "%s\n" "$ntp_ok" >&6; }
32217case "$ntp_ok$ntp_canparse" in
32218 yesno)
32219    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32220esac
32221
32222{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WHARTON 400A Series clock" >&5
32223printf %s "checking WHARTON 400A Series clock... " >&6; }
32224# Check whether --enable-WHARTON was given.
32225if test ${enable_WHARTON+y}
32226then :
32227  enableval=$enable_WHARTON; ntp_ok=$enableval
32228else $as_nop
32229  ntp_ok=$ntp_eapc
32230
32231fi
32232
32233case "$ntp_ok" in
32234 yes)
32235    ntp_libparse=yes
32236    ntp_refclock=yes
32237
32238printf "%s\n" "#define CLOCK_WHARTON_400A 1" >>confdefs.h
32239
32240    ;;
32241esac
32242{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32243printf "%s\n" "$ntp_ok" >&6; }
32244case "$ntp_ok$ntp_canparse" in
32245 yesno)
32246    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32247esac
32248
32249{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
32250printf %s "checking VARITEXT clock... " >&6; }
32251# Check whether --enable-VARITEXT was given.
32252if test ${enable_VARITEXT+y}
32253then :
32254  enableval=$enable_VARITEXT; ntp_ok=$enableval
32255else $as_nop
32256  ntp_ok=$ntp_eapc
32257
32258fi
32259
32260case "$ntp_ok" in
32261 yes)
32262    ntp_libparse=yes
32263    ntp_refclock=yes
32264
32265printf "%s\n" "#define CLOCK_VARITEXT 1" >>confdefs.h
32266
32267    ;;
32268esac
32269{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32270printf "%s\n" "$ntp_ok" >&6; }
32271case "$ntp_ok$ntp_canparse" in
32272 yesno)
32273    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32274esac
32275
32276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
32277printf %s "checking SEL240X clock... " >&6; }
32278# Check whether --enable-SEL240X was given.
32279if test ${enable_SEL240X+y}
32280then :
32281  enableval=$enable_SEL240X; ntp_ok=$enableval
32282else $as_nop
32283  ntp_ok=$ntp_eapc
32284fi
32285
32286if test "$ntp_ok" = "yes"; then
32287    ntp_libparse=yes
32288    ntp_refclock=yes
32289
32290printf "%s\n" "#define CLOCK_SEL240X 1" >>confdefs.h
32291
32292fi
32293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
32294printf "%s\n" "$ntp_ok" >&6; }
32295case "$ntp_ok$ntp_canparse" in
32296 yesno)
32297    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
32298    ;;
32299esac
32300
32301
32302
32303
32304
32305
32306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to make and use the parse libraries" >&5
32307printf %s "checking if we need to make and use the parse libraries... " >&6; }
32308ans=no
32309case "$ntp_libparse" in
32310 yes)
32311    ans=yes
32312
32313printf "%s\n" "#define CLOCK_PARSE 1" >>confdefs.h
32314
32315    LIBPARSE=../libparse/libparse.a
32316    MAKE_LIBPARSE=libparse.a
32317    # HMS: check_y2k trips the 34 year problem now...
32318    false && MAKE_CHECK_Y2K=check_y2k
32319esac
32320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32321printf "%s\n" "$ans" >&6; }
32322
32323# if we have crypto, by default Autokey is enabled
32324# Check whether --enable-autokey was given.
32325if test ${enable_autokey+y}
32326then :
32327  enableval=$enable_autokey; ntp_autokey=$enableval
32328else $as_nop
32329  ntp_autokey=$ntp_openssl
32330
32331fi
32332
32333case "$ntp_autokey" in
32334 no)
32335    ;;
32336 *)
32337    case "$ntp_openssl" in
32338     no)
32339	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, crypto unavailable." >&5
32340printf "%s\n" "$as_me: WARNING: Disabling Autokey, crypto unavailable." >&2;}
32341	ntp_autokey=no
32342	;;
32343     *)
32344
32345printf "%s\n" "#define AUTOKEY 1" >>confdefs.h
32346
32347	ntp_autokey=yes
32348	;;
32349    esac
32350    ;;
32351esac
32352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if NTP Autokey protocol will be supported" >&5
32353printf %s "checking if NTP Autokey protocol will be supported... " >&6; }
32354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
32355printf "%s\n" "$ntp_autokey" >&6; }
32356
32357
32358{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
32359printf %s "checking if we want to run check-layout... " >&6; }
32360case "$cross_compiling$PATH_PERL" in
32361 no/*)
32362    MAKE_CHECK_LAYOUT=check-layout
32363    ans=yes
32364    ;;
32365 *)
32366    ans=no
32367    ;;
32368esac
32369{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32370printf "%s\n" "$ans" >&6; }
32371
32372
32373
32374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
32375printf %s "checking if we can make dcf parse utilities... " >&6; }
32376ans=no
32377case "$ntp_parseutil" in
32378 yes)
32379    case "$host" in
32380     *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
32381	ans="dcfd testdcf"
32382	DCFD=dcfd
32383	TESTDCF=testdcf
32384    esac
32385    ;;
32386esac
32387{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32388printf "%s\n" "$ans" >&6; }
32389
32390
32391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can build kernel streams modules for parse" >&5
32392printf %s "checking if we can build kernel streams modules for parse... " >&6; }
32393ans=no
32394case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
32395 yesyes)
32396    case "$host" in
32397     sparc-*-sunos4*)
32398        case "$ntp_cv_var_kernel_pll" in
32399	yes)
32400
32401printf "%s\n" "#define PPS_SYNC 1" >>confdefs.h
32402
32403	    ;;
32404	esac
32405	ans=parsestreams
32406	MAKE_PARSEKMODULE=parsestreams.loadable_module.o
32407	;;
32408     sparc-*-solaris2*)
32409	ans=parsesolaris
32410	MAKE_PARSEKMODULE=parse
32411	ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
32412if test "x$ac_cv_header_strings_h" = xyes
32413then :
32414  printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
32415
32416fi
32417
32418	;;
32419    esac
32420    ;;
32421esac
32422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32423printf "%s\n" "$ans" >&6; }
32424
32425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
32426printf %s "checking if we need basic refclock support... " >&6; }
32427case "$ntp_refclock" in
32428 yes)
32429
32430printf "%s\n" "#define REFCLOCK 1" >>confdefs.h
32431
32432    ;;
32433esac
32434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
32435printf "%s\n" "$ntp_refclock" >&6; }
32436
32437PROPDELAY=propdelay
32438
32439
32440
32441{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
32442printf %s "checking if we want HP-UX adjtimed support... " >&6; }
32443case "$host" in
32444 *-*-hpux[56789]*)
32445    ans=yes
32446    ;;
32447 *) ans=no
32448    ;;
32449esac
32450case "$ans" in
32451 yes)
32452    MAKE_ADJTIMED=adjtimed
32453
32454printf "%s\n" "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
32455
32456    ;;
32457 *) ADJTIMED_DB=
32458    ADJTIMED_DL=
32459    ADJTIMED_DS=
32460    ADJTIMED_MS=
32461    ;;
32462esac
32463{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32464printf "%s\n" "$ans" >&6; }
32465
32466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want QNX adjtime support" >&5
32467printf %s "checking if we want QNX adjtime support... " >&6; }
32468case "$host" in
32469 *-*-qnx*)
32470    ans=yes
32471    ;;
32472 *) ans=no
32473    ;;
32474esac
32475case "$ans" in
32476 yes)
32477
32478printf "%s\n" "#define NEED_QNX_ADJTIME 1" >>confdefs.h
32479
32480    ;;
32481esac
32482{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32483printf "%s\n" "$ans" >&6; }
32484
32485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can read kmem" >&5
32486printf %s "checking if we can read kmem... " >&6; }
32487
32488#  the default is to enable it if the system has the capability
32489
32490case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
32491 *yes*)
32492    ans=yes
32493    ;;
32494 *) ans=no
32495    ;;
32496esac
32497
32498case "$host" in
32499 *-*-domainos)	# Won't be found...
32500    ans=no
32501    ;;
32502 *-*-hpux*)
32503    #ans=no
32504    ;;
32505 *-*-irix[456]*)
32506    ans=no
32507    ;;
32508 *-*-*linux*)
32509    ans=no
32510    ;;
32511 *-*-winnt3.5)
32512    ans=no
32513    ;;
32514 *-*-unicosmp*)
32515    ans=no
32516    ;;
32517esac
32518
32519# --enable-kmem / --disable-kmem controls if present
32520# Check whether --enable-kmem was given.
32521if test ${enable_kmem+y}
32522then :
32523  enableval=$enable_kmem; ans=$enableval
32524
32525fi
32526
32527
32528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32529printf "%s\n" "$ans" >&6; }
32530
32531case "$ans" in
32532 yes)
32533    can_kmem=yes
32534    ;;
32535 *)
32536    can_kmem=no
32537
32538printf "%s\n" "#define NOKMEM 1" >>confdefs.h
32539
32540esac
32541
32542
32543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if adjtime is accurate" >&5
32544printf %s "checking if adjtime is accurate... " >&6; }
32545
32546# target-dependent defaults
32547
32548case "$host" in
32549 i386-sequent-ptx*)
32550    ans=no
32551    ;;
32552 i386-unknown-osf1*)
32553    ans=yes
32554    ;;
32555 mips-sgi-irix[456]*)
32556    ans=yes
32557    ;;
32558 *-fujitsu-uxp*)
32559    ans=yes
32560    ;;
32561 *-ibm-aix[4-9]*)
32562    # XXX only verified thru AIX6.
32563    ans=yes
32564    ;;
32565 *-*-*linux*)
32566    ans=yes
32567    ;;
32568 *-*-solaris2.[01])
32569    ans=no
32570    ;;
32571 *-*-solaris2*)
32572    ans=yes
32573    ;;
32574 *-*-unicosmp*)
32575    ans=yes
32576    ;;
32577 *) ans=no
32578    ;;
32579esac
32580
32581# --enable-accurate-adjtime / --disable-accurate-adjtime
32582# override the default
32583# Check whether --enable-accurate-adjtime was given.
32584if test ${enable_accurate_adjtime+y}
32585then :
32586  enableval=$enable_accurate_adjtime; ans=$enableval
32587
32588fi
32589
32590
32591{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32592printf "%s\n" "$ans" >&6; }
32593
32594case "$ans" in
32595 yes)
32596
32597printf "%s\n" "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
32598
32599    adjtime_is_accurate=yes
32600    ;;
32601 *)
32602    adjtime_is_accurate=no
32603    ;;
32604esac
32605
32606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tick' in the kernel" >&5
32607printf %s "checking the name of 'tick' in the kernel... " >&6; }
32608if test ${ntp_cv_nlist_tick+y}
32609then :
32610  printf %s "(cached) " >&6
32611else $as_nop
32612
32613	ans=_tick
32614	case "$host" in
32615	 m68*-hp-hpux*) # HP9000/300?
32616	    ans=_old_tick
32617	    ;;
32618	 *-apple-aux[23]*)
32619	    ans=tick
32620	    ;;
32621	 *-hp-hpux*)
32622	    ans=old_tick
32623	    ;;
32624	 *-ibm-aix[3-9]*)
32625	    # XXX only verified thru AIX6.
32626	    ans=no
32627	    ;;
32628	 *-*-mpeix*)
32629	    ans=no
32630	    ;;
32631	 *-*-ptx*)
32632	    ans=tick
32633	    ;;
32634	 *-*-sco3.2v[45]*)
32635	    ans=no
32636	    ;;
32637	 *-*-solaris2*)
32638	    ans=nsec_per_tick
32639	    ;;
32640	 *-*-sysv4*)
32641	    ans=tick
32642	    ;;
32643	esac
32644	ntp_cv_nlist_tick=$ans
32645
32646
32647fi
32648{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tick" >&5
32649printf "%s\n" "$ntp_cv_nlist_tick" >&6; }
32650case "$ntp_cv_nlist_tick" in
32651 ''|no)
32652    ;;	# HMS: I think we can only get 'no' here...
32653 *)
32654
32655printf "%s\n" "#define K_TICK_NAME \"$ntp_cv_nlist_tick\"" >>confdefs.h
32656
32657esac
32658
32659{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tick'" >&5
32660printf %s "checking for the units of 'tick'... " >&6; }
32661if test ${ntp_cv_tick_nano+y}
32662then :
32663  printf %s "(cached) " >&6
32664else $as_nop
32665
32666	ans=usec
32667	case "$host" in
32668	 *-*-solaris2*)
32669	    ans=nsec
32670	    ;;
32671	esac
32672	ntp_cv_tick_nano=$ans
32673
32674
32675fi
32676{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tick_nano" >&5
32677printf "%s\n" "$ntp_cv_tick_nano" >&6; }
32678case "$ntp_cv_tick_nano" in
32679 nsec)
32680
32681printf "%s\n" "#define TICK_NANO 1" >>confdefs.h
32682
32683esac
32684
32685{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tickadj' in the kernel" >&5
32686printf %s "checking the name of 'tickadj' in the kernel... " >&6; }
32687if test ${ntp_cv_nlist_tickadj+y}
32688then :
32689  printf %s "(cached) " >&6
32690else $as_nop
32691
32692	ans=_tickadj
32693	case "$host" in
32694	 m68*-hp-hpux*) # HP9000/300?
32695	    ans=_tickadj
32696	    ;;
32697	 *-apple-aux[23]*)
32698	    ans=tickadj
32699	    ;;
32700	 *-hp-hpux10*)
32701	    ans=no
32702	    ;;
32703	 *-hp-hpux9*)
32704	    ans=no
32705	    ;;
32706	 *-hp-hpux*)
32707	    ans=tickadj
32708	    ;;
32709	 *-*-aix*)
32710	    ans=tickadj
32711	    ;;
32712	 *-*-mpeix*)
32713	    ans=no
32714	    ;;
32715	 *-*-ptx*)
32716	    ans=tickadj
32717	    ;;
32718	 *-*-sco3.2v4*)
32719	    ans=no
32720	    ;;
32721	 *-*-sco3.2v5.0*)
32722	    ans=clock_drift
32723	    ;;
32724	 *-*-solaris2*)
32725	    ans=no	# hrestime_adj
32726	    ;;
32727	 *-*-sysv4*)
32728	    ans=tickadj
32729	    ;;
32730	esac
32731	ntp_cv_nlist_tickadj=$ans
32732
32733
32734fi
32735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tickadj" >&5
32736printf "%s\n" "$ntp_cv_nlist_tickadj" >&6; }
32737case "$ntp_cv_nlist_tickadj" in
32738 ''|no)
32739    ;;	# HMS: I think we can only get 'no' here...
32740 *)
32741
32742printf "%s\n" "#define K_TICKADJ_NAME \"$ntp_cv_nlist_tickadj\"" >>confdefs.h
32743
32744esac
32745
32746{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tickadj'" >&5
32747printf %s "checking for the units of 'tickadj'... " >&6; }
32748if test ${ntp_cv_tickadj_nano+y}
32749then :
32750  printf %s "(cached) " >&6
32751else $as_nop
32752
32753	ans=usec
32754	case "$host" in
32755	 *-*-solaris2*)
32756	    ans=nsec
32757	    ;;
32758	esac
32759	ntp_cv_tickadj_nano=$ans
32760
32761
32762fi
32763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tickadj_nano" >&5
32764printf "%s\n" "$ntp_cv_tickadj_nano" >&6; }
32765case "$ntp_cv_tickadj_nano" in
32766 nsec)
32767
32768printf "%s\n" "#define TICKADJ_NANO 1" >>confdefs.h
32769
32770esac
32771
32772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'dosynctodr' in the kernel" >&5
32773printf %s "checking half-heartedly for 'dosynctodr' in the kernel... " >&6; }
32774if test ${ntp_cv_nlist_dosynctodr+y}
32775then :
32776  printf %s "(cached) " >&6
32777else $as_nop
32778
32779	case "$host" in
32780	 *-apple-aux[23]*)
32781	    ans=no
32782	    ;;
32783	 *-sni-sysv*)
32784	    ans=dosynctodr
32785	    ;;
32786	 *-stratus-vos)
32787	    ans=no
32788	    ;;
32789	 *-*-aix*)
32790	    ans=dosynctodr
32791	    ;;
32792	 *-*-hpux*)
32793	    ans=no
32794	    ;;
32795	 *-*-mpeix*)
32796	    ans=no
32797	    ;;
32798	 *-*-nextstep*)
32799	    ans=_dosynctodr
32800	    ;;
32801	 *-*-ptx*)
32802	    ans=doresettodr
32803	    ;;
32804	 *-*-sco3.2v4*)
32805	    ans=no
32806	    ;;
32807	 *-*-sco3.2v5*)
32808	    ans=track_rtc
32809	    ;;
32810	 *-*-solaris2*)
32811	    ans=dosynctodr
32812	    ;;
32813	 *-*-sysv4*)
32814	    ans=doresettodr
32815	    ;;
32816	 *)
32817	    ans=_dosynctodr
32818	    ;;
32819	esac
32820	ntp_cv_nlist_dosynctodr=$ans
32821
32822
32823fi
32824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_dosynctodr" >&5
32825printf "%s\n" "$ntp_cv_nlist_dosynctodr" >&6; }
32826case "$ntp_cv_nlist_dosynctodr" in
32827 no)
32828    ;;
32829 *)
32830
32831printf "%s\n" "#define K_DOSYNCTODR_NAME \"$ntp_cv_nlist_dosynctodr\"" >>confdefs.h
32832
32833    ;;
32834esac
32835
32836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'noprintf' in the kernel" >&5
32837printf %s "checking half-heartedly for 'noprintf' in the kernel... " >&6; }
32838if test ${ntp_cv_nlist_noprintf+y}
32839then :
32840  printf %s "(cached) " >&6
32841else $as_nop
32842
32843	case "$host" in
32844	 *-apple-aux[23]*)
32845	    ans=no
32846	    ;;
32847	 *-sni-sysv*)
32848	    ans=noprintf
32849	    ;;
32850	 *-stratus-vos)
32851	    ans=no
32852	    ;;
32853	 *-*-aix*)
32854	    ans=noprintf
32855	    ;;
32856	 *-*-hpux*)
32857	    ans=no
32858	    ;;
32859	 *-*-mpeix*)
32860	    ans=no
32861	    ;;
32862	 *-*-ptx*)
32863	    ans=noprintf
32864	    ;;
32865	 *-*-nextstep*)
32866	    ans=_noprintf
32867	    ;;
32868	 *-*-solaris2*)
32869	    ans=noprintf
32870	    ;;
32871	 *-*-sysv4*)
32872	    ans=noprintf
32873	    ;;
32874	 *)
32875	    ans=_noprintf
32876	    ;;
32877	esac
32878	ntp_cv_nlist_noprintf=$ans
32879
32880
32881fi
32882{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_noprintf" >&5
32883printf "%s\n" "$ntp_cv_nlist_noprintf" >&6; }
32884case "$ntp_cv_nlist_noprintf" in
32885 no)
32886    ;;
32887 *)
32888
32889printf "%s\n" "#define K_NOPRINTF_NAME \"$ntp_cv_nlist_noprintf\"" >>confdefs.h
32890
32891    ;;
32892esac
32893
32894
32895
32896
32897{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tick'" >&5
32898printf %s "checking for a default value for 'tick'... " >&6; }
32899
32900# target-dependent default for tick
32901
32902case "$host" in
32903 *-*-pc-cygwin*)
32904    as_fn_error $? "tick needs work for cygwin" "$LINENO" 5
32905    ;;
32906 *-univel-sysv*)
32907    ans=10000
32908    ;;
32909 *-*-irix*)
32910    ans=10000
32911    ;;
32912 *-*-*linux*)
32913    ans=txc.tick
32914    ;;
32915 *-*-mpeix*)
32916    ans=no
32917    ;;
32918 *-*-winnt3.5)
32919    ans='(every / 10)'
32920    ;;
32921 *-*-unicosmp*)
32922    ans=10000
32923    ;;
32924 *)
32925    ans='1000000L/hz'
32926    ;;
32927esac
32928
32929# Check whether --enable-tick was given.
32930if test ${enable_tick+y}
32931then :
32932  enableval=$enable_tick; ans=$enableval
32933
32934fi
32935
32936
32937{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32938printf "%s\n" "$ans" >&6; }
32939
32940case "$ans" in
32941 ''|no)
32942    ;;	# HMS: I think we can only get 'no' here...
32943 *)
32944
32945printf "%s\n" "#define PRESET_TICK $ans" >>confdefs.h
32946
32947esac
32948
32949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tickadj'" >&5
32950printf %s "checking for a default value for 'tickadj'... " >&6; }
32951
32952# target-specific default
32953ans='500/hz'
32954case "$host" in
32955 *-fujitsu-uxp*)
32956    case "$adjtime_is_accurate" in
32957     yes)
32958	ans='tick/16'
32959    esac
32960    ;;
32961 *-univel-sysv*)
32962    ans=80
32963    ;;
32964 *-*-aix*)
32965    case "$can_kmem" in
32966     no)
32967	ans=1000
32968	;;
32969    esac
32970    ;;
32971 *-*-domainos)	# Skippy: won't be found...
32972    case "$can_kmem" in
32973     no)
32974	ans=668
32975	;;
32976    esac
32977    ;;
32978 *-*-hpux*)
32979    case "$adjtime_is_accurate" in
32980     yes)
32981	ans='tick/16'
32982	;;
32983    esac
32984    ;;
32985 *-*-irix*)
32986    ans=150
32987    ;;
32988 *-*-mpeix*)
32989    ans=no
32990    ;;
32991 *-*-sco3.2v5.0*)
32992    ans=10000L/hz
32993    ;;
32994 *-*-winnt3.5)
32995    ans=50
32996    ;;
32997 *-*-unicosmp*)
32998    ans=150
32999    ;;
33000esac
33001
33002# Check whether --enable-tickadj was given.
33003if test ${enable_tickadj+y}
33004then :
33005  enableval=$enable_tickadj; ans=$enableval
33006
33007fi
33008
33009
33010{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33011printf "%s\n" "$ans" >&6; }
33012
33013default_tickadj=$ans
33014
33015case "$default_tickadj" in
33016 ''|no)
33017    ;;	# HMS: I think we can only get 'no' here...
33018 *)
33019
33020printf "%s\n" "#define PRESET_TICKADJ $default_tickadj" >>confdefs.h
33021 ;;
33022esac
33023
33024# Newer versions of ReliantUNIX round adjtime() values down to
33025# 1/100s (system tick). Sigh ...
33026# Unfortunately, there is no easy way to know if particular release
33027# has this "feature" or any obvious way to test for it.
33028case "$host" in
33029 mips-sni-sysv4*)
33030
33031printf "%s\n" "#define RELIANTUNIX_CLOCK 1" >>confdefs.h
33032
33033esac
33034
33035case "$host" in
33036 *-*-sco3.2v5*)
33037
33038printf "%s\n" "#define SCO5_CLOCK 1" >>confdefs.h
33039
33040esac
33041
33042ntp_cv_make_tickadj=yes
33043case "$can_kmem$ac_cv_var_tick$default_tickadj" in
33044 nonono)	# Don't read KMEM, no presets.  Bogus.
33045    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&5
33046printf "%s\n" "$as_me: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&2;}
33047    ntp_cv_make_tickadj=no
33048    ;;
33049 nono*)		# Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
33050    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&5
33051printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&2;}
33052    ntp_cv_make_tickadj=no
33053    ;;
33054 no*no)		# Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Bogus.
33055    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&5
33056printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&2;}
33057    ntp_cv_make_tickadj=no
33058    ;;
33059 no*)		# Don't read KMEM, PRESET_TICK and PRESET_TICKADJ.  Cool.
33060    ;;
33061 yesnono)	# Read KMEM, no presets.  Cool.
33062    ;;
33063 yesno*)	# Read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
33064    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&5
33065printf "%s\n" "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&2;}
33066    ;;
33067 yes*no)	# Read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Cool.
33068    ;;
33069 yes*)		# READ KMEM, PRESET_TICK and PRESET_TICKADJ.
33070    ;;
33071 *)		# Generally bogus.
33072    as_fn_error $? "This shouldn't happen." "$LINENO" 5
33073    ;;
33074esac
33075
33076
33077{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the ntptime utility" >&5
33078printf %s "checking if we want and can make the ntptime utility... " >&6; }
33079if test ${ac_cv_make_ntptime+y}
33080then :
33081  printf %s "(cached) " >&6
33082else $as_nop
33083  case "$host" in
33084 *) case "$ntp_cv_struct_ntptimeval$ntp_cv_var_kernel_pll" in
33085     yesyes)
33086	ans=yes
33087	;;
33088     *)
33089	ans=no
33090	;;
33091    esac
33092    ;;
33093esac
33094ac_cv_make_ntptime=$ans
33095fi
33096{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_make_ntptime" >&5
33097printf "%s\n" "$ac_cv_make_ntptime" >&6; }
33098case "$ac_cv_make_ntptime" in
33099 yes)
33100    MAKE_NTPTIME=ntptime
33101    ;;
33102 *)
33103    NTPTIME_DB=
33104    NTPTIME_DL=
33105    NTPTIME_DS=
33106    NTPTIME_MS=
33107    ;;
33108esac
33109
33110
33111case "$host" in
33112 mips-sni-sysv4*)
33113    # tickadj is pretty useless on newer versions of ReliantUNIX
33114    # Do not bother
33115    ntp_cv_make_tickadj=no
33116    ;;
33117 *-*-irix*)
33118    ntp_cv_make_tickadj=no
33119    ;;
33120 *-*-solaris2*)
33121    # DLM says tickadj is a no-no starting with solaris2.5
33122    case "$host" in
33123     *-*-solaris2.1[0-9]*)
33124	ntp_cv_make_tickadj=no
33125	;;
33126     *-*-solaris2.[0-4]*) ;;
33127     *) ntp_cv_make_tickadj=no ;;
33128    esac
33129    ;;
33130 *-*-unicosmp*)
33131    ntp_cv_make_tickadj=no
33132    ;;
33133esac
33134
33135#
33136# Despite all the above, we always make tickadj.  Setting
33137# ntp_cv_make_tickadj before AC_CACHE_CHECK will cause a false
33138# report that the configuration variable was cached.  It may
33139# be better to simply remove the hunk above, I did not want
33140# to remove it if there is hope it will be used again.
33141#
33142{ ntp_cv_make_tickadj=; unset ntp_cv_make_tickadj;}
33143
33144{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the tickadj utility" >&5
33145printf %s "checking if we want and can make the tickadj utility... " >&6; }
33146if test ${ntp_cv_make_tickadj+y}
33147then :
33148  printf %s "(cached) " >&6
33149else $as_nop
33150  ntp_cv_make_tickadj=yes
33151
33152fi
33153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_tickadj" >&5
33154printf "%s\n" "$ntp_cv_make_tickadj" >&6; }
33155case "$ntp_cv_make_tickadj" in
33156 yes)
33157    MAKE_TICKADJ=tickadj
33158    ;;
33159 *)
33160    CALC_TICKADJ_DB=
33161    CALC_TICKADJ_DL=
33162    CALC_TICKADJ_DS=
33163    CALC_TICKADJ_MS=
33164    TICKADJ_DB=
33165    TICKADJ_DL=
33166    TICKADJ_DS=
33167    TICKADJ_MS=
33168    ;;
33169esac
33170
33171
33172{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the timetrim utility" >&5
33173printf %s "checking if we want and can make the timetrim utility... " >&6; }
33174if test ${ntp_cv_make_timetrim+y}
33175then :
33176  printf %s "(cached) " >&6
33177else $as_nop
33178
33179	case "$host" in
33180	 *-*-irix*)
33181	    ntp_cv_make_timetrim=yes
33182	    ;;
33183	 *-*-unicosmp*)
33184	    ntp_cv_make_timetrim=yes
33185	    ;;
33186	 *)
33187	    ntp_cv_make_timetrim=no
33188	    ;;
33189	esac
33190
33191
33192fi
33193{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_timetrim" >&5
33194printf "%s\n" "$ntp_cv_make_timetrim" >&6; }
33195case "$ntp_cv_make_timetrim" in
33196 yes)
33197    MAKE_TIMETRIM=timetrim
33198    ;;
33199 *) TIMETRIM_DB=
33200    TIMETRIM_DL=
33201    TIMETRIM_DS=
33202    TIMETRIM_MS=
33203    ;;
33204esac
33205
33206
33207
33208
33209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build the NTPD simulator" >&5
33210printf %s "checking if we want to build the NTPD simulator... " >&6; }
33211# Check whether --enable-simulator was given.
33212if test ${enable_simulator+y}
33213then :
33214  enableval=$enable_simulator; ans=$enableval
33215else $as_nop
33216  ans=no
33217
33218fi
33219
33220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33221printf "%s\n" "$ans" >&6; }
33222case "$ans" in
33223 yes)
33224    MAKE_NTPDSIM=ntpdsim
33225    MAKE_LIBNTPSIM=libntpsim.a
33226    ;;
33227 *)
33228    NTPDSIM_DB=
33229    NTPDSIM_DL=
33230    NTPDSIM_DS=
33231    NTPDSIM_MS=
33232    ;;
33233esac
33234
33235case "$build" in
33236 $host)
33237    ;;
33238 *) case "$host" in
33239     *-*-vxworks*)
33240	LDFLAGS="$LDFLAGS -r"
33241	;;
33242    esac
33243    ;;
33244esac
33245
33246
33247
33248{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
33249printf %s "checking if sntp will be built... " >&6; }
33250
33251# Check whether --with-sntp was given.
33252if test ${with_sntp+y}
33253then :
33254  withval=$with_sntp;
33255else $as_nop
33256  with_sntp="${withsntp=yes}"
33257
33258fi
33259
33260case "$with_sntp" in
33261 no)
33262    SNTP=
33263    ;;
33264 *)
33265    SNTP=sntp
33266    ;;
33267esac
33268
33269 if test -n "$SNTP"; then
33270  BUILD_SNTP_TRUE=
33271  BUILD_SNTP_FALSE='#'
33272else
33273  BUILD_SNTP_TRUE='#'
33274  BUILD_SNTP_FALSE=
33275fi
33276
33277{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
33278printf "%s\n" "$with_sntp" >&6; }
33279
33280
33281
33282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
33283printf %s "checking if we want to build ntpsnmpd... " >&6; }
33284
33285# Check whether --with-ntpsnmpd was given.
33286if test ${with_ntpsnmpd+y}
33287then :
33288  withval=$with_ntpsnmpd; ans=$withval
33289else $as_nop
33290
33291	case "$PATH_NET_SNMP_CONFIG" in
33292	 /*)	ans=yes ;;
33293	 *)	ans=no  ;;
33294	esac
33295
33296
33297fi
33298
33299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33300printf "%s\n" "$ans" >&6; }
33301case "$ans" in
33302 yes)
33303    case "$PATH_NET_SNMP_CONFIG" in
33304     /*)
33305	SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
33306	# Bug 2815.  This is a bit of a hack, but it works...
33307	case "$ntp_cv_net_snmp_version" in
33308	 5.3*)	SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'`
33309		;;
33310	esac
33311
33312	# HMS: we really want to separate CPPFLAGS and CFLAGS
33313	foo=`$PATH_NET_SNMP_CONFIG --cflags`
33314	SNMP_CPPFLAGS=
33315	SNMP_CFLAGS=
33316	for i in $foo; do
33317	    case "$i" in
33318	     -D*|-U*|-I*)
33319		SNMP_CPPFLAGS="$SNMP_CPPFLAGS $i"
33320		;;
33321	    *)	SNMP_CFLAGS="$SNMP_CFLAGS $i"
33322		;;
33323	    esac
33324	done
33325
33326
33327
33328	save_CFLAGS=$CFLAGS
33329	save_CPPFLAGS=$CPPFLAGS
33330	save_LIBS=$LIBS
33331	CFLAGS=$SNMP_CFLAGS
33332	CPPFLAGS=$SNMP_CPPFLAGS
33333
33334	ac_fn_c_check_header_compile "$LINENO" "net-snmp/net-snmp-config.h" "ac_cv_header_net_snmp_net_snmp_config_h" "$ac_includes_default"
33335if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes
33336then :
33337  MAKE_NTPSNMPD=ntpsnmpd
33338else $as_nop
33339  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: net-snmp-config present but net-snmp headers are not available!" >&5
33340printf "%s\n" "$as_me: WARNING: net-snmp-config present but net-snmp headers are not available!" >&2;}
33341
33342fi
33343
33344
33345	# Do this last, as we're messing up LIBS.
33346	# check -lnetsnmp for netsnmp_daemonize
33347	LIBS=`$PATH_NET_SNMP_CONFIG --libs`
33348	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for netsnmp_daemonize in -lnetsnmp" >&5
33349printf %s "checking for netsnmp_daemonize in -lnetsnmp... " >&6; }
33350if test ${ac_cv_lib_netsnmp_netsnmp_daemonize+y}
33351then :
33352  printf %s "(cached) " >&6
33353else $as_nop
33354  ac_check_lib_save_LIBS=$LIBS
33355LIBS="-lnetsnmp  $LIBS"
33356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33357/* end confdefs.h.  */
33358
33359/* Override any GCC internal prototype to avoid an error.
33360   Use char because int might match the return type of a GCC
33361   builtin and then its argument prototype would still apply.  */
33362char netsnmp_daemonize ();
33363int
33364main (void)
33365{
33366return netsnmp_daemonize ();
33367  ;
33368  return 0;
33369}
33370_ACEOF
33371if ac_fn_c_try_link "$LINENO"
33372then :
33373  ac_cv_lib_netsnmp_netsnmp_daemonize=yes
33374else $as_nop
33375  ac_cv_lib_netsnmp_netsnmp_daemonize=no
33376fi
33377rm -f core conftest.err conftest.$ac_objext conftest.beam \
33378    conftest$ac_exeext conftest.$ac_ext
33379LIBS=$ac_check_lib_save_LIBS
33380fi
33381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_netsnmp_daemonize" >&5
33382printf "%s\n" "$ac_cv_lib_netsnmp_netsnmp_daemonize" >&6; }
33383if test "x$ac_cv_lib_netsnmp_netsnmp_daemonize" = xyes
33384then :
33385  ans=yes
33386else $as_nop
33387  ans=no
33388
33389fi
33390
33391	case "$ans" in
33392	 no)
33393
33394printf "%s\n" "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
33395
33396	esac
33397
33398	CFLAGS=$save_CFLAGS
33399	{ save_CFLAGS=; unset save_CFLAGS;}
33400	CPPFLAGS=$save_CPPFLAGS
33401	{ save_CPPFLAGS=; unset save_CPPFLAGS;}
33402	LIBS=$save_LIBS
33403	{ save_LIBS=; unset save_LIBS;}
33404	;;
33405     *)
33406	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
33407printf "%s\n" "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&2;}
33408	;;
33409    esac
33410    ;;
33411esac
33412
33413
33414case "$MAKE_NTPSNMPD" in
33415 '')
33416    NTPSNMPD_DB=
33417    NTPSNMPD_DL=
33418    NTPSNMPD_DS=
33419    NTPSNMPD_MS=
33420    ;;
33421esac
33422
33423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
33424printf %s "checking if we should always slew the time... " >&6; }
33425
33426# target-specific defaults
33427
33428case "$host" in
33429 *-apple-aux[23]*)
33430    ans=yes
33431    ;;
33432 *-*-bsdi[012]*)
33433    ans=no
33434    ;;
33435 *-*-bsdi*)
33436    ans=yes
33437    ;;
33438 *-*-openvms*)	# HMS: won't be found
33439    ans=yes
33440    ;;
33441 *) ans=no
33442    ;;
33443esac
33444
33445# --enable-slew-always / --disable-slew-always overrides default
33446
33447# Check whether --enable-slew-always was given.
33448if test ${enable_slew_always+y}
33449then :
33450  enableval=$enable_slew_always; ans=$enableval
33451
33452fi
33453
33454
33455{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33456printf "%s\n" "$ans" >&6; }
33457
33458case "$ans" in
33459 yes)
33460
33461printf "%s\n" "#define SLEWALWAYS 1" >>confdefs.h
33462
33463esac
33464
33465{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should step and slew the time" >&5
33466printf %s "checking if we should step and slew the time... " >&6; }
33467
33468case "$host" in
33469 *-sni-sysv*)
33470    ans=yes
33471    ;;
33472 *-stratus-vos)
33473    ans=no
33474    ;;
33475 *-univel-sysv*)
33476    ans=no
33477    ;;
33478 *-*-ptx*)
33479    ans=yes
33480    ;;
33481 *-*-solaris2.1[0-9]*)
33482    ans=no
33483    ;;
33484 *-*-solaris2.[012]*)
33485    ans=yes
33486    ;;
33487 *-*-sysv4*)	# HMS: Does this catch Fujitsu UXP?
33488    ans=yes
33489    ;;
33490 *) ans=no
33491    ;;
33492esac
33493
33494# Check whether --enable-step-slew was given.
33495if test ${enable_step_slew+y}
33496then :
33497  enableval=$enable_step_slew; ans=$enableval
33498
33499fi
33500
33501
33502{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33503printf "%s\n" "$ans" >&6; }
33504
33505case "$ans" in
33506 yes)
33507
33508printf "%s\n" "#define STEP_SLEW 1" >>confdefs.h
33509
33510esac
33511
33512{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpdate should step the time" >&5
33513printf %s "checking if ntpdate should step the time... " >&6; }
33514
33515case "$host" in
33516 *-apple-aux[23]*)
33517    ans=yes
33518    ;;
33519 *) ans=no
33520    ;;
33521esac
33522
33523# Check whether --enable-ntpdate-step was given.
33524if test ${enable_ntpdate_step+y}
33525then :
33526  enableval=$enable_ntpdate_step; ans=$enableval
33527
33528fi
33529
33530
33531{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33532printf "%s\n" "$ans" >&6; }
33533
33534case "$ans" in
33535 yes)
33536
33537printf "%s\n" "#define FORCE_NTPDATE_STEP 1" >>confdefs.h
33538
33539esac
33540
33541
33542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should sync TODR clock every hour" >&5
33543printf %s "checking if we should sync TODR clock every hour... " >&6; }
33544
33545case "$host" in
33546 *-*-nextstep*)
33547    ans=yes
33548    ;;
33549 *-*-openvms*)	# HMS: won't be found
33550    ans=yes
33551    ;;
33552 *)
33553    ans=no
33554    ;;
33555esac
33556
33557# Check whether --enable-hourly-todr-sync was given.
33558if test ${enable_hourly_todr_sync+y}
33559then :
33560  enableval=$enable_hourly_todr_sync; ans=$enableval
33561
33562fi
33563
33564
33565{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33566printf "%s\n" "$ans" >&6; }
33567
33568case "$ac_cv_var_sync_todr" in
33569 yes)
33570
33571printf "%s\n" "#define DOSYNCTODR 1" >>confdefs.h
33572 ;;
33573esac
33574
33575
33576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should avoid kernel FLL bug" >&5
33577printf %s "checking if we should avoid kernel FLL bug... " >&6; }
33578
33579case "$host" in
33580 *-*-solaris2.6)
33581    unamev=`uname -v`
33582    case "$unamev" in
33583     Generic_105181-*)
33584	old_IFS="$IFS"
33585	IFS="-"
33586	set $unamev
33587	IFS="$old_IFS"
33588	if test "$2" -ge 17
33589	then
33590	    # Generic_105181-17 and higher
33591	    ans=no
33592	else
33593	    ans=yes
33594	fi
33595	;;
33596     *)
33597	ans=yes
33598	;;
33599    esac
33600    ;;
33601 *-*-solaris2.7)
33602    unamev=`uname -v`
33603    case "$unamev" in
33604     Generic_106541-*)
33605	old_IFS="$IFS"
33606	IFS="-"
33607	set $unamev
33608	IFS="$old_IFS"
33609	if test "$2" -ge 07
33610	then
33611	    # Generic_106541-07 and higher
33612	    ans=no
33613	else
33614	    ans=yes
33615	fi
33616	;;
33617     *)
33618	ans=yes
33619	;;
33620    esac
33621    ;;
33622 *)
33623    ans=no
33624    ;;
33625esac
33626
33627# Check whether --enable-kernel-fll-bug was given.
33628if test ${enable_kernel_fll_bug+y}
33629then :
33630  enableval=$enable_kernel_fll_bug; ans=$enableval
33631
33632fi
33633
33634
33635{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33636printf "%s\n" "$ans" >&6; }
33637
33638case "$ans" in
33639 yes)
33640
33641printf "%s\n" "#define KERNEL_FLL_BUG 1" >>confdefs.h
33642
33643esac
33644
33645
33646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want new session key behavior" >&5
33647printf %s "checking if we want new session key behavior... " >&6; }
33648# Check whether --enable-bug1243-fix was given.
33649if test ${enable_bug1243_fix+y}
33650then :
33651  enableval=$enable_bug1243_fix; ans=$enableval
33652else $as_nop
33653  ans=yes
33654
33655fi
33656
33657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33658printf "%s\n" "$ans" >&6; }
33659case "$ans" in
33660 no)
33661
33662printf "%s\n" "#define DISABLE_BUG1243_FIX 1" >>confdefs.h
33663
33664esac
33665
33666
33667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the explicit 127.0.0.0/8 martian filter" >&5
33668printf %s "checking if we want the explicit 127.0.0.0/8 martian filter... " >&6; }
33669# Check whether --enable-bug3020-fix was given.
33670if test ${enable_bug3020_fix+y}
33671then :
33672  enableval=$enable_bug3020_fix; ans=$enableval
33673else $as_nop
33674  ans=yes
33675
33676fi
33677
33678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33679printf "%s\n" "$ans" >&6; }
33680case "$ans" in
33681 yes)
33682
33683printf "%s\n" "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
33684
33685esac
33686
33687
33688{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want correct mode7 fudgetime2 behavior" >&5
33689printf %s "checking if we want correct mode7 fudgetime2 behavior... " >&6; }
33690# Check whether --enable-bug3527-fix was given.
33691if test ${enable_bug3527_fix+y}
33692then :
33693  enableval=$enable_bug3527_fix; ans=$enableval
33694else $as_nop
33695  ans=yes
33696
33697fi
33698
33699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33700printf "%s\n" "$ans" >&6; }
33701case "$ans" in
33702 no)
33703
33704printf "%s\n" "#define DISABLE_BUG3527_FIX 1" >>confdefs.h
33705
33706esac
33707
33708
33709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want a debug assert on an OOB KoD RATE value" >&5
33710printf %s "checking if we want a debug assert on an OOB KoD RATE value... " >&6; }
33711# Check whether --enable-bug3767-fix was given.
33712if test ${enable_bug3767_fix+y}
33713then :
33714  enableval=$enable_bug3767_fix; ans=$enableval
33715else $as_nop
33716  ans=yes
33717
33718fi
33719
33720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33721printf "%s\n" "$ans" >&6; }
33722case "$ans" in
33723 no)
33724
33725printf "%s\n" "#define DISABLE_BUG3767_FIX 1" >>confdefs.h
33726
33727esac
33728
33729
33730{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
33731printf %s "checking if we should use the IRIG sawtooth filter... " >&6; }
33732
33733case "$host" in
33734 *-*-solaris2.[89])
33735    ans=yes
33736    ;;
33737 *-*-solaris2.1[0-9]*)
33738    ans=yes
33739    ;;
33740 *) ans=no
33741    ;;
33742esac
33743
33744# Check whether --enable-irig-sawtooth was given.
33745if test ${enable_irig_sawtooth+y}
33746then :
33747  enableval=$enable_irig_sawtooth; ans=$enableval
33748
33749fi
33750
33751
33752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33753printf "%s\n" "$ans" >&6; }
33754
33755case "$ans" in
33756 yes)
33757
33758printf "%s\n" "#define IRIG_SUCKS 1" >>confdefs.h
33759
33760esac
33761
33762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
33763printf %s "checking if we should enable NIST lockclock scheme... " >&6; }
33764# Check whether --enable-nist was given.
33765if test ${enable_nist+y}
33766then :
33767  enableval=$enable_nist; ans=$enableval
33768else $as_nop
33769  ans=no
33770
33771fi
33772
33773
33774{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33775printf "%s\n" "$ans" >&6; }
33776
33777case "$ans" in
33778 yes)
33779
33780printf "%s\n" "#define LOCKCLOCK 1" >>confdefs.h
33781 ;;
33782esac
33783
33784{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
33785printf %s "checking if we want support for Samba's signing daemon... " >&6; }
33786# Check whether --enable-ntp-signd was given.
33787if test ${enable_ntp_signd+y}
33788then :
33789  enableval=$enable_ntp_signd; ans=$enableval
33790else $as_nop
33791  ans=no
33792
33793fi
33794
33795
33796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33797printf "%s\n" "$ans" >&6; }
33798
33799case "$ans" in
33800 no)
33801    ntp_signd_path=
33802    ;;
33803 yes)
33804    ntp_signd_path=/var/run/ntp_signd
33805    ;;
33806 *)
33807    ntp_signd_path="$ans"
33808esac
33809
33810case "$ntp_signd_path" in
33811 '')
33812    ;;
33813 *)
33814
33815printf "%s\n" "#define HAVE_NTP_SIGND 1" >>confdefs.h
33816
33817
33818printf "%s\n" "#define NTP_SIGND_PATH \"$ntp_signd_path\"" >>confdefs.h
33819
33820    ;;
33821esac
33822
33823{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want 'magic' PPS support" >&5
33824printf %s "checking if we want 'magic' PPS support... " >&6; }
33825# Check whether --enable-magicpps was given.
33826if test ${enable_magicpps+y}
33827then :
33828  enableval=$enable_magicpps; ans=$enableval
33829else $as_nop
33830  ans=yes
33831
33832fi
33833
33834{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33835printf "%s\n" "$ans" >&6; }
33836case "$ans" in
33837 yes)
33838
33839printf "%s\n" "#define ENABLE_MAGICPPS 1" >>confdefs.h
33840
33841    ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
33842if test "x$ac_cv_func_openat" = xyes
33843then :
33844  printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
33845
33846fi
33847ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
33848if test "x$ac_cv_func_fdopendir" = xyes
33849then :
33850  printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
33851
33852fi
33853ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
33854if test "x$ac_cv_func_fstatat" = xyes
33855then :
33856  printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
33857
33858fi
33859
33860    ;;
33861esac
33862
33863ac_fn_c_check_header_compile "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
33864if test "x$ac_cv_header_libscf_h" = xyes
33865then :
33866  printf "%s\n" "#define HAVE_LIBSCF_H 1" >>confdefs.h
33867
33868fi
33869
33870LSCF=
33871case "$ac_cv_header_libscf_h" in
33872 yes)
33873    LSCF='-lscf'
33874esac
33875
33876
33877
33878
33879{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
33880printf %s "checking for struct sockaddr_storage... " >&6; }
33881if test ${ntp_cv_sockaddr_storage+y}
33882then :
33883  printf %s "(cached) " >&6
33884else $as_nop
33885  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33886/* end confdefs.h.  */
33887
33888		#ifdef HAVE_SYS_TYPES_H
33889		# include <sys/types.h>
33890		#endif
33891		#ifdef HAVE_SYS_SOCKET_H
33892		# include <sys/socket.h>
33893		#endif
33894		#ifdef HAVE_NETINET_IN_H
33895		# include <netinet/in.h>
33896		#endif
33897
33898int
33899main (void)
33900{
33901
33902		struct sockaddr_storage n;
33903
33904
33905  ;
33906  return 0;
33907}
33908_ACEOF
33909if ac_fn_c_try_compile "$LINENO"
33910then :
33911  ntp_cv_sockaddr_storage=yes
33912else $as_nop
33913  ntp_cv_sockaddr_storage=no
33914
33915fi
33916rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33917
33918fi
33919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
33920printf "%s\n" "$ntp_cv_sockaddr_storage" >&6; }
33921case "$ntp_cv_sockaddr_storage" in
33922 yes)
33923
33924printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
33925
33926    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
33927printf %s "checking for sockaddr_storage.__ss_family... " >&6; }
33928if test ${ntp_cv_have___ss_family+y}
33929then :
33930  printf %s "(cached) " >&6
33931else $as_nop
33932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33933/* end confdefs.h.  */
33934
33935		    #ifdef HAVE_SYS_TYPES_H
33936		    # include <sys/types.h>
33937		    #endif
33938		    #ifdef HAVE_SYS_SOCKET_H
33939		    # include <sys/socket.h>
33940		    #endif
33941		    #ifdef HAVE_NETINET_IN_H
33942		    # include <netinet/in.h>
33943		    #endif
33944
33945int
33946main (void)
33947{
33948
33949		    struct sockaddr_storage s;
33950		    s.__ss_family = 1;
33951
33952
33953  ;
33954  return 0;
33955}
33956_ACEOF
33957if ac_fn_c_try_compile "$LINENO"
33958then :
33959  ntp_cv_have___ss_family=yes
33960else $as_nop
33961  ntp_cv_have___ss_family=no
33962
33963fi
33964rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33965
33966fi
33967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
33968printf "%s\n" "$ntp_cv_have___ss_family" >&6; }
33969    case "$ntp_cv_have___ss_family" in
33970     yes)
33971
33972printf "%s\n" "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
33973
33974    esac
33975
33976esac
33977
33978
33979#
33980# Look for in_port_t.
33981#
33982{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
33983printf %s "checking for in_port_t... " >&6; }
33984if test ${isc_cv_have_in_port_t+y}
33985then :
33986  printf %s "(cached) " >&6
33987else $as_nop
33988  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33989/* end confdefs.h.  */
33990
33991		#include <sys/types.h>
33992		#include <netinet/in.h>
33993
33994int
33995main (void)
33996{
33997
33998		in_port_t port = 25;
33999		return (0);
34000
34001
34002  ;
34003  return 0;
34004}
34005_ACEOF
34006if ac_fn_c_try_compile "$LINENO"
34007then :
34008  isc_cv_have_in_port_t=yes
34009else $as_nop
34010  isc_cv_have_in_port_t=no
34011
34012fi
34013rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34014
34015fi
34016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
34017printf "%s\n" "$isc_cv_have_in_port_t" >&6; }
34018case "$isc_cv_have_in_port_t" in
34019 no)
34020
34021printf "%s\n" "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
34022
34023esac
34024
34025{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
34026printf %s "checking type of socklen arg for getsockname()... " >&6; }
34027if test ${ntp_cv_getsockname_socklen_type+y}
34028then :
34029  printf %s "(cached) " >&6
34030else $as_nop
34031
34032    getsockname_socklen_type_found=no
34033    for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
34034	for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
34035	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34036/* end confdefs.h.  */
34037
34038			#ifdef HAVE_SYS_TYPES_H
34039			# include <sys/types.h>
34040			#endif
34041			#ifdef HAVE_SYS_SOCKET_H
34042			# include <sys/socket.h>
34043			#endif
34044
34045int
34046main (void)
34047{
34048
34049			extern
34050			getsockname(int, $getsockname_arg2,
34051				$ntp_cv_getsockname_socklen_type *);
34052
34053
34054  ;
34055  return 0;
34056}
34057_ACEOF
34058if ac_fn_c_try_compile "$LINENO"
34059then :
34060  getsockname_socklen_type_found=yes ; break 2
34061fi
34062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34063	done
34064    done
34065    case "$getsockname_socklen_type_found" in
34066     no)
34067	ntp_cv_getsockname_socklen_type='socklen_t'
34068    esac
34069    { getsockname_arg2=; unset getsockname_arg2;}
34070    { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
34071
34072
34073fi
34074{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
34075printf "%s\n" "$ntp_cv_getsockname_socklen_type" >&6; }
34076
34077printf "%s\n" "#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type" >>confdefs.h
34078
34079
34080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
34081printf %s "checking struct sockaddr for sa_len... " >&6; }
34082if test ${isc_cv_platform_havesalen+y}
34083then :
34084  printf %s "(cached) " >&6
34085else $as_nop
34086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34087/* end confdefs.h.  */
34088
34089		#include <sys/types.h>
34090		#include <sys/socket.h>
34091
34092int
34093main (void)
34094{
34095
34096		extern struct sockaddr *ps;
34097		return ps->sa_len;
34098
34099
34100  ;
34101  return 0;
34102}
34103_ACEOF
34104if ac_fn_c_try_compile "$LINENO"
34105then :
34106  isc_cv_platform_havesalen=yes
34107else $as_nop
34108  isc_cv_platform_havesalen=no
34109
34110fi
34111rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34112
34113fi
34114{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
34115printf "%s\n" "$isc_cv_platform_havesalen" >&6; }
34116case "$isc_cv_platform_havesalen" in
34117 yes)
34118
34119printf "%s\n" "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
34120
34121esac
34122
34123# Check whether --enable-ipv6 was given.
34124if test ${enable_ipv6+y}
34125then :
34126  enableval=$enable_ipv6;
34127fi
34128
34129
34130case "$enable_ipv6" in
34131 yes|''|autodetect)
34132    case "$host" in
34133     powerpc-ibm-aix4*)
34134	;;
34135     *)
34136
34137printf "%s\n" "#define WANT_IPV6 1" >>confdefs.h
34138
34139	;;
34140    esac
34141    ;;
34142 no)
34143    ;;
34144esac
34145
34146
34147case "$host" in
34148 *-*-darwin*)
34149
34150printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
34151
34152esac
34153
34154
34155{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
34156printf %s "checking for IPv6 structures... " >&6; }
34157if test ${isc_cv_found_ipv6+y}
34158then :
34159  printf %s "(cached) " >&6
34160else $as_nop
34161  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34162/* end confdefs.h.  */
34163
34164		#include <sys/types.h>
34165		#include <sys/socket.h>
34166		#include <netinet/in.h>
34167
34168int
34169main (void)
34170{
34171
34172		struct sockaddr_in6 sin6;
34173
34174
34175  ;
34176  return 0;
34177}
34178_ACEOF
34179if ac_fn_c_try_compile "$LINENO"
34180then :
34181  isc_cv_found_ipv6=yes
34182else $as_nop
34183  isc_cv_found_ipv6=no
34184
34185fi
34186rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34187
34188fi
34189{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
34190printf "%s\n" "$isc_cv_found_ipv6" >&6; }
34191
34192#
34193# See whether IPv6 support is provided via a Kame add-on.
34194# This is done before other IPv6 linking tests so LIBS is properly set.
34195#
34196{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
34197printf %s "checking for Kame IPv6 support... " >&6; }
34198
34199# Check whether --with-kame was given.
34200if test ${with_kame+y}
34201then :
34202  withval=$with_kame; use_kame="$withval"
34203else $as_nop
34204  use_kame="no"
34205
34206fi
34207
34208case "$use_kame" in
34209 no)
34210    ;;
34211 yes)
34212    kame_path=/usr/local/v6
34213    ;;
34214 *)
34215    kame_path="$use_kame"
34216    ;;
34217esac
34218case "$use_kame" in
34219 no)
34220    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34221printf "%s\n" "no" >&6; }
34222    ;;
34223 *)
34224    if test -f $kame_path/lib/libinet6.a; then
34225	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
34226printf "%s\n" "$kame_path/lib/libinet6.a" >&6; }
34227	LIBS="-L$kame_path/lib -linet6 $LIBS"
34228    else
34229	as_fn_error $? "$kame_path/lib/libinet6.a not found.
34230
34231Please choose the proper path with the following command:
34232
34233    configure --with-kame=PATH
34234" "$LINENO" 5
34235    fi
34236    ;;
34237esac
34238
34239#
34240# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
34241# Including it on Kame-using platforms is very bad, though, because
34242# Kame uses #error against direct inclusion.   So include it on only
34243# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
34244# This is done before the in6_pktinfo check because that's what
34245# netinet6/in6.h is needed for.
34246#
34247case "$host" in
34248 *-bsdi4.[01]*)
34249
34250printf "%s\n" "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
34251
34252    isc_netinet6in6_hack="#include <netinet6/in6.h>"
34253    ;;
34254 *)
34255    isc_netinet6in6_hack=""
34256    ;;
34257esac
34258
34259#
34260# This is similar to the netinet6/in6.h issue.
34261#
34262case "$host" in
34263 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
34264
34265printf "%s\n" "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
34266
34267    isc_netinetin6_hack="#include <netinet/in6.h>"
34268    ;;
34269 *)
34270    isc_netinetin6_hack=""
34271    ;;
34272esac
34273
34274
34275case "$isc_cv_found_ipv6" in
34276 yes)
34277
34278printf "%s\n" "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
34279
34280    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
34281printf %s "checking for in6_pktinfo... " >&6; }
34282if test ${isc_cv_have_in6_pktinfo+y}
34283then :
34284  printf %s "(cached) " >&6
34285else $as_nop
34286  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34287/* end confdefs.h.  */
34288
34289		    #include <sys/types.h>
34290		    #include <sys/socket.h>
34291		    #include <netinet/in.h>
34292		    $isc_netinetin6_hack
34293		    $isc_netinet6in6_hack
34294
34295int
34296main (void)
34297{
34298
34299		    struct in6_pktinfo xyzzy;
34300
34301
34302  ;
34303  return 0;
34304}
34305_ACEOF
34306if ac_fn_c_try_compile "$LINENO"
34307then :
34308  isc_cv_have_in6_pktinfo=yes
34309else $as_nop
34310  isc_cv_have_in6_pktinfo=no
34311
34312fi
34313rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34314
34315fi
34316{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
34317printf "%s\n" "$isc_cv_have_in6_pktinfo" >&6; }
34318    case "$isc_cv_have_in6_pktinfo" in
34319     yes)
34320
34321printf "%s\n" "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
34322
34323    esac
34324
34325
34326    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
34327    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
34328printf %s "checking for sockaddr_in6.sin6_scope_id... " >&6; }
34329if test ${isc_cv_have_sin6_scope_id+y}
34330then :
34331  printf %s "(cached) " >&6
34332else $as_nop
34333  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34334/* end confdefs.h.  */
34335
34336		    #include <sys/types.h>
34337		    #include <sys/socket.h>
34338		    #include <netinet/in.h>
34339		    $isc_netinetin6_hack
34340		    $isc_netinet6in6_hack
34341
34342int
34343main (void)
34344{
34345
34346		    struct sockaddr_in6 xyzzy;
34347		    xyzzy.sin6_scope_id = 0;
34348
34349
34350  ;
34351  return 0;
34352}
34353_ACEOF
34354if ac_fn_c_try_compile "$LINENO"
34355then :
34356  isc_cv_have_sin6_scope_id=yes
34357else $as_nop
34358  isc_cv_have_sin6_scope_id=no
34359
34360fi
34361rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34362
34363fi
34364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
34365printf "%s\n" "$isc_cv_have_sin6_scope_id" >&6; }
34366
34367    case "$isc_cv_have_sin6_scope_id" in
34368     yes)
34369
34370printf "%s\n" "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
34371
34372    esac
34373esac
34374
34375
34376# We need this check run even without isc_cv_found_ipv6=yes
34377
34378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
34379printf %s "checking for in6addr_any... " >&6; }
34380if test ${isc_cv_in6addr_any_links+y}
34381then :
34382  printf %s "(cached) " >&6
34383else $as_nop
34384
34385	SAVED_LIBS="$LIBS"
34386	LIBS="$LDADD_LIBNTP $LIBS"
34387	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34388/* end confdefs.h.  */
34389$ac_includes_default
34390		    #include <sys/socket.h>
34391		    #include <netinet/in.h>
34392		    $isc_netinetin6_hack
34393		    $isc_netinet6in6_hack
34394
34395int
34396main (void)
34397{
34398
34399		    printf("%x", in6addr_any.s6_addr[15]);
34400
34401
34402  ;
34403  return 0;
34404}
34405_ACEOF
34406if ac_fn_c_try_link "$LINENO"
34407then :
34408  isc_cv_in6addr_any_links=yes
34409else $as_nop
34410  isc_cv_in6addr_any_links=no
34411
34412fi
34413rm -f core conftest.err conftest.$ac_objext conftest.beam \
34414    conftest$ac_exeext conftest.$ac_ext
34415	LIBS="$SAVED_LIBS"
34416	{ SAVED_LIBS=; unset SAVED_LIBS;}
34417
34418
34419fi
34420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
34421printf "%s\n" "$isc_cv_in6addr_any_links" >&6; }
34422
34423case "$isc_cv_in6addr_any_links" in
34424 no)
34425
34426printf "%s\n" "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
34427
34428esac
34429
34430
34431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
34432printf %s "checking for struct if_laddrconf... " >&6; }
34433if test ${isc_cv_struct_if_laddrconf+y}
34434then :
34435  printf %s "(cached) " >&6
34436else $as_nop
34437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34438/* end confdefs.h.  */
34439
34440		#include <sys/types.h>
34441		#include <net/if6.h>
34442
34443int
34444main (void)
34445{
34446
34447		struct if_laddrconf a;
34448
34449
34450  ;
34451  return 0;
34452}
34453_ACEOF
34454if ac_fn_c_try_compile "$LINENO"
34455then :
34456  isc_cv_struct_if_laddrconf=yes
34457else $as_nop
34458  isc_cv_struct_if_laddrconf=no
34459
34460fi
34461rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34462
34463fi
34464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
34465printf "%s\n" "$isc_cv_struct_if_laddrconf" >&6; }
34466
34467case "$isc_cv_struct_if_laddrconf" in
34468 yes)
34469
34470printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
34471
34472esac
34473
34474{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
34475printf %s "checking for struct if_laddrreq... " >&6; }
34476if test ${isc_cv_struct_if_laddrreq+y}
34477then :
34478  printf %s "(cached) " >&6
34479else $as_nop
34480  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34481/* end confdefs.h.  */
34482
34483		#include <sys/types.h>
34484		#include <net/if6.h>
34485
34486int
34487main (void)
34488{
34489
34490		struct if_laddrreq a;
34491
34492
34493  ;
34494  return 0;
34495}
34496_ACEOF
34497if ac_fn_c_try_compile "$LINENO"
34498then :
34499  isc_cv_struct_if_laddrreq=yes
34500else $as_nop
34501  isc_cv_struct_if_laddrreq=no
34502
34503fi
34504rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34505
34506fi
34507{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
34508printf "%s\n" "$isc_cv_struct_if_laddrreq" >&6; }
34509
34510case "$isc_cv_struct_if_laddrreq" in
34511 yes)
34512
34513printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
34514
34515esac
34516
34517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
34518printf %s "checking for multicast IP support... " >&6; }
34519if test ${ntp_cv_multicast+y}
34520then :
34521  printf %s "(cached) " >&6
34522else $as_nop
34523
34524	ntp_cv_multicast=no
34525	case "$host" in
34526	 i386-sequent-sysv4)
34527	    ;;
34528	 *)
34529	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34530/* end confdefs.h.  */
34531
34532			#ifdef HAVE_NETINET_IN_H
34533			# include <netinet/in.h>
34534			#endif
34535
34536int
34537main (void)
34538{
34539
34540			struct ip_mreq ipmr;
34541			ipmr.imr_interface.s_addr = 0;
34542
34543
34544  ;
34545  return 0;
34546}
34547_ACEOF
34548if ac_fn_c_try_compile "$LINENO"
34549then :
34550  ntp_cv_multicast=yes
34551fi
34552rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34553	    ;;
34554	esac
34555
34556
34557fi
34558{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
34559printf "%s\n" "$ntp_cv_multicast" >&6; }
34560case "$ntp_cv_multicast" in
34561 yes)
34562
34563printf "%s\n" "#define MCAST 1" >>confdefs.h
34564
34565    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
34566printf %s "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
34567if test ${ntp_cv_typeof_ip_multicast_loop+y}
34568then :
34569  printf %s "(cached) " >&6
34570else $as_nop
34571
34572	    case "$host" in
34573	     *-*-netbsd*|*-*-*linux*)
34574		ntp_cv_typeof_ip_multicast_loop=u_int
34575		;;
34576	     *)
34577		ntp_cv_typeof_ip_multicast_loop=u_char
34578		;;
34579	    esac
34580
34581
34582fi
34583{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
34584printf "%s\n" "$ntp_cv_typeof_ip_multicast_loop" >&6; }
34585
34586printf "%s\n" "#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop" >>confdefs.h
34587
34588esac
34589
34590# Check whether --enable-getifaddrs was given.
34591if test ${enable_getifaddrs+y}
34592then :
34593  enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
34594else $as_nop
34595  want_getifaddrs="yes"
34596
34597fi
34598
34599
34600case $want_getifaddrs in
34601 glibc)
34602    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
34603printf "%s\n" "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
34604esac
34605case $want_getifaddrs in
34606 no)
34607    ;;
34608 *)
34609    SAVED_LIBS="$LIBS"
34610    LIBS="$LDADD_LIBNTP $LIBS"
34611    ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
34612if test "x$ac_cv_func_getifaddrs" = xyes
34613then :
34614  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
34615
34616fi
34617
34618    LIBS="$SAVED_LIBS"
34619    { SAVED_LIBS=; unset SAVED_LIBS;}
34620    ;;
34621esac
34622
34623#
34624# Check for if_nametoindex() for IPv6 scoped addresses support
34625#
34626case "$host" in
34627 *-hp-hpux*)
34628    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
34629printf %s "checking for library containing if_nametoindex... " >&6; }
34630if test ${ac_cv_search_if_nametoindex+y}
34631then :
34632  printf %s "(cached) " >&6
34633else $as_nop
34634  ac_func_search_save_LIBS=$LIBS
34635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34636/* end confdefs.h.  */
34637
34638/* Override any GCC internal prototype to avoid an error.
34639   Use char because int might match the return type of a GCC
34640   builtin and then its argument prototype would still apply.  */
34641char if_nametoindex ();
34642int
34643main (void)
34644{
34645return if_nametoindex ();
34646  ;
34647  return 0;
34648}
34649_ACEOF
34650for ac_lib in '' ipv6
34651do
34652  if test -z "$ac_lib"; then
34653    ac_res="none required"
34654  else
34655    ac_res=-l$ac_lib
34656    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
34657  fi
34658  if ac_fn_c_try_link "$LINENO"
34659then :
34660  ac_cv_search_if_nametoindex=$ac_res
34661fi
34662rm -f core conftest.err conftest.$ac_objext conftest.beam \
34663    conftest$ac_exeext
34664  if test ${ac_cv_search_if_nametoindex+y}
34665then :
34666  break
34667fi
34668done
34669if test ${ac_cv_search_if_nametoindex+y}
34670then :
34671
34672else $as_nop
34673  ac_cv_search_if_nametoindex=no
34674fi
34675rm conftest.$ac_ext
34676LIBS=$ac_func_search_save_LIBS
34677fi
34678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
34679printf "%s\n" "$ac_cv_search_if_nametoindex" >&6; }
34680ac_res=$ac_cv_search_if_nametoindex
34681if test "$ac_res" != no
34682then :
34683  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34684
34685fi
34686
34687esac
34688SAVED_LIBS="$LIBS"
34689LIBS="$LDADD_LIBNTP $LIBS"
34690ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
34691if test "x$ac_cv_func_if_nametoindex" = xyes
34692then :
34693  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
34694
34695fi
34696
34697LIBS="$SAVED_LIBS"
34698{ SAVED_LIBS=; unset SAVED_LIBS;}
34699case "$ac_cv_func_if_nametoindex" in
34700 yes)
34701
34702printf "%s\n" "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
34703
34704esac
34705
34706
34707
34708
34709#
34710# Look for a sysctl call to get the list of network interfaces.
34711#
34712{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5
34713printf %s "checking for interface list sysctl... " >&6; }
34714if test ${ntp_cv_iflist_sysctl+y}
34715then :
34716  printf %s "(cached) " >&6
34717else $as_nop
34718  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34719/* end confdefs.h.  */
34720
34721	    #include <sys/param.h>
34722	    #include <sys/sysctl.h>
34723	    #include <sys/socket.h>
34724	    #ifndef NET_RT_IFLIST
34725	    # error
34726	    #endif
34727
34728_ACEOF
34729if ac_fn_c_try_cpp "$LINENO"
34730then :
34731  ntp_cv_iflist_sysctl=yes
34732else $as_nop
34733  ntp_cv_iflist_sysctl=no
34734
34735fi
34736rm -f conftest.err conftest.i conftest.$ac_ext
34737
34738fi
34739{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
34740printf "%s\n" "$ntp_cv_iflist_sysctl" >&6; }
34741case "$ntp_cv_iflist_sysctl" in
34742 yes)
34743
34744printf "%s\n" "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h
34745
34746esac
34747
34748###
34749
34750{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the saveconfig mechanism" >&5
34751printf %s "checking if we want the saveconfig mechanism... " >&6; }
34752# Check whether --enable-saveconfig was given.
34753if test ${enable_saveconfig+y}
34754then :
34755  enableval=$enable_saveconfig; ntp_ok=$enableval
34756else $as_nop
34757  ntp_ok=yes
34758
34759fi
34760
34761ntp_saveconfig_enabled=0
34762case "$ntp_ok" in
34763 yes)
34764    ntp_saveconfig_enabled=1
34765
34766printf "%s\n" "#define SAVECONFIG 1" >>confdefs.h
34767
34768    ;;
34769esac
34770 if test x$ntp_saveconfig_enabled = x1; then
34771  SAVECONFIG_ENABLED_TRUE=
34772  SAVECONFIG_ENABLED_FALSE='#'
34773else
34774  SAVECONFIG_ENABLED_TRUE='#'
34775  SAVECONFIG_ENABLED_FALSE=
34776fi
34777
34778{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34779printf "%s\n" "$ntp_ok" >&6; }
34780
34781###
34782
34783{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the experimental leap smear code" >&5
34784printf %s "checking if we want the experimental leap smear code... " >&6; }
34785# Check whether --enable-leap-smear was given.
34786if test ${enable_leap_smear+y}
34787then :
34788  enableval=$enable_leap_smear; ntp_ok=$enableval
34789else $as_nop
34790  ntp_ok=no
34791
34792fi
34793
34794ntp_leap_smear_enabled=0
34795case "$ntp_ok" in
34796 yes)
34797    ntp_leap_smear_enabled=1
34798
34799printf "%s\n" "#define LEAP_SMEAR 1" >>confdefs.h
34800
34801
34802    HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0"
34803    ;;
34804esac
34805{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34806printf "%s\n" "$ntp_ok" >&6; }
34807
34808###
34809
34810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want dynamic interleave support" >&5
34811printf %s "checking if we want dynamic interleave support... " >&6; }
34812# Check whether --enable-dynamic-interleave was given.
34813if test ${enable_dynamic_interleave+y}
34814then :
34815  enableval=$enable_dynamic_interleave; ntp_ok=$enableval
34816else $as_nop
34817  ntp_ok=no
34818
34819fi
34820
34821ntp_dynamic_interleave=0
34822case "$ntp_ok" in
34823 yes)
34824    ntp_dynamic_interleave=1
34825    ;;
34826esac
34827
34828printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h
34829
34830{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34831printf "%s\n" "$ntp_ok" >&6; }
34832
34833
34834
34835
34836# We may not need have_unity
34837have_unity=false
34838# Extract the first word of "ruby", so it can be a program name with args.
34839set dummy ruby; ac_word=$2
34840{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34841printf %s "checking for $ac_word... " >&6; }
34842if test ${ac_cv_path_PATH_RUBY+y}
34843then :
34844  printf %s "(cached) " >&6
34845else $as_nop
34846  case $PATH_RUBY in
34847  [\\/]* | ?:[\\/]*)
34848  ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
34849  ;;
34850  *)
34851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34852for as_dir in $PATH
34853do
34854  IFS=$as_save_IFS
34855  case $as_dir in #(((
34856    '') as_dir=./ ;;
34857    */) ;;
34858    *) as_dir=$as_dir/ ;;
34859  esac
34860    for ac_exec_ext in '' $ac_executable_extensions; do
34861  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
34862    ac_cv_path_PATH_RUBY="$as_dir$ac_word$ac_exec_ext"
34863    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
34864    break 2
34865  fi
34866done
34867  done
34868IFS=$as_save_IFS
34869
34870  ;;
34871esac
34872fi
34873PATH_RUBY=$ac_cv_path_PATH_RUBY
34874if test -n "$PATH_RUBY"; then
34875  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
34876printf "%s\n" "$PATH_RUBY" >&6; }
34877else
34878  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34879printf "%s\n" "no" >&6; }
34880fi
34881
34882
34883case "$PATH_RUBY" in
34884 /*)
34885    have_unity=true
34886    ;;
34887 *) PATH_RUBY="false"
34888    ;;
34889esac
34890# We may not need UNITYBUILD_AVAILABLE
34891 if $have_unity; then
34892  UNITYBUILD_AVAILABLE_TRUE=
34893  UNITYBUILD_AVAILABLE_FALSE='#'
34894else
34895  UNITYBUILD_AVAILABLE_TRUE='#'
34896  UNITYBUILD_AVAILABLE_FALSE=
34897fi
34898
34899
34900
34901
34902
34903case "$build" in
34904 $host)	cross=0 ;;
34905 *)	cross=1 ;;
34906esac
34907
34908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
34909printf %s "checking if we want to enable tests with undiagnosed problems... " >&6; }
34910# Check whether --enable-problem-tests was given.
34911if test ${enable_problem_tests+y}
34912then :
34913  enableval=$enable_problem_tests; ntp_ept=$enableval
34914else $as_nop
34915  ntp_ept=yes
34916
34917fi
34918
34919{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
34920printf "%s\n" "$ntp_ept" >&6; }
34921
34922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
34923printf %s "checking if we can run test-ntp_restrict... " >&6; }
34924ntp_test_ntp_restrict="no"
34925case "$ntp_ept:$cross:$host" in
34926 no:0:*-*-freebsd6.4) ;;
34927 no:0:*-*-hpux11.23*) ;;
34928 no:0:*-*-solaris*) ;;
34929 *) ntp_test_ntp_restrict="yes" ;;
34930esac
34931case "$ntp_cv_gc_sections_runs" in
34932  no) ntp_test_ntp_restrict="no" ;;
34933  * ) ;;
34934esac
34935{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
34936printf "%s\n" "$ntp_test_ntp_restrict" >&6; }
34937 if test x$ntp_test_ntp_restrict = xyes; then
34938  BUILD_TEST_NTP_RESTRICT_TRUE=
34939  BUILD_TEST_NTP_RESTRICT_FALSE='#'
34940else
34941  BUILD_TEST_NTP_RESTRICT_TRUE='#'
34942  BUILD_TEST_NTP_RESTRICT_FALSE=
34943fi
34944
34945
34946{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
34947printf %s "checking if we can run test-ntp_scanner... " >&6; }
34948ntp_test_ntp_scanner="no"
34949case "$ntp_ept:$cross:$host" in
34950 no:0:*-*-freebsd6.4) ;;
34951 no:0:*-*-solaris*) ;;
34952 *) ntp_test_ntp_scanner="yes" ;;
34953esac
34954case "$ntp_cv_gc_sections_runs" in
34955  no) ntp_test_ntp_scanner="no" ;;
34956  * ) ;;
34957esac
34958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
34959printf "%s\n" "$ntp_test_ntp_scanner" >&6; }
34960 if test x$ntp_test_ntp_scanner = xyes; then
34961  BUILD_TEST_NTP_SCANNER_TRUE=
34962  BUILD_TEST_NTP_SCANNER_FALSE='#'
34963else
34964  BUILD_TEST_NTP_SCANNER_TRUE='#'
34965  BUILD_TEST_NTP_SCANNER_FALSE=
34966fi
34967
34968
34969{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
34970printf %s "checking if we can run test-ntp_signd... " >&6; }
34971ntp_test_ntp_signd="no"
34972case "$ntp_ept:$cross:$host" in
34973 no:0:*-*-freebsd6.4) ;;
34974 no:0:*-*-solaris*) ;;
34975 *) ntp_test_ntp_signd="yes" ;;
34976esac
34977case "$ntp_cv_gc_sections_runs" in
34978  no) ntp_test_ntp_signd="no" ;;
34979  * ) ;;
34980esac
34981{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
34982printf "%s\n" "$ntp_test_ntp_signd" >&6; }
34983 if test x$ntp_test_ntp_signd = xyes; then
34984  BUILD_TEST_NTP_SIGND_TRUE=
34985  BUILD_TEST_NTP_SIGND_FALSE='#'
34986else
34987  BUILD_TEST_NTP_SIGND_TRUE='#'
34988  BUILD_TEST_NTP_SIGND_FALSE=
34989fi
34990
34991
34992
34993
34994###
34995
34996ac_fn_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
34997" "$ac_c_undeclared_builtin_options" "CFLAGS"
34998if test "x$ac_cv_have_decl_sigsetjmp" = xyes
34999then :
35000  ac_have_decl=1
35001else $as_nop
35002  ac_have_decl=0
35003fi
35004printf "%s\n" "#define HAVE_DECL_SIGSETJMP $ac_have_decl" >>confdefs.h
35005ac_fn_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include <setjmp.h>
35006" "$ac_c_undeclared_builtin_options" "CFLAGS"
35007if test "x$ac_cv_have_decl_siglongjmp" = xyes
35008then :
35009  ac_have_decl=1
35010else $as_nop
35011  ac_have_decl=0
35012fi
35013printf "%s\n" "#define HAVE_DECL_SIGLONGJMP $ac_have_decl" >>confdefs.h
35014
35015
35016###
35017
35018
35019  prefix_NONE=
35020  exec_prefix_NONE=
35021  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
35022  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
35023  eval ac_define_dir="\"$sysconfdir\""
35024  eval ac_define_dir="\"$ac_define_dir\""
35025  NTP_KEYSDIR="$ac_define_dir"
35026
35027
35028printf "%s\n" "#define NTP_KEYSDIR \"$ac_define_dir\"" >>confdefs.h
35029
35030  test "$prefix_NONE" && prefix=NONE
35031  test "$exec_prefix_NONE" && exec_prefix=NONE
35032
35033
35034ac_config_files="$ac_config_files Makefile"
35035
35036ac_config_files="$ac_config_files adjtimed/Makefile"
35037
35038ac_config_files="$ac_config_files clockstuff/Makefile"
35039
35040ac_config_files="$ac_config_files include/Makefile"
35041
35042ac_config_files="$ac_config_files include/isc/Makefile"
35043
35044ac_config_files="$ac_config_files kernel/Makefile"
35045
35046ac_config_files="$ac_config_files kernel/sys/Makefile"
35047
35048ac_config_files="$ac_config_files libntp/Makefile"
35049
35050ac_config_files="$ac_config_files libparse/Makefile"
35051
35052ac_config_files="$ac_config_files ntpd/Makefile"
35053
35054ac_config_files="$ac_config_files ntpd/complete.conf"
35055
35056ac_config_files="$ac_config_files ntpdate/Makefile"
35057
35058ac_config_files="$ac_config_files ntpdc/Makefile"
35059
35060ac_config_files="$ac_config_files ntpdc/nl.pl"
35061
35062ac_config_files="$ac_config_files ntpq/Makefile"
35063
35064ac_config_files="$ac_config_files ntpsnmpd/Makefile"
35065
35066ac_config_files="$ac_config_files parseutil/Makefile"
35067
35068ac_config_files="$ac_config_files scripts/Makefile"
35069
35070ac_config_files="$ac_config_files scripts/build/Makefile"
35071
35072ac_config_files="$ac_config_files scripts/build/genAuthors"
35073
35074ac_config_files="$ac_config_files scripts/build/mkver"
35075
35076ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
35077
35078ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
35079
35080ac_config_files="$ac_config_files scripts/lib/Makefile"
35081
35082ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
35083
35084ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
35085
35086ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
35087
35088ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
35089
35090ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
35091
35092ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
35093
35094ac_config_files="$ac_config_files scripts/ntpver"
35095
35096ac_config_files="$ac_config_files scripts/plot_summary"
35097
35098ac_config_files="$ac_config_files scripts/summary"
35099
35100ac_config_files="$ac_config_files scripts/update-leap/Makefile"
35101
35102ac_config_files="$ac_config_files scripts/update-leap/update-leap"
35103
35104ac_config_files="$ac_config_files tests/Makefile"
35105
35106ac_config_files="$ac_config_files tests/bug-2803/Makefile"
35107
35108ac_config_files="$ac_config_files tests/libntp/Makefile"
35109
35110ac_config_files="$ac_config_files tests/ntpd/Makefile"
35111
35112ac_config_files="$ac_config_files tests/ntpq/Makefile"
35113
35114ac_config_files="$ac_config_files tests/sandbox/Makefile"
35115
35116ac_config_files="$ac_config_files tests/sec-2853/Makefile"
35117
35118ac_config_files="$ac_config_files util/Makefile"
35119
35120
35121perllibdir="${datadir}/ntp/lib"
35122
35123  prefix_NONE=
35124  exec_prefix_NONE=
35125  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
35126  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
35127  eval ac_define_dir="\"$perllibdir\""
35128  eval ac_define_dir="\"$ac_define_dir\""
35129  PERLLIBDIR="$ac_define_dir"
35130
35131
35132printf "%s\n" "#define PERLLIBDIR \"$ac_define_dir\"" >>confdefs.h
35133
35134  test "$prefix_NONE" && prefix=NONE
35135  test "$exec_prefix_NONE" && exec_prefix=NONE
35136
35137
35138calc_tickadj_opts="$srcdir/scripts/calc_tickadj/calc_tickadj-opts"
35139
35140ntp_wait_opts="$srcdir/scripts/ntp-wait/ntp-wait-opts"
35141
35142ntpsweep_opts="$srcdir/scripts/ntpsweep/ntpsweep-opts"
35143
35144ntptrace_opts="$srcdir/scripts/ntptrace/ntptrace-opts"
35145
35146summary_opts="$srcdir/scripts/summary-opts"
35147
35148plot_summary_opts="$srcdir/scripts/plot_summary-opts"
35149
35150
35151
35152
35153subdirs="$subdirs sntp"
35154
35155
35156cat >confcache <<\_ACEOF
35157# This file is a shell script that caches the results of configure
35158# tests run on this system so they can be shared between configure
35159# scripts and configure runs, see configure's option --config-cache.
35160# It is not useful on other systems.  If it contains results you don't
35161# want to keep, you may remove or edit it.
35162#
35163# config.status only pays attention to the cache file if you give it
35164# the --recheck option to rerun configure.
35165#
35166# `ac_cv_env_foo' variables (set or unset) will be overridden when
35167# loading this file, other *unset* `ac_cv_foo' will be assigned the
35168# following values.
35169
35170_ACEOF
35171
35172# The following way of writing the cache mishandles newlines in values,
35173# but we know of no workaround that is simple, portable, and efficient.
35174# So, we kill variables containing newlines.
35175# Ultrix sh set writes to stderr and can't be redirected directly,
35176# and sets the high bit in the cache file unless we assign to the vars.
35177(
35178  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
35179    eval ac_val=\$$ac_var
35180    case $ac_val in #(
35181    *${as_nl}*)
35182      case $ac_var in #(
35183      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
35184printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
35185      esac
35186      case $ac_var in #(
35187      _ | IFS | as_nl) ;; #(
35188      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
35189      *) { eval $ac_var=; unset $ac_var;} ;;
35190      esac ;;
35191    esac
35192  done
35193
35194  (set) 2>&1 |
35195    case $as_nl`(ac_space=' '; set) 2>&1` in #(
35196    *${as_nl}ac_space=\ *)
35197      # `set' does not quote correctly, so add quotes: double-quote
35198      # substitution turns \\\\ into \\, and sed turns \\ into \.
35199      sed -n \
35200	"s/'/'\\\\''/g;
35201	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
35202      ;; #(
35203    *)
35204      # `set' quotes correctly as required by POSIX, so do not add quotes.
35205      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
35206      ;;
35207    esac |
35208    sort
35209) |
35210  sed '
35211     /^ac_cv_env_/b end
35212     t clear
35213     :clear
35214     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
35215     t end
35216     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
35217     :end' >>confcache
35218if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
35219  if test -w "$cache_file"; then
35220    if test "x$cache_file" != "x/dev/null"; then
35221      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
35222printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
35223      if test ! -f "$cache_file" || test -h "$cache_file"; then
35224	cat confcache >"$cache_file"
35225      else
35226        case $cache_file in #(
35227        */* | ?:*)
35228	  mv -f confcache "$cache_file"$$ &&
35229	  mv -f "$cache_file"$$ "$cache_file" ;; #(
35230        *)
35231	  mv -f confcache "$cache_file" ;;
35232	esac
35233      fi
35234    fi
35235  else
35236    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
35237printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
35238  fi
35239fi
35240rm -f confcache
35241
35242test "x$prefix" = xNONE && prefix=$ac_default_prefix
35243# Let make expand exec_prefix.
35244test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
35245
35246DEFS=-DHAVE_CONFIG_H
35247
35248ac_libobjs=
35249ac_ltlibobjs=
35250U=
35251for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
35252  # 1. Remove the extension, and $U if already installed.
35253  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
35254  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
35255  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
35256  #    will be set to the directory where LIBOBJS objects are built.
35257  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
35258  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
35259done
35260LIBOBJS=$ac_libobjs
35261
35262LTLIBOBJS=$ac_ltlibobjs
35263
35264
35265{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
35266printf %s "checking that generated files are newer than configure... " >&6; }
35267   if test -n "$am_sleep_pid"; then
35268     # Hide warnings about reused PIDs.
35269     wait $am_sleep_pid 2>/dev/null
35270   fi
35271   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
35272printf "%s\n" "done" >&6; }
35273 if test -n "$EXEEXT"; then
35274  am__EXEEXT_TRUE=
35275  am__EXEEXT_FALSE='#'
35276else
35277  am__EXEEXT_TRUE='#'
35278  am__EXEEXT_FALSE=
35279fi
35280
35281if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
35282  as_fn_error $? "conditional \"AMDEP\" was never defined.
35283Usually this means the macro was only invoked conditionally." "$LINENO" 5
35284fi
35285if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
35286  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
35287Usually this means the macro was only invoked conditionally." "$LINENO" 5
35288fi
35289
35290if test -z "${VPATH_HACK_TRUE}" && test -z "${VPATH_HACK_FALSE}"; then
35291  as_fn_error $? "conditional \"VPATH_HACK\" was never defined.
35292Usually this means the macro was only invoked conditionally." "$LINENO" 5
35293fi
35294if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
35295  as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
35296Usually this means the macro was only invoked conditionally." "$LINENO" 5
35297fi
35298if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
35299  as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
35300Usually this means the macro was only invoked conditionally." "$LINENO" 5
35301fi
35302if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
35303  as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
35304Usually this means the macro was only invoked conditionally." "$LINENO" 5
35305fi
35306if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
35307  as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
35308Usually this means the macro was only invoked conditionally." "$LINENO" 5
35309fi
35310if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
35311  as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
35312Usually this means the macro was only invoked conditionally." "$LINENO" 5
35313fi
35314if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
35315  as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
35316Usually this means the macro was only invoked conditionally." "$LINENO" 5
35317fi
35318if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
35319  as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
35320Usually this means the macro was only invoked conditionally." "$LINENO" 5
35321fi
35322if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
35323  as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
35324Usually this means the macro was only invoked conditionally." "$LINENO" 5
35325fi
35326if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
35327  as_fn_error $? "conditional \"PTHREADS\" was never defined.
35328Usually this means the macro was only invoked conditionally." "$LINENO" 5
35329fi
35330if test -z "${LIBNTP_SUBMAKES_TRUE}" && test -z "${LIBNTP_SUBMAKES_FALSE}"; then
35331  as_fn_error $? "conditional \"LIBNTP_SUBMAKES\" was never defined.
35332Usually this means the macro was only invoked conditionally." "$LINENO" 5
35333fi
35334if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
35335  as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
35336Usually this means the macro was only invoked conditionally." "$LINENO" 5
35337fi
35338if test -z "${SAVECONFIG_ENABLED_TRUE}" && test -z "${SAVECONFIG_ENABLED_FALSE}"; then
35339  as_fn_error $? "conditional \"SAVECONFIG_ENABLED\" was never defined.
35340Usually this means the macro was only invoked conditionally." "$LINENO" 5
35341fi
35342if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
35343  as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
35344Usually this means the macro was only invoked conditionally." "$LINENO" 5
35345fi
35346if test -z "${BUILD_TEST_NTP_RESTRICT_TRUE}" && test -z "${BUILD_TEST_NTP_RESTRICT_FALSE}"; then
35347  as_fn_error $? "conditional \"BUILD_TEST_NTP_RESTRICT\" was never defined.
35348Usually this means the macro was only invoked conditionally." "$LINENO" 5
35349fi
35350if test -z "${BUILD_TEST_NTP_SCANNER_TRUE}" && test -z "${BUILD_TEST_NTP_SCANNER_FALSE}"; then
35351  as_fn_error $? "conditional \"BUILD_TEST_NTP_SCANNER\" was never defined.
35352Usually this means the macro was only invoked conditionally." "$LINENO" 5
35353fi
35354if test -z "${BUILD_TEST_NTP_SIGND_TRUE}" && test -z "${BUILD_TEST_NTP_SIGND_FALSE}"; then
35355  as_fn_error $? "conditional \"BUILD_TEST_NTP_SIGND\" was never defined.
35356Usually this means the macro was only invoked conditionally." "$LINENO" 5
35357fi
35358
35359: "${CONFIG_STATUS=./config.status}"
35360ac_write_fail=0
35361ac_clean_files_save=$ac_clean_files
35362ac_clean_files="$ac_clean_files $CONFIG_STATUS"
35363{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
35364printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
35365as_write_fail=0
35366cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
35367#! $SHELL
35368# Generated by $as_me.
35369# Run this file to recreate the current configuration.
35370# Compiler output produced by configure, useful for debugging
35371# configure, is in config.log if it exists.
35372
35373debug=false
35374ac_cs_recheck=false
35375ac_cs_silent=false
35376
35377SHELL=\${CONFIG_SHELL-$SHELL}
35378export SHELL
35379_ASEOF
35380cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
35381## -------------------- ##
35382## M4sh Initialization. ##
35383## -------------------- ##
35384
35385# Be more Bourne compatible
35386DUALCASE=1; export DUALCASE # for MKS sh
35387as_nop=:
35388if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
35389then :
35390  emulate sh
35391  NULLCMD=:
35392  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
35393  # is contrary to our usage.  Disable this feature.
35394  alias -g '${1+"$@"}'='"$@"'
35395  setopt NO_GLOB_SUBST
35396else $as_nop
35397  case `(set -o) 2>/dev/null` in #(
35398  *posix*) :
35399    set -o posix ;; #(
35400  *) :
35401     ;;
35402esac
35403fi
35404
35405
35406
35407# Reset variables that may have inherited troublesome values from
35408# the environment.
35409
35410# IFS needs to be set, to space, tab, and newline, in precisely that order.
35411# (If _AS_PATH_WALK were called with IFS unset, it would have the
35412# side effect of setting IFS to empty, thus disabling word splitting.)
35413# Quoting is to prevent editors from complaining about space-tab.
35414as_nl='
35415'
35416export as_nl
35417IFS=" ""	$as_nl"
35418
35419PS1='$ '
35420PS2='> '
35421PS4='+ '
35422
35423# Ensure predictable behavior from utilities with locale-dependent output.
35424LC_ALL=C
35425export LC_ALL
35426LANGUAGE=C
35427export LANGUAGE
35428
35429# We cannot yet rely on "unset" to work, but we need these variables
35430# to be unset--not just set to an empty or harmless value--now, to
35431# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
35432# also avoids known problems related to "unset" and subshell syntax
35433# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
35434for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
35435do eval test \${$as_var+y} \
35436  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
35437done
35438
35439# Ensure that fds 0, 1, and 2 are open.
35440if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
35441if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
35442if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
35443
35444# The user is always right.
35445if ${PATH_SEPARATOR+false} :; then
35446  PATH_SEPARATOR=:
35447  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
35448    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
35449      PATH_SEPARATOR=';'
35450  }
35451fi
35452
35453
35454# Find who we are.  Look in the path if we contain no directory separator.
35455as_myself=
35456case $0 in #((
35457  *[\\/]* ) as_myself=$0 ;;
35458  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35459for as_dir in $PATH
35460do
35461  IFS=$as_save_IFS
35462  case $as_dir in #(((
35463    '') as_dir=./ ;;
35464    */) ;;
35465    *) as_dir=$as_dir/ ;;
35466  esac
35467    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
35468  done
35469IFS=$as_save_IFS
35470
35471     ;;
35472esac
35473# We did not find ourselves, most probably we were run as `sh COMMAND'
35474# in which case we are not to be found in the path.
35475if test "x$as_myself" = x; then
35476  as_myself=$0
35477fi
35478if test ! -f "$as_myself"; then
35479  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
35480  exit 1
35481fi
35482
35483
35484
35485# as_fn_error STATUS ERROR [LINENO LOG_FD]
35486# ----------------------------------------
35487# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
35488# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
35489# script with STATUS, using 1 if that was 0.
35490as_fn_error ()
35491{
35492  as_status=$1; test $as_status -eq 0 && as_status=1
35493  if test "$4"; then
35494    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
35495    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
35496  fi
35497  printf "%s\n" "$as_me: error: $2" >&2
35498  as_fn_exit $as_status
35499} # as_fn_error
35500
35501
35502
35503# as_fn_set_status STATUS
35504# -----------------------
35505# Set $? to STATUS, without forking.
35506as_fn_set_status ()
35507{
35508  return $1
35509} # as_fn_set_status
35510
35511# as_fn_exit STATUS
35512# -----------------
35513# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
35514as_fn_exit ()
35515{
35516  set +e
35517  as_fn_set_status $1
35518  exit $1
35519} # as_fn_exit
35520
35521# as_fn_unset VAR
35522# ---------------
35523# Portably unset VAR.
35524as_fn_unset ()
35525{
35526  { eval $1=; unset $1;}
35527}
35528as_unset=as_fn_unset
35529
35530# as_fn_append VAR VALUE
35531# ----------------------
35532# Append the text in VALUE to the end of the definition contained in VAR. Take
35533# advantage of any shell optimizations that allow amortized linear growth over
35534# repeated appends, instead of the typical quadratic growth present in naive
35535# implementations.
35536if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
35537then :
35538  eval 'as_fn_append ()
35539  {
35540    eval $1+=\$2
35541  }'
35542else $as_nop
35543  as_fn_append ()
35544  {
35545    eval $1=\$$1\$2
35546  }
35547fi # as_fn_append
35548
35549# as_fn_arith ARG...
35550# ------------------
35551# Perform arithmetic evaluation on the ARGs, and store the result in the
35552# global $as_val. Take advantage of shells that can avoid forks. The arguments
35553# must be portable across $(()) and expr.
35554if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
35555then :
35556  eval 'as_fn_arith ()
35557  {
35558    as_val=$(( $* ))
35559  }'
35560else $as_nop
35561  as_fn_arith ()
35562  {
35563    as_val=`expr "$@" || test $? -eq 1`
35564  }
35565fi # as_fn_arith
35566
35567
35568if expr a : '\(a\)' >/dev/null 2>&1 &&
35569   test "X`expr 00001 : '.*\(...\)'`" = X001; then
35570  as_expr=expr
35571else
35572  as_expr=false
35573fi
35574
35575if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
35576  as_basename=basename
35577else
35578  as_basename=false
35579fi
35580
35581if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
35582  as_dirname=dirname
35583else
35584  as_dirname=false
35585fi
35586
35587as_me=`$as_basename -- "$0" ||
35588$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
35589	 X"$0" : 'X\(//\)$' \| \
35590	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
35591printf "%s\n" X/"$0" |
35592    sed '/^.*\/\([^/][^/]*\)\/*$/{
35593	    s//\1/
35594	    q
35595	  }
35596	  /^X\/\(\/\/\)$/{
35597	    s//\1/
35598	    q
35599	  }
35600	  /^X\/\(\/\).*/{
35601	    s//\1/
35602	    q
35603	  }
35604	  s/.*/./; q'`
35605
35606# Avoid depending upon Character Ranges.
35607as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35608as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35609as_cr_Letters=$as_cr_letters$as_cr_LETTERS
35610as_cr_digits='0123456789'
35611as_cr_alnum=$as_cr_Letters$as_cr_digits
35612
35613
35614# Determine whether it's possible to make 'echo' print without a newline.
35615# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
35616# for compatibility with existing Makefiles.
35617ECHO_C= ECHO_N= ECHO_T=
35618case `echo -n x` in #(((((
35619-n*)
35620  case `echo 'xy\c'` in
35621  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
35622  xy)  ECHO_C='\c';;
35623  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
35624       ECHO_T='	';;
35625  esac;;
35626*)
35627  ECHO_N='-n';;
35628esac
35629
35630# For backward compatibility with old third-party macros, we provide
35631# the shell variables $as_echo and $as_echo_n.  New code should use
35632# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
35633as_echo='printf %s\n'
35634as_echo_n='printf %s'
35635
35636rm -f conf$$ conf$$.exe conf$$.file
35637if test -d conf$$.dir; then
35638  rm -f conf$$.dir/conf$$.file
35639else
35640  rm -f conf$$.dir
35641  mkdir conf$$.dir 2>/dev/null
35642fi
35643if (echo >conf$$.file) 2>/dev/null; then
35644  if ln -s conf$$.file conf$$ 2>/dev/null; then
35645    as_ln_s='ln -s'
35646    # ... but there are two gotchas:
35647    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
35648    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
35649    # In both cases, we have to default to `cp -pR'.
35650    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
35651      as_ln_s='cp -pR'
35652  elif ln conf$$.file conf$$ 2>/dev/null; then
35653    as_ln_s=ln
35654  else
35655    as_ln_s='cp -pR'
35656  fi
35657else
35658  as_ln_s='cp -pR'
35659fi
35660rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
35661rmdir conf$$.dir 2>/dev/null
35662
35663
35664# as_fn_mkdir_p
35665# -------------
35666# Create "$as_dir" as a directory, including parents if necessary.
35667as_fn_mkdir_p ()
35668{
35669
35670  case $as_dir in #(
35671  -*) as_dir=./$as_dir;;
35672  esac
35673  test -d "$as_dir" || eval $as_mkdir_p || {
35674    as_dirs=
35675    while :; do
35676      case $as_dir in #(
35677      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
35678      *) as_qdir=$as_dir;;
35679      esac
35680      as_dirs="'$as_qdir' $as_dirs"
35681      as_dir=`$as_dirname -- "$as_dir" ||
35682$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35683	 X"$as_dir" : 'X\(//\)[^/]' \| \
35684	 X"$as_dir" : 'X\(//\)$' \| \
35685	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
35686printf "%s\n" X"$as_dir" |
35687    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35688	    s//\1/
35689	    q
35690	  }
35691	  /^X\(\/\/\)[^/].*/{
35692	    s//\1/
35693	    q
35694	  }
35695	  /^X\(\/\/\)$/{
35696	    s//\1/
35697	    q
35698	  }
35699	  /^X\(\/\).*/{
35700	    s//\1/
35701	    q
35702	  }
35703	  s/.*/./; q'`
35704      test -d "$as_dir" && break
35705    done
35706    test -z "$as_dirs" || eval "mkdir $as_dirs"
35707  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
35708
35709
35710} # as_fn_mkdir_p
35711if mkdir -p . 2>/dev/null; then
35712  as_mkdir_p='mkdir -p "$as_dir"'
35713else
35714  test -d ./-p && rmdir ./-p
35715  as_mkdir_p=false
35716fi
35717
35718
35719# as_fn_executable_p FILE
35720# -----------------------
35721# Test if FILE is an executable regular file.
35722as_fn_executable_p ()
35723{
35724  test -f "$1" && test -x "$1"
35725} # as_fn_executable_p
35726as_test_x='test -x'
35727as_executable_p=as_fn_executable_p
35728
35729# Sed expression to map a string onto a valid CPP name.
35730as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
35731
35732# Sed expression to map a string onto a valid variable name.
35733as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
35734
35735
35736exec 6>&1
35737## ----------------------------------- ##
35738## Main body of $CONFIG_STATUS script. ##
35739## ----------------------------------- ##
35740_ASEOF
35741test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
35742
35743cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35744# Save the log message, to keep $0 and so on meaningful, and to
35745# report actual input values of CONFIG_FILES etc. instead of their
35746# values after options handling.
35747ac_log="
35748This file was extended by ntp $as_me 4.2.8p18, which was
35749generated by GNU Autoconf 2.71.  Invocation command line was
35750
35751  CONFIG_FILES    = $CONFIG_FILES
35752  CONFIG_HEADERS  = $CONFIG_HEADERS
35753  CONFIG_LINKS    = $CONFIG_LINKS
35754  CONFIG_COMMANDS = $CONFIG_COMMANDS
35755  $ $0 $@
35756
35757on `(hostname || uname -n) 2>/dev/null | sed 1q`
35758"
35759
35760_ACEOF
35761
35762case $ac_config_files in *"
35763"*) set x $ac_config_files; shift; ac_config_files=$*;;
35764esac
35765
35766case $ac_config_headers in *"
35767"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
35768esac
35769
35770
35771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35772# Files that config.status was made for.
35773config_files="$ac_config_files"
35774config_headers="$ac_config_headers"
35775config_commands="$ac_config_commands"
35776
35777_ACEOF
35778
35779cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35780ac_cs_usage="\
35781\`$as_me' instantiates files and other configuration actions
35782from templates according to the current configuration.  Unless the files
35783and actions are specified as TAGs, all are instantiated by default.
35784
35785Usage: $0 [OPTION]... [TAG]...
35786
35787  -h, --help       print this help, then exit
35788  -V, --version    print version number and configuration settings, then exit
35789      --config     print configuration, then exit
35790  -q, --quiet, --silent
35791                   do not print progress messages
35792  -d, --debug      don't remove temporary files
35793      --recheck    update $as_me by reconfiguring in the same conditions
35794      --file=FILE[:TEMPLATE]
35795                   instantiate the configuration file FILE
35796      --header=FILE[:TEMPLATE]
35797                   instantiate the configuration header FILE
35798
35799Configuration files:
35800$config_files
35801
35802Configuration headers:
35803$config_headers
35804
35805Configuration commands:
35806$config_commands
35807
35808Report bugs to <https://bugs.ntp.org/>.
35809ntp home page: <https://www.ntp.org/>."
35810
35811_ACEOF
35812ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
35813ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
35814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35815ac_cs_config='$ac_cs_config_escaped'
35816ac_cs_version="\\
35817ntp config.status 4.2.8p18
35818configured by $0, generated by GNU Autoconf 2.71,
35819  with options \\"\$ac_cs_config\\"
35820
35821Copyright (C) 2021 Free Software Foundation, Inc.
35822This config.status script is free software; the Free Software Foundation
35823gives unlimited permission to copy, distribute and modify it."
35824
35825ac_pwd='$ac_pwd'
35826srcdir='$srcdir'
35827INSTALL='$INSTALL'
35828MKDIR_P='$MKDIR_P'
35829AWK='$AWK'
35830test -n "\$AWK" || AWK=awk
35831_ACEOF
35832
35833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35834# The default lists apply if the user does not specify any file.
35835ac_need_defaults=:
35836while test $# != 0
35837do
35838  case $1 in
35839  --*=?*)
35840    ac_option=`expr "X$1" : 'X\([^=]*\)='`
35841    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
35842    ac_shift=:
35843    ;;
35844  --*=)
35845    ac_option=`expr "X$1" : 'X\([^=]*\)='`
35846    ac_optarg=
35847    ac_shift=:
35848    ;;
35849  *)
35850    ac_option=$1
35851    ac_optarg=$2
35852    ac_shift=shift
35853    ;;
35854  esac
35855
35856  case $ac_option in
35857  # Handling of the options.
35858  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
35859    ac_cs_recheck=: ;;
35860  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
35861    printf "%s\n" "$ac_cs_version"; exit ;;
35862  --config | --confi | --conf | --con | --co | --c )
35863    printf "%s\n" "$ac_cs_config"; exit ;;
35864  --debug | --debu | --deb | --de | --d | -d )
35865    debug=: ;;
35866  --file | --fil | --fi | --f )
35867    $ac_shift
35868    case $ac_optarg in
35869    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
35870    '') as_fn_error $? "missing file argument" ;;
35871    esac
35872    as_fn_append CONFIG_FILES " '$ac_optarg'"
35873    ac_need_defaults=false;;
35874  --header | --heade | --head | --hea )
35875    $ac_shift
35876    case $ac_optarg in
35877    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
35878    esac
35879    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
35880    ac_need_defaults=false;;
35881  --he | --h)
35882    # Conflict between --help and --header
35883    as_fn_error $? "ambiguous option: \`$1'
35884Try \`$0 --help' for more information.";;
35885  --help | --hel | -h )
35886    printf "%s\n" "$ac_cs_usage"; exit ;;
35887  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
35888  | -silent | --silent | --silen | --sile | --sil | --si | --s)
35889    ac_cs_silent=: ;;
35890
35891  # This is an error.
35892  -*) as_fn_error $? "unrecognized option: \`$1'
35893Try \`$0 --help' for more information." ;;
35894
35895  *) as_fn_append ac_config_targets " $1"
35896     ac_need_defaults=false ;;
35897
35898  esac
35899  shift
35900done
35901
35902ac_configure_extra_args=
35903
35904if $ac_cs_silent; then
35905  exec 6>/dev/null
35906  ac_configure_extra_args="$ac_configure_extra_args --silent"
35907fi
35908
35909_ACEOF
35910cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35911if \$ac_cs_recheck; then
35912  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
35913  shift
35914  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
35915  CONFIG_SHELL='$SHELL'
35916  export CONFIG_SHELL
35917  exec "\$@"
35918fi
35919
35920_ACEOF
35921cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35922exec 5>>config.log
35923{
35924  echo
35925  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
35926## Running $as_me. ##
35927_ASBOX
35928  printf "%s\n" "$ac_log"
35929} >&5
35930
35931_ACEOF
35932cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35933#
35934# INIT-COMMANDS
35935#
35936AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
35937
35938
35939# The HP-UX ksh and POSIX shell print the target directory to stdout
35940# if CDPATH is set.
35941(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
35942
35943sed_quote_subst='$sed_quote_subst'
35944double_quote_subst='$double_quote_subst'
35945delay_variable_subst='$delay_variable_subst'
35946macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
35947macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
35948enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
35949enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
35950pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
35951enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
35952shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
35953SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
35954ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
35955PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
35956host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
35957host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
35958host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
35959build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
35960build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
35961build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
35962SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
35963Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
35964GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
35965EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
35966FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
35967LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
35968NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
35969LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
35970max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
35971ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
35972exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
35973lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
35974lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
35975lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
35976lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
35977lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
35978reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
35979reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
35980OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
35981deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
35982file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
35983file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
35984want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
35985DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
35986sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
35987AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
35988AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
35989archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
35990STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
35991RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
35992old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
35993old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
35994old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
35995lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
35996CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
35997CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
35998compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
35999GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
36000lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
36001lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
36002lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
36003lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
36004lt_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"`'
36005lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
36006nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
36007lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
36008lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
36009objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
36010MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
36011lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
36012lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
36013lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
36014lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
36015lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
36016need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
36017MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
36018DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
36019NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
36020LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
36021OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
36022OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
36023libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
36024shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
36025extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
36026archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
36027enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
36028export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
36029whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
36030compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
36031old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
36032old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
36033archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
36034archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
36035module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
36036module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
36037with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
36038allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
36039no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
36040hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
36041hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
36042hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
36043hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
36044hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
36045hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
36046hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
36047inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
36048link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
36049always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
36050export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
36051exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
36052include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
36053prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
36054postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
36055file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
36056variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
36057need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
36058need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
36059version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
36060runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
36061shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
36062shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
36063libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
36064library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
36065soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
36066install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
36067postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
36068postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
36069finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
36070finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
36071hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
36072sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
36073configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
36074configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
36075hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
36076enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
36077enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
36078enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
36079old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
36080striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
36081
36082LTCC='$LTCC'
36083LTCFLAGS='$LTCFLAGS'
36084compiler='$compiler_DEFAULT'
36085
36086# A function that is used when there is no print builtin or printf.
36087func_fallback_echo ()
36088{
36089  eval 'cat <<_LTECHO_EOF
36090\$1
36091_LTECHO_EOF'
36092}
36093
36094# Quote evaled strings.
36095for var in SHELL \
36096ECHO \
36097PATH_SEPARATOR \
36098SED \
36099GREP \
36100EGREP \
36101FGREP \
36102LD \
36103NM \
36104LN_S \
36105lt_SP2NL \
36106lt_NL2SP \
36107reload_flag \
36108OBJDUMP \
36109deplibs_check_method \
36110file_magic_cmd \
36111file_magic_glob \
36112want_nocaseglob \
36113DLLTOOL \
36114sharedlib_from_linklib_cmd \
36115AR \
36116AR_FLAGS \
36117archiver_list_spec \
36118STRIP \
36119RANLIB \
36120CC \
36121CFLAGS \
36122compiler \
36123lt_cv_sys_global_symbol_pipe \
36124lt_cv_sys_global_symbol_to_cdecl \
36125lt_cv_sys_global_symbol_to_import \
36126lt_cv_sys_global_symbol_to_c_name_address \
36127lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
36128lt_cv_nm_interface \
36129nm_file_list_spec \
36130lt_cv_truncate_bin \
36131lt_prog_compiler_no_builtin_flag \
36132lt_prog_compiler_pic \
36133lt_prog_compiler_wl \
36134lt_prog_compiler_static \
36135lt_cv_prog_compiler_c_o \
36136need_locks \
36137MANIFEST_TOOL \
36138DSYMUTIL \
36139NMEDIT \
36140LIPO \
36141OTOOL \
36142OTOOL64 \
36143shrext_cmds \
36144export_dynamic_flag_spec \
36145whole_archive_flag_spec \
36146compiler_needs_object \
36147with_gnu_ld \
36148allow_undefined_flag \
36149no_undefined_flag \
36150hardcode_libdir_flag_spec \
36151hardcode_libdir_separator \
36152exclude_expsyms \
36153include_expsyms \
36154file_list_spec \
36155variables_saved_for_relink \
36156libname_spec \
36157library_names_spec \
36158soname_spec \
36159install_override_mode \
36160finish_eval \
36161old_striplib \
36162striplib; do
36163    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
36164    *[\\\\\\\`\\"\\\$]*)
36165      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
36166      ;;
36167    *)
36168      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
36169      ;;
36170    esac
36171done
36172
36173# Double-quote double-evaled strings.
36174for var in reload_cmds \
36175old_postinstall_cmds \
36176old_postuninstall_cmds \
36177old_archive_cmds \
36178extract_expsyms_cmds \
36179old_archive_from_new_cmds \
36180old_archive_from_expsyms_cmds \
36181archive_cmds \
36182archive_expsym_cmds \
36183module_cmds \
36184module_expsym_cmds \
36185export_symbols_cmds \
36186prelink_cmds \
36187postlink_cmds \
36188postinstall_cmds \
36189postuninstall_cmds \
36190finish_cmds \
36191sys_lib_search_path_spec \
36192configure_time_dlsearch_path \
36193configure_time_lt_sys_library_path; do
36194    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
36195    *[\\\\\\\`\\"\\\$]*)
36196      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
36197      ;;
36198    *)
36199      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
36200      ;;
36201    esac
36202done
36203
36204ac_aux_dir='$ac_aux_dir'
36205
36206# See if we are running on zsh, and set the options that allow our
36207# commands through without removal of \ escapes INIT.
36208if test -n "\${ZSH_VERSION+set}"; then
36209   setopt NO_GLOB_SUBST
36210fi
36211
36212
36213    PACKAGE='$PACKAGE'
36214    VERSION='$VERSION'
36215    RM='$RM'
36216    ofile='$ofile'
36217
36218
36219
36220
36221_ACEOF
36222
36223cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36224
36225# Handling of arguments.
36226for ac_config_target in $ac_config_targets
36227do
36228  case $ac_config_target in
36229    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
36230    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
36231    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
36232    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
36233    "adjtimed/Makefile") CONFIG_FILES="$CONFIG_FILES adjtimed/Makefile" ;;
36234    "clockstuff/Makefile") CONFIG_FILES="$CONFIG_FILES clockstuff/Makefile" ;;
36235    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
36236    "include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES include/isc/Makefile" ;;
36237    "kernel/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;;
36238    "kernel/sys/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/sys/Makefile" ;;
36239    "libntp/Makefile") CONFIG_FILES="$CONFIG_FILES libntp/Makefile" ;;
36240    "libparse/Makefile") CONFIG_FILES="$CONFIG_FILES libparse/Makefile" ;;
36241    "ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpd/Makefile" ;;
36242    "ntpd/complete.conf") CONFIG_FILES="$CONFIG_FILES ntpd/complete.conf" ;;
36243    "ntpdate/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdate/Makefile" ;;
36244    "ntpdc/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdc/Makefile" ;;
36245    "ntpdc/nl.pl") CONFIG_FILES="$CONFIG_FILES ntpdc/nl.pl" ;;
36246    "ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES ntpq/Makefile" ;;
36247    "ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
36248    "parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
36249    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
36250    "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
36251    "scripts/build/genAuthors") CONFIG_FILES="$CONFIG_FILES scripts/build/genAuthors" ;;
36252    "scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
36253    "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
36254    "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
36255    "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
36256    "scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
36257    "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
36258    "scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
36259    "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
36260    "scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
36261    "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
36262    "scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
36263    "scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
36264    "scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
36265    "scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
36266    "scripts/update-leap/update-leap") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/update-leap" ;;
36267    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
36268    "tests/bug-2803/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bug-2803/Makefile" ;;
36269    "tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
36270    "tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
36271    "tests/ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpq/Makefile" ;;
36272    "tests/sandbox/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sandbox/Makefile" ;;
36273    "tests/sec-2853/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sec-2853/Makefile" ;;
36274    "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
36275
36276  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
36277  esac
36278done
36279
36280
36281# If the user did not use the arguments to specify the items to instantiate,
36282# then the envvar interface is used.  Set only those that are not.
36283# We use the long form for the default assignment because of an extremely
36284# bizarre bug on SunOS 4.1.3.
36285if $ac_need_defaults; then
36286  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
36287  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
36288  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
36289fi
36290
36291# Have a temporary directory for convenience.  Make it in the build tree
36292# simply because there is no reason against having it here, and in addition,
36293# creating and moving files from /tmp can sometimes cause problems.
36294# Hook for its removal unless debugging.
36295# Note that there is a small window in which the directory will not be cleaned:
36296# after its creation but before its name has been assigned to `$tmp'.
36297$debug ||
36298{
36299  tmp= ac_tmp=
36300  trap 'exit_status=$?
36301  : "${ac_tmp:=$tmp}"
36302  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
36303' 0
36304  trap 'as_fn_exit 1' 1 2 13 15
36305}
36306# Create a (secure) tmp directory for tmp files.
36307
36308{
36309  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
36310  test -d "$tmp"
36311}  ||
36312{
36313  tmp=./conf$$-$RANDOM
36314  (umask 077 && mkdir "$tmp")
36315} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
36316ac_tmp=$tmp
36317
36318# Set up the scripts for CONFIG_FILES section.
36319# No need to generate them if there are no CONFIG_FILES.
36320# This happens for instance with `./config.status config.h'.
36321if test -n "$CONFIG_FILES"; then
36322
36323if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
36324  ac_cs_awk_getline=:
36325  ac_cs_awk_pipe_init=
36326  ac_cs_awk_read_file='
36327      while ((getline aline < (F[key])) > 0)
36328	print(aline)
36329      close(F[key])'
36330  ac_cs_awk_pipe_fini=
36331else
36332  ac_cs_awk_getline=false
36333  ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
36334  ac_cs_awk_read_file='
36335      print "|#_!!_#|"
36336      print "cat " F[key] " &&"
36337      '$ac_cs_awk_pipe_init
36338  # The final `:' finishes the AND list.
36339  ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
36340fi
36341ac_cr=`echo X | tr X '\015'`
36342# On cygwin, bash can eat \r inside `` if the user requested igncr.
36343# But we know of no other shell where ac_cr would be empty at this
36344# point, so we can use a bashism as a fallback.
36345if test "x$ac_cr" = x; then
36346  eval ac_cr=\$\'\\r\'
36347fi
36348ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
36349if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
36350  ac_cs_awk_cr='\\r'
36351else
36352  ac_cs_awk_cr=$ac_cr
36353fi
36354
36355echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
36356_ACEOF
36357
36358# Create commands to substitute file output variables.
36359{
36360  echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
36361  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
36362  echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
36363  echo "_ACAWK" &&
36364  echo "_ACEOF"
36365} >conf$$files.sh &&
36366. ./conf$$files.sh ||
36367  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36368rm -f conf$$files.sh
36369
36370{
36371  echo "cat >conf$$subs.awk <<_ACEOF" &&
36372  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
36373  echo "_ACEOF"
36374} >conf$$subs.sh ||
36375  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36376ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
36377ac_delim='%!_!# '
36378for ac_last_try in false false false false false :; do
36379  . ./conf$$subs.sh ||
36380    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36381
36382  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36383  if test $ac_delim_n = $ac_delim_num; then
36384    break
36385  elif $ac_last_try; then
36386    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36387  else
36388    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36389  fi
36390done
36391rm -f conf$$subs.sh
36392
36393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36394cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36395_ACEOF
36396sed -n '
36397h
36398s/^/S["/; s/!.*/"]=/
36399p
36400g
36401s/^[^!]*!//
36402:repl
36403t repl
36404s/'"$ac_delim"'$//
36405t delim
36406:nl
36407h
36408s/\(.\{148\}\)..*/\1/
36409t more1
36410s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36411p
36412n
36413b repl
36414:more1
36415s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36416p
36417g
36418s/.\{148\}//
36419t nl
36420:delim
36421h
36422s/\(.\{148\}\)..*/\1/
36423t more2
36424s/["\\]/\\&/g; s/^/"/; s/$/"/
36425p
36426b
36427:more2
36428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36429p
36430g
36431s/.\{148\}//
36432t delim
36433' <conf$$subs.awk | sed '
36434/^[^""]/{
36435  N
36436  s/\n//
36437}
36438' >>$CONFIG_STATUS || ac_write_fail=1
36439rm -f conf$$subs.awk
36440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36441_ACAWK
36442cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36443  for (key in S) S_is_set[key] = 1
36444  FS = ""
36445  \$ac_cs_awk_pipe_init
36446}
36447{
36448  line = $ 0
36449  nfields = split(line, field, "@")
36450  substed = 0
36451  len = length(field[1])
36452  for (i = 2; i < nfields; i++) {
36453    key = field[i]
36454    keylen = length(key)
36455    if (S_is_set[key]) {
36456      value = S[key]
36457      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36458      len += length(value) + length(field[++i])
36459      substed = 1
36460    } else
36461      len += 1 + keylen
36462  }
36463  if (nfields == 3 && !substed) {
36464    key = field[2]
36465    if (F[key] != "" && line ~ /^[	 ]*@.*@[	 ]*$/) {
36466      \$ac_cs_awk_read_file
36467      next
36468    }
36469  }
36470  print line
36471}
36472\$ac_cs_awk_pipe_fini
36473_ACAWK
36474_ACEOF
36475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36476if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36477  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36478else
36479  cat
36480fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36481  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36482_ACEOF
36483
36484# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36485# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36486# trailing colons and then remove the whole line if VPATH becomes empty
36487# (actually we leave an empty line to preserve line numbers).
36488if test "x$srcdir" = x.; then
36489  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36490h
36491s///
36492s/^/:/
36493s/[	 ]*$/:/
36494s/:\$(srcdir):/:/g
36495s/:\${srcdir}:/:/g
36496s/:@srcdir@:/:/g
36497s/^:*//
36498s/:*$//
36499x
36500s/\(=[	 ]*\).*/\1/
36501G
36502s/\n//
36503s/^[^=]*=[	 ]*$//
36504}'
36505fi
36506
36507cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36508fi # test -n "$CONFIG_FILES"
36509
36510# Set up the scripts for CONFIG_HEADERS section.
36511# No need to generate them if there are no CONFIG_HEADERS.
36512# This happens for instance with `./config.status Makefile'.
36513if test -n "$CONFIG_HEADERS"; then
36514cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36515BEGIN {
36516_ACEOF
36517
36518# Transform confdefs.h into an awk script `defines.awk', embedded as
36519# here-document in config.status, that substitutes the proper values into
36520# config.h.in to produce config.h.
36521
36522# Create a delimiter string that does not exist in confdefs.h, to ease
36523# handling of long lines.
36524ac_delim='%!_!# '
36525for ac_last_try in false false :; do
36526  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36527  if test -z "$ac_tt"; then
36528    break
36529  elif $ac_last_try; then
36530    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36531  else
36532    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36533  fi
36534done
36535
36536# For the awk script, D is an array of macro values keyed by name,
36537# likewise P contains macro parameters if any.  Preserve backslash
36538# newline sequences.
36539
36540ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36541sed -n '
36542s/.\{148\}/&'"$ac_delim"'/g
36543t rset
36544:rset
36545s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36546t def
36547d
36548:def
36549s/\\$//
36550t bsnl
36551s/["\\]/\\&/g
36552s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36553D["\1"]=" \3"/p
36554s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36555d
36556:bsnl
36557s/["\\]/\\&/g
36558s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36559D["\1"]=" \3\\\\\\n"\\/p
36560t cont
36561s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36562t cont
36563d
36564:cont
36565n
36566s/.\{148\}/&'"$ac_delim"'/g
36567t clear
36568:clear
36569s/\\$//
36570t bsnlc
36571s/["\\]/\\&/g; s/^/"/; s/$/"/p
36572d
36573:bsnlc
36574s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
36575b cont
36576' <confdefs.h | sed '
36577s/'"$ac_delim"'/"\\\
36578"/g' >>$CONFIG_STATUS || ac_write_fail=1
36579
36580cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36581  for (key in D) D_is_set[key] = 1
36582  FS = ""
36583}
36584/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
36585  line = \$ 0
36586  split(line, arg, " ")
36587  if (arg[1] == "#") {
36588    defundef = arg[2]
36589    mac1 = arg[3]
36590  } else {
36591    defundef = substr(arg[1], 2)
36592    mac1 = arg[2]
36593  }
36594  split(mac1, mac2, "(") #)
36595  macro = mac2[1]
36596  prefix = substr(line, 1, index(line, defundef) - 1)
36597  if (D_is_set[macro]) {
36598    # Preserve the white space surrounding the "#".
36599    print prefix "define", macro P[macro] D[macro]
36600    next
36601  } else {
36602    # Replace #undef with comments.  This is necessary, for example,
36603    # in the case of _POSIX_SOURCE, which is predefined and required
36604    # on some systems where configure will not decide to define it.
36605    if (defundef == "undef") {
36606      print "/*", prefix defundef, macro, "*/"
36607      next
36608    }
36609  }
36610}
36611{ print }
36612_ACAWK
36613_ACEOF
36614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36615  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
36616fi # test -n "$CONFIG_HEADERS"
36617
36618
36619eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
36620shift
36621for ac_tag
36622do
36623  case $ac_tag in
36624  :[FHLC]) ac_mode=$ac_tag; continue;;
36625  esac
36626  case $ac_mode$ac_tag in
36627  :[FHL]*:*);;
36628  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
36629  :[FH]-) ac_tag=-:-;;
36630  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
36631  esac
36632  ac_save_IFS=$IFS
36633  IFS=:
36634  set x $ac_tag
36635  IFS=$ac_save_IFS
36636  shift
36637  ac_file=$1
36638  shift
36639
36640  case $ac_mode in
36641  :L) ac_source=$1;;
36642  :[FH])
36643    ac_file_inputs=
36644    for ac_f
36645    do
36646      case $ac_f in
36647      -) ac_f="$ac_tmp/stdin";;
36648      *) # Look for the file first in the build tree, then in the source tree
36649	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
36650	 # because $ac_f cannot contain `:'.
36651	 test -f "$ac_f" ||
36652	   case $ac_f in
36653	   [\\/$]*) false;;
36654	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
36655	   esac ||
36656	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
36657      esac
36658      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
36659      as_fn_append ac_file_inputs " '$ac_f'"
36660    done
36661
36662    # Let's still pretend it is `configure' which instantiates (i.e., don't
36663    # use $as_me), people would be surprised to read:
36664    #    /* config.h.  Generated by config.status.  */
36665    configure_input='Generated from '`
36666	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
36667	`' by configure.'
36668    if test x"$ac_file" != x-; then
36669      configure_input="$ac_file.  $configure_input"
36670      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
36671printf "%s\n" "$as_me: creating $ac_file" >&6;}
36672    fi
36673    # Neutralize special characters interpreted by sed in replacement strings.
36674    case $configure_input in #(
36675    *\&* | *\|* | *\\* )
36676       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
36677       sed 's/[\\\\&|]/\\\\&/g'`;; #(
36678    *) ac_sed_conf_input=$configure_input;;
36679    esac
36680
36681    case $ac_tag in
36682    *:-:* | *:-) cat >"$ac_tmp/stdin" \
36683      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
36684    esac
36685    ;;
36686  esac
36687
36688  ac_dir=`$as_dirname -- "$ac_file" ||
36689$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36690	 X"$ac_file" : 'X\(//\)[^/]' \| \
36691	 X"$ac_file" : 'X\(//\)$' \| \
36692	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
36693printf "%s\n" X"$ac_file" |
36694    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36695	    s//\1/
36696	    q
36697	  }
36698	  /^X\(\/\/\)[^/].*/{
36699	    s//\1/
36700	    q
36701	  }
36702	  /^X\(\/\/\)$/{
36703	    s//\1/
36704	    q
36705	  }
36706	  /^X\(\/\).*/{
36707	    s//\1/
36708	    q
36709	  }
36710	  s/.*/./; q'`
36711  as_dir="$ac_dir"; as_fn_mkdir_p
36712  ac_builddir=.
36713
36714case "$ac_dir" in
36715.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
36716*)
36717  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
36718  # A ".." for each directory in $ac_dir_suffix.
36719  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
36720  case $ac_top_builddir_sub in
36721  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
36722  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
36723  esac ;;
36724esac
36725ac_abs_top_builddir=$ac_pwd
36726ac_abs_builddir=$ac_pwd$ac_dir_suffix
36727# for backward compatibility:
36728ac_top_builddir=$ac_top_build_prefix
36729
36730case $srcdir in
36731  .)  # We are building in place.
36732    ac_srcdir=.
36733    ac_top_srcdir=$ac_top_builddir_sub
36734    ac_abs_top_srcdir=$ac_pwd ;;
36735  [\\/]* | ?:[\\/]* )  # Absolute name.
36736    ac_srcdir=$srcdir$ac_dir_suffix;
36737    ac_top_srcdir=$srcdir
36738    ac_abs_top_srcdir=$srcdir ;;
36739  *) # Relative name.
36740    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
36741    ac_top_srcdir=$ac_top_build_prefix$srcdir
36742    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
36743esac
36744ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
36745
36746
36747  case $ac_mode in
36748  :F)
36749  #
36750  # CONFIG_FILE
36751  #
36752
36753  case $INSTALL in
36754  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
36755  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
36756  esac
36757  ac_MKDIR_P=$MKDIR_P
36758  case $MKDIR_P in
36759  [\\/$]* | ?:[\\/]* ) ;;
36760  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
36761  esac
36762_ACEOF
36763
36764cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36765# If the template does not know about datarootdir, expand it.
36766# FIXME: This hack should be removed a few years after 2.60.
36767ac_datarootdir_hack=; ac_datarootdir_seen=
36768ac_sed_dataroot='
36769/datarootdir/ {
36770  p
36771  q
36772}
36773/@datadir@/p
36774/@docdir@/p
36775/@infodir@/p
36776/@localedir@/p
36777/@mandir@/p'
36778case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
36779*datarootdir*) ac_datarootdir_seen=yes;;
36780*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
36781  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
36782printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
36783_ACEOF
36784cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36785  ac_datarootdir_hack='
36786  s&@datadir@&$datadir&g
36787  s&@docdir@&$docdir&g
36788  s&@infodir@&$infodir&g
36789  s&@localedir@&$localedir&g
36790  s&@mandir@&$mandir&g
36791  s&\\\${datarootdir}&$datarootdir&g' ;;
36792esac
36793_ACEOF
36794
36795# Neutralize VPATH when `$srcdir' = `.'.
36796# Shell code in configure.ac might set extrasub.
36797# FIXME: do we really want to maintain this feature?
36798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36799ac_sed_extra="$ac_vpsub
36800$extrasub
36801_ACEOF
36802cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36803:t
36804/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
36805s|@configure_input@|$ac_sed_conf_input|;t t
36806s&@top_builddir@&$ac_top_builddir_sub&;t t
36807s&@top_build_prefix@&$ac_top_build_prefix&;t t
36808s&@srcdir@&$ac_srcdir&;t t
36809s&@abs_srcdir@&$ac_abs_srcdir&;t t
36810s&@top_srcdir@&$ac_top_srcdir&;t t
36811s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
36812s&@builddir@&$ac_builddir&;t t
36813s&@abs_builddir@&$ac_abs_builddir&;t t
36814s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
36815s&@INSTALL@&$ac_INSTALL&;t t
36816s&@MKDIR_P@&$ac_MKDIR_P&;t t
36817$ac_datarootdir_hack
36818"
36819eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
36820if $ac_cs_awk_getline; then
36821  $AWK -f "$ac_tmp/subs.awk"
36822else
36823  $AWK -f "$ac_tmp/subs.awk" | $SHELL
36824fi \
36825  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36826
36827test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
36828  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
36829  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
36830      "$ac_tmp/out"`; test -z "$ac_out"; } &&
36831  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36832which seems to be undefined.  Please make sure it is defined" >&5
36833printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36834which seems to be undefined.  Please make sure it is defined" >&2;}
36835
36836  rm -f "$ac_tmp/stdin"
36837  case $ac_file in
36838  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
36839  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
36840  esac \
36841  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36842 ;;
36843  :H)
36844  #
36845  # CONFIG_HEADER
36846  #
36847  if test x"$ac_file" != x-; then
36848    {
36849      printf "%s\n" "/* $configure_input  */" >&1 \
36850      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
36851    } >"$ac_tmp/config.h" \
36852      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36853    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
36854      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
36855printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
36856    else
36857      rm -f "$ac_file"
36858      mv "$ac_tmp/config.h" "$ac_file" \
36859	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
36860    fi
36861  else
36862    printf "%s\n" "/* $configure_input  */" >&1 \
36863      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
36864      || as_fn_error $? "could not create -" "$LINENO" 5
36865  fi
36866# Compute "$ac_file"'s index in $config_headers.
36867_am_arg="$ac_file"
36868_am_stamp_count=1
36869for _am_header in $config_headers :; do
36870  case $_am_header in
36871    $_am_arg | $_am_arg:* )
36872      break ;;
36873    * )
36874      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
36875  esac
36876done
36877echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
36878$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36879	 X"$_am_arg" : 'X\(//\)[^/]' \| \
36880	 X"$_am_arg" : 'X\(//\)$' \| \
36881	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
36882printf "%s\n" X"$_am_arg" |
36883    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36884	    s//\1/
36885	    q
36886	  }
36887	  /^X\(\/\/\)[^/].*/{
36888	    s//\1/
36889	    q
36890	  }
36891	  /^X\(\/\/\)$/{
36892	    s//\1/
36893	    q
36894	  }
36895	  /^X\(\/\).*/{
36896	    s//\1/
36897	    q
36898	  }
36899	  s/.*/./; q'`/stamp-h$_am_stamp_count
36900 ;;
36901
36902  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
36903printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
36904 ;;
36905  esac
36906
36907
36908  case $ac_file$ac_mode in
36909    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
36910  # Older Autoconf quotes --file arguments for eval, but not when files
36911  # are listed without --file.  Let's play safe and only enable the eval
36912  # if we detect the quoting.
36913  # TODO: see whether this extra hack can be removed once we start
36914  # requiring Autoconf 2.70 or later.
36915  case $CONFIG_FILES in #(
36916  *\'*) :
36917    eval set x "$CONFIG_FILES" ;; #(
36918  *) :
36919    set x $CONFIG_FILES ;; #(
36920  *) :
36921     ;;
36922esac
36923  shift
36924  # Used to flag and report bootstrapping failures.
36925  am_rc=0
36926  for am_mf
36927  do
36928    # Strip MF so we end up with the name of the file.
36929    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
36930    # Check whether this is an Automake generated Makefile which includes
36931    # dependency-tracking related rules and includes.
36932    # Grep'ing the whole file directly is not great: AIX grep has a line
36933    # limit of 2048, but all sed's we know have understand at least 4000.
36934    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
36935      || continue
36936    am_dirpart=`$as_dirname -- "$am_mf" ||
36937$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36938	 X"$am_mf" : 'X\(//\)[^/]' \| \
36939	 X"$am_mf" : 'X\(//\)$' \| \
36940	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
36941printf "%s\n" X"$am_mf" |
36942    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36943	    s//\1/
36944	    q
36945	  }
36946	  /^X\(\/\/\)[^/].*/{
36947	    s//\1/
36948	    q
36949	  }
36950	  /^X\(\/\/\)$/{
36951	    s//\1/
36952	    q
36953	  }
36954	  /^X\(\/\).*/{
36955	    s//\1/
36956	    q
36957	  }
36958	  s/.*/./; q'`
36959    am_filepart=`$as_basename -- "$am_mf" ||
36960$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
36961	 X"$am_mf" : 'X\(//\)$' \| \
36962	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
36963printf "%s\n" X/"$am_mf" |
36964    sed '/^.*\/\([^/][^/]*\)\/*$/{
36965	    s//\1/
36966	    q
36967	  }
36968	  /^X\/\(\/\/\)$/{
36969	    s//\1/
36970	    q
36971	  }
36972	  /^X\/\(\/\).*/{
36973	    s//\1/
36974	    q
36975	  }
36976	  s/.*/./; q'`
36977    { echo "$as_me:$LINENO: cd "$am_dirpart" \
36978      && sed -e '/# am--include-marker/d' "$am_filepart" \
36979        | $MAKE -f - am--depfiles" >&5
36980   (cd "$am_dirpart" \
36981      && sed -e '/# am--include-marker/d' "$am_filepart" \
36982        | $MAKE -f - am--depfiles) >&5 2>&5
36983   ac_status=$?
36984   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36985   (exit $ac_status); } || am_rc=$?
36986  done
36987  if test $am_rc -ne 0; then
36988    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36989printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
36990as_fn_error $? "Something went wrong bootstrapping makefile fragments
36991    for automatic dependency tracking.  If GNU make was not used, consider
36992    re-running the configure script with MAKE=\"gmake\" (or whatever is
36993    necessary).  You can also try re-running configure with the
36994    '--disable-dependency-tracking' option to at least be able to build
36995    the package (albeit without support for automatic dependency tracking).
36996See \`config.log' for more details" "$LINENO" 5; }
36997  fi
36998  { am_dirpart=; unset am_dirpart;}
36999  { am_filepart=; unset am_filepart;}
37000  { am_mf=; unset am_mf;}
37001  { am_rc=; unset am_rc;}
37002  rm -f conftest-deps.mk
37003}
37004 ;;
37005    "libtool":C)
37006
37007    # See if we are running on zsh, and set the options that allow our
37008    # commands through without removal of \ escapes.
37009    if test -n "${ZSH_VERSION+set}"; then
37010      setopt NO_GLOB_SUBST
37011    fi
37012
37013    cfgfile=${ofile}T
37014    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
37015    $RM "$cfgfile"
37016
37017    cat <<_LT_EOF >> "$cfgfile"
37018#! $SHELL
37019# Generated automatically by $as_me ($PACKAGE) $VERSION
37020# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
37021# NOTE: Changes made to this file will be lost: look at ltmain.sh.
37022
37023# Provide generalized library-building support services.
37024# Written by Gordon Matzigkeit, 1996
37025
37026# Copyright (C) 2014 Free Software Foundation, Inc.
37027# This is free software; see the source for copying conditions.  There is NO
37028# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
37029
37030# GNU Libtool is free software; you can redistribute it and/or modify
37031# it under the terms of the GNU General Public License as published by
37032# the Free Software Foundation; either version 2 of of the License, or
37033# (at your option) any later version.
37034#
37035# As a special exception to the GNU General Public License, if you
37036# distribute this file as part of a program or library that is built
37037# using GNU Libtool, you may include this file under the  same
37038# distribution terms that you use for the rest of that program.
37039#
37040# GNU Libtool is distributed in the hope that it will be useful, but
37041# WITHOUT ANY WARRANTY; without even the implied warranty of
37042# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
37043# GNU General Public License for more details.
37044#
37045# You should have received a copy of the GNU General Public License
37046# along with this program.  If not, see <http://www.gnu.org/licenses/>.
37047
37048
37049# The names of the tagged configurations supported by this script.
37050available_tags=''
37051
37052# Configured defaults for sys_lib_dlsearch_path munging.
37053: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
37054
37055# ### BEGIN LIBTOOL CONFIG
37056
37057# Which release of libtool.m4 was used?
37058macro_version=$macro_version
37059macro_revision=$macro_revision
37060
37061# Whether or not to build shared libraries.
37062build_libtool_libs=$enable_shared
37063
37064# Whether or not to build static libraries.
37065build_old_libs=$enable_static
37066
37067# What type of objects to build.
37068pic_mode=$pic_mode
37069
37070# Whether or not to optimize for fast installation.
37071fast_install=$enable_fast_install
37072
37073# Shared archive member basename,for filename based shared library versioning on AIX.
37074shared_archive_member_spec=$shared_archive_member_spec
37075
37076# Shell to use when invoking shell scripts.
37077SHELL=$lt_SHELL
37078
37079# An echo program that protects backslashes.
37080ECHO=$lt_ECHO
37081
37082# The PATH separator for the build system.
37083PATH_SEPARATOR=$lt_PATH_SEPARATOR
37084
37085# The host system.
37086host_alias=$host_alias
37087host=$host
37088host_os=$host_os
37089
37090# The build system.
37091build_alias=$build_alias
37092build=$build
37093build_os=$build_os
37094
37095# A sed program that does not truncate output.
37096SED=$lt_SED
37097
37098# Sed that helps us avoid accidentally triggering echo(1) options like -n.
37099Xsed="\$SED -e 1s/^X//"
37100
37101# A grep program that handles long lines.
37102GREP=$lt_GREP
37103
37104# An ERE matcher.
37105EGREP=$lt_EGREP
37106
37107# A literal string matcher.
37108FGREP=$lt_FGREP
37109
37110# A BSD- or MS-compatible name lister.
37111NM=$lt_NM
37112
37113# Whether we need soft or hard links.
37114LN_S=$lt_LN_S
37115
37116# What is the maximum length of a command?
37117max_cmd_len=$max_cmd_len
37118
37119# Object file suffix (normally "o").
37120objext=$ac_objext
37121
37122# Executable file suffix (normally "").
37123exeext=$exeext
37124
37125# whether the shell understands "unset".
37126lt_unset=$lt_unset
37127
37128# turn spaces into newlines.
37129SP2NL=$lt_lt_SP2NL
37130
37131# turn newlines into spaces.
37132NL2SP=$lt_lt_NL2SP
37133
37134# convert \$build file names to \$host format.
37135to_host_file_cmd=$lt_cv_to_host_file_cmd
37136
37137# convert \$build files to toolchain format.
37138to_tool_file_cmd=$lt_cv_to_tool_file_cmd
37139
37140# An object symbol dumper.
37141OBJDUMP=$lt_OBJDUMP
37142
37143# Method to check whether dependent libraries are shared objects.
37144deplibs_check_method=$lt_deplibs_check_method
37145
37146# Command to use when deplibs_check_method = "file_magic".
37147file_magic_cmd=$lt_file_magic_cmd
37148
37149# How to find potential files when deplibs_check_method = "file_magic".
37150file_magic_glob=$lt_file_magic_glob
37151
37152# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
37153want_nocaseglob=$lt_want_nocaseglob
37154
37155# DLL creation program.
37156DLLTOOL=$lt_DLLTOOL
37157
37158# Command to associate shared and link libraries.
37159sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
37160
37161# The archiver.
37162AR=$lt_AR
37163
37164# Flags to create an archive.
37165AR_FLAGS=$lt_AR_FLAGS
37166
37167# How to feed a file listing to the archiver.
37168archiver_list_spec=$lt_archiver_list_spec
37169
37170# A symbol stripping program.
37171STRIP=$lt_STRIP
37172
37173# Commands used to install an old-style archive.
37174RANLIB=$lt_RANLIB
37175old_postinstall_cmds=$lt_old_postinstall_cmds
37176old_postuninstall_cmds=$lt_old_postuninstall_cmds
37177
37178# Whether to use a lock for old archive extraction.
37179lock_old_archive_extraction=$lock_old_archive_extraction
37180
37181# A C compiler.
37182LTCC=$lt_CC
37183
37184# LTCC compiler flags.
37185LTCFLAGS=$lt_CFLAGS
37186
37187# Take the output of nm and produce a listing of raw symbols and C names.
37188global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
37189
37190# Transform the output of nm in a proper C declaration.
37191global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
37192
37193# Transform the output of nm into a list of symbols to manually relocate.
37194global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
37195
37196# Transform the output of nm in a C name address pair.
37197global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
37198
37199# Transform the output of nm in a C name address pair when lib prefix is needed.
37200global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
37201
37202# The name lister interface.
37203nm_interface=$lt_lt_cv_nm_interface
37204
37205# Specify filename containing input files for \$NM.
37206nm_file_list_spec=$lt_nm_file_list_spec
37207
37208# The root where to search for dependent libraries,and where our libraries should be installed.
37209lt_sysroot=$lt_sysroot
37210
37211# Command to truncate a binary pipe.
37212lt_truncate_bin=$lt_lt_cv_truncate_bin
37213
37214# The name of the directory that contains temporary libtool files.
37215objdir=$objdir
37216
37217# Used to examine libraries when file_magic_cmd begins with "file".
37218MAGIC_CMD=$MAGIC_CMD
37219
37220# Must we lock files when doing compilation?
37221need_locks=$lt_need_locks
37222
37223# Manifest tool.
37224MANIFEST_TOOL=$lt_MANIFEST_TOOL
37225
37226# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
37227DSYMUTIL=$lt_DSYMUTIL
37228
37229# Tool to change global to local symbols on Mac OS X.
37230NMEDIT=$lt_NMEDIT
37231
37232# Tool to manipulate fat objects and archives on Mac OS X.
37233LIPO=$lt_LIPO
37234
37235# ldd/readelf like tool for Mach-O binaries on Mac OS X.
37236OTOOL=$lt_OTOOL
37237
37238# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
37239OTOOL64=$lt_OTOOL64
37240
37241# Old archive suffix (normally "a").
37242libext=$libext
37243
37244# Shared library suffix (normally ".so").
37245shrext_cmds=$lt_shrext_cmds
37246
37247# The commands to extract the exported symbol list from a shared archive.
37248extract_expsyms_cmds=$lt_extract_expsyms_cmds
37249
37250# Variables whose values should be saved in libtool wrapper scripts and
37251# restored at link time.
37252variables_saved_for_relink=$lt_variables_saved_for_relink
37253
37254# Do we need the "lib" prefix for modules?
37255need_lib_prefix=$need_lib_prefix
37256
37257# Do we need a version for libraries?
37258need_version=$need_version
37259
37260# Library versioning type.
37261version_type=$version_type
37262
37263# Shared library runtime path variable.
37264runpath_var=$runpath_var
37265
37266# Shared library path variable.
37267shlibpath_var=$shlibpath_var
37268
37269# Is shlibpath searched before the hard-coded library search path?
37270shlibpath_overrides_runpath=$shlibpath_overrides_runpath
37271
37272# Format of library name prefix.
37273libname_spec=$lt_libname_spec
37274
37275# List of archive names.  First name is the real one, the rest are links.
37276# The last name is the one that the linker finds with -lNAME
37277library_names_spec=$lt_library_names_spec
37278
37279# The coded name of the library, if different from the real name.
37280soname_spec=$lt_soname_spec
37281
37282# Permission mode override for installation of shared libraries.
37283install_override_mode=$lt_install_override_mode
37284
37285# Command to use after installation of a shared archive.
37286postinstall_cmds=$lt_postinstall_cmds
37287
37288# Command to use after uninstallation of a shared archive.
37289postuninstall_cmds=$lt_postuninstall_cmds
37290
37291# Commands used to finish a libtool library installation in a directory.
37292finish_cmds=$lt_finish_cmds
37293
37294# As "finish_cmds", except a single script fragment to be evaled but
37295# not shown.
37296finish_eval=$lt_finish_eval
37297
37298# Whether we should hardcode library paths into libraries.
37299hardcode_into_libs=$hardcode_into_libs
37300
37301# Compile-time system search path for libraries.
37302sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
37303
37304# Detected run-time system search path for libraries.
37305sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
37306
37307# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
37308configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
37309
37310# Whether dlopen is supported.
37311dlopen_support=$enable_dlopen
37312
37313# Whether dlopen of programs is supported.
37314dlopen_self=$enable_dlopen_self
37315
37316# Whether dlopen of statically linked programs is supported.
37317dlopen_self_static=$enable_dlopen_self_static
37318
37319# Commands to strip libraries.
37320old_striplib=$lt_old_striplib
37321striplib=$lt_striplib
37322
37323
37324# The linker used to build libraries.
37325LD=$lt_LD
37326
37327# How to create reloadable object files.
37328reload_flag=$lt_reload_flag
37329reload_cmds=$lt_reload_cmds
37330
37331# Commands used to build an old-style archive.
37332old_archive_cmds=$lt_old_archive_cmds
37333
37334# A language specific compiler.
37335CC=$lt_compiler
37336
37337# Is the compiler the GNU compiler?
37338with_gcc=$GCC
37339
37340# Compiler flag to turn off builtin functions.
37341no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
37342
37343# Additional compiler flags for building library objects.
37344pic_flag=$lt_lt_prog_compiler_pic
37345
37346# How to pass a linker flag through the compiler.
37347wl=$lt_lt_prog_compiler_wl
37348
37349# Compiler flag to prevent dynamic linking.
37350link_static_flag=$lt_lt_prog_compiler_static
37351
37352# Does compiler simultaneously support -c and -o options?
37353compiler_c_o=$lt_lt_cv_prog_compiler_c_o
37354
37355# Whether or not to add -lc for building shared libraries.
37356build_libtool_need_lc=$archive_cmds_need_lc
37357
37358# Whether or not to disallow shared libs when runtime libs are static.
37359allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
37360
37361# Compiler flag to allow reflexive dlopens.
37362export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
37363
37364# Compiler flag to generate shared objects directly from archives.
37365whole_archive_flag_spec=$lt_whole_archive_flag_spec
37366
37367# Whether the compiler copes with passing no objects directly.
37368compiler_needs_object=$lt_compiler_needs_object
37369
37370# Create an old-style archive from a shared archive.
37371old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
37372
37373# Create a temporary old-style archive to link instead of a shared archive.
37374old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
37375
37376# Commands used to build a shared archive.
37377archive_cmds=$lt_archive_cmds
37378archive_expsym_cmds=$lt_archive_expsym_cmds
37379
37380# Commands used to build a loadable module if different from building
37381# a shared archive.
37382module_cmds=$lt_module_cmds
37383module_expsym_cmds=$lt_module_expsym_cmds
37384
37385# Whether we are building with GNU ld or not.
37386with_gnu_ld=$lt_with_gnu_ld
37387
37388# Flag that allows shared libraries with undefined symbols to be built.
37389allow_undefined_flag=$lt_allow_undefined_flag
37390
37391# Flag that enforces no undefined symbols.
37392no_undefined_flag=$lt_no_undefined_flag
37393
37394# Flag to hardcode \$libdir into a binary during linking.
37395# This must work even if \$libdir does not exist
37396hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
37397
37398# Whether we need a single "-rpath" flag with a separated argument.
37399hardcode_libdir_separator=$lt_hardcode_libdir_separator
37400
37401# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
37402# DIR into the resulting binary.
37403hardcode_direct=$hardcode_direct
37404
37405# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
37406# DIR into the resulting binary and the resulting library dependency is
37407# "absolute",i.e impossible to change by setting \$shlibpath_var if the
37408# library is relocated.
37409hardcode_direct_absolute=$hardcode_direct_absolute
37410
37411# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
37412# into the resulting binary.
37413hardcode_minus_L=$hardcode_minus_L
37414
37415# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
37416# into the resulting binary.
37417hardcode_shlibpath_var=$hardcode_shlibpath_var
37418
37419# Set to "yes" if building a shared library automatically hardcodes DIR
37420# into the library and all subsequent libraries and executables linked
37421# against it.
37422hardcode_automatic=$hardcode_automatic
37423
37424# Set to yes if linker adds runtime paths of dependent libraries
37425# to runtime path list.
37426inherit_rpath=$inherit_rpath
37427
37428# Whether libtool must link a program against all its dependency libraries.
37429link_all_deplibs=$link_all_deplibs
37430
37431# Set to "yes" if exported symbols are required.
37432always_export_symbols=$always_export_symbols
37433
37434# The commands to list exported symbols.
37435export_symbols_cmds=$lt_export_symbols_cmds
37436
37437# Symbols that should not be listed in the preloaded symbols.
37438exclude_expsyms=$lt_exclude_expsyms
37439
37440# Symbols that must always be exported.
37441include_expsyms=$lt_include_expsyms
37442
37443# Commands necessary for linking programs (against libraries) with templates.
37444prelink_cmds=$lt_prelink_cmds
37445
37446# Commands necessary for finishing linking programs.
37447postlink_cmds=$lt_postlink_cmds
37448
37449# Specify filename containing input files.
37450file_list_spec=$lt_file_list_spec
37451
37452# How to hardcode a shared library path into an executable.
37453hardcode_action=$hardcode_action
37454
37455# ### END LIBTOOL CONFIG
37456
37457_LT_EOF
37458
37459    cat <<'_LT_EOF' >> "$cfgfile"
37460
37461# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
37462
37463# func_munge_path_list VARIABLE PATH
37464# -----------------------------------
37465# VARIABLE is name of variable containing _space_ separated list of
37466# directories to be munged by the contents of PATH, which is string
37467# having a format:
37468# "DIR[:DIR]:"
37469#       string "DIR[ DIR]" will be prepended to VARIABLE
37470# ":DIR[:DIR]"
37471#       string "DIR[ DIR]" will be appended to VARIABLE
37472# "DIRP[:DIRP]::[DIRA:]DIRA"
37473#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
37474#       "DIRA[ DIRA]" will be appended to VARIABLE
37475# "DIR[:DIR]"
37476#       VARIABLE will be replaced by "DIR[ DIR]"
37477func_munge_path_list ()
37478{
37479    case x$2 in
37480    x)
37481        ;;
37482    *:)
37483        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
37484        ;;
37485    x:*)
37486        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
37487        ;;
37488    *::*)
37489        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
37490        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
37491        ;;
37492    *)
37493        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
37494        ;;
37495    esac
37496}
37497
37498
37499# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
37500func_cc_basename ()
37501{
37502    for cc_temp in $*""; do
37503      case $cc_temp in
37504        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
37505        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
37506        \-*) ;;
37507        *) break;;
37508      esac
37509    done
37510    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
37511}
37512
37513
37514# ### END FUNCTIONS SHARED WITH CONFIGURE
37515
37516_LT_EOF
37517
37518  case $host_os in
37519  aix3*)
37520    cat <<\_LT_EOF >> "$cfgfile"
37521# AIX sometimes has problems with the GCC collect2 program.  For some
37522# reason, if we set the COLLECT_NAMES environment variable, the problems
37523# vanish in a puff of smoke.
37524if test set != "${COLLECT_NAMES+set}"; then
37525  COLLECT_NAMES=
37526  export COLLECT_NAMES
37527fi
37528_LT_EOF
37529    ;;
37530  esac
37531
37532
37533
37534ltmain=$ac_aux_dir/ltmain.sh
37535
37536
37537  # We use sed instead of cat because bash on DJGPP gets confused if
37538  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
37539  # text mode, it properly converts lines to CR/LF.  This bash problem
37540  # is reportedly fixed, but why not run on old versions too?
37541  sed '$q' "$ltmain" >> "$cfgfile" \
37542     || (rm -f "$cfgfile"; exit 1)
37543
37544   mv -f "$cfgfile" "$ofile" ||
37545    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
37546  chmod +x "$ofile"
37547
37548 ;;
37549    "ntpd/complete.conf":F) $SED -e '/^rlimit$/d' -e '/^$/d' < ntpd/complete.conf > ntpd/complete.conf.new && mv ntpd/complete.conf.new ntpd/complete.conf ;;
37550    "ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
37551    "scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;;
37552    "scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
37553    "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
37554    "scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
37555    "scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
37556    "scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
37557    "scripts/ntpver":F) chmod +x scripts/ntpver ;;
37558    "scripts/plot_summary":F) chmod +x scripts/plot_summary ;;
37559    "scripts/summary":F) chmod +x scripts/summary ;;
37560    "scripts/update-leap/update-leap":F) chmod +x scripts/update-leap/update-leap ;;
37561
37562  esac
37563done # for ac_tag
37564
37565
37566as_fn_exit 0
37567_ACEOF
37568ac_clean_files=$ac_clean_files_save
37569
37570test $ac_write_fail = 0 ||
37571  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37572
37573
37574# configure is writing to config.log, and then calls config.status.
37575# config.status does its own redirection, appending to config.log.
37576# Unfortunately, on DOS this fails, as config.log is still kept open
37577# by configure, so config.status won't be able to write to it; its
37578# output is simply discarded.  So we exec the FD to /dev/null,
37579# effectively closing config.log, so it can be properly (re)opened and
37580# appended to by config.status.  When coming back to configure, we
37581# need to make the FD available again.
37582if test "$no_create" != yes; then
37583  ac_cs_success=:
37584  ac_config_status_args=
37585  test "$silent" = yes &&
37586    ac_config_status_args="$ac_config_status_args --quiet"
37587  exec 5>/dev/null
37588  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37589  exec 5>>config.log
37590  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37591  # would make configure fail if this is the last instruction.
37592  $ac_cs_success || as_fn_exit 1
37593fi
37594
37595#
37596# CONFIG_SUBDIRS section.
37597#
37598if test "$no_recursion" != yes; then
37599
37600  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
37601  # so they do not pile up.
37602  ac_sub_configure_args=
37603  ac_prev=
37604  eval "set x $ac_configure_args"
37605  shift
37606  for ac_arg
37607  do
37608    if test -n "$ac_prev"; then
37609      ac_prev=
37610      continue
37611    fi
37612    case $ac_arg in
37613    -cache-file | --cache-file | --cache-fil | --cache-fi \
37614    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
37615      ac_prev=cache_file ;;
37616    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
37617    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
37618    | --c=*)
37619      ;;
37620    --config-cache | -C)
37621      ;;
37622    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
37623      ac_prev=srcdir ;;
37624    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
37625      ;;
37626    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
37627      ac_prev=prefix ;;
37628    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
37629      ;;
37630    --disable-option-checking)
37631      ;;
37632    *)
37633      case $ac_arg in
37634      *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
37635      esac
37636      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
37637    esac
37638  done
37639
37640  # Always prepend --prefix to ensure using the same prefix
37641  # in subdir configurations.
37642  ac_arg="--prefix=$prefix"
37643  case $ac_arg in
37644  *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
37645  esac
37646  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
37647
37648  # Pass --silent
37649  if test "$silent" = yes; then
37650    ac_sub_configure_args="--silent $ac_sub_configure_args"
37651  fi
37652
37653  # Always prepend --disable-option-checking to silence warnings, since
37654  # different subdirs can have different --enable and --with options.
37655  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
37656
37657  ac_popdir=`pwd`
37658  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
37659
37660    # Do not complain, so a configure script can configure whichever
37661    # parts of a large source tree are present.
37662    test -d "$srcdir/$ac_dir" || continue
37663
37664    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
37665    printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
37666    printf "%s\n" "$ac_msg" >&6
37667    as_dir="$ac_dir"; as_fn_mkdir_p
37668    ac_builddir=.
37669
37670case "$ac_dir" in
37671.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37672*)
37673  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
37674  # A ".." for each directory in $ac_dir_suffix.
37675  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37676  case $ac_top_builddir_sub in
37677  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37678  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37679  esac ;;
37680esac
37681ac_abs_top_builddir=$ac_pwd
37682ac_abs_builddir=$ac_pwd$ac_dir_suffix
37683# for backward compatibility:
37684ac_top_builddir=$ac_top_build_prefix
37685
37686case $srcdir in
37687  .)  # We are building in place.
37688    ac_srcdir=.
37689    ac_top_srcdir=$ac_top_builddir_sub
37690    ac_abs_top_srcdir=$ac_pwd ;;
37691  [\\/]* | ?:[\\/]* )  # Absolute name.
37692    ac_srcdir=$srcdir$ac_dir_suffix;
37693    ac_top_srcdir=$srcdir
37694    ac_abs_top_srcdir=$srcdir ;;
37695  *) # Relative name.
37696    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37697    ac_top_srcdir=$ac_top_build_prefix$srcdir
37698    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37699esac
37700ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37701
37702
37703    cd "$ac_dir"
37704
37705    # Check for configure.gnu first; this name is used for a wrapper for
37706    # Metaconfig's "Configure" on case-insensitive file systems.
37707    if test -f "$ac_srcdir/configure.gnu"; then
37708      ac_sub_configure=$ac_srcdir/configure.gnu
37709    elif test -f "$ac_srcdir/configure"; then
37710      ac_sub_configure=$ac_srcdir/configure
37711    else
37712      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
37713printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
37714      ac_sub_configure=
37715    fi
37716
37717    # The recursion is here.
37718    if test -n "$ac_sub_configure"; then
37719      # Make the cache file name correct relative to the subdirectory.
37720      case $cache_file in
37721      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
37722      *) # Relative name.
37723	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
37724      esac
37725
37726      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
37727printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
37728      # The eval makes quoting arguments work.
37729      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
37730	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
37731	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
37732    fi
37733
37734    cd "$ac_popdir"
37735  done
37736fi
37737if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37738  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37739printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37740fi
37741
37742
37743