xref: /freebsd/contrib/ntp/configure (revision a03411e84728e9b267056fd31c7d1d9d1dc1b01e)
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.71 for ntp 4.2.8p17.
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
186test \$(( 1 + 1 )) = 2 || exit 1
187
188  test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
189    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
190    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
191    ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
192    PATH=/empty FPATH=/empty; export PATH FPATH
193    test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
194      || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || 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.8p17'
625PACKAGE_STRING='ntp 4.2.8p17'
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
701VER_SUFFIX
702MAKE_CHECK_Y2K
703MAKE_LIBPARSE_KERNEL
704MAKE_LIBPARSE
705LIBPARSE
706HAVE_RLIMIT_STACK
707HAVE_RLIMIT_MEMLOCK
708LDADD_NLIST
709PATH_NET_SNMP_CONFIG
710CONFIG_SHELL
711PATH_TEST
712PATH_PERL
713LIBOBJS
714PTHREADS_FALSE
715PTHREADS_TRUE
716LIBISC_PTHREADS_NOTHREADS
717PTHREAD_LIBS
718LTHREAD_LIBS
719BUILD_THREAD
720HAVE_INLINE
721LDADD_LIBUTIL
722ALLOCA
723LIBM
724EDITLINE_LIBS
725LDADD_LIBNTP
726NTP_CROSSCOMPILE_FALSE
727NTP_CROSSCOMPILE_TRUE
728BUILD_LIBEVENT_FALSE
729BUILD_LIBEVENT_TRUE
730LDADD_LIBEVENT
731CPPFLAGS_LIBEVENT
732CFLAGS_LIBEVENT
733PKG_CONFIG
734LIBOPTS_DIR
735LIBOPTS_CFLAGS
736LIBOPTS_LDADD
737NEED_LIBOPTS_FALSE
738NEED_LIBOPTS_TRUE
739INSTALL_LIBOPTS_FALSE
740INSTALL_LIBOPTS_TRUE
741POSIX_SHELL
742GL_GENERATE_STDNORETURN_H_FALSE
743GL_GENERATE_STDNORETURN_H_TRUE
744STDNORETURN_H
745LIBTOOL_DEPS
746LT_SYS_LIBRARY_PATH
747OTOOL64
748OTOOL
749LIPO
750NMEDIT
751DSYMUTIL
752MANIFEST_TOOL
753RANLIB
754DLLTOOL
755OBJDUMP
756LN_S
757NM
758ac_ct_DUMPBIN
759DUMPBIN
760LD
761FGREP
762SED
763LIBTOOL
764ac_ct_AR
765AR
766INSTALL_UPDATE_LEAP_FALSE
767INSTALL_UPDATE_LEAP_TRUE
768UPDATE_LEAP_NI
769UPDATE_LEAP_MS
770UPDATE_LEAP_DS
771UPDATE_LEAP_DL
772UPDATE_LEAP_DB
773TIMETRIM_NI
774TIMETRIM_MS
775TIMETRIM_DS
776TIMETRIM_DL
777TIMETRIM_DB
778TICKADJ_NI
779TICKADJ_MS
780TICKADJ_DS
781TICKADJ_DL
782TICKADJ_DB
783SNTP_NI
784SNTP_MS
785SNTP_DS
786SNTP_DL
787SNTP_DB
788NTP_WAIT_NI
789NTP_WAIT_MS
790NTP_WAIT_DS
791NTP_WAIT_DL
792NTP_WAIT_DB
793NTP_KEYGEN_NI
794NTP_KEYGEN_MS
795NTP_KEYGEN_DS
796NTP_KEYGEN_DL
797NTP_KEYGEN_DB
798NTPTRACE_NI
799NTPTRACE_MS
800NTPTRACE_DS
801NTPTRACE_DL
802NTPTRACE_DB
803NTPTIME_NI
804NTPTIME_MS
805NTPTIME_DS
806NTPTIME_DL
807NTPTIME_DB
808INSTALL_NTPSWEEP_FALSE
809INSTALL_NTPSWEEP_TRUE
810NTPSWEEP_NI
811NTPSWEEP_MS
812NTPSWEEP_DS
813NTPSWEEP_DL
814NTPSWEEP_DB
815NTPSNMPD_NI
816NTPSNMPD_MS
817NTPSNMPD_DS
818NTPSNMPD_DL
819NTPSNMPD_DB
820NTPQ_NI
821NTPQ_MS
822NTPQ_DS
823NTPQ_DL
824NTPQ_DB
825NTPD_NI
826NTPD_MS
827NTPD_DS
828NTPD_DL
829NTPD_DB
830NTPDSIM_NI
831NTPDSIM_MS
832NTPDSIM_DS
833NTPDSIM_DL
834NTPDSIM_DB
835NTPDC_NI
836NTPDC_MS
837NTPDC_DS
838NTPDC_DL
839NTPDC_DB
840NTPDATE_NI
841NTPDATE_MS
842NTPDATE_DS
843NTPDATE_DL
844NTPDATE_DB
845MANTAGFMT
846CALC_TICKADJ_NI
847CALC_TICKADJ_MS
848CALC_TICKADJ_DS
849CALC_TICKADJ_DL
850CALC_TICKADJ_DB
851WANT_CALC_TICKADJ_MS_FALSE
852WANT_CALC_TICKADJ_MS_TRUE
853VPATH_HACK_FALSE
854VPATH_HACK_TRUE
855NTP_HARD_LDFLAGS
856NTP_HARD_CPPFLAGS
857NTP_HARD_CFLAGS
858YFLAGS
859YACC
860LDFLAGS_NTP
861LDADD_NTP
862CPPFLAGS_NTP
863CFLAGS_NTP
864CC_NOFORMAT
865EGREP
866GREP
867CPP
868am__fastdepCC_FALSE
869am__fastdepCC_TRUE
870CCDEPMODE
871am__nodep
872AMDEPBACKSLASH
873AMDEP_FALSE
874AMDEP_TRUE
875am__include
876DEPDIR
877OBJEXT
878EXEEXT
879ac_ct_CC
880CPPFLAGS
881LDFLAGS
882CFLAGS
883CC
884host_os
885host_vendor
886host_cpu
887host
888build_os
889build_vendor
890build_cpu
891build
892AM_BACKSLASH
893AM_DEFAULT_VERBOSITY
894AM_DEFAULT_V
895AM_V
896CSCOPE
897ETAGS
898CTAGS
899am__untar
900am__tar
901AMTAR
902am__leading_dot
903SET_MAKE
904AWK
905mkdir_p
906MKDIR_P
907INSTALL_STRIP_PROGRAM
908STRIP
909install_sh
910MAKEINFO
911AUTOHEADER
912AUTOMAKE
913AUTOCONF
914ACLOCAL
915VERSION
916PACKAGE
917CYGPATH_W
918am__isrc
919INSTALL_DATA
920INSTALL_SCRIPT
921INSTALL_PROGRAM
922target_alias
923host_alias
924build_alias
925LIBS
926ECHO_T
927ECHO_N
928ECHO_C
929DEFS
930mandir
931localedir
932libdir
933psdir
934pdfdir
935dvidir
936htmldir
937infodir
938docdir
939oldincludedir
940includedir
941runstatedir
942localstatedir
943sharedstatedir
944sysconfdir
945datadir
946datarootdir
947libexecdir
948sbindir
949bindir
950program_transform_name
951prefix
952exec_prefix
953PACKAGE_URL
954PACKAGE_BUGREPORT
955PACKAGE_STRING
956PACKAGE_VERSION
957PACKAGE_TARNAME
958PACKAGE_NAME
959PATH_SEPARATOR
960SHELL
961am__quote'
962ac_subst_files='calc_tickadj_opts
963ntp_wait_opts
964ntpsweep_opts
965ntptrace_opts
966summary_opts
967plot_summary_opts'
968ac_user_opts='
969enable_option_checking
970enable_silent_rules
971enable_dependency_tracking
972with_hardenfile
973with_locfile
974enable_shared
975enable_static
976with_pic
977enable_fast_install
978with_aix_soname
979with_gnu_ld
980with_sysroot
981enable_libtool_lock
982enable_nls
983enable_local_libopts
984enable_libopts_install
985with_autoopts_config
986enable_local_libevent
987with_lineeditlibs
988enable_debugging
989enable_thread_support
990with_threads
991with_yielding_select
992enable_c99_snprintf
993enable_clockctl
994enable_linuxcaps
995enable_solarisprivs
996enable_trustedbsd_mac
997enable_signalled_io
998with_arlib
999with_net_snmp_config
1000enable_libseccomp
1001with_stack_limit
1002with_memlock
1003enable_debug_timing
1004enable_dst_minutes
1005enable_ignore_dns_errors
1006enable_BANCOMM
1007enable_GPSVME
1008enable_all_clocks
1009enable_ACTS
1010enable_ARBITER
1011enable_ARCRON_MSF
1012enable_AS2201
1013enable_ATOM
1014enable_CHRONOLOG
1015enable_CHU
1016enable_AUDIO_CHU
1017enable_DATUM
1018enable_DUMBCLOCK
1019enable_FG
1020enable_HEATH
1021enable_HOPFSERIAL
1022enable_HOPFPCI
1023enable_HPGPS
1024enable_IRIG
1025enable_JJY
1026enable_JUPITER
1027enable_LEITCH
1028enable_LOCAL_CLOCK
1029enable_MX4200
1030enable_NEOCLOCK4X
1031enable_NMEA
1032enable_GPSD
1033enable_ONCORE
1034enable_PALISADE
1035enable_PCF
1036enable_PST
1037enable_RIPENCC
1038enable_SHM
1039enable_SPECTRACOM
1040enable_TPRO
1041enable_TRUETIME
1042enable_TT560
1043enable_ULINK
1044enable_TSYNCPCI
1045enable_WWV
1046enable_ZYFER
1047enable_parse_clocks
1048enable_COMPUTIME
1049enable_DCF7000
1050enable_HOPF6021
1051enable_MEINBERG
1052enable_RAWDCF
1053enable_RCC8000
1054enable_SCHMID
1055enable_TRIMTAIP
1056enable_TRIMTSIP
1057enable_WHARTON
1058enable_VARITEXT
1059enable_SEL240X
1060with_crypto
1061with_openssl_libdir
1062with_openssl_incdir
1063with_rpath
1064enable_openssl_random
1065enable_autokey
1066enable_kmem
1067enable_accurate_adjtime
1068enable_tick
1069enable_tickadj
1070enable_simulator
1071with_sntp
1072with_ntpsnmpd
1073enable_slew_always
1074enable_step_slew
1075enable_ntpdate_step
1076enable_hourly_todr_sync
1077enable_kernel_fll_bug
1078enable_bug1243_fix
1079enable_bug3020_fix
1080enable_bug3527_fix
1081enable_bug3767_fix
1082enable_irig_sawtooth
1083enable_nist
1084enable_ntp_signd
1085enable_magicpps
1086enable_ipv6
1087with_kame
1088enable_getifaddrs
1089enable_saveconfig
1090enable_leap_smear
1091enable_dynamic_interleave
1092enable_problem_tests
1093'
1094      ac_precious_vars='build_alias
1095host_alias
1096target_alias
1097CC
1098CFLAGS
1099LDFLAGS
1100LIBS
1101CPPFLAGS
1102CPP
1103YACC
1104YFLAGS
1105LT_SYS_LIBRARY_PATH'
1106ac_subdirs_all='sntp'
1107
1108# Initialize some variables set by options.
1109ac_init_help=
1110ac_init_version=false
1111ac_unrecognized_opts=
1112ac_unrecognized_sep=
1113# The variables have the same names as the options, with
1114# dashes changed to underlines.
1115cache_file=/dev/null
1116exec_prefix=NONE
1117no_create=
1118no_recursion=
1119prefix=NONE
1120program_prefix=NONE
1121program_suffix=NONE
1122program_transform_name=s,x,x,
1123silent=
1124site=
1125srcdir=
1126verbose=
1127x_includes=NONE
1128x_libraries=NONE
1129
1130# Installation directory options.
1131# These are left unexpanded so users can "make install exec_prefix=/foo"
1132# and all the variables that are supposed to be based on exec_prefix
1133# by default will actually change.
1134# Use braces instead of parens because sh, perl, etc. also accept them.
1135# (The list follows the same order as the GNU Coding Standards.)
1136bindir='${exec_prefix}/bin'
1137sbindir='${exec_prefix}/sbin'
1138libexecdir='${exec_prefix}/libexec'
1139datarootdir='${prefix}/share'
1140datadir='${datarootdir}'
1141sysconfdir='${prefix}/etc'
1142sharedstatedir='${prefix}/com'
1143localstatedir='${prefix}/var'
1144runstatedir='${localstatedir}/run'
1145includedir='${prefix}/include'
1146oldincludedir='/usr/include'
1147docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1148infodir='${datarootdir}/info'
1149htmldir='${docdir}'
1150dvidir='${docdir}'
1151pdfdir='${docdir}'
1152psdir='${docdir}'
1153libdir='${exec_prefix}/lib'
1154localedir='${datarootdir}/locale'
1155mandir='${datarootdir}/man'
1156
1157ac_prev=
1158ac_dashdash=
1159for ac_option
1160do
1161  # If the previous option needs an argument, assign it.
1162  if test -n "$ac_prev"; then
1163    eval $ac_prev=\$ac_option
1164    ac_prev=
1165    continue
1166  fi
1167
1168  case $ac_option in
1169  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1170  *=)   ac_optarg= ;;
1171  *)    ac_optarg=yes ;;
1172  esac
1173
1174  case $ac_dashdash$ac_option in
1175  --)
1176    ac_dashdash=yes ;;
1177
1178  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1179    ac_prev=bindir ;;
1180  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1181    bindir=$ac_optarg ;;
1182
1183  -build | --build | --buil | --bui | --bu)
1184    ac_prev=build_alias ;;
1185  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1186    build_alias=$ac_optarg ;;
1187
1188  -cache-file | --cache-file | --cache-fil | --cache-fi \
1189  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1190    ac_prev=cache_file ;;
1191  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1192  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1193    cache_file=$ac_optarg ;;
1194
1195  --config-cache | -C)
1196    cache_file=config.cache ;;
1197
1198  -datadir | --datadir | --datadi | --datad)
1199    ac_prev=datadir ;;
1200  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1201    datadir=$ac_optarg ;;
1202
1203  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1204  | --dataroo | --dataro | --datar)
1205    ac_prev=datarootdir ;;
1206  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1207  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1208    datarootdir=$ac_optarg ;;
1209
1210  -disable-* | --disable-*)
1211    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1212    # Reject names that are not valid shell variable names.
1213    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1214      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1215    ac_useropt_orig=$ac_useropt
1216    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1217    case $ac_user_opts in
1218      *"
1219"enable_$ac_useropt"
1220"*) ;;
1221      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1222	 ac_unrecognized_sep=', ';;
1223    esac
1224    eval enable_$ac_useropt=no ;;
1225
1226  -docdir | --docdir | --docdi | --doc | --do)
1227    ac_prev=docdir ;;
1228  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1229    docdir=$ac_optarg ;;
1230
1231  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1232    ac_prev=dvidir ;;
1233  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1234    dvidir=$ac_optarg ;;
1235
1236  -enable-* | --enable-*)
1237    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1238    # Reject names that are not valid shell variable names.
1239    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1240      as_fn_error $? "invalid feature name: \`$ac_useropt'"
1241    ac_useropt_orig=$ac_useropt
1242    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1243    case $ac_user_opts in
1244      *"
1245"enable_$ac_useropt"
1246"*) ;;
1247      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1248	 ac_unrecognized_sep=', ';;
1249    esac
1250    eval enable_$ac_useropt=\$ac_optarg ;;
1251
1252  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1253  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1254  | --exec | --exe | --ex)
1255    ac_prev=exec_prefix ;;
1256  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1257  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1258  | --exec=* | --exe=* | --ex=*)
1259    exec_prefix=$ac_optarg ;;
1260
1261  -gas | --gas | --ga | --g)
1262    # Obsolete; use --with-gas.
1263    with_gas=yes ;;
1264
1265  -help | --help | --hel | --he | -h)
1266    ac_init_help=long ;;
1267  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1268    ac_init_help=recursive ;;
1269  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1270    ac_init_help=short ;;
1271
1272  -host | --host | --hos | --ho)
1273    ac_prev=host_alias ;;
1274  -host=* | --host=* | --hos=* | --ho=*)
1275    host_alias=$ac_optarg ;;
1276
1277  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1278    ac_prev=htmldir ;;
1279  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1280  | --ht=*)
1281    htmldir=$ac_optarg ;;
1282
1283  -includedir | --includedir | --includedi | --included | --include \
1284  | --includ | --inclu | --incl | --inc)
1285    ac_prev=includedir ;;
1286  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1287  | --includ=* | --inclu=* | --incl=* | --inc=*)
1288    includedir=$ac_optarg ;;
1289
1290  -infodir | --infodir | --infodi | --infod | --info | --inf)
1291    ac_prev=infodir ;;
1292  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1293    infodir=$ac_optarg ;;
1294
1295  -libdir | --libdir | --libdi | --libd)
1296    ac_prev=libdir ;;
1297  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1298    libdir=$ac_optarg ;;
1299
1300  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1301  | --libexe | --libex | --libe)
1302    ac_prev=libexecdir ;;
1303  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1304  | --libexe=* | --libex=* | --libe=*)
1305    libexecdir=$ac_optarg ;;
1306
1307  -localedir | --localedir | --localedi | --localed | --locale)
1308    ac_prev=localedir ;;
1309  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1310    localedir=$ac_optarg ;;
1311
1312  -localstatedir | --localstatedir | --localstatedi | --localstated \
1313  | --localstate | --localstat | --localsta | --localst | --locals)
1314    ac_prev=localstatedir ;;
1315  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1316  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1317    localstatedir=$ac_optarg ;;
1318
1319  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1320    ac_prev=mandir ;;
1321  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1322    mandir=$ac_optarg ;;
1323
1324  -nfp | --nfp | --nf)
1325    # Obsolete; use --without-fp.
1326    with_fp=no ;;
1327
1328  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1329  | --no-cr | --no-c | -n)
1330    no_create=yes ;;
1331
1332  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1333  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1334    no_recursion=yes ;;
1335
1336  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1337  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1338  | --oldin | --oldi | --old | --ol | --o)
1339    ac_prev=oldincludedir ;;
1340  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1341  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1342  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1343    oldincludedir=$ac_optarg ;;
1344
1345  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1346    ac_prev=prefix ;;
1347  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1348    prefix=$ac_optarg ;;
1349
1350  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1351  | --program-pre | --program-pr | --program-p)
1352    ac_prev=program_prefix ;;
1353  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1354  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1355    program_prefix=$ac_optarg ;;
1356
1357  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1358  | --program-suf | --program-su | --program-s)
1359    ac_prev=program_suffix ;;
1360  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1361  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1362    program_suffix=$ac_optarg ;;
1363
1364  -program-transform-name | --program-transform-name \
1365  | --program-transform-nam | --program-transform-na \
1366  | --program-transform-n | --program-transform- \
1367  | --program-transform | --program-transfor \
1368  | --program-transfo | --program-transf \
1369  | --program-trans | --program-tran \
1370  | --progr-tra | --program-tr | --program-t)
1371    ac_prev=program_transform_name ;;
1372  -program-transform-name=* | --program-transform-name=* \
1373  | --program-transform-nam=* | --program-transform-na=* \
1374  | --program-transform-n=* | --program-transform-=* \
1375  | --program-transform=* | --program-transfor=* \
1376  | --program-transfo=* | --program-transf=* \
1377  | --program-trans=* | --program-tran=* \
1378  | --progr-tra=* | --program-tr=* | --program-t=*)
1379    program_transform_name=$ac_optarg ;;
1380
1381  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1382    ac_prev=pdfdir ;;
1383  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1384    pdfdir=$ac_optarg ;;
1385
1386  -psdir | --psdir | --psdi | --psd | --ps)
1387    ac_prev=psdir ;;
1388  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1389    psdir=$ac_optarg ;;
1390
1391  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1392  | -silent | --silent | --silen | --sile | --sil)
1393    silent=yes ;;
1394
1395  -runstatedir | --runstatedir | --runstatedi | --runstated \
1396  | --runstate | --runstat | --runsta | --runst | --runs \
1397  | --run | --ru | --r)
1398    ac_prev=runstatedir ;;
1399  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1400  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1401  | --run=* | --ru=* | --r=*)
1402    runstatedir=$ac_optarg ;;
1403
1404  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1405    ac_prev=sbindir ;;
1406  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1407  | --sbi=* | --sb=*)
1408    sbindir=$ac_optarg ;;
1409
1410  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1411  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1412  | --sharedst | --shareds | --shared | --share | --shar \
1413  | --sha | --sh)
1414    ac_prev=sharedstatedir ;;
1415  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1416  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1417  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1418  | --sha=* | --sh=*)
1419    sharedstatedir=$ac_optarg ;;
1420
1421  -site | --site | --sit)
1422    ac_prev=site ;;
1423  -site=* | --site=* | --sit=*)
1424    site=$ac_optarg ;;
1425
1426  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1427    ac_prev=srcdir ;;
1428  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1429    srcdir=$ac_optarg ;;
1430
1431  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1432  | --syscon | --sysco | --sysc | --sys | --sy)
1433    ac_prev=sysconfdir ;;
1434  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1435  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1436    sysconfdir=$ac_optarg ;;
1437
1438  -target | --target | --targe | --targ | --tar | --ta | --t)
1439    ac_prev=target_alias ;;
1440  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1441    target_alias=$ac_optarg ;;
1442
1443  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1444    verbose=yes ;;
1445
1446  -version | --version | --versio | --versi | --vers | -V)
1447    ac_init_version=: ;;
1448
1449  -with-* | --with-*)
1450    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1451    # Reject names that are not valid shell variable names.
1452    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1453      as_fn_error $? "invalid package name: \`$ac_useropt'"
1454    ac_useropt_orig=$ac_useropt
1455    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1456    case $ac_user_opts in
1457      *"
1458"with_$ac_useropt"
1459"*) ;;
1460      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1461	 ac_unrecognized_sep=', ';;
1462    esac
1463    eval with_$ac_useropt=\$ac_optarg ;;
1464
1465  -without-* | --without-*)
1466    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1467    # Reject names that are not valid shell variable names.
1468    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1469      as_fn_error $? "invalid package name: \`$ac_useropt'"
1470    ac_useropt_orig=$ac_useropt
1471    ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1472    case $ac_user_opts in
1473      *"
1474"with_$ac_useropt"
1475"*) ;;
1476      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1477	 ac_unrecognized_sep=', ';;
1478    esac
1479    eval with_$ac_useropt=no ;;
1480
1481  --x)
1482    # Obsolete; use --with-x.
1483    with_x=yes ;;
1484
1485  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1486  | --x-incl | --x-inc | --x-in | --x-i)
1487    ac_prev=x_includes ;;
1488  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1489  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1490    x_includes=$ac_optarg ;;
1491
1492  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1493  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1494    ac_prev=x_libraries ;;
1495  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1496  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1497    x_libraries=$ac_optarg ;;
1498
1499  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1500Try \`$0 --help' for more information"
1501    ;;
1502
1503  *=*)
1504    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1505    # Reject names that are not valid shell variable names.
1506    case $ac_envvar in #(
1507      '' | [0-9]* | *[!_$as_cr_alnum]* )
1508      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1509    esac
1510    eval $ac_envvar=\$ac_optarg
1511    export $ac_envvar ;;
1512
1513  *)
1514    # FIXME: should be removed in autoconf 3.0.
1515    printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1516    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1517      printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1518    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1519    ;;
1520
1521  esac
1522done
1523
1524if test -n "$ac_prev"; then
1525  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1526  as_fn_error $? "missing argument to $ac_option"
1527fi
1528
1529if test -n "$ac_unrecognized_opts"; then
1530  case $enable_option_checking in
1531    no) ;;
1532    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1533    *)     printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1534  esac
1535fi
1536
1537# Check all directory arguments for consistency.
1538for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1539		datadir sysconfdir sharedstatedir localstatedir includedir \
1540		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1541		libdir localedir mandir runstatedir
1542do
1543  eval ac_val=\$$ac_var
1544  # Remove trailing slashes.
1545  case $ac_val in
1546    */ )
1547      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1548      eval $ac_var=\$ac_val;;
1549  esac
1550  # Be sure to have absolute directory names.
1551  case $ac_val in
1552    [\\/$]* | ?:[\\/]* )  continue;;
1553    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1554  esac
1555  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1556done
1557
1558# There might be people who depend on the old broken behavior: `$host'
1559# used to hold the argument of --host etc.
1560# FIXME: To remove some day.
1561build=$build_alias
1562host=$host_alias
1563target=$target_alias
1564
1565# FIXME: To remove some day.
1566if test "x$host_alias" != x; then
1567  if test "x$build_alias" = x; then
1568    cross_compiling=maybe
1569  elif test "x$build_alias" != "x$host_alias"; then
1570    cross_compiling=yes
1571  fi
1572fi
1573
1574ac_tool_prefix=
1575test -n "$host_alias" && ac_tool_prefix=$host_alias-
1576
1577test "$silent" = yes && exec 6>/dev/null
1578
1579
1580ac_pwd=`pwd` && test -n "$ac_pwd" &&
1581ac_ls_di=`ls -di .` &&
1582ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1583  as_fn_error $? "working directory cannot be determined"
1584test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1585  as_fn_error $? "pwd does not report name of working directory"
1586
1587
1588# Find the source files, if location was not specified.
1589if test -z "$srcdir"; then
1590  ac_srcdir_defaulted=yes
1591  # Try the directory containing this script, then the parent directory.
1592  ac_confdir=`$as_dirname -- "$as_myself" ||
1593$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1594	 X"$as_myself" : 'X\(//\)[^/]' \| \
1595	 X"$as_myself" : 'X\(//\)$' \| \
1596	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1597printf "%s\n" X"$as_myself" |
1598    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1599	    s//\1/
1600	    q
1601	  }
1602	  /^X\(\/\/\)[^/].*/{
1603	    s//\1/
1604	    q
1605	  }
1606	  /^X\(\/\/\)$/{
1607	    s//\1/
1608	    q
1609	  }
1610	  /^X\(\/\).*/{
1611	    s//\1/
1612	    q
1613	  }
1614	  s/.*/./; q'`
1615  srcdir=$ac_confdir
1616  if test ! -r "$srcdir/$ac_unique_file"; then
1617    srcdir=..
1618  fi
1619else
1620  ac_srcdir_defaulted=no
1621fi
1622if test ! -r "$srcdir/$ac_unique_file"; then
1623  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1624  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1625fi
1626ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1627ac_abs_confdir=`(
1628	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1629	pwd)`
1630# When building in place, set srcdir=.
1631if test "$ac_abs_confdir" = "$ac_pwd"; then
1632  srcdir=.
1633fi
1634# Remove unnecessary trailing slashes from srcdir.
1635# Double slashes in file names in object file debugging info
1636# mess up M-x gdb in Emacs.
1637case $srcdir in
1638*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1639esac
1640for ac_var in $ac_precious_vars; do
1641  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1642  eval ac_env_${ac_var}_value=\$${ac_var}
1643  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1644  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1645done
1646
1647#
1648# Report the --help message.
1649#
1650if test "$ac_init_help" = "long"; then
1651  # Omit some internal or obsolete options to make the list less imposing.
1652  # This message is too long to be a string in the A/UX 3.1 sh.
1653  cat <<_ACEOF
1654\`configure' configures ntp 4.2.8p17 to adapt to many kinds of systems.
1655
1656Usage: $0 [OPTION]... [VAR=VALUE]...
1657
1658To assign environment variables (e.g., CC, CFLAGS...), specify them as
1659VAR=VALUE.  See below for descriptions of some of the useful variables.
1660
1661Defaults for the options are specified in brackets.
1662
1663Configuration:
1664  -h, --help              display this help and exit
1665      --help=short        display options specific to this package
1666      --help=recursive    display the short help of all the included packages
1667  -V, --version           display version information and exit
1668  -q, --quiet, --silent   do not print \`checking ...' messages
1669      --cache-file=FILE   cache test results in FILE [disabled]
1670  -C, --config-cache      alias for \`--cache-file=config.cache'
1671  -n, --no-create         do not create output files
1672      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1673
1674Installation directories:
1675  --prefix=PREFIX         install architecture-independent files in PREFIX
1676                          [$ac_default_prefix]
1677  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1678                          [PREFIX]
1679
1680By default, \`make install' will install all the files in
1681\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1682an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1683for instance \`--prefix=\$HOME'.
1684
1685For better control, use the options below.
1686
1687Fine tuning of the installation directories:
1688  --bindir=DIR            user executables [EPREFIX/bin]
1689  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1690  --libexecdir=DIR        program executables [EPREFIX/libexec]
1691  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1692  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1693  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1694  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
1695  --libdir=DIR            object code libraries [EPREFIX/lib]
1696  --includedir=DIR        C header files [PREFIX/include]
1697  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1698  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1699  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1700  --infodir=DIR           info documentation [DATAROOTDIR/info]
1701  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1702  --mandir=DIR            man documentation [DATAROOTDIR/man]
1703  --docdir=DIR            documentation root [DATAROOTDIR/doc/ntp]
1704  --htmldir=DIR           html documentation [DOCDIR]
1705  --dvidir=DIR            dvi documentation [DOCDIR]
1706  --pdfdir=DIR            pdf documentation [DOCDIR]
1707  --psdir=DIR             ps documentation [DOCDIR]
1708_ACEOF
1709
1710  cat <<\_ACEOF
1711
1712Program names:
1713  --program-prefix=PREFIX            prepend PREFIX to installed program names
1714  --program-suffix=SUFFIX            append SUFFIX to installed program names
1715  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
1716
1717System types:
1718  --build=BUILD     configure for building on BUILD [guessed]
1719  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1720_ACEOF
1721fi
1722
1723if test -n "$ac_init_help"; then
1724  case $ac_init_help in
1725     short | recursive ) echo "Configuration of ntp 4.2.8p17:";;
1726   esac
1727  cat <<\_ACEOF
1728
1729Optional Features and Packages:
1730  --disable-option-checking  ignore unrecognized --enable/--with options
1731  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1732  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1733  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1734  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1735  --enable-silent-rules   less verbose build output (undo: "make V=1")
1736  --disable-silent-rules  verbose build output (undo: "make V=0")
1737  --enable-dependency-tracking
1738                          do not reject slow dependency extractors
1739  --disable-dependency-tracking
1740                          speeds up one-time build
1741  --with-hardenfile=XXX   os-specific or "/dev/null"
1742  --with-locfile=XXX      os-specific or "legacy"
1743  --enable-shared[=PKGS]  build shared libraries [default=no]
1744  --enable-static[=PKGS]  build static libraries [default=yes]
1745  --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
1746                          both]
1747  --enable-fast-install[=PKGS]
1748                          optimize for fast installation [default=yes]
1749  --with-aix-soname=aix|svr4|both
1750                          shared library versioning (aka "SONAME") variant to
1751                          provide on AIX, [default=aix].
1752  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
1753  --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
1754                          compiler's sysroot if not specified).
1755  --disable-libtool-lock  avoid locking (might break parallel builds)
1756  --disable-nls           disable nls support in libopts
1757  --enable-local-libopts  Use the supplied libopts tearoff code
1758  --enable-libopts-install
1759                          Install libopts with client installation
1760  --with-autoopts-config  specify the config-info script
1761  --enable-local-libevent Force using the supplied libevent tearoff code
1762  --with-lineeditlibs     edit,editline (readline may be specified if desired)
1763  defaults:               + yes, - no, s system-specific
1764  --enable-debugging      + include ntpd debugging code
1765  --enable-thread-support s use threads (+ if available)
1766  --with-threads	  with threads [auto]
1767  --with-yielding-select  with yielding select [auto]
1768  --enable-c99-snprintf   s force replacement
1769  --enable-clockctl       s Use /dev/clockctl for non-root clock control
1770  --enable-linuxcaps      + Use Linux capabilities for non-root clock control
1771  --enable-solarisprivs   + Use Solaris privileges for non-root clock control
1772  --enable-trustedbsd-mac s Use TrustedBSD MAC policy for non-root clock
1773                          control
1774  --enable-signalled-io   s Use signalled IO if we can
1775  --with-arlib            - deprecated, arlib not distributed
1776  --with-net-snmp-config  + =net-snmp-config
1777  --enable-libseccomp     EXPERIMENTAL: enable support for libseccomp
1778                          sandboxing (default is no)
1779  --with-stack-limit      ? =50 (200 for openbsd) 4k pages
1780  --with-memlock          ? =32 (-1 on linux) megabytes
1781  --enable-debug-timing   - include processing time debugging code (costs
1782                          performance)
1783  --enable-dst-minutes    =60 minutes per DST adjustment
1784  --enable-ignore-dns-errors
1785                          - retry DNS queries on any error
1786  --enable-BANCOMM        - Datum/Bancomm bc635/VME interface
1787  --enable-GPSVME         - TrueTime GPS receiver/VME interface
1788  --enable-all-clocks     + include all suitable non-PARSE clocks:
1789  --enable-ACTS           s ACTS modem service
1790  --enable-ARBITER        + Arbiter 1088A/B GPS receiver
1791  --enable-ARCRON-MSF     + Arcron MSF receiver
1792  --enable-AS2201         + Austron 2200A/2201A GPS receiver
1793  --enable-ATOM           s ATOM PPS interface
1794  --enable-CHRONOLOG      + Chrono-log K-series WWVB receiver
1795  --enable-CHU            + CHU modem/decoder
1796  --enable-AUDIO-CHU      s CHU audio/decoder
1797  --enable-DATUM          s Datum Programmable Time System
1798  --enable-DUMBCLOCK      + Dumb generic hh:mm:ss local clock
1799  --enable-FG             + Forum Graphic GPS
1800  --enable-HEATH          s Heath GC-1000 WWV/WWVH receiver
1801  --enable-HOPFSERIAL     + hopf serial clock device
1802  --enable-HOPFPCI        + hopf 6039 PCI board
1803  --enable-HPGPS          + HP 58503A GPS receiver
1804  --enable-IRIG           s IRIG audio decoder
1805  --enable-JJY            + JJY receiver
1806  --enable-JUPITER        s Rockwell Jupiter GPS receiver
1807  --enable-LEITCH         + Leitch CSD 5300 Master Clock System Driver
1808  --enable-LOCAL-CLOCK    + local clock reference
1809  --enable-MX4200         s Magnavox MX4200 GPS receiver
1810  --enable-NEOCLOCK4X     + NeoClock4X DCF77 / TDF receiver
1811  --enable-NMEA           + NMEA GPS receiver
1812  --enable-GPSD           + GPSD JSON receiver
1813  --enable-ONCORE         s Motorola VP/UT Oncore GPS receiver
1814  --enable-PALISADE       s Palisade clock
1815  --enable-PCF            + Conrad parallel port radio clock
1816  --enable-PST            + PST/Traconex 1020 WWV/WWVH receiver
1817  --enable-RIPENCC        - RIPENCC specific Trimble driver
1818  --enable-SHM            s SHM clock attached thru shared memory
1819  --enable-SPECTRACOM     + Spectracom 8170/Netclock/2 WWVB receiver
1820  --enable-TPRO           s KSI/Odetics TPRO/S GPS receiver/IRIG interface
1821  --enable-TRUETIME       s Kinemetrics/TrueTime receivers
1822  --enable-TT560          - TrueTime 560 IRIG-B decoder
1823  --enable-ULINK          + Ultralink WWVB receiver
1824  --enable-TSYNCPCI       s Spectracom TSYNC timing board
1825  --enable-WWV            s WWV Audio receiver
1826  --enable-ZYFER          + Zyfer GPStarplus receiver
1827  --enable-parse-clocks   - include all suitable PARSE clocks:
1828  --enable-COMPUTIME      s Diem Computime Radio Clock
1829  --enable-DCF7000        s ELV/DCF7000 clock
1830  --enable-HOPF6021       s HOPF 6021 clock
1831  --enable-MEINBERG       s Meinberg clocks
1832  --enable-RAWDCF         s DCF77 raw time code
1833  --enable-RCC8000        s RCC 8000 clock
1834  --enable-SCHMID         s Schmid DCF77 clock
1835  --enable-TRIMTAIP       s Trimble GPS receiver/TAIP protocol
1836  --enable-TRIMTSIP       s Trimble GPS receiver/TSIP protocol
1837  --enable-WHARTON        s WHARTON 400A Series clock
1838  --enable-VARITEXT       s VARITEXT clock
1839  --enable-SEL240X        s SEL240X clock
1840  --with-crypto           + =openssl,libcrypto
1841
1842  --with-openssl-libdir   + =/something/reasonable
1843
1844  --with-openssl-incdir   + =/something/reasonable
1845
1846  --without-rpath         s Disable auto-added -R linker paths
1847
1848  --enable-openssl-random Use OpenSSL's crypto random number functions, if
1849                          available (default is yes)
1850  --enable-autokey        + support NTP Autokey protocol
1851  --enable-kmem           s read /dev/kmem for tick and/or tickadj
1852  --enable-accurate-adjtime
1853                          s the adjtime() call is accurate
1854  --enable-tick=VALUE     s force a value for 'tick'
1855  --enable-tickadj=VALUE  s force a value for 'tickadj'
1856  --enable-simulator      - build/install the NTPD simulator?
1857  --without-sntp          - disable building sntp and sntp/tests
1858  --with-ntpsnmpd         s Build ntpsnmpd MIB agent?
1859  --enable-slew-always    s always slew the time
1860  --enable-step-slew      s step and slew the time
1861  --enable-ntpdate-step   s if ntpdate should step the time
1862  --enable-hourly-todr-sync
1863                          s if we should sync TODR hourly
1864  --enable-kernel-fll-bug s if we should avoid a kernel FLL bug
1865  --enable-bug1243-fix    + use unmodified autokey session keys
1866  --enable-bug3020-fix    + Provide the explicit 127.0.0.0/8 martian filter
1867  --enable-bug3527-fix    + provide correct mode7 fudgetime2 behavior
1868  --enable-bug3767-fix    + Disable debug assertion on OOB KoD RATE value
1869  --enable-irig-sawtooth  s if we should enable the IRIG sawtooth filter
1870  --enable-nist           - if we should enable the NIST lockclock scheme
1871  --enable-ntp-signd      - Provide support for Samba's signing daemon,
1872                          =/var/run/ntp_signd
1873  --enable-magicpps       + try to auto-instantiate PPS devices on Linux
1874  --enable-ipv6           s use IPv6?
1875
1876  --with-kame             - =/usr/local/v6
1877  --enable-getifaddrs     + Enable the use of getifaddrs() [[yes|no]].
1878  --enable-saveconfig     + saveconfig mechanism
1879  --enable-leap-smear     - experimental leap smear code
1880  --enable-dynamic-interleave
1881                          - dynamic interleave support
1882  --enable-problem-tests  + enable tests with undiagnosed problems
1883
1884Some influential environment variables:
1885  CC          C compiler command
1886  CFLAGS      C compiler flags
1887  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1888              nonstandard directory <lib dir>
1889  LIBS        libraries to pass to the linker, e.g. -l<library>
1890  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1891              you have headers in a nonstandard directory <include dir>
1892  CPP         C preprocessor
1893  YACC        The `Yet Another Compiler Compiler' implementation to use.
1894              Defaults to the first program found out of: `bison -y', `byacc',
1895              `yacc'.
1896  YFLAGS      The list of arguments that will be passed by default to $YACC.
1897              This script will default YFLAGS to the empty string to avoid a
1898              default value of `-d' given by some make applications.
1899  LT_SYS_LIBRARY_PATH
1900              User-defined run-time library search path.
1901
1902Use these variables to override the choices made by `configure' or to help
1903it to find libraries and programs with nonstandard names/locations.
1904
1905Report bugs to <https://bugs.ntp.org/>.
1906ntp home page: <https://www.ntp.org/>.
1907_ACEOF
1908ac_status=$?
1909fi
1910
1911if test "$ac_init_help" = "recursive"; then
1912  # If there are subdirs, report their specific --help.
1913  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1914    test -d "$ac_dir" ||
1915      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1916      continue
1917    ac_builddir=.
1918
1919case "$ac_dir" in
1920.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1921*)
1922  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1923  # A ".." for each directory in $ac_dir_suffix.
1924  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1925  case $ac_top_builddir_sub in
1926  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1927  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1928  esac ;;
1929esac
1930ac_abs_top_builddir=$ac_pwd
1931ac_abs_builddir=$ac_pwd$ac_dir_suffix
1932# for backward compatibility:
1933ac_top_builddir=$ac_top_build_prefix
1934
1935case $srcdir in
1936  .)  # We are building in place.
1937    ac_srcdir=.
1938    ac_top_srcdir=$ac_top_builddir_sub
1939    ac_abs_top_srcdir=$ac_pwd ;;
1940  [\\/]* | ?:[\\/]* )  # Absolute name.
1941    ac_srcdir=$srcdir$ac_dir_suffix;
1942    ac_top_srcdir=$srcdir
1943    ac_abs_top_srcdir=$srcdir ;;
1944  *) # Relative name.
1945    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1946    ac_top_srcdir=$ac_top_build_prefix$srcdir
1947    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1948esac
1949ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1950
1951    cd "$ac_dir" || { ac_status=$?; continue; }
1952    # Check for configure.gnu first; this name is used for a wrapper for
1953    # Metaconfig's "Configure" on case-insensitive file systems.
1954    if test -f "$ac_srcdir/configure.gnu"; then
1955      echo &&
1956      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1957    elif test -f "$ac_srcdir/configure"; then
1958      echo &&
1959      $SHELL "$ac_srcdir/configure" --help=recursive
1960    else
1961      printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1962    fi || ac_status=$?
1963    cd "$ac_pwd" || { ac_status=$?; break; }
1964  done
1965fi
1966
1967test -n "$ac_init_help" && exit $ac_status
1968if $ac_init_version; then
1969  cat <<\_ACEOF
1970ntp configure 4.2.8p17
1971generated by GNU Autoconf 2.71
1972
1973Copyright (C) 2021 Free Software Foundation, Inc.
1974This configure script is free software; the Free Software Foundation
1975gives unlimited permission to copy, distribute and modify it.
1976_ACEOF
1977  exit
1978fi
1979
1980## ------------------------ ##
1981## Autoconf initialization. ##
1982## ------------------------ ##
1983
1984# ac_fn_c_try_compile LINENO
1985# --------------------------
1986# Try to compile conftest.$ac_ext, and return whether this succeeded.
1987ac_fn_c_try_compile ()
1988{
1989  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990  rm -f conftest.$ac_objext conftest.beam
1991  if { { ac_try="$ac_compile"
1992case "(($ac_try" in
1993  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994  *) ac_try_echo=$ac_try;;
1995esac
1996eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997printf "%s\n" "$ac_try_echo"; } >&5
1998  (eval "$ac_compile") 2>conftest.err
1999  ac_status=$?
2000  if test -s conftest.err; then
2001    grep -v '^ *+' conftest.err >conftest.er1
2002    cat conftest.er1 >&5
2003    mv -f conftest.er1 conftest.err
2004  fi
2005  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2006  test $ac_status = 0; } && {
2007	 test -z "$ac_c_werror_flag" ||
2008	 test ! -s conftest.err
2009       } && test -s conftest.$ac_objext
2010then :
2011  ac_retval=0
2012else $as_nop
2013  printf "%s\n" "$as_me: failed program was:" >&5
2014sed 's/^/| /' conftest.$ac_ext >&5
2015
2016	ac_retval=1
2017fi
2018  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019  as_fn_set_status $ac_retval
2020
2021} # ac_fn_c_try_compile
2022
2023# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2024# -------------------------------------------------------
2025# Tests whether HEADER exists and can be compiled using the include files in
2026# INCLUDES, setting the cache variable VAR accordingly.
2027ac_fn_c_check_header_compile ()
2028{
2029  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2031printf %s "checking for $2... " >&6; }
2032if eval test \${$3+y}
2033then :
2034  printf %s "(cached) " >&6
2035else $as_nop
2036  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h.  */
2038$4
2039#include <$2>
2040_ACEOF
2041if ac_fn_c_try_compile "$LINENO"
2042then :
2043  eval "$3=yes"
2044else $as_nop
2045  eval "$3=no"
2046fi
2047rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2048fi
2049eval ac_res=\$$3
2050	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051printf "%s\n" "$ac_res" >&6; }
2052  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2053
2054} # ac_fn_c_check_header_compile
2055
2056# ac_fn_c_try_cpp LINENO
2057# ----------------------
2058# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2059ac_fn_c_try_cpp ()
2060{
2061  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2062  if { { ac_try="$ac_cpp conftest.$ac_ext"
2063case "(($ac_try" in
2064  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2065  *) ac_try_echo=$ac_try;;
2066esac
2067eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2068printf "%s\n" "$ac_try_echo"; } >&5
2069  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2070  ac_status=$?
2071  if test -s conftest.err; then
2072    grep -v '^ *+' conftest.err >conftest.er1
2073    cat conftest.er1 >&5
2074    mv -f conftest.er1 conftest.err
2075  fi
2076  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2077  test $ac_status = 0; } > conftest.i && {
2078	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2079	 test ! -s conftest.err
2080       }
2081then :
2082  ac_retval=0
2083else $as_nop
2084  printf "%s\n" "$as_me: failed program was:" >&5
2085sed 's/^/| /' conftest.$ac_ext >&5
2086
2087    ac_retval=1
2088fi
2089  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2090  as_fn_set_status $ac_retval
2091
2092} # ac_fn_c_try_cpp
2093
2094# ac_fn_c_try_link LINENO
2095# -----------------------
2096# Try to link conftest.$ac_ext, and return whether this succeeded.
2097ac_fn_c_try_link ()
2098{
2099  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2100  rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
2101  if { { ac_try="$ac_link"
2102case "(($ac_try" in
2103  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2104  *) ac_try_echo=$ac_try;;
2105esac
2106eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2107printf "%s\n" "$ac_try_echo"; } >&5
2108  (eval "$ac_link") 2>conftest.err
2109  ac_status=$?
2110  if test -s conftest.err; then
2111    grep -v '^ *+' conftest.err >conftest.er1
2112    cat conftest.er1 >&5
2113    mv -f conftest.er1 conftest.err
2114  fi
2115  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2116  test $ac_status = 0; } && {
2117	 test -z "$ac_c_werror_flag" ||
2118	 test ! -s conftest.err
2119       } && test -s conftest$ac_exeext && {
2120	 test "$cross_compiling" = yes ||
2121	 test -x conftest$ac_exeext
2122       }
2123then :
2124  ac_retval=0
2125else $as_nop
2126  printf "%s\n" "$as_me: failed program was:" >&5
2127sed 's/^/| /' conftest.$ac_ext >&5
2128
2129	ac_retval=1
2130fi
2131  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2132  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2133  # interfere with the next link command; also delete a directory that is
2134  # left behind by Apple's compiler.  We do this before executing the actions.
2135  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2136  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2137  as_fn_set_status $ac_retval
2138
2139} # ac_fn_c_try_link
2140
2141# ac_fn_c_try_run LINENO
2142# ----------------------
2143# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2144# executables *can* be run.
2145ac_fn_c_try_run ()
2146{
2147  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2148  if { { ac_try="$ac_link"
2149case "(($ac_try" in
2150  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2151  *) ac_try_echo=$ac_try;;
2152esac
2153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2154printf "%s\n" "$ac_try_echo"; } >&5
2155  (eval "$ac_link") 2>&5
2156  ac_status=$?
2157  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2158  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2159  { { case "(($ac_try" in
2160  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2161  *) ac_try_echo=$ac_try;;
2162esac
2163eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2164printf "%s\n" "$ac_try_echo"; } >&5
2165  (eval "$ac_try") 2>&5
2166  ac_status=$?
2167  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2168  test $ac_status = 0; }; }
2169then :
2170  ac_retval=0
2171else $as_nop
2172  printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2173       printf "%s\n" "$as_me: failed program was:" >&5
2174sed 's/^/| /' conftest.$ac_ext >&5
2175
2176       ac_retval=$ac_status
2177fi
2178  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2179  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2180  as_fn_set_status $ac_retval
2181
2182} # ac_fn_c_try_run
2183
2184# ac_fn_c_check_func LINENO FUNC VAR
2185# ----------------------------------
2186# Tests whether FUNC exists, setting the cache variable VAR accordingly
2187ac_fn_c_check_func ()
2188{
2189  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2190  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2191printf %s "checking for $2... " >&6; }
2192if eval test \${$3+y}
2193then :
2194  printf %s "(cached) " >&6
2195else $as_nop
2196  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197/* end confdefs.h.  */
2198/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2199   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2200#define $2 innocuous_$2
2201
2202/* System header to define __stub macros and hopefully few prototypes,
2203   which can conflict with char $2 (); below.  */
2204
2205#include <limits.h>
2206#undef $2
2207
2208/* Override any GCC internal prototype to avoid an error.
2209   Use char because int might match the return type of a GCC
2210   builtin and then its argument prototype would still apply.  */
2211#ifdef __cplusplus
2212extern "C"
2213#endif
2214char $2 ();
2215/* The GNU C library defines this for functions which it implements
2216    to always fail with ENOSYS.  Some functions are actually named
2217    something starting with __ and the normal name is an alias.  */
2218#if defined __stub_$2 || defined __stub___$2
2219choke me
2220#endif
2221
2222int
2223main (void)
2224{
2225return $2 ();
2226  ;
2227  return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_link "$LINENO"
2231then :
2232  eval "$3=yes"
2233else $as_nop
2234  eval "$3=no"
2235fi
2236rm -f core conftest.err conftest.$ac_objext conftest.beam \
2237    conftest$ac_exeext conftest.$ac_ext
2238fi
2239eval ac_res=\$$3
2240	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2241printf "%s\n" "$ac_res" >&6; }
2242  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2243
2244} # ac_fn_c_check_func
2245
2246# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2247# -------------------------------------------
2248# Tests whether TYPE exists after having included INCLUDES, setting cache
2249# variable VAR accordingly.
2250ac_fn_c_check_type ()
2251{
2252  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2253  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2254printf %s "checking for $2... " >&6; }
2255if eval test \${$3+y}
2256then :
2257  printf %s "(cached) " >&6
2258else $as_nop
2259  eval "$3=no"
2260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2261/* end confdefs.h.  */
2262$4
2263int
2264main (void)
2265{
2266if (sizeof ($2))
2267	 return 0;
2268  ;
2269  return 0;
2270}
2271_ACEOF
2272if ac_fn_c_try_compile "$LINENO"
2273then :
2274  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2275/* end confdefs.h.  */
2276$4
2277int
2278main (void)
2279{
2280if (sizeof (($2)))
2281	    return 0;
2282  ;
2283  return 0;
2284}
2285_ACEOF
2286if ac_fn_c_try_compile "$LINENO"
2287then :
2288
2289else $as_nop
2290  eval "$3=yes"
2291fi
2292rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2293fi
2294rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2295fi
2296eval ac_res=\$$3
2297	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2298printf "%s\n" "$ac_res" >&6; }
2299  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2300
2301} # ac_fn_c_check_type
2302
2303# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2304# --------------------------------------------
2305# Tries to find the compile-time value of EXPR in a program that includes
2306# INCLUDES, setting VAR accordingly. Returns whether the value could be
2307# computed
2308ac_fn_c_compute_int ()
2309{
2310  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2311  if test "$cross_compiling" = yes; then
2312    # Depending upon the size, compute the lo and hi bounds.
2313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h.  */
2315$4
2316int
2317main (void)
2318{
2319static int test_array [1 - 2 * !(($2) >= 0)];
2320test_array [0] = 0;
2321return test_array [0];
2322
2323  ;
2324  return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"
2328then :
2329  ac_lo=0 ac_mid=0
2330  while :; do
2331    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2332/* end confdefs.h.  */
2333$4
2334int
2335main (void)
2336{
2337static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2338test_array [0] = 0;
2339return test_array [0];
2340
2341  ;
2342  return 0;
2343}
2344_ACEOF
2345if ac_fn_c_try_compile "$LINENO"
2346then :
2347  ac_hi=$ac_mid; break
2348else $as_nop
2349  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2350			if test $ac_lo -le $ac_mid; then
2351			  ac_lo= ac_hi=
2352			  break
2353			fi
2354			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2355fi
2356rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2357  done
2358else $as_nop
2359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h.  */
2361$4
2362int
2363main (void)
2364{
2365static int test_array [1 - 2 * !(($2) < 0)];
2366test_array [0] = 0;
2367return test_array [0];
2368
2369  ;
2370  return 0;
2371}
2372_ACEOF
2373if ac_fn_c_try_compile "$LINENO"
2374then :
2375  ac_hi=-1 ac_mid=-1
2376  while :; do
2377    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h.  */
2379$4
2380int
2381main (void)
2382{
2383static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2384test_array [0] = 0;
2385return test_array [0];
2386
2387  ;
2388  return 0;
2389}
2390_ACEOF
2391if ac_fn_c_try_compile "$LINENO"
2392then :
2393  ac_lo=$ac_mid; break
2394else $as_nop
2395  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2396			if test $ac_mid -le $ac_hi; then
2397			  ac_lo= ac_hi=
2398			  break
2399			fi
2400			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2403  done
2404else $as_nop
2405  ac_lo= ac_hi=
2406fi
2407rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2408fi
2409rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2410# Binary search between lo and hi bounds.
2411while test "x$ac_lo" != "x$ac_hi"; do
2412  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2414/* end confdefs.h.  */
2415$4
2416int
2417main (void)
2418{
2419static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2420test_array [0] = 0;
2421return test_array [0];
2422
2423  ;
2424  return 0;
2425}
2426_ACEOF
2427if ac_fn_c_try_compile "$LINENO"
2428then :
2429  ac_hi=$ac_mid
2430else $as_nop
2431  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2432fi
2433rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2434done
2435case $ac_lo in #((
2436?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2437'') ac_retval=1 ;;
2438esac
2439  else
2440    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442$4
2443static long int longval (void) { return $2; }
2444static unsigned long int ulongval (void) { return $2; }
2445#include <stdio.h>
2446#include <stdlib.h>
2447int
2448main (void)
2449{
2450
2451  FILE *f = fopen ("conftest.val", "w");
2452  if (! f)
2453    return 1;
2454  if (($2) < 0)
2455    {
2456      long int i = longval ();
2457      if (i != ($2))
2458	return 1;
2459      fprintf (f, "%ld", i);
2460    }
2461  else
2462    {
2463      unsigned long int i = ulongval ();
2464      if (i != ($2))
2465	return 1;
2466      fprintf (f, "%lu", i);
2467    }
2468  /* Do not output a trailing newline, as this causes \r\n confusion
2469     on some platforms.  */
2470  return ferror (f) || fclose (f) != 0;
2471
2472  ;
2473  return 0;
2474}
2475_ACEOF
2476if ac_fn_c_try_run "$LINENO"
2477then :
2478  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2479else $as_nop
2480  ac_retval=1
2481fi
2482rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2483  conftest.$ac_objext conftest.beam conftest.$ac_ext
2484rm -f conftest.val
2485
2486  fi
2487  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488  as_fn_set_status $ac_retval
2489
2490} # ac_fn_c_compute_int
2491
2492# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2493# ------------------------------------------------------------------
2494# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2495# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2496ac_fn_check_decl ()
2497{
2498  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2499  as_decl_name=`echo $2|sed 's/ *(.*//'`
2500  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2501printf %s "checking whether $as_decl_name is declared... " >&6; }
2502if eval test \${$3+y}
2503then :
2504  printf %s "(cached) " >&6
2505else $as_nop
2506  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2507  eval ac_save_FLAGS=\$$6
2508  as_fn_append $6 " $5"
2509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2510/* end confdefs.h.  */
2511$4
2512int
2513main (void)
2514{
2515#ifndef $as_decl_name
2516#ifdef __cplusplus
2517  (void) $as_decl_use;
2518#else
2519  (void) $as_decl_name;
2520#endif
2521#endif
2522
2523  ;
2524  return 0;
2525}
2526_ACEOF
2527if ac_fn_c_try_compile "$LINENO"
2528then :
2529  eval "$3=yes"
2530else $as_nop
2531  eval "$3=no"
2532fi
2533rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2534  eval $6=\$ac_save_FLAGS
2535
2536fi
2537eval ac_res=\$$3
2538	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2539printf "%s\n" "$ac_res" >&6; }
2540  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2541
2542} # ac_fn_check_decl
2543
2544# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2545# ----------------------------------------------------
2546# Tries to find if the field MEMBER exists in type AGGR, after including
2547# INCLUDES, setting cache variable VAR accordingly.
2548ac_fn_c_check_member ()
2549{
2550  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2551  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2552printf %s "checking for $2.$3... " >&6; }
2553if eval test \${$4+y}
2554then :
2555  printf %s "(cached) " >&6
2556else $as_nop
2557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* end confdefs.h.  */
2559$5
2560int
2561main (void)
2562{
2563static $2 ac_aggr;
2564if (ac_aggr.$3)
2565return 0;
2566  ;
2567  return 0;
2568}
2569_ACEOF
2570if ac_fn_c_try_compile "$LINENO"
2571then :
2572  eval "$4=yes"
2573else $as_nop
2574  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2575/* end confdefs.h.  */
2576$5
2577int
2578main (void)
2579{
2580static $2 ac_aggr;
2581if (sizeof ac_aggr.$3)
2582return 0;
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587if ac_fn_c_try_compile "$LINENO"
2588then :
2589  eval "$4=yes"
2590else $as_nop
2591  eval "$4=no"
2592fi
2593rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2594fi
2595rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2596fi
2597eval ac_res=\$$4
2598	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2599printf "%s\n" "$ac_res" >&6; }
2600  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2601
2602} # ac_fn_c_check_member
2603ac_configure_args_raw=
2604for ac_arg
2605do
2606  case $ac_arg in
2607  *\'*)
2608    ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2609  esac
2610  as_fn_append ac_configure_args_raw " '$ac_arg'"
2611done
2612
2613case $ac_configure_args_raw in
2614  *$as_nl*)
2615    ac_safe_unquote= ;;
2616  *)
2617    ac_unsafe_z='|&;<>()$`\\"*?[ ''	' # This string ends in space, tab.
2618    ac_unsafe_a="$ac_unsafe_z#~"
2619    ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2620    ac_configure_args_raw=`      printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2621esac
2622
2623cat >config.log <<_ACEOF
2624This file contains any messages produced by compilers while
2625running configure, to aid debugging if configure makes a mistake.
2626
2627It was created by ntp $as_me 4.2.8p17, which was
2628generated by GNU Autoconf 2.71.  Invocation command line was
2629
2630  $ $0$ac_configure_args_raw
2631
2632_ACEOF
2633exec 5>>config.log
2634{
2635cat <<_ASUNAME
2636## --------- ##
2637## Platform. ##
2638## --------- ##
2639
2640hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2641uname -m = `(uname -m) 2>/dev/null || echo unknown`
2642uname -r = `(uname -r) 2>/dev/null || echo unknown`
2643uname -s = `(uname -s) 2>/dev/null || echo unknown`
2644uname -v = `(uname -v) 2>/dev/null || echo unknown`
2645
2646/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2647/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2648
2649/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2650/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2651/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2652/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2653/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2654/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2655/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2656
2657_ASUNAME
2658
2659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2660for as_dir in $PATH
2661do
2662  IFS=$as_save_IFS
2663  case $as_dir in #(((
2664    '') as_dir=./ ;;
2665    */) ;;
2666    *) as_dir=$as_dir/ ;;
2667  esac
2668    printf "%s\n" "PATH: $as_dir"
2669  done
2670IFS=$as_save_IFS
2671
2672} >&5
2673
2674cat >&5 <<_ACEOF
2675
2676
2677## ----------- ##
2678## Core tests. ##
2679## ----------- ##
2680
2681_ACEOF
2682
2683
2684# Keep a trace of the command line.
2685# Strip out --no-create and --no-recursion so they do not pile up.
2686# Strip out --silent because we don't want to record it for future runs.
2687# Also quote any args containing shell meta-characters.
2688# Make two passes to allow for proper duplicate-argument suppression.
2689ac_configure_args=
2690ac_configure_args0=
2691ac_configure_args1=
2692ac_must_keep_next=false
2693for ac_pass in 1 2
2694do
2695  for ac_arg
2696  do
2697    case $ac_arg in
2698    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2699    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2700    | -silent | --silent | --silen | --sile | --sil)
2701      continue ;;
2702    *\'*)
2703      ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2704    esac
2705    case $ac_pass in
2706    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2707    2)
2708      as_fn_append ac_configure_args1 " '$ac_arg'"
2709      if test $ac_must_keep_next = true; then
2710	ac_must_keep_next=false # Got value, back to normal.
2711      else
2712	case $ac_arg in
2713	  *=* | --config-cache | -C | -disable-* | --disable-* \
2714	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2715	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2716	  | -with-* | --with-* | -without-* | --without-* | --x)
2717	    case "$ac_configure_args0 " in
2718	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2719	    esac
2720	    ;;
2721	  -* ) ac_must_keep_next=true ;;
2722	esac
2723      fi
2724      as_fn_append ac_configure_args " '$ac_arg'"
2725      ;;
2726    esac
2727  done
2728done
2729{ ac_configure_args0=; unset ac_configure_args0;}
2730{ ac_configure_args1=; unset ac_configure_args1;}
2731
2732# When interrupted or exit'd, cleanup temporary files, and complete
2733# config.log.  We remove comments because anyway the quotes in there
2734# would cause problems or look ugly.
2735# WARNING: Use '\'' to represent an apostrophe within the trap.
2736# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2737trap 'exit_status=$?
2738  # Sanitize IFS.
2739  IFS=" ""	$as_nl"
2740  # Save into config.log some information that might help in debugging.
2741  {
2742    echo
2743
2744    printf "%s\n" "## ---------------- ##
2745## Cache variables. ##
2746## ---------------- ##"
2747    echo
2748    # The following way of writing the cache mishandles newlines in values,
2749(
2750  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2751    eval ac_val=\$$ac_var
2752    case $ac_val in #(
2753    *${as_nl}*)
2754      case $ac_var in #(
2755      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2756printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2757      esac
2758      case $ac_var in #(
2759      _ | IFS | as_nl) ;; #(
2760      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2761      *) { eval $ac_var=; unset $ac_var;} ;;
2762      esac ;;
2763    esac
2764  done
2765  (set) 2>&1 |
2766    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2767    *${as_nl}ac_space=\ *)
2768      sed -n \
2769	"s/'\''/'\''\\\\'\'''\''/g;
2770	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2771      ;; #(
2772    *)
2773      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2774      ;;
2775    esac |
2776    sort
2777)
2778    echo
2779
2780    printf "%s\n" "## ----------------- ##
2781## Output variables. ##
2782## ----------------- ##"
2783    echo
2784    for ac_var in $ac_subst_vars
2785    do
2786      eval ac_val=\$$ac_var
2787      case $ac_val in
2788      *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2789      esac
2790      printf "%s\n" "$ac_var='\''$ac_val'\''"
2791    done | sort
2792    echo
2793
2794    if test -n "$ac_subst_files"; then
2795      printf "%s\n" "## ------------------- ##
2796## File substitutions. ##
2797## ------------------- ##"
2798      echo
2799      for ac_var in $ac_subst_files
2800      do
2801	eval ac_val=\$$ac_var
2802	case $ac_val in
2803	*\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804	esac
2805	printf "%s\n" "$ac_var='\''$ac_val'\''"
2806      done | sort
2807      echo
2808    fi
2809
2810    if test -s confdefs.h; then
2811      printf "%s\n" "## ----------- ##
2812## confdefs.h. ##
2813## ----------- ##"
2814      echo
2815      cat confdefs.h
2816      echo
2817    fi
2818    test "$ac_signal" != 0 &&
2819      printf "%s\n" "$as_me: caught signal $ac_signal"
2820    printf "%s\n" "$as_me: exit $exit_status"
2821  } >&5
2822  rm -f core *.core core.conftest.* &&
2823    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2824    exit $exit_status
2825' 0
2826for ac_signal in 1 2 13 15; do
2827  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2828done
2829ac_signal=0
2830
2831# confdefs.h avoids OS command line length limits that DEFS can exceed.
2832rm -f -r conftest* confdefs.h
2833
2834printf "%s\n" "/* confdefs.h */" > confdefs.h
2835
2836# Predefined preprocessor variables.
2837
2838printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2839
2840printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2841
2842printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2843
2844printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2845
2846printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2847
2848printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2849
2850
2851# Let the site file select an alternate cache file if it wants to.
2852# Prefer an explicitly selected file to automatically selected ones.
2853if test -n "$CONFIG_SITE"; then
2854  ac_site_files="$CONFIG_SITE"
2855elif test "x$prefix" != xNONE; then
2856  ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2857else
2858  ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2859fi
2860
2861for ac_site_file in $ac_site_files
2862do
2863  case $ac_site_file in #(
2864  */*) :
2865     ;; #(
2866  *) :
2867    ac_site_file=./$ac_site_file ;;
2868esac
2869  if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2870    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2871printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2872    sed 's/^/| /' "$ac_site_file" >&5
2873    . "$ac_site_file" \
2874      || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2875printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2876as_fn_error $? "failed to load site script $ac_site_file
2877See \`config.log' for more details" "$LINENO" 5; }
2878  fi
2879done
2880
2881if test -r "$cache_file"; then
2882  # Some versions of bash will fail to source /dev/null (special files
2883  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2884  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2885    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2886printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2887    case $cache_file in
2888      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2889      *)                      . "./$cache_file";;
2890    esac
2891  fi
2892else
2893  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2894printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2895  >$cache_file
2896fi
2897
2898# Test code for whether the C compiler supports C89 (global declarations)
2899ac_c_conftest_c89_globals='
2900/* Does the compiler advertise C89 conformance?
2901   Do not test the value of __STDC__, because some compilers set it to 0
2902   while being otherwise adequately conformant. */
2903#if !defined __STDC__
2904# error "Compiler does not advertise C89 conformance"
2905#endif
2906
2907#include <stddef.h>
2908#include <stdarg.h>
2909struct stat;
2910/* Most of the following tests are stolen from RCS 5.7 src/conf.sh.  */
2911struct buf { int x; };
2912struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2913static char *e (p, i)
2914     char **p;
2915     int i;
2916{
2917  return p[i];
2918}
2919static char *f (char * (*g) (char **, int), char **p, ...)
2920{
2921  char *s;
2922  va_list v;
2923  va_start (v,p);
2924  s = g (p, va_arg (v,int));
2925  va_end (v);
2926  return s;
2927}
2928
2929/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
2930   function prototypes and stuff, but not \xHH hex character constants.
2931   These do not provoke an error unfortunately, instead are silently treated
2932   as an "x".  The following induces an error, until -std is added to get
2933   proper ANSI mode.  Curiously \x00 != x always comes out true, for an
2934   array size at least.  It is necessary to write \x00 == 0 to get something
2935   that is true only with -std.  */
2936int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2937
2938/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2939   inside strings and character constants.  */
2940#define FOO(x) '\''x'\''
2941int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2942
2943int test (int i, double x);
2944struct s1 {int (*f) (int a);};
2945struct s2 {int (*f) (double a);};
2946int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2947               int, int);'
2948
2949# Test code for whether the C compiler supports C89 (body of main).
2950ac_c_conftest_c89_main='
2951ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2952'
2953
2954# Test code for whether the C compiler supports C99 (global declarations)
2955ac_c_conftest_c99_globals='
2956// Does the compiler advertise C99 conformance?
2957#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2958# error "Compiler does not advertise C99 conformance"
2959#endif
2960
2961#include <stdbool.h>
2962extern int puts (const char *);
2963extern int printf (const char *, ...);
2964extern int dprintf (int, const char *, ...);
2965extern void *malloc (size_t);
2966
2967// Check varargs macros.  These examples are taken from C99 6.10.3.5.
2968// dprintf is used instead of fprintf to avoid needing to declare
2969// FILE and stderr.
2970#define debug(...) dprintf (2, __VA_ARGS__)
2971#define showlist(...) puts (#__VA_ARGS__)
2972#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2973static void
2974test_varargs_macros (void)
2975{
2976  int x = 1234;
2977  int y = 5678;
2978  debug ("Flag");
2979  debug ("X = %d\n", x);
2980  showlist (The first, second, and third items.);
2981  report (x>y, "x is %d but y is %d", x, y);
2982}
2983
2984// Check long long types.
2985#define BIG64 18446744073709551615ull
2986#define BIG32 4294967295ul
2987#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2988#if !BIG_OK
2989  #error "your preprocessor is broken"
2990#endif
2991#if BIG_OK
2992#else
2993  #error "your preprocessor is broken"
2994#endif
2995static long long int bignum = -9223372036854775807LL;
2996static unsigned long long int ubignum = BIG64;
2997
2998struct incomplete_array
2999{
3000  int datasize;
3001  double data[];
3002};
3003
3004struct named_init {
3005  int number;
3006  const wchar_t *name;
3007  double average;
3008};
3009
3010typedef const char *ccp;
3011
3012static inline int
3013test_restrict (ccp restrict text)
3014{
3015  // See if C++-style comments work.
3016  // Iterate through items via the restricted pointer.
3017  // Also check for declarations in for loops.
3018  for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
3019    continue;
3020  return 0;
3021}
3022
3023// Check varargs and va_copy.
3024static bool
3025test_varargs (const char *format, ...)
3026{
3027  va_list args;
3028  va_start (args, format);
3029  va_list args_copy;
3030  va_copy (args_copy, args);
3031
3032  const char *str = "";
3033  int number = 0;
3034  float fnumber = 0;
3035
3036  while (*format)
3037    {
3038      switch (*format++)
3039	{
3040	case '\''s'\'': // string
3041	  str = va_arg (args_copy, const char *);
3042	  break;
3043	case '\''d'\'': // int
3044	  number = va_arg (args_copy, int);
3045	  break;
3046	case '\''f'\'': // float
3047	  fnumber = va_arg (args_copy, double);
3048	  break;
3049	default:
3050	  break;
3051	}
3052    }
3053  va_end (args_copy);
3054  va_end (args);
3055
3056  return *str && number && fnumber;
3057}
3058'
3059
3060# Test code for whether the C compiler supports C99 (body of main).
3061ac_c_conftest_c99_main='
3062  // Check bool.
3063  _Bool success = false;
3064  success |= (argc != 0);
3065
3066  // Check restrict.
3067  if (test_restrict ("String literal") == 0)
3068    success = true;
3069  char *restrict newvar = "Another string";
3070
3071  // Check varargs.
3072  success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
3073  test_varargs_macros ();
3074
3075  // Check flexible array members.
3076  struct incomplete_array *ia =
3077    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3078  ia->datasize = 10;
3079  for (int i = 0; i < ia->datasize; ++i)
3080    ia->data[i] = i * 1.234;
3081
3082  // Check named initializers.
3083  struct named_init ni = {
3084    .number = 34,
3085    .name = L"Test wide string",
3086    .average = 543.34343,
3087  };
3088
3089  ni.number = 58;
3090
3091  int dynamic_array[ni.number];
3092  dynamic_array[0] = argv[0][0];
3093  dynamic_array[ni.number - 1] = 543;
3094
3095  // work around unused variable warnings
3096  ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3097	 || dynamic_array[ni.number - 1] != 543);
3098'
3099
3100# Test code for whether the C compiler supports C11 (global declarations)
3101ac_c_conftest_c11_globals='
3102// Does the compiler advertise C11 conformance?
3103#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3104# error "Compiler does not advertise C11 conformance"
3105#endif
3106
3107// Check _Alignas.
3108char _Alignas (double) aligned_as_double;
3109char _Alignas (0) no_special_alignment;
3110extern char aligned_as_int;
3111char _Alignas (0) _Alignas (int) aligned_as_int;
3112
3113// Check _Alignof.
3114enum
3115{
3116  int_alignment = _Alignof (int),
3117  int_array_alignment = _Alignof (int[100]),
3118  char_alignment = _Alignof (char)
3119};
3120_Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3121
3122// Check _Noreturn.
3123int _Noreturn does_not_return (void) { for (;;) continue; }
3124
3125// Check _Static_assert.
3126struct test_static_assert
3127{
3128  int x;
3129  _Static_assert (sizeof (int) <= sizeof (long int),
3130                  "_Static_assert does not work in struct");
3131  long int y;
3132};
3133
3134// Check UTF-8 literals.
3135#define u8 syntax error!
3136char const utf8_literal[] = u8"happens to be ASCII" "another string";
3137
3138// Check duplicate typedefs.
3139typedef long *long_ptr;
3140typedef long int *long_ptr;
3141typedef long_ptr long_ptr;
3142
3143// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3144struct anonymous
3145{
3146  union {
3147    struct { int i; int j; };
3148    struct { int k; long int l; } w;
3149  };
3150  int m;
3151} v1;
3152'
3153
3154# Test code for whether the C compiler supports C11 (body of main).
3155ac_c_conftest_c11_main='
3156  _Static_assert ((offsetof (struct anonymous, i)
3157		   == offsetof (struct anonymous, w.k)),
3158		  "Anonymous union alignment botch");
3159  v1.i = 2;
3160  v1.w.k = 5;
3161  ok |= v1.i != 5;
3162'
3163
3164# Test code for whether the C compiler supports C11 (complete).
3165ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3166${ac_c_conftest_c99_globals}
3167${ac_c_conftest_c11_globals}
3168
3169int
3170main (int argc, char **argv)
3171{
3172  int ok = 0;
3173  ${ac_c_conftest_c89_main}
3174  ${ac_c_conftest_c99_main}
3175  ${ac_c_conftest_c11_main}
3176  return ok;
3177}
3178"
3179
3180# Test code for whether the C compiler supports C99 (complete).
3181ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3182${ac_c_conftest_c99_globals}
3183
3184int
3185main (int argc, char **argv)
3186{
3187  int ok = 0;
3188  ${ac_c_conftest_c89_main}
3189  ${ac_c_conftest_c99_main}
3190  return ok;
3191}
3192"
3193
3194# Test code for whether the C compiler supports C89 (complete).
3195ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3196
3197int
3198main (int argc, char **argv)
3199{
3200  int ok = 0;
3201  ${ac_c_conftest_c89_main}
3202  return ok;
3203}
3204"
3205
3206as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3207as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3208as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3209as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3210as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3211as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3212as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3213as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3214as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3215as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H"
3216as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H"
3217as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF"
3218as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
3219as_fn_append ac_func_c_list " fork HAVE_FORK"
3220as_fn_append ac_func_c_list " vfork HAVE_VFORK"
3221as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H"
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=20230326
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.8p17'
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
4269ntp_atom_ok=${ntp_atom_ok=no}
4270ntp_oncore_ok=${ntp_oncore_ok=no}
4271ntp_parse_ok=${ntp_parse_ok=no}
4272ntp_ripe_ncc_ok=${ntp_parse_ok=no}
4273ntp_jupiter_ok=${ntp_jupiter_ok=no}
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284DEPDIR="${am__leading_dot}deps"
4285
4286ac_config_commands="$ac_config_commands depfiles"
4287
4288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
4289printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; }
4290cat > confinc.mk << 'END'
4291am__doit:
4292	@echo this is the am__doit target >confinc.out
4293.PHONY: am__doit
4294END
4295am__include="#"
4296am__quote=
4297# BSD make does it like this.
4298echo '.include "confinc.mk" # ignored' > confmf.BSD
4299# Other make implementations (GNU, Solaris 10, AIX) do it like this.
4300echo 'include confinc.mk # ignored' > confmf.GNU
4301_am_result=no
4302for s in GNU BSD; do
4303  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
4304   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
4305   ac_status=$?
4306   echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307   (exit $ac_status); }
4308  case $?:`cat confinc.out 2>/dev/null` in #(
4309  '0:this is the am__doit target') :
4310    case $s in #(
4311  BSD) :
4312    am__include='.include' am__quote='"' ;; #(
4313  *) :
4314    am__include='include' am__quote='' ;;
4315esac ;; #(
4316  *) :
4317     ;;
4318esac
4319  if test "$am__include" != "#"; then
4320    _am_result="yes ($s style)"
4321    break
4322  fi
4323done
4324rm -f confinc.* confmf.*
4325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
4326printf "%s\n" "${_am_result}" >&6; }
4327
4328# Check whether --enable-dependency-tracking was given.
4329if test ${enable_dependency_tracking+y}
4330then :
4331  enableval=$enable_dependency_tracking;
4332fi
4333
4334if test "x$enable_dependency_tracking" != xno; then
4335  am_depcomp="$ac_aux_dir/depcomp"
4336  AMDEPBACKSLASH='\'
4337  am__nodep='_no'
4338fi
4339 if test "x$enable_dependency_tracking" != xno; then
4340  AMDEP_TRUE=
4341  AMDEP_FALSE='#'
4342else
4343  AMDEP_TRUE='#'
4344  AMDEP_FALSE=
4345fi
4346
4347
4348
4349case "$build" in
4350 *-*-freebsd1?.*)
4351    cclist=cc
4352    ;;
4353 *)
4354    cclist="cc gcc"
4355    ;;
4356esac
4357
4358
4359#AC_USE_SYSTEM_EXTENSIONS
4360
4361ac_ext=c
4362ac_cpp='$CPP $CPPFLAGS'
4363ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4364ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4365ac_compiler_gnu=$ac_cv_c_compiler_gnu
4366if test -n "$ac_tool_prefix"; then
4367  for ac_prog in $cclist
4368  do
4369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372printf %s "checking for $ac_word... " >&6; }
4373if test ${ac_cv_prog_CC+y}
4374then :
4375  printf %s "(cached) " >&6
4376else $as_nop
4377  if test -n "$CC"; then
4378  ac_cv_prog_CC="$CC" # Let the user override the test.
4379else
4380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH
4382do
4383  IFS=$as_save_IFS
4384  case $as_dir in #(((
4385    '') as_dir=./ ;;
4386    */) ;;
4387    *) as_dir=$as_dir/ ;;
4388  esac
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4391    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4392    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399fi
4400fi
4401CC=$ac_cv_prog_CC
4402if test -n "$CC"; then
4403  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4404printf "%s\n" "$CC" >&6; }
4405else
4406  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4407printf "%s\n" "no" >&6; }
4408fi
4409
4410
4411    test -n "$CC" && break
4412  done
4413fi
4414if test -z "$CC"; then
4415  ac_ct_CC=$CC
4416  for ac_prog in $cclist
4417do
4418  # Extract the first word of "$ac_prog", so it can be a program name with args.
4419set dummy $ac_prog; ac_word=$2
4420{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4421printf %s "checking for $ac_word... " >&6; }
4422if test ${ac_cv_prog_ac_ct_CC+y}
4423then :
4424  printf %s "(cached) " >&6
4425else $as_nop
4426  if test -n "$ac_ct_CC"; then
4427  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4428else
4429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  case $as_dir in #(((
4434    '') as_dir=./ ;;
4435    */) ;;
4436    *) as_dir=$as_dir/ ;;
4437  esac
4438    for ac_exec_ext in '' $ac_executable_extensions; do
4439  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4440    ac_cv_prog_ac_ct_CC="$ac_prog"
4441    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4442    break 2
4443  fi
4444done
4445  done
4446IFS=$as_save_IFS
4447
4448fi
4449fi
4450ac_ct_CC=$ac_cv_prog_ac_ct_CC
4451if test -n "$ac_ct_CC"; then
4452  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4453printf "%s\n" "$ac_ct_CC" >&6; }
4454else
4455  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4456printf "%s\n" "no" >&6; }
4457fi
4458
4459
4460  test -n "$ac_ct_CC" && break
4461done
4462
4463  if test "x$ac_ct_CC" = x; then
4464    CC=""
4465  else
4466    case $cross_compiling:$ac_tool_warned in
4467yes:)
4468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4469printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4470ac_tool_warned=yes ;;
4471esac
4472    CC=$ac_ct_CC
4473  fi
4474fi
4475
4476
4477test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4478printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4479as_fn_error $? "no acceptable C compiler found in \$PATH
4480See \`config.log' for more details" "$LINENO" 5; }
4481
4482# Provide some information about the compiler.
4483printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4484set X $ac_compile
4485ac_compiler=$2
4486for ac_option in --version -v -V -qversion -version; do
4487  { { ac_try="$ac_compiler $ac_option >&5"
4488case "(($ac_try" in
4489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4490  *) ac_try_echo=$ac_try;;
4491esac
4492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4493printf "%s\n" "$ac_try_echo"; } >&5
4494  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4495  ac_status=$?
4496  if test -s conftest.err; then
4497    sed '10a\
4498... rest of stderr output deleted ...
4499         10q' conftest.err >conftest.er1
4500    cat conftest.er1 >&5
4501  fi
4502  rm -f conftest.er1 conftest.err
4503  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4504  test $ac_status = 0; }
4505done
4506
4507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4508/* end confdefs.h.  */
4509
4510int
4511main (void)
4512{
4513
4514  ;
4515  return 0;
4516}
4517_ACEOF
4518ac_clean_files_save=$ac_clean_files
4519ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4520# Try to create an executable without -o first, disregard a.out.
4521# It will help us diagnose broken compilers, and finding out an intuition
4522# of exeext.
4523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4524printf %s "checking whether the C compiler works... " >&6; }
4525ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4526
4527# The possible output files:
4528ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4529
4530ac_rmfiles=
4531for ac_file in $ac_files
4532do
4533  case $ac_file in
4534    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4535    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4536  esac
4537done
4538rm -f $ac_rmfiles
4539
4540if { { ac_try="$ac_link_default"
4541case "(($ac_try" in
4542  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4543  *) ac_try_echo=$ac_try;;
4544esac
4545eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4546printf "%s\n" "$ac_try_echo"; } >&5
4547  (eval "$ac_link_default") 2>&5
4548  ac_status=$?
4549  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4550  test $ac_status = 0; }
4551then :
4552  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4553# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4554# in a Makefile.  We should not override ac_cv_exeext if it was cached,
4555# so that the user can short-circuit this test for compilers unknown to
4556# Autoconf.
4557for ac_file in $ac_files ''
4558do
4559  test -f "$ac_file" || continue
4560  case $ac_file in
4561    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4562	;;
4563    [ab].out )
4564	# We found the default executable, but exeext='' is most
4565	# certainly right.
4566	break;;
4567    *.* )
4568	if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
4569	then :; else
4570	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4571	fi
4572	# We set ac_cv_exeext here because the later test for it is not
4573	# safe: cross compilers may not add the suffix if given an `-o'
4574	# argument, so we may need to know it at that point already.
4575	# Even if this section looks crufty: it has the advantage of
4576	# actually working.
4577	break;;
4578    * )
4579	break;;
4580  esac
4581done
4582test "$ac_cv_exeext" = no && ac_cv_exeext=
4583
4584else $as_nop
4585  ac_file=''
4586fi
4587if test -z "$ac_file"
4588then :
4589  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4590printf "%s\n" "no" >&6; }
4591printf "%s\n" "$as_me: failed program was:" >&5
4592sed 's/^/| /' conftest.$ac_ext >&5
4593
4594{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4595printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4596as_fn_error 77 "C compiler cannot create executables
4597See \`config.log' for more details" "$LINENO" 5; }
4598else $as_nop
4599  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4600printf "%s\n" "yes" >&6; }
4601fi
4602{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4603printf %s "checking for C compiler default output file name... " >&6; }
4604{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4605printf "%s\n" "$ac_file" >&6; }
4606ac_exeext=$ac_cv_exeext
4607
4608rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4609ac_clean_files=$ac_clean_files_save
4610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4611printf %s "checking for suffix of executables... " >&6; }
4612if { { ac_try="$ac_link"
4613case "(($ac_try" in
4614  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4615  *) ac_try_echo=$ac_try;;
4616esac
4617eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4618printf "%s\n" "$ac_try_echo"; } >&5
4619  (eval "$ac_link") 2>&5
4620  ac_status=$?
4621  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4622  test $ac_status = 0; }
4623then :
4624  # If both `conftest.exe' and `conftest' are `present' (well, observable)
4625# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
4626# work properly (i.e., refer to `conftest.exe'), while it won't with
4627# `rm'.
4628for ac_file in conftest.exe conftest conftest.*; do
4629  test -f "$ac_file" || continue
4630  case $ac_file in
4631    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4632    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4633	  break;;
4634    * ) break;;
4635  esac
4636done
4637else $as_nop
4638  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4639printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4640as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4641See \`config.log' for more details" "$LINENO" 5; }
4642fi
4643rm -f conftest conftest$ac_cv_exeext
4644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4645printf "%s\n" "$ac_cv_exeext" >&6; }
4646
4647rm -f conftest.$ac_ext
4648EXEEXT=$ac_cv_exeext
4649ac_exeext=$EXEEXT
4650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4651/* end confdefs.h.  */
4652#include <stdio.h>
4653int
4654main (void)
4655{
4656FILE *f = fopen ("conftest.out", "w");
4657 return ferror (f) || fclose (f) != 0;
4658
4659  ;
4660  return 0;
4661}
4662_ACEOF
4663ac_clean_files="$ac_clean_files conftest.out"
4664# Check that the compiler produces executables we can run.  If not, either
4665# the compiler is broken, or we cross compile.
4666{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4667printf %s "checking whether we are cross compiling... " >&6; }
4668if test "$cross_compiling" != yes; then
4669  { { ac_try="$ac_link"
4670case "(($ac_try" in
4671  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4672  *) ac_try_echo=$ac_try;;
4673esac
4674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4675printf "%s\n" "$ac_try_echo"; } >&5
4676  (eval "$ac_link") 2>&5
4677  ac_status=$?
4678  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4679  test $ac_status = 0; }
4680  if { ac_try='./conftest$ac_cv_exeext'
4681  { { case "(($ac_try" in
4682  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4683  *) ac_try_echo=$ac_try;;
4684esac
4685eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4686printf "%s\n" "$ac_try_echo"; } >&5
4687  (eval "$ac_try") 2>&5
4688  ac_status=$?
4689  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4690  test $ac_status = 0; }; }; then
4691    cross_compiling=no
4692  else
4693    if test "$cross_compiling" = maybe; then
4694	cross_compiling=yes
4695    else
4696	{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4697printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4698as_fn_error 77 "cannot run C compiled programs.
4699If you meant to cross compile, use \`--host'.
4700See \`config.log' for more details" "$LINENO" 5; }
4701    fi
4702  fi
4703fi
4704{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4705printf "%s\n" "$cross_compiling" >&6; }
4706
4707rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4708ac_clean_files=$ac_clean_files_save
4709{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4710printf %s "checking for suffix of object files... " >&6; }
4711if test ${ac_cv_objext+y}
4712then :
4713  printf %s "(cached) " >&6
4714else $as_nop
4715  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4716/* end confdefs.h.  */
4717
4718int
4719main (void)
4720{
4721
4722  ;
4723  return 0;
4724}
4725_ACEOF
4726rm -f conftest.o conftest.obj
4727if { { ac_try="$ac_compile"
4728case "(($ac_try" in
4729  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4730  *) ac_try_echo=$ac_try;;
4731esac
4732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4733printf "%s\n" "$ac_try_echo"; } >&5
4734  (eval "$ac_compile") 2>&5
4735  ac_status=$?
4736  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4737  test $ac_status = 0; }
4738then :
4739  for ac_file in conftest.o conftest.obj conftest.*; do
4740  test -f "$ac_file" || continue;
4741  case $ac_file in
4742    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4743    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4744       break;;
4745  esac
4746done
4747else $as_nop
4748  printf "%s\n" "$as_me: failed program was:" >&5
4749sed 's/^/| /' conftest.$ac_ext >&5
4750
4751{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4752printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
4753as_fn_error $? "cannot compute suffix of object files: cannot compile
4754See \`config.log' for more details" "$LINENO" 5; }
4755fi
4756rm -f conftest.$ac_cv_objext conftest.$ac_ext
4757fi
4758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4759printf "%s\n" "$ac_cv_objext" >&6; }
4760OBJEXT=$ac_cv_objext
4761ac_objext=$OBJEXT
4762{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
4763printf %s "checking whether the compiler supports GNU C... " >&6; }
4764if test ${ac_cv_c_compiler_gnu+y}
4765then :
4766  printf %s "(cached) " >&6
4767else $as_nop
4768  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769/* end confdefs.h.  */
4770
4771int
4772main (void)
4773{
4774#ifndef __GNUC__
4775       choke me
4776#endif
4777
4778  ;
4779  return 0;
4780}
4781_ACEOF
4782if ac_fn_c_try_compile "$LINENO"
4783then :
4784  ac_compiler_gnu=yes
4785else $as_nop
4786  ac_compiler_gnu=no
4787fi
4788rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4789ac_cv_c_compiler_gnu=$ac_compiler_gnu
4790
4791fi
4792{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4793printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4794ac_compiler_gnu=$ac_cv_c_compiler_gnu
4795
4796if test $ac_compiler_gnu = yes; then
4797  GCC=yes
4798else
4799  GCC=
4800fi
4801ac_test_CFLAGS=${CFLAGS+y}
4802ac_save_CFLAGS=$CFLAGS
4803{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4804printf %s "checking whether $CC accepts -g... " >&6; }
4805if test ${ac_cv_prog_cc_g+y}
4806then :
4807  printf %s "(cached) " >&6
4808else $as_nop
4809  ac_save_c_werror_flag=$ac_c_werror_flag
4810   ac_c_werror_flag=yes
4811   ac_cv_prog_cc_g=no
4812   CFLAGS="-g"
4813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4814/* end confdefs.h.  */
4815
4816int
4817main (void)
4818{
4819
4820  ;
4821  return 0;
4822}
4823_ACEOF
4824if ac_fn_c_try_compile "$LINENO"
4825then :
4826  ac_cv_prog_cc_g=yes
4827else $as_nop
4828  CFLAGS=""
4829      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4830/* end confdefs.h.  */
4831
4832int
4833main (void)
4834{
4835
4836  ;
4837  return 0;
4838}
4839_ACEOF
4840if ac_fn_c_try_compile "$LINENO"
4841then :
4842
4843else $as_nop
4844  ac_c_werror_flag=$ac_save_c_werror_flag
4845	 CFLAGS="-g"
4846	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4847/* end confdefs.h.  */
4848
4849int
4850main (void)
4851{
4852
4853  ;
4854  return 0;
4855}
4856_ACEOF
4857if ac_fn_c_try_compile "$LINENO"
4858then :
4859  ac_cv_prog_cc_g=yes
4860fi
4861rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4862fi
4863rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4864fi
4865rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4866   ac_c_werror_flag=$ac_save_c_werror_flag
4867fi
4868{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4869printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4870if test $ac_test_CFLAGS; then
4871  CFLAGS=$ac_save_CFLAGS
4872elif test $ac_cv_prog_cc_g = yes; then
4873  if test "$GCC" = yes; then
4874    CFLAGS="-g -O2"
4875  else
4876    CFLAGS="-g"
4877  fi
4878else
4879  if test "$GCC" = yes; then
4880    CFLAGS="-O2"
4881  else
4882    CFLAGS=
4883  fi
4884fi
4885ac_prog_cc_stdc=no
4886if test x$ac_prog_cc_stdc = xno
4887then :
4888  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4889printf %s "checking for $CC option to enable C11 features... " >&6; }
4890if test ${ac_cv_prog_cc_c11+y}
4891then :
4892  printf %s "(cached) " >&6
4893else $as_nop
4894  ac_cv_prog_cc_c11=no
4895ac_save_CC=$CC
4896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4897/* end confdefs.h.  */
4898$ac_c_conftest_c11_program
4899_ACEOF
4900for ac_arg in '' -std=gnu11
4901do
4902  CC="$ac_save_CC $ac_arg"
4903  if ac_fn_c_try_compile "$LINENO"
4904then :
4905  ac_cv_prog_cc_c11=$ac_arg
4906fi
4907rm -f core conftest.err conftest.$ac_objext conftest.beam
4908  test "x$ac_cv_prog_cc_c11" != "xno" && break
4909done
4910rm -f conftest.$ac_ext
4911CC=$ac_save_CC
4912fi
4913
4914if test "x$ac_cv_prog_cc_c11" = xno
4915then :
4916  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4917printf "%s\n" "unsupported" >&6; }
4918else $as_nop
4919  if test "x$ac_cv_prog_cc_c11" = x
4920then :
4921  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4922printf "%s\n" "none needed" >&6; }
4923else $as_nop
4924  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4925printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4926     CC="$CC $ac_cv_prog_cc_c11"
4927fi
4928  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4929  ac_prog_cc_stdc=c11
4930fi
4931fi
4932if test x$ac_prog_cc_stdc = xno
4933then :
4934  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4935printf %s "checking for $CC option to enable C99 features... " >&6; }
4936if test ${ac_cv_prog_cc_c99+y}
4937then :
4938  printf %s "(cached) " >&6
4939else $as_nop
4940  ac_cv_prog_cc_c99=no
4941ac_save_CC=$CC
4942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4943/* end confdefs.h.  */
4944$ac_c_conftest_c99_program
4945_ACEOF
4946for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4947do
4948  CC="$ac_save_CC $ac_arg"
4949  if ac_fn_c_try_compile "$LINENO"
4950then :
4951  ac_cv_prog_cc_c99=$ac_arg
4952fi
4953rm -f core conftest.err conftest.$ac_objext conftest.beam
4954  test "x$ac_cv_prog_cc_c99" != "xno" && break
4955done
4956rm -f conftest.$ac_ext
4957CC=$ac_save_CC
4958fi
4959
4960if test "x$ac_cv_prog_cc_c99" = xno
4961then :
4962  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4963printf "%s\n" "unsupported" >&6; }
4964else $as_nop
4965  if test "x$ac_cv_prog_cc_c99" = x
4966then :
4967  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4968printf "%s\n" "none needed" >&6; }
4969else $as_nop
4970  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4971printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4972     CC="$CC $ac_cv_prog_cc_c99"
4973fi
4974  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4975  ac_prog_cc_stdc=c99
4976fi
4977fi
4978if test x$ac_prog_cc_stdc = xno
4979then :
4980  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4981printf %s "checking for $CC option to enable C89 features... " >&6; }
4982if test ${ac_cv_prog_cc_c89+y}
4983then :
4984  printf %s "(cached) " >&6
4985else $as_nop
4986  ac_cv_prog_cc_c89=no
4987ac_save_CC=$CC
4988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4989/* end confdefs.h.  */
4990$ac_c_conftest_c89_program
4991_ACEOF
4992for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4993do
4994  CC="$ac_save_CC $ac_arg"
4995  if ac_fn_c_try_compile "$LINENO"
4996then :
4997  ac_cv_prog_cc_c89=$ac_arg
4998fi
4999rm -f core conftest.err conftest.$ac_objext conftest.beam
5000  test "x$ac_cv_prog_cc_c89" != "xno" && break
5001done
5002rm -f conftest.$ac_ext
5003CC=$ac_save_CC
5004fi
5005
5006if test "x$ac_cv_prog_cc_c89" = xno
5007then :
5008  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5009printf "%s\n" "unsupported" >&6; }
5010else $as_nop
5011  if test "x$ac_cv_prog_cc_c89" = x
5012then :
5013  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5014printf "%s\n" "none needed" >&6; }
5015else $as_nop
5016  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5017printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5018     CC="$CC $ac_cv_prog_cc_c89"
5019fi
5020  ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5021  ac_prog_cc_stdc=c89
5022fi
5023fi
5024
5025ac_ext=c
5026ac_cpp='$CPP $CPPFLAGS'
5027ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5028ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5029ac_compiler_gnu=$ac_cv_c_compiler_gnu
5030
5031
5032  ac_ext=c
5033ac_cpp='$CPP $CPPFLAGS'
5034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5036ac_compiler_gnu=$ac_cv_c_compiler_gnu
5037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
5038printf %s "checking whether $CC understands -c and -o together... " >&6; }
5039if test ${am_cv_prog_cc_c_o+y}
5040then :
5041  printf %s "(cached) " >&6
5042else $as_nop
5043  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5044/* end confdefs.h.  */
5045
5046int
5047main (void)
5048{
5049
5050  ;
5051  return 0;
5052}
5053_ACEOF
5054  # Make sure it works both with $CC and with simple cc.
5055  # Following AC_PROG_CC_C_O, we do the test twice because some
5056  # compilers refuse to overwrite an existing .o file with -o,
5057  # though they will create one.
5058  am_cv_prog_cc_c_o=yes
5059  for am_i in 1 2; do
5060    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
5061   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
5062   ac_status=$?
5063   echo "$as_me:$LINENO: \$? = $ac_status" >&5
5064   (exit $ac_status); } \
5065         && test -f conftest2.$ac_objext; then
5066      : OK
5067    else
5068      am_cv_prog_cc_c_o=no
5069      break
5070    fi
5071  done
5072  rm -f core conftest*
5073  unset am_i
5074fi
5075{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
5076printf "%s\n" "$am_cv_prog_cc_c_o" >&6; }
5077if test "$am_cv_prog_cc_c_o" != yes; then
5078   # Losing compiler, so override with the script.
5079   # FIXME: It is wrong to rewrite CC.
5080   # But if we don't then we get into trouble of one sort or another.
5081   # A longer-term fix would be to have automake use am__CC in this case,
5082   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5083   CC="$am_aux_dir/compile $CC"
5084fi
5085ac_ext=c
5086ac_cpp='$CPP $CPPFLAGS'
5087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5089ac_compiler_gnu=$ac_cv_c_compiler_gnu
5090
5091
5092depcc="$CC"   am_compiler_list=
5093
5094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5095printf %s "checking dependency style of $depcc... " >&6; }
5096if test ${am_cv_CC_dependencies_compiler_type+y}
5097then :
5098  printf %s "(cached) " >&6
5099else $as_nop
5100  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5101  # We make a subdir and do the tests there.  Otherwise we can end up
5102  # making bogus files that we don't know about and never remove.  For
5103  # instance it was reported that on HP-UX the gcc test will end up
5104  # making a dummy file named 'D' -- because '-MD' means "put the output
5105  # in D".
5106  rm -rf conftest.dir
5107  mkdir conftest.dir
5108  # Copy depcomp to subdir because otherwise we won't find it if we're
5109  # using a relative directory.
5110  cp "$am_depcomp" conftest.dir
5111  cd conftest.dir
5112  # We will build objects and dependencies in a subdirectory because
5113  # it helps to detect inapplicable dependency modes.  For instance
5114  # both Tru64's cc and ICC support -MD to output dependencies as a
5115  # side effect of compilation, but ICC will put the dependencies in
5116  # the current directory while Tru64 will put them in the object
5117  # directory.
5118  mkdir sub
5119
5120  am_cv_CC_dependencies_compiler_type=none
5121  if test "$am_compiler_list" = ""; then
5122     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5123  fi
5124  am__universal=false
5125  case " $depcc " in #(
5126     *\ -arch\ *\ -arch\ *) am__universal=true ;;
5127     esac
5128
5129  for depmode in $am_compiler_list; do
5130    # Setup a source with many dependencies, because some compilers
5131    # like to wrap large dependency lists on column 80 (with \), and
5132    # we should not choose a depcomp mode which is confused by this.
5133    #
5134    # We need to recreate these files for each test, as the compiler may
5135    # overwrite some of them when testing with obscure command lines.
5136    # This happens at least with the AIX C compiler.
5137    : > sub/conftest.c
5138    for i in 1 2 3 4 5 6; do
5139      echo '#include "conftst'$i'.h"' >> sub/conftest.c
5140      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5141      # Solaris 10 /bin/sh.
5142      echo '/* dummy */' > sub/conftst$i.h
5143    done
5144    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5145
5146    # We check with '-c' and '-o' for the sake of the "dashmstdout"
5147    # mode.  It turns out that the SunPro C++ compiler does not properly
5148    # handle '-M -o', and we need to detect this.  Also, some Intel
5149    # versions had trouble with output in subdirs.
5150    am__obj=sub/conftest.${OBJEXT-o}
5151    am__minus_obj="-o $am__obj"
5152    case $depmode in
5153    gcc)
5154      # This depmode causes a compiler race in universal mode.
5155      test "$am__universal" = false || continue
5156      ;;
5157    nosideeffect)
5158      # After this tag, mechanisms are not by side-effect, so they'll
5159      # only be used when explicitly requested.
5160      if test "x$enable_dependency_tracking" = xyes; then
5161	continue
5162      else
5163	break
5164      fi
5165      ;;
5166    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5167      # This compiler won't grok '-c -o', but also, the minuso test has
5168      # not run yet.  These depmodes are late enough in the game, and
5169      # so weak that their functioning should not be impacted.
5170      am__obj=conftest.${OBJEXT-o}
5171      am__minus_obj=
5172      ;;
5173    none) break ;;
5174    esac
5175    if depmode=$depmode \
5176       source=sub/conftest.c object=$am__obj \
5177       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5178       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5179         >/dev/null 2>conftest.err &&
5180       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5181       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5182       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5183       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5184      # icc doesn't choke on unknown options, it will just issue warnings
5185      # or remarks (even with -Werror).  So we grep stderr for any message
5186      # that says an option was ignored or not supported.
5187      # When given -MP, icc 7.0 and 7.1 complain thusly:
5188      #   icc: Command line warning: ignoring option '-M'; no argument required
5189      # The diagnosis changed in icc 8.0:
5190      #   icc: Command line remark: option '-MP' not supported
5191      if (grep 'ignoring option' conftest.err ||
5192          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5193        am_cv_CC_dependencies_compiler_type=$depmode
5194        break
5195      fi
5196    fi
5197  done
5198
5199  cd ..
5200  rm -rf conftest.dir
5201else
5202  am_cv_CC_dependencies_compiler_type=none
5203fi
5204
5205fi
5206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5207printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; }
5208CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5209
5210 if
5211  test "x$enable_dependency_tracking" != xno \
5212  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5213  am__fastdepCC_TRUE=
5214  am__fastdepCC_FALSE='#'
5215else
5216  am__fastdepCC_TRUE='#'
5217  am__fastdepCC_FALSE=
5218fi
5219
5220
5221
5222
5223
5224ac_header= ac_cache=
5225for ac_item in $ac_header_c_list
5226do
5227  if test $ac_cache; then
5228    ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5229    if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5230      printf "%s\n" "#define $ac_item 1" >> confdefs.h
5231    fi
5232    ac_header= ac_cache=
5233  elif test $ac_header; then
5234    ac_cache=$ac_item
5235  else
5236    ac_header=$ac_item
5237  fi
5238done
5239
5240
5241
5242
5243
5244
5245
5246
5247if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5248then :
5249
5250printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5251
5252fi
5253
5254
5255
5256
5257
5258
5259  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5260printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5261if test ${ac_cv_safe_to_define___extensions__+y}
5262then :
5263  printf %s "(cached) " >&6
5264else $as_nop
5265  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h.  */
5267
5268#         define __EXTENSIONS__ 1
5269          $ac_includes_default
5270int
5271main (void)
5272{
5273
5274  ;
5275  return 0;
5276}
5277_ACEOF
5278if ac_fn_c_try_compile "$LINENO"
5279then :
5280  ac_cv_safe_to_define___extensions__=yes
5281else $as_nop
5282  ac_cv_safe_to_define___extensions__=no
5283fi
5284rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5285fi
5286{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5287printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; }
5288
5289  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5290printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5291if test ${ac_cv_should_define__xopen_source+y}
5292then :
5293  printf %s "(cached) " >&6
5294else $as_nop
5295  ac_cv_should_define__xopen_source=no
5296    if test $ac_cv_header_wchar_h = yes
5297then :
5298  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5299/* end confdefs.h.  */
5300
5301          #include <wchar.h>
5302          mbstate_t x;
5303int
5304main (void)
5305{
5306
5307  ;
5308  return 0;
5309}
5310_ACEOF
5311if ac_fn_c_try_compile "$LINENO"
5312then :
5313
5314else $as_nop
5315  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5316/* end confdefs.h.  */
5317
5318            #define _XOPEN_SOURCE 500
5319            #include <wchar.h>
5320            mbstate_t x;
5321int
5322main (void)
5323{
5324
5325  ;
5326  return 0;
5327}
5328_ACEOF
5329if ac_fn_c_try_compile "$LINENO"
5330then :
5331  ac_cv_should_define__xopen_source=yes
5332fi
5333rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5334fi
5335rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5336fi
5337fi
5338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5339printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; }
5340
5341  printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h
5342
5343  printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5344
5345  printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
5346
5347  printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5348
5349  printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h
5350
5351  printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h
5352
5353  printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5354
5355  printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5356
5357  printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5358
5359  printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5360
5361  printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5362
5363  printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5364
5365  printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5366
5367  printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5368
5369  printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h
5370
5371  if test $ac_cv_header_minix_config_h = yes
5372then :
5373  MINIX=yes
5374    printf "%s\n" "#define _MINIX 1" >>confdefs.h
5375
5376    printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h
5377
5378    printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h
5379
5380else $as_nop
5381  MINIX=
5382fi
5383  if test $ac_cv_safe_to_define___extensions__ = yes
5384then :
5385  printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h
5386
5387fi
5388  if test $ac_cv_should_define__xopen_source = yes
5389then :
5390  printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h
5391
5392fi
5393
5394
5395ac_ext=c
5396ac_cpp='$CPP $CPPFLAGS'
5397ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5398ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5399ac_compiler_gnu=$ac_cv_c_compiler_gnu
5400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5401printf %s "checking how to run the C preprocessor... " >&6; }
5402# On Suns, sometimes $CPP names a directory.
5403if test -n "$CPP" && test -d "$CPP"; then
5404  CPP=
5405fi
5406if test -z "$CPP"; then
5407  if test ${ac_cv_prog_CPP+y}
5408then :
5409  printf %s "(cached) " >&6
5410else $as_nop
5411      # Double quotes because $CC needs to be expanded
5412    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
5413    do
5414      ac_preproc_ok=false
5415for ac_c_preproc_warn_flag in '' yes
5416do
5417  # Use a header file that comes with gcc, so configuring glibc
5418  # with a fresh cross-compiler works.
5419  # On the NeXT, cc -E runs the code through the compiler's parser,
5420  # not just through cpp. "Syntax error" is here to catch this case.
5421  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5422/* end confdefs.h.  */
5423#include <limits.h>
5424		     Syntax error
5425_ACEOF
5426if ac_fn_c_try_cpp "$LINENO"
5427then :
5428
5429else $as_nop
5430  # Broken: fails on valid input.
5431continue
5432fi
5433rm -f conftest.err conftest.i conftest.$ac_ext
5434
5435  # OK, works on sane cases.  Now check whether nonexistent headers
5436  # can be detected and how.
5437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438/* end confdefs.h.  */
5439#include <ac_nonexistent.h>
5440_ACEOF
5441if ac_fn_c_try_cpp "$LINENO"
5442then :
5443  # Broken: success on invalid input.
5444continue
5445else $as_nop
5446  # Passes both tests.
5447ac_preproc_ok=:
5448break
5449fi
5450rm -f conftest.err conftest.i conftest.$ac_ext
5451
5452done
5453# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5454rm -f conftest.i conftest.err conftest.$ac_ext
5455if $ac_preproc_ok
5456then :
5457  break
5458fi
5459
5460    done
5461    ac_cv_prog_CPP=$CPP
5462
5463fi
5464  CPP=$ac_cv_prog_CPP
5465else
5466  ac_cv_prog_CPP=$CPP
5467fi
5468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5469printf "%s\n" "$CPP" >&6; }
5470ac_preproc_ok=false
5471for ac_c_preproc_warn_flag in '' yes
5472do
5473  # Use a header file that comes with gcc, so configuring glibc
5474  # with a fresh cross-compiler works.
5475  # On the NeXT, cc -E runs the code through the compiler's parser,
5476  # not just through cpp. "Syntax error" is here to catch this case.
5477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5478/* end confdefs.h.  */
5479#include <limits.h>
5480		     Syntax error
5481_ACEOF
5482if ac_fn_c_try_cpp "$LINENO"
5483then :
5484
5485else $as_nop
5486  # Broken: fails on valid input.
5487continue
5488fi
5489rm -f conftest.err conftest.i conftest.$ac_ext
5490
5491  # OK, works on sane cases.  Now check whether nonexistent headers
5492  # can be detected and how.
5493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494/* end confdefs.h.  */
5495#include <ac_nonexistent.h>
5496_ACEOF
5497if ac_fn_c_try_cpp "$LINENO"
5498then :
5499  # Broken: success on invalid input.
5500continue
5501else $as_nop
5502  # Passes both tests.
5503ac_preproc_ok=:
5504break
5505fi
5506rm -f conftest.err conftest.i conftest.$ac_ext
5507
5508done
5509# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5510rm -f conftest.i conftest.err conftest.$ac_ext
5511if $ac_preproc_ok
5512then :
5513
5514else $as_nop
5515  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5516printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5517as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5518See \`config.log' for more details" "$LINENO" 5; }
5519fi
5520
5521ac_ext=c
5522ac_cpp='$CPP $CPPFLAGS'
5523ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5524ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5525ac_compiler_gnu=$ac_cv_c_compiler_gnu
5526
5527
5528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5529printf %s "checking for grep that handles long lines and -e... " >&6; }
5530if test ${ac_cv_path_GREP+y}
5531then :
5532  printf %s "(cached) " >&6
5533else $as_nop
5534  if test -z "$GREP"; then
5535  ac_path_GREP_found=false
5536  # Loop through the user's path and test for each of PROGNAME-LIST
5537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5538for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5539do
5540  IFS=$as_save_IFS
5541  case $as_dir in #(((
5542    '') as_dir=./ ;;
5543    */) ;;
5544    *) as_dir=$as_dir/ ;;
5545  esac
5546    for ac_prog in grep ggrep
5547   do
5548    for ac_exec_ext in '' $ac_executable_extensions; do
5549      ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5550      as_fn_executable_p "$ac_path_GREP" || continue
5551# Check for GNU ac_path_GREP and select it if it is found.
5552  # Check for GNU $ac_path_GREP
5553case `"$ac_path_GREP" --version 2>&1` in
5554*GNU*)
5555  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5556*)
5557  ac_count=0
5558  printf %s 0123456789 >"conftest.in"
5559  while :
5560  do
5561    cat "conftest.in" "conftest.in" >"conftest.tmp"
5562    mv "conftest.tmp" "conftest.in"
5563    cp "conftest.in" "conftest.nl"
5564    printf "%s\n" 'GREP' >> "conftest.nl"
5565    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5566    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5567    as_fn_arith $ac_count + 1 && ac_count=$as_val
5568    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5569      # Best one so far, save it but keep looking for a better one
5570      ac_cv_path_GREP="$ac_path_GREP"
5571      ac_path_GREP_max=$ac_count
5572    fi
5573    # 10*(2^10) chars as input seems more than enough
5574    test $ac_count -gt 10 && break
5575  done
5576  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5577esac
5578
5579      $ac_path_GREP_found && break 3
5580    done
5581  done
5582  done
5583IFS=$as_save_IFS
5584  if test -z "$ac_cv_path_GREP"; then
5585    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5586  fi
5587else
5588  ac_cv_path_GREP=$GREP
5589fi
5590
5591fi
5592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5593printf "%s\n" "$ac_cv_path_GREP" >&6; }
5594 GREP="$ac_cv_path_GREP"
5595
5596
5597{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5598printf %s "checking for egrep... " >&6; }
5599if test ${ac_cv_path_EGREP+y}
5600then :
5601  printf %s "(cached) " >&6
5602else $as_nop
5603  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5604   then ac_cv_path_EGREP="$GREP -E"
5605   else
5606     if test -z "$EGREP"; then
5607  ac_path_EGREP_found=false
5608  # Loop through the user's path and test for each of PROGNAME-LIST
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5611do
5612  IFS=$as_save_IFS
5613  case $as_dir in #(((
5614    '') as_dir=./ ;;
5615    */) ;;
5616    *) as_dir=$as_dir/ ;;
5617  esac
5618    for ac_prog in egrep
5619   do
5620    for ac_exec_ext in '' $ac_executable_extensions; do
5621      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5622      as_fn_executable_p "$ac_path_EGREP" || continue
5623# Check for GNU ac_path_EGREP and select it if it is found.
5624  # Check for GNU $ac_path_EGREP
5625case `"$ac_path_EGREP" --version 2>&1` in
5626*GNU*)
5627  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5628*)
5629  ac_count=0
5630  printf %s 0123456789 >"conftest.in"
5631  while :
5632  do
5633    cat "conftest.in" "conftest.in" >"conftest.tmp"
5634    mv "conftest.tmp" "conftest.in"
5635    cp "conftest.in" "conftest.nl"
5636    printf "%s\n" 'EGREP' >> "conftest.nl"
5637    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5639    as_fn_arith $ac_count + 1 && ac_count=$as_val
5640    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5641      # Best one so far, save it but keep looking for a better one
5642      ac_cv_path_EGREP="$ac_path_EGREP"
5643      ac_path_EGREP_max=$ac_count
5644    fi
5645    # 10*(2^10) chars as input seems more than enough
5646    test $ac_count -gt 10 && break
5647  done
5648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5649esac
5650
5651      $ac_path_EGREP_found && break 3
5652    done
5653  done
5654  done
5655IFS=$as_save_IFS
5656  if test -z "$ac_cv_path_EGREP"; then
5657    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5658  fi
5659else
5660  ac_cv_path_EGREP=$EGREP
5661fi
5662
5663   fi
5664fi
5665{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5666printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5667 EGREP="$ac_cv_path_EGREP"
5668
5669
5670
5671
5672
5673
5674
5675# Ralf Wildenhues: With per-target flags we need CC_C_O
5676# AM_PROG_CC_C_O supersets AC_PROG_CC_C_O
5677
5678if test $ac_cv_c_compiler_gnu = yes; then
5679    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5
5680printf %s "checking whether $CC needs -traditional... " >&6; }
5681if test ${ac_cv_prog_gcc_traditional+y}
5682then :
5683  printf %s "(cached) " >&6
5684else $as_nop
5685    ac_pattern="Autoconf.*'x'"
5686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5687/* end confdefs.h.  */
5688#include <sgtty.h>
5689Autoconf TIOCGETP
5690_ACEOF
5691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5692  $EGREP "$ac_pattern" >/dev/null 2>&1
5693then :
5694  ac_cv_prog_gcc_traditional=yes
5695else $as_nop
5696  ac_cv_prog_gcc_traditional=no
5697fi
5698rm -rf conftest*
5699
5700
5701  if test $ac_cv_prog_gcc_traditional = no; then
5702    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5703/* end confdefs.h.  */
5704#include <termio.h>
5705Autoconf TCGETA
5706_ACEOF
5707if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5708  $EGREP "$ac_pattern" >/dev/null 2>&1
5709then :
5710  ac_cv_prog_gcc_traditional=yes
5711fi
5712rm -rf conftest*
5713
5714  fi
5715fi
5716{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5
5717printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; }
5718  if test $ac_cv_prog_gcc_traditional = yes; then
5719    CC="$CC -traditional"
5720  fi
5721fi
5722
5723
5724
5725CC_NOFORMAT=
5726CFLAGS_NTP=
5727CPPFLAGS_NTP=
5728LDADD_NTP=
5729LDFLAGS_NTP=
5730
5731
5732
5733
5734
5735
5736case "$ac_cv_prog_cc_c89" in
5737 no)
5738    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5739		 version 4.2.5 and higher." >&5
5740printf "%s\n" "$as_me: WARNING: ANSI C89/ISO C90 is the minimum to compile NTP
5741		 version 4.2.5 and higher." >&2;}
5742    ;;
5743esac
5744
5745{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle #warning" >&5
5746printf %s "checking if $CC can handle #warning... " >&6; }
5747if test ${ntp_cv_cpp_warning+y}
5748then :
5749  printf %s "(cached) " >&6
5750else $as_nop
5751  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5752/* end confdefs.h.  */
5753
5754int
5755main (void)
5756{
5757#warning foo
5758  ;
5759  return 0;
5760}
5761_ACEOF
5762if ac_fn_c_try_compile "$LINENO"
5763then :
5764  ntp_cv_cpp_warning=yes
5765else $as_nop
5766  ntp_cv_cpp_warning=no
5767
5768fi
5769rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5770
5771fi
5772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cpp_warning" >&5
5773printf "%s\n" "$ntp_cv_cpp_warning" >&6; }
5774case "$ntp_cv_cpp_warning" in
5775 no)
5776
5777printf "%s\n" "#define NO_OPTION_NAME_WARNINGS 1" >>confdefs.h
5778
5779esac
5780
5781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports __attribute__((...))" >&5
5782printf %s "checking if $CC supports __attribute__((...))... " >&6; }
5783if test ${ntp_cv_cc_attribute+y}
5784then :
5785  printf %s "(cached) " >&6
5786else $as_nop
5787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5788/* end confdefs.h.  */
5789
5790int
5791main (void)
5792{
5793void foo(void) __attribute__((__noreturn__));
5794
5795  ;
5796  return 0;
5797}
5798_ACEOF
5799if ac_fn_c_try_compile "$LINENO"
5800then :
5801  ntp_cv_cc_attribute=yes
5802else $as_nop
5803  ntp_cv_cc_attribute=no
5804
5805fi
5806rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5807
5808fi
5809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_cc_attribute" >&5
5810printf "%s\n" "$ntp_cv_cc_attribute" >&6; }
5811case "$ntp_cv_cc_attribute" in
5812 yes)
5813
5814printf "%s\n" "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h
5815
5816esac
5817
5818
5819case "$GCC" in
5820 yes)
5821    SAVED_CFLAGS="$CFLAGS"
5822    CFLAGS="$SAVED_CFLAGS -Wstrict-overflow"
5823    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wstrict-overflow" >&5
5824printf %s "checking if $CC can handle -Wstrict-overflow... " >&6; }
5825if test ${ntp_cv_gcc_Wstrict_overflow+y}
5826then :
5827  printf %s "(cached) " >&6
5828else $as_nop
5829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5830/* end confdefs.h.  */
5831
5832int
5833main (void)
5834{
5835
5836  ;
5837  return 0;
5838}
5839_ACEOF
5840if ac_fn_c_try_compile "$LINENO"
5841then :
5842  ntp_cv_gcc_Wstrict_overflow=yes
5843else $as_nop
5844  ntp_cv_gcc_Wstrict_overflow=no
5845
5846fi
5847rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5848
5849fi
5850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wstrict_overflow" >&5
5851printf "%s\n" "$ntp_cv_gcc_Wstrict_overflow" >&6; }
5852    #
5853    # $ntp_cv_gcc_Wstrict_overflow is tested later to add the
5854    # flag to CFLAGS.
5855    #
5856    CFLAGS="$SAVED_CFLAGS -Winit-self"
5857    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Winit-self" >&5
5858printf %s "checking if $CC can handle -Winit-self... " >&6; }
5859if test ${ntp_cv_gcc_Winit_self+y}
5860then :
5861  printf %s "(cached) " >&6
5862else $as_nop
5863
5864	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5865/* end confdefs.h.  */
5866
5867int
5868main (void)
5869{
5870
5871  ;
5872  return 0;
5873}
5874_ACEOF
5875if ac_fn_c_try_compile "$LINENO"
5876then :
5877  ntp_cv_gcc_Winit_self=yes
5878else $as_nop
5879  ntp_cv_gcc_Winit_self=no
5880
5881fi
5882rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5883
5884
5885fi
5886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Winit_self" >&5
5887printf "%s\n" "$ntp_cv_gcc_Winit_self" >&6; }
5888    #
5889    # libopts specifically builds a string with embedded NULs.
5890    # This causes a bunch of distracting warnings due to -Wformat.
5891    # Let's see if we can figure out how to disable these.
5892    #
5893    CFLAGS="$SAVED_CFLAGS -Wno-format"
5894    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC can handle -Wno-format" >&5
5895printf %s "checking if $CC can handle -Wno-format... " >&6; }
5896if test ${ntp_cv_gcc_Wno_format+y}
5897then :
5898  printf %s "(cached) " >&6
5899else $as_nop
5900
5901	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5902/* end confdefs.h.  */
5903
5904int
5905main (void)
5906{
5907
5908  ;
5909  return 0;
5910}
5911_ACEOF
5912if ac_fn_c_try_compile "$LINENO"
5913then :
5914  ntp_cv_gcc_Wno_format=yes
5915else $as_nop
5916  ntp_cv_gcc_Wno_format=no
5917
5918fi
5919rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5920
5921
5922fi
5923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gcc_Wno_format" >&5
5924printf "%s\n" "$ntp_cv_gcc_Wno_format" >&6; }
5925
5926    case "$ntp_cv_gcc_Wno_format" in
5927     yes)
5928	CC_NOFORMAT="$CC_NOFORMAT -Wno-format"
5929	;;
5930     no)
5931	;;
5932    esac
5933
5934    CFLAGS="$SAVED_CFLAGS"
5935    { SAVED_CFLAGS=; unset SAVED_CFLAGS;}
5936    #
5937    # $ntp_cv_gcc_Winit_self is tested later to add the
5938    # flag to CFLAGS_NTP.
5939    #
5940    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linker supports omitting unused code and data" >&5
5941printf %s "checking if linker supports omitting unused code and data... " >&6; }
5942if test ${ntp_cv_gc_sections_runs+y}
5943then :
5944  printf %s "(cached) " >&6
5945else $as_nop
5946
5947	    	    	    	    	    	    	    	    	    	    	    origCFLAGS="$CFLAGS"
5948	    CFLAGS="$CFLAGS -Wl,--gc-sections"
5949	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950/* end confdefs.h.  */
5951
5952			#include <stdlib.h>
5953			#include <stdio.h>
5954
5955int
5956main (void)
5957{
5958
5959			FILE *	fpC;
5960			char	buf[32];
5961			size_t	cch;
5962			int	read_success_once;
5963
5964			fpC = fopen("conftest.c", "r");
5965			if (NULL == fpC)
5966				exit(1);
5967			do {
5968				cch = fread(buf, sizeof(buf), 1, fpC);
5969				read_success_once |= (0 != cch);
5970			} while (0 != cch);
5971			if (!read_success_once)
5972				exit(2);
5973			if (!feof(fpC))
5974				exit(3);
5975			if (0 != fclose(fpC))
5976				exit(4);
5977
5978			exit(EXIT_SUCCESS);
5979
5980
5981  ;
5982  return 0;
5983}
5984_ACEOF
5985if ac_fn_c_try_link "$LINENO"
5986then :
5987
5988		    if test "X$cross_compiling" = "Xyes" || grep gc-sections conftest.err ; then
5989			ntp_cv_gc_sections_runs=no
5990		    else
5991			ntp_cv_gc_sections_runs=no
5992			./conftest >/dev/null 2>&1 && ntp_cv_gc_sections_runs=yes
5993		    fi
5994
5995else $as_nop
5996  ntp_cv_gc_sections_runs=no
5997
5998fi
5999rm -f core conftest.err conftest.$ac_objext conftest.beam \
6000    conftest$ac_exeext conftest.$ac_ext
6001	    CFLAGS="$origCFLAGS"
6002	    { origCFLAGS=; unset origCFLAGS;}
6003
6004
6005fi
6006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_gc_sections_runs" >&5
6007printf "%s\n" "$ntp_cv_gc_sections_runs" >&6; }
6008    case "$ntp_cv_gc_sections_runs" in
6009     yes)
6010	LDADD_LIBNTP="-Wl,--gc-sections"
6011	CFLAGS_NTP="$CFLAGS_NTP -ffunction-sections -fdata-sections"
6012	;;
6013     no)
6014	LDADD_LIBNTP=
6015	;;
6016    esac
6017    CFLAGS_NTP="$CFLAGS_NTP -Wall"
6018    CFLAGS_NTP="$CFLAGS_NTP -Wcast-align"
6019    CFLAGS_NTP="$CFLAGS_NTP -Wcast-qual"
6020    # CFLAGS_NTP="$CFLAGS_NTP -Wconversion"
6021    # CFLAGS_NTP="$CFLAGS_NTP -Werror"
6022    # CFLAGS_NTP="$CFLAGS_NTP -Wextra"
6023    # CFLAGS_NTP="$CFLAGS_NTP -Wfloat-equal"
6024    CFLAGS_NTP="$CFLAGS_NTP -Wmissing-prototypes"
6025    CFLAGS_NTP="$CFLAGS_NTP -Wpointer-arith"
6026    CFLAGS_NTP="$CFLAGS_NTP -Wshadow"
6027    # CFLAGS_NTP="$CFLAGS_NTP -Wtraditional"
6028    # CFLAGS_NTP="$CFLAGS_NTP -Wwrite-strings"
6029    case "$ntp_cv_gcc_Winit_self" in
6030     yes)
6031	CFLAGS_NTP="$CFLAGS_NTP -Winit-self"
6032    esac
6033    case "$ntp_cv_gcc_Wstrict_overflow" in
6034     yes)
6035	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-overflow"
6036    esac
6037    # -W[no-]strict-prototypes might be added by NTP_OPENSSL
6038esac
6039
6040
6041    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional compiler flags" >&5
6042printf %s "checking additional compiler flags... " >&6; }
6043    # allow ntp_os_cflags to be preset to skip this stuff
6044    case "${ntp_os_cflags+set}" in
6045     set)
6046	;;
6047     *)
6048	ntp_os_cflags=
6049	case "$host_os" in
6050	 aix[1-3]*)
6051	    ;;
6052	 aix4.[0-2]*)
6053	    # turn on additional headers
6054	    ntp_os_cflags="-D_XOPEN_EXTENDED_SOURCE"
6055	    ;;
6056	 aix5.3*)
6057	    # avoid circular dependencies in yp headers, and more
6058	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_EXTENDED_SOURCE"
6059	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS -D_MSGQSUPPORT"
6060	    ;;
6061	 aix*)
6062	    # XXX Only verified thru AIX6.
6063	    # aix7 seems to need a different XOPEN_SOURCE_EXTENDED thing.
6064	    # avoid circular dependencies in yp headers
6065	    # _XOPEN_SOURCE=500 = X/Open 5: POSIX 1995
6066	    # _XOPEN_SOURCE=600 = X/Open 6: POSIX 2004
6067	    # _XOPEN_SOURCE=700 = X/Open 7: POSIX 2008
6068	    ntp_os_cflags="-DHAVE_BAD_HEADERS -D_XOPEN_SOURCE=600"
6069	    ntp_os_cflags="${ntp_os_cflags} -D_USE_IRS"
6070	    ;;
6071	 amigaos)
6072	    ntp_os_cflags="-DSYS_AMIGA"
6073	    ;;
6074	 darwin*|macosx*|rhapsody*)
6075	    ntp_os_cflags="-D_P1003_1B_VISIBLE"
6076	    ;;
6077	 hpux10.*)		# at least for hppa2.0-hp-hpux10.20
6078	    case "$GCC" in
6079	     yes)
6080		;;
6081	     *)
6082		# use Ansi compiler on HPUX, and some -Wp magic
6083		ntp_os_cflags="-Ae -Wp,-H18816"
6084		;;
6085	    esac
6086	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6087	    ;;
6088	 hpux*)
6089	    case "$GCC" in
6090	     yes)
6091		;;
6092	     *)
6093		# use Ansi compiler on HPUX
6094		ntp_os_cflags="-Ae"
6095	    esac
6096	    ntp_os_cflags="${ntp_os_cflags} -D_HPUX_SOURCE -D__STDC_VERSION__=199901L"
6097	    ;;
6098	 irix6*)
6099	    case "$CC" in
6100	     cc)
6101		# do not use 64-bit compiler
6102		ntp_os_cflags="-n32 -mips3 -Wl,-woff,84"
6103	    esac
6104	    ;;
6105	 nextstep3)
6106	    ntp_os_cflags="-posix"
6107	    ;;
6108	 solaris1*|solaris2.[0-5]|solaris2.5.*)
6109	    ;;
6110	 sunos[34]*|sunos5.[0-5]|sunos5.5.*)
6111	    ;;
6112	 solaris2*|sunos5*)
6113	    # turn on 64-bit file offset interface
6114	    ntp_os_cflags="-D_LARGEFILE64_SOURCE"
6115	    ;;
6116	 vxworks*)
6117	    case "$build" in
6118	     $host)
6119		;;
6120	     *)
6121		# Quick and dirty sanity check
6122		case "$VX_KERNEL" in
6123		 '')
6124		    as_fn_error $? "See html/build/hints/vxworks.html" "$LINENO" 5
6125		esac
6126		ntp_os_cflags="-DSYS_VXWORKS"
6127	    esac
6128	    ;;
6129	esac
6130    esac
6131    case "$ntp_os_cflags" in
6132     '')
6133	ntp_os_cflags_msg="none needed"
6134	;;
6135     *)
6136	ntp_os_cflags_msg="$ntp_os_cflags"
6137    esac
6138    CFLAGS_NTP="$CFLAGS_NTP $ntp_os_cflags"
6139    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_cflags_msg" >&5
6140printf "%s\n" "$ntp_os_cflags_msg" >&6; }
6141    { ntp_os_cflags_msg=; unset ntp_os_cflags_msg;}
6142    ###
6143    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking additional linker flags" >&5
6144printf %s "checking additional linker flags... " >&6; }
6145    # HMS: The following might still need tweaking
6146    # allow ntp_os_ldflags to be preset to skip this stuff
6147    case "${ntp_os_ldflags+set}" in
6148     set)
6149	;;
6150     *)
6151	ntp_os_ldflags=
6152	case "$host_os" in
6153	 hpux*)
6154	    case "$GCC" in
6155	     yes)
6156		ntp_os_ldflags="-Wl,+allowdups"
6157		;;
6158	    esac
6159	    ;;
6160	esac
6161	;;
6162    esac
6163    case "$ntp_os_ldflags" in
6164     '')
6165	ntp_os_ldflags_msg="none needed"
6166	;;
6167     *)
6168	ntp_os_ldflags_msg="$ntp_os_ldflags"
6169    esac
6170    LDFLAGS_NTP="$LDFLAGS_NTP $ntp_os_ldflags"
6171    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_os_ldflags_msg" >&5
6172printf "%s\n" "$ntp_os_ldflags_msg" >&6; }
6173    { ntp_os_ldflags_msg=; unset ntp_os_ldflags_msg;}
6174
6175
6176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
6177printf %s "checking whether byte ordering is bigendian... " >&6; }
6178if test ${ac_cv_c_bigendian+y}
6179then :
6180  printf %s "(cached) " >&6
6181else $as_nop
6182  ac_cv_c_bigendian=unknown
6183    # See if we're dealing with a universal compiler.
6184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6185/* end confdefs.h.  */
6186#ifndef __APPLE_CC__
6187	       not a universal capable compiler
6188	     #endif
6189	     typedef int dummy;
6190
6191_ACEOF
6192if ac_fn_c_try_compile "$LINENO"
6193then :
6194
6195	# Check for potential -arch flags.  It is not universal unless
6196	# there are at least two -arch flags with different values.
6197	ac_arch=
6198	ac_prev=
6199	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
6200	 if test -n "$ac_prev"; then
6201	   case $ac_word in
6202	     i?86 | x86_64 | ppc | ppc64)
6203	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
6204		 ac_arch=$ac_word
6205	       else
6206		 ac_cv_c_bigendian=universal
6207		 break
6208	       fi
6209	       ;;
6210	   esac
6211	   ac_prev=
6212	 elif test "x$ac_word" = "x-arch"; then
6213	   ac_prev=arch
6214	 fi
6215       done
6216fi
6217rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6218    if test $ac_cv_c_bigendian = unknown; then
6219      # See if sys/param.h defines the BYTE_ORDER macro.
6220      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6221/* end confdefs.h.  */
6222#include <sys/types.h>
6223	     #include <sys/param.h>
6224
6225int
6226main (void)
6227{
6228#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
6229		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
6230		     && LITTLE_ENDIAN)
6231	      bogus endian macros
6232	     #endif
6233
6234  ;
6235  return 0;
6236}
6237_ACEOF
6238if ac_fn_c_try_compile "$LINENO"
6239then :
6240  # It does; now see whether it defined to BIG_ENDIAN or not.
6241	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242/* end confdefs.h.  */
6243#include <sys/types.h>
6244		#include <sys/param.h>
6245
6246int
6247main (void)
6248{
6249#if BYTE_ORDER != BIG_ENDIAN
6250		 not big endian
6251		#endif
6252
6253  ;
6254  return 0;
6255}
6256_ACEOF
6257if ac_fn_c_try_compile "$LINENO"
6258then :
6259  ac_cv_c_bigendian=yes
6260else $as_nop
6261  ac_cv_c_bigendian=no
6262fi
6263rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6264fi
6265rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6266    fi
6267    if test $ac_cv_c_bigendian = unknown; then
6268      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6269      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6270/* end confdefs.h.  */
6271#include <limits.h>
6272
6273int
6274main (void)
6275{
6276#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6277	      bogus endian macros
6278	     #endif
6279
6280  ;
6281  return 0;
6282}
6283_ACEOF
6284if ac_fn_c_try_compile "$LINENO"
6285then :
6286  # It does; now see whether it defined to _BIG_ENDIAN or not.
6287	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6288/* end confdefs.h.  */
6289#include <limits.h>
6290
6291int
6292main (void)
6293{
6294#ifndef _BIG_ENDIAN
6295		 not big endian
6296		#endif
6297
6298  ;
6299  return 0;
6300}
6301_ACEOF
6302if ac_fn_c_try_compile "$LINENO"
6303then :
6304  ac_cv_c_bigendian=yes
6305else $as_nop
6306  ac_cv_c_bigendian=no
6307fi
6308rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6309fi
6310rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6311    fi
6312    if test $ac_cv_c_bigendian = unknown; then
6313      # Compile a test program.
6314      if test "$cross_compiling" = yes
6315then :
6316  # Try to guess by grepping values from an object file.
6317	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6318/* end confdefs.h.  */
6319unsigned short int ascii_mm[] =
6320		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6321		unsigned short int ascii_ii[] =
6322		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6323		int use_ascii (int i) {
6324		  return ascii_mm[i] + ascii_ii[i];
6325		}
6326		unsigned short int ebcdic_ii[] =
6327		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6328		unsigned short int ebcdic_mm[] =
6329		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6330		int use_ebcdic (int i) {
6331		  return ebcdic_mm[i] + ebcdic_ii[i];
6332		}
6333		extern int foo;
6334
6335int
6336main (void)
6337{
6338return use_ascii (foo) == use_ebcdic (foo);
6339  ;
6340  return 0;
6341}
6342_ACEOF
6343if ac_fn_c_try_compile "$LINENO"
6344then :
6345  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
6346	      ac_cv_c_bigendian=yes
6347	    fi
6348	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
6349	      if test "$ac_cv_c_bigendian" = unknown; then
6350		ac_cv_c_bigendian=no
6351	      else
6352		# finding both strings is unlikely to happen, but who knows?
6353		ac_cv_c_bigendian=unknown
6354	      fi
6355	    fi
6356fi
6357rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6358else $as_nop
6359  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6360/* end confdefs.h.  */
6361$ac_includes_default
6362int
6363main (void)
6364{
6365
6366	     /* Are we little or big endian?  From Harbison&Steele.  */
6367	     union
6368	     {
6369	       long int l;
6370	       char c[sizeof (long int)];
6371	     } u;
6372	     u.l = 1;
6373	     return u.c[sizeof (long int) - 1] == 1;
6374
6375  ;
6376  return 0;
6377}
6378_ACEOF
6379if ac_fn_c_try_run "$LINENO"
6380then :
6381  ac_cv_c_bigendian=no
6382else $as_nop
6383  ac_cv_c_bigendian=yes
6384fi
6385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6386  conftest.$ac_objext conftest.beam conftest.$ac_ext
6387fi
6388
6389    fi
6390fi
6391{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6392printf "%s\n" "$ac_cv_c_bigendian" >&6; }
6393 case $ac_cv_c_bigendian in #(
6394   yes)
6395     printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
6396;; #(
6397   no)
6398      ;; #(
6399   universal)
6400
6401printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6402
6403     ;; #(
6404   *)
6405     as_fn_error $? "unknown endianness
6406 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6407 esac
6408
6409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
6410printf %s "checking for working volatile... " >&6; }
6411if test ${ac_cv_c_volatile+y}
6412then :
6413  printf %s "(cached) " >&6
6414else $as_nop
6415  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6416/* end confdefs.h.  */
6417
6418int
6419main (void)
6420{
6421
6422volatile int x;
6423int * volatile y = (int *) 0;
6424return !x && !y;
6425  ;
6426  return 0;
6427}
6428_ACEOF
6429if ac_fn_c_try_compile "$LINENO"
6430then :
6431  ac_cv_c_volatile=yes
6432else $as_nop
6433  ac_cv_c_volatile=no
6434fi
6435rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6436fi
6437{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
6438printf "%s\n" "$ac_cv_c_volatile" >&6; }
6439if test $ac_cv_c_volatile = no; then
6440
6441printf "%s\n" "#define volatile /**/" >>confdefs.h
6442
6443fi
6444
6445ac_ext=c
6446ac_cpp='$CPP $CPPFLAGS'
6447ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6448ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6449ac_compiler_gnu=$ac_cv_c_compiler_gnu
6450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
6451printf %s "checking how to run the C preprocessor... " >&6; }
6452# On Suns, sometimes $CPP names a directory.
6453if test -n "$CPP" && test -d "$CPP"; then
6454  CPP=
6455fi
6456if test -z "$CPP"; then
6457  if test ${ac_cv_prog_CPP+y}
6458then :
6459  printf %s "(cached) " >&6
6460else $as_nop
6461      # Double quotes because $CC needs to be expanded
6462    for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
6463    do
6464      ac_preproc_ok=false
6465for ac_c_preproc_warn_flag in '' yes
6466do
6467  # Use a header file that comes with gcc, so configuring glibc
6468  # with a fresh cross-compiler works.
6469  # On the NeXT, cc -E runs the code through the compiler's parser,
6470  # not just through cpp. "Syntax error" is here to catch this case.
6471  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472/* end confdefs.h.  */
6473#include <limits.h>
6474		     Syntax error
6475_ACEOF
6476if ac_fn_c_try_cpp "$LINENO"
6477then :
6478
6479else $as_nop
6480  # Broken: fails on valid input.
6481continue
6482fi
6483rm -f conftest.err conftest.i conftest.$ac_ext
6484
6485  # OK, works on sane cases.  Now check whether nonexistent headers
6486  # can be detected and how.
6487  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6488/* end confdefs.h.  */
6489#include <ac_nonexistent.h>
6490_ACEOF
6491if ac_fn_c_try_cpp "$LINENO"
6492then :
6493  # Broken: success on invalid input.
6494continue
6495else $as_nop
6496  # Passes both tests.
6497ac_preproc_ok=:
6498break
6499fi
6500rm -f conftest.err conftest.i conftest.$ac_ext
6501
6502done
6503# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6504rm -f conftest.i conftest.err conftest.$ac_ext
6505if $ac_preproc_ok
6506then :
6507  break
6508fi
6509
6510    done
6511    ac_cv_prog_CPP=$CPP
6512
6513fi
6514  CPP=$ac_cv_prog_CPP
6515else
6516  ac_cv_prog_CPP=$CPP
6517fi
6518{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
6519printf "%s\n" "$CPP" >&6; }
6520ac_preproc_ok=false
6521for ac_c_preproc_warn_flag in '' yes
6522do
6523  # Use a header file that comes with gcc, so configuring glibc
6524  # with a fresh cross-compiler works.
6525  # On the NeXT, cc -E runs the code through the compiler's parser,
6526  # not just through cpp. "Syntax error" is here to catch this case.
6527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6528/* end confdefs.h.  */
6529#include <limits.h>
6530		     Syntax error
6531_ACEOF
6532if ac_fn_c_try_cpp "$LINENO"
6533then :
6534
6535else $as_nop
6536  # Broken: fails on valid input.
6537continue
6538fi
6539rm -f conftest.err conftest.i conftest.$ac_ext
6540
6541  # OK, works on sane cases.  Now check whether nonexistent headers
6542  # can be detected and how.
6543  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6544/* end confdefs.h.  */
6545#include <ac_nonexistent.h>
6546_ACEOF
6547if ac_fn_c_try_cpp "$LINENO"
6548then :
6549  # Broken: success on invalid input.
6550continue
6551else $as_nop
6552  # Passes both tests.
6553ac_preproc_ok=:
6554break
6555fi
6556rm -f conftest.err conftest.i conftest.$ac_ext
6557
6558done
6559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6560rm -f conftest.i conftest.err conftest.$ac_ext
6561if $ac_preproc_ok
6562then :
6563
6564else $as_nop
6565  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6566printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6567as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
6568See \`config.log' for more details" "$LINENO" 5; }
6569fi
6570
6571ac_ext=c
6572ac_cpp='$CPP $CPPFLAGS'
6573ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6574ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6575ac_compiler_gnu=$ac_cv_c_compiler_gnu
6576
6577
6578
6579
6580for ac_prog in 'bison -y' byacc
6581do
6582  # Extract the first word of "$ac_prog", so it can be a program name with args.
6583set dummy $ac_prog; ac_word=$2
6584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6585printf %s "checking for $ac_word... " >&6; }
6586if test ${ac_cv_prog_YACC+y}
6587then :
6588  printf %s "(cached) " >&6
6589else $as_nop
6590  if test -n "$YACC"; then
6591  ac_cv_prog_YACC="$YACC" # Let the user override the test.
6592else
6593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6594for as_dir in $PATH
6595do
6596  IFS=$as_save_IFS
6597  case $as_dir in #(((
6598    '') as_dir=./ ;;
6599    */) ;;
6600    *) as_dir=$as_dir/ ;;
6601  esac
6602    for ac_exec_ext in '' $ac_executable_extensions; do
6603  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6604    ac_cv_prog_YACC="$ac_prog"
6605    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6606    break 2
6607  fi
6608done
6609  done
6610IFS=$as_save_IFS
6611
6612fi
6613fi
6614YACC=$ac_cv_prog_YACC
6615if test -n "$YACC"; then
6616  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
6617printf "%s\n" "$YACC" >&6; }
6618else
6619  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6620printf "%s\n" "no" >&6; }
6621fi
6622
6623
6624  test -n "$YACC" && break
6625done
6626test -n "$YACC" || YACC="yacc"
6627
6628
6629
6630	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports C99 structure initialization" >&5
6631printf %s "checking whether the compiler supports C99 structure initialization... " >&6; }
6632
6633
6634	ac_ext=c
6635ac_cpp='$CPP $CPPFLAGS'
6636ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6637ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6638ac_compiler_gnu=$ac_cv_c_compiler_gnu
6639
6640
6641		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6642/* end confdefs.h.  */
6643
6644			struct foo_s {int i1; int i2;};
6645			int main() { struct foo_s foo[] = { { .i1 = 1, .i2 = 1 }, { .i1 = 2, .i2 = 2 }, { .i1 = 0, .i2 = 0 } }; }
6646
6647_ACEOF
6648if ac_fn_c_try_compile "$LINENO"
6649then :
6650  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6651printf "%s\n" "yes" >&6; }
6652else $as_nop
6653  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6654printf "%s\n" "no" >&6; }
6655
6656printf "%s\n" "#define MISSING_C99_STRUCT_INIT 1" >>confdefs.h
6657
6658fi
6659rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6660
6661	ac_ext=c
6662ac_cpp='$CPP $CPPFLAGS'
6663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6665ac_compiler_gnu=$ac_cv_c_compiler_gnu
6666
6667
6668
6669
6670
6671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compile/link hardening flags" >&5
6672printf %s "checking for compile/link hardening flags... " >&6; }
6673
6674
6675# Check whether --with-hardenfile was given.
6676if test ${with_hardenfile+y}
6677then :
6678  withval=$with_hardenfile;
6679else $as_nop
6680  with_hardenfile=no
6681
6682fi
6683
6684
6685(									\
6686    SENTINEL_DIR="$PWD" &&						\
6687    cd $srcdir/sntp &&							\
6688    case "$with_hardenfile" in						\
6689     yes|no|'')								\
6690	scripts/genHardFlags -d "$SENTINEL_DIR"				\
6691	;;								\
6692     *)									\
6693	scripts/genHardFlags -d "$SENTINEL_DIR" -f "$with_hardenfile"	\
6694	;;								\
6695    esac								\
6696) > genHardFlags.i 2> genHardFlags.err
6697. ./genHardFlags.i
6698
6699case "$GENHARDFLAG" in
6700 OK)
6701    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENHARDFLAGFILE" >&5
6702printf "%s\n" "in file $GENHARDFLAGFILE" >&6; }
6703    rm genHardFlags.err genHardFlags.i
6704    ;;
6705 *)
6706    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6707printf "%s\n" "failed." >&6; }
6708    as_fn_error $? "Problem with genHardFlags!" "$LINENO" 5
6709    ;;
6710esac
6711
6712
6713
6714
6715
6716
6717
6718
6719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if we need ylwrap VPATH hack" >&5
6720printf %s "checking to see if we need ylwrap VPATH hack... " >&6; }
6721ntp_vpath_hack="no"
6722case "$srcdir::${force_ntp_vpath_hack-no}" in
6723 .::*)
6724    ;; # VPATH_HACK path is for VPATH builds only.
6725 *::yes)
6726    ntp_vpath_hack="yes"
6727    ;;
6728 *::*)
6729    case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
6730     '')
6731	ntp_vpath_hack="yes"
6732    esac
6733esac
6734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_vpath_hack" >&5
6735printf "%s\n" "$ntp_vpath_hack" >&6; }
6736 if test x$ntp_vpath_hack = xyes; then
6737  VPATH_HACK_TRUE=
6738  VPATH_HACK_FALSE='#'
6739else
6740  VPATH_HACK_TRUE='#'
6741  VPATH_HACK_FALSE=
6742fi
6743
6744
6745
6746
6747{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for install dir and man conventions" >&5
6748printf %s "checking for install dir and man conventions... " >&6; }
6749
6750
6751# Check whether --with-locfile was given.
6752if test ${with_locfile+y}
6753then :
6754  withval=$with_locfile;
6755else $as_nop
6756  with_locfile=no
6757
6758fi
6759
6760
6761(									\
6762    SENTINEL_DIR="$PWD" &&						\
6763    cd $srcdir/sntp &&							\
6764    case "$with_locfile" in						\
6765     yes|no|'')								\
6766	scripts/genLocInfo -d "$SENTINEL_DIR"				\
6767	;;								\
6768     *)									\
6769	scripts/genLocInfo -d "$SENTINEL_DIR" -f "$with_locfile"	\
6770	;;								\
6771    esac								\
6772) > genLocInfo.i 2> genLocInfo.err
6773. ./genLocInfo.i
6774
6775case "$GENLOCINFO" in
6776 OK)
6777    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: in file $GENLOCINFOFILE" >&5
6778printf "%s\n" "in file $GENLOCINFOFILE" >&6; }
6779    rm genLocInfo.err genLocInfo.i
6780    ;;
6781 *)
6782    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed." >&5
6783printf "%s\n" "failed." >&6; }
6784    as_fn_error $? "Problem with genLocInfo!" "$LINENO" 5
6785    ;;
6786esac
6787
6788 if test "$CALC_TICKADJ_MS" ; then
6789  WANT_CALC_TICKADJ_MS_TRUE=
6790  WANT_CALC_TICKADJ_MS_FALSE='#'
6791else
6792  WANT_CALC_TICKADJ_MS_TRUE='#'
6793  WANT_CALC_TICKADJ_MS_FALSE=
6794fi
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838 if test -z "$NTPSWEEP_NI" ; then
6839  INSTALL_NTPSWEEP_TRUE=
6840  INSTALL_NTPSWEEP_FALSE='#'
6841else
6842  INSTALL_NTPSWEEP_TRUE='#'
6843  INSTALL_NTPSWEEP_FALSE=
6844fi
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886 if test -z "$UPDATE_LEAP_NI" ; then
6887  INSTALL_UPDATE_LEAP_TRUE=
6888  INSTALL_UPDATE_LEAP_FALSE='#'
6889else
6890  INSTALL_UPDATE_LEAP_TRUE='#'
6891  INSTALL_UPDATE_LEAP_FALSE=
6892fi
6893
6894
6895
6896
6897  if test -n "$ac_tool_prefix"; then
6898  for ac_prog in ar lib "link -lib"
6899  do
6900    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6901set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6903printf %s "checking for $ac_word... " >&6; }
6904if test ${ac_cv_prog_AR+y}
6905then :
6906  printf %s "(cached) " >&6
6907else $as_nop
6908  if test -n "$AR"; then
6909  ac_cv_prog_AR="$AR" # Let the user override the test.
6910else
6911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6912for as_dir in $PATH
6913do
6914  IFS=$as_save_IFS
6915  case $as_dir in #(((
6916    '') as_dir=./ ;;
6917    */) ;;
6918    *) as_dir=$as_dir/ ;;
6919  esac
6920    for ac_exec_ext in '' $ac_executable_extensions; do
6921  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6922    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
6923    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6924    break 2
6925  fi
6926done
6927  done
6928IFS=$as_save_IFS
6929
6930fi
6931fi
6932AR=$ac_cv_prog_AR
6933if test -n "$AR"; then
6934  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6935printf "%s\n" "$AR" >&6; }
6936else
6937  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6938printf "%s\n" "no" >&6; }
6939fi
6940
6941
6942    test -n "$AR" && break
6943  done
6944fi
6945if test -z "$AR"; then
6946  ac_ct_AR=$AR
6947  for ac_prog in ar lib "link -lib"
6948do
6949  # Extract the first word of "$ac_prog", so it can be a program name with args.
6950set dummy $ac_prog; ac_word=$2
6951{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6952printf %s "checking for $ac_word... " >&6; }
6953if test ${ac_cv_prog_ac_ct_AR+y}
6954then :
6955  printf %s "(cached) " >&6
6956else $as_nop
6957  if test -n "$ac_ct_AR"; then
6958  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6959else
6960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6961for as_dir in $PATH
6962do
6963  IFS=$as_save_IFS
6964  case $as_dir in #(((
6965    '') as_dir=./ ;;
6966    */) ;;
6967    *) as_dir=$as_dir/ ;;
6968  esac
6969    for ac_exec_ext in '' $ac_executable_extensions; do
6970  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6971    ac_cv_prog_ac_ct_AR="$ac_prog"
6972    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6973    break 2
6974  fi
6975done
6976  done
6977IFS=$as_save_IFS
6978
6979fi
6980fi
6981ac_ct_AR=$ac_cv_prog_ac_ct_AR
6982if test -n "$ac_ct_AR"; then
6983  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6984printf "%s\n" "$ac_ct_AR" >&6; }
6985else
6986  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6987printf "%s\n" "no" >&6; }
6988fi
6989
6990
6991  test -n "$ac_ct_AR" && break
6992done
6993
6994  if test "x$ac_ct_AR" = x; then
6995    AR="false"
6996  else
6997    case $cross_compiling:$ac_tool_warned in
6998yes:)
6999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7000printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7001ac_tool_warned=yes ;;
7002esac
7003    AR=$ac_ct_AR
7004  fi
7005fi
7006
7007: ${AR=ar}
7008
7009{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
7010printf %s "checking the archiver ($AR) interface... " >&6; }
7011if test ${am_cv_ar_interface+y}
7012then :
7013  printf %s "(cached) " >&6
7014else $as_nop
7015  ac_ext=c
7016ac_cpp='$CPP $CPPFLAGS'
7017ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7018ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7019ac_compiler_gnu=$ac_cv_c_compiler_gnu
7020
7021   am_cv_ar_interface=ar
7022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7023/* end confdefs.h.  */
7024int some_variable = 0;
7025_ACEOF
7026if ac_fn_c_try_compile "$LINENO"
7027then :
7028  am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
7029      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7030  (eval $am_ar_try) 2>&5
7031  ac_status=$?
7032  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7033  test $ac_status = 0; }
7034      if test "$ac_status" -eq 0; then
7035        am_cv_ar_interface=ar
7036      else
7037        am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
7038        { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
7039  (eval $am_ar_try) 2>&5
7040  ac_status=$?
7041  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7042  test $ac_status = 0; }
7043        if test "$ac_status" -eq 0; then
7044          am_cv_ar_interface=lib
7045        else
7046          am_cv_ar_interface=unknown
7047        fi
7048      fi
7049      rm -f conftest.lib libconftest.a
7050
7051fi
7052rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7053   ac_ext=c
7054ac_cpp='$CPP $CPPFLAGS'
7055ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7056ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7057ac_compiler_gnu=$ac_cv_c_compiler_gnu
7058
7059fi
7060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
7061printf "%s\n" "$am_cv_ar_interface" >&6; }
7062
7063case $am_cv_ar_interface in
7064ar)
7065  ;;
7066lib)
7067  # Microsoft lib, so override with the ar-lib wrapper script.
7068  # FIXME: It is wrong to rewrite AR.
7069  # But if we don't then we get into trouble of one sort or another.
7070  # A longer-term fix would be to have automake use am__AR in this case,
7071  # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
7072  # similar.
7073  AR="$am_aux_dir/ar-lib $AR"
7074  ;;
7075unknown)
7076  as_fn_error $? "could not determine $AR interface" "$LINENO" 5
7077  ;;
7078esac
7079
7080
7081# So far, the only shared library we might use is libopts.
7082# It's a small library - we might as well use a static version of it.
7083# Check whether --enable-shared was given.
7084if test ${enable_shared+y}
7085then :
7086  enableval=$enable_shared; p=${PACKAGE-default}
7087    case $enableval in
7088    yes) enable_shared=yes ;;
7089    no) enable_shared=no ;;
7090    *)
7091      enable_shared=no
7092      # Look at the argument we got.  We use all the common list separators.
7093      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
7094      for pkg in $enableval; do
7095	IFS=$lt_save_ifs
7096	if test "X$pkg" = "X$p"; then
7097	  enable_shared=yes
7098	fi
7099      done
7100      IFS=$lt_save_ifs
7101      ;;
7102    esac
7103else $as_nop
7104  enable_shared=no
7105fi
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115case `pwd` in
7116  *\ * | *\	*)
7117    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
7118printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
7119esac
7120
7121
7122
7123macro_version='2.4.6'
7124macro_revision='2.4.6'
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139ltmain=$ac_aux_dir/ltmain.sh
7140
7141# Backslashify metacharacters that are still active within
7142# double-quoted strings.
7143sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
7144
7145# Same as above, but do not quote variable references.
7146double_quote_subst='s/\(["`\\]\)/\\\1/g'
7147
7148# Sed substitution to delay expansion of an escaped shell variable in a
7149# double_quote_subst'ed string.
7150delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
7151
7152# Sed substitution to delay expansion of an escaped single quote.
7153delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
7154
7155# Sed substitution to avoid accidental globbing in evaled expressions
7156no_glob_subst='s/\*/\\\*/g'
7157
7158ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
7159ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
7160ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
7161
7162{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
7163printf %s "checking how to print strings... " >&6; }
7164# Test print first, because it will be a builtin if present.
7165if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
7166   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
7167  ECHO='print -r --'
7168elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
7169  ECHO='printf %s\n'
7170else
7171  # Use this function as a fallback that always works.
7172  func_fallback_echo ()
7173  {
7174    eval 'cat <<_LTECHO_EOF
7175$1
7176_LTECHO_EOF'
7177  }
7178  ECHO='func_fallback_echo'
7179fi
7180
7181# func_echo_all arg...
7182# Invoke $ECHO with all args, space-separated.
7183func_echo_all ()
7184{
7185    $ECHO ""
7186}
7187
7188case $ECHO in
7189  printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
7190printf "%s\n" "printf" >&6; } ;;
7191  print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
7192printf "%s\n" "print -r" >&6; } ;;
7193  *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
7194printf "%s\n" "cat" >&6; } ;;
7195esac
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7211printf %s "checking for a sed that does not truncate output... " >&6; }
7212if test ${ac_cv_path_SED+y}
7213then :
7214  printf %s "(cached) " >&6
7215else $as_nop
7216            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7217     for ac_i in 1 2 3 4 5 6 7; do
7218       ac_script="$ac_script$as_nl$ac_script"
7219     done
7220     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7221     { ac_script=; unset ac_script;}
7222     if test -z "$SED"; then
7223  ac_path_SED_found=false
7224  # Loop through the user's path and test for each of PROGNAME-LIST
7225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7226for as_dir in $PATH
7227do
7228  IFS=$as_save_IFS
7229  case $as_dir in #(((
7230    '') as_dir=./ ;;
7231    */) ;;
7232    *) as_dir=$as_dir/ ;;
7233  esac
7234    for ac_prog in sed gsed
7235   do
7236    for ac_exec_ext in '' $ac_executable_extensions; do
7237      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7238      as_fn_executable_p "$ac_path_SED" || continue
7239# Check for GNU ac_path_SED and select it if it is found.
7240  # Check for GNU $ac_path_SED
7241case `"$ac_path_SED" --version 2>&1` in
7242*GNU*)
7243  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7244*)
7245  ac_count=0
7246  printf %s 0123456789 >"conftest.in"
7247  while :
7248  do
7249    cat "conftest.in" "conftest.in" >"conftest.tmp"
7250    mv "conftest.tmp" "conftest.in"
7251    cp "conftest.in" "conftest.nl"
7252    printf "%s\n" '' >> "conftest.nl"
7253    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7254    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7255    as_fn_arith $ac_count + 1 && ac_count=$as_val
7256    if test $ac_count -gt ${ac_path_SED_max-0}; then
7257      # Best one so far, save it but keep looking for a better one
7258      ac_cv_path_SED="$ac_path_SED"
7259      ac_path_SED_max=$ac_count
7260    fi
7261    # 10*(2^10) chars as input seems more than enough
7262    test $ac_count -gt 10 && break
7263  done
7264  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7265esac
7266
7267      $ac_path_SED_found && break 3
7268    done
7269  done
7270  done
7271IFS=$as_save_IFS
7272  if test -z "$ac_cv_path_SED"; then
7273    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7274  fi
7275else
7276  ac_cv_path_SED=$SED
7277fi
7278
7279fi
7280{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7281printf "%s\n" "$ac_cv_path_SED" >&6; }
7282 SED="$ac_cv_path_SED"
7283  rm -f conftest.sed
7284
7285test -z "$SED" && SED=sed
7286Xsed="$SED -e 1s/^X//"
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
7299printf %s "checking for fgrep... " >&6; }
7300if test ${ac_cv_path_FGREP+y}
7301then :
7302  printf %s "(cached) " >&6
7303else $as_nop
7304  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
7305   then ac_cv_path_FGREP="$GREP -F"
7306   else
7307     if test -z "$FGREP"; then
7308  ac_path_FGREP_found=false
7309  # Loop through the user's path and test for each of PROGNAME-LIST
7310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7311for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
7312do
7313  IFS=$as_save_IFS
7314  case $as_dir in #(((
7315    '') as_dir=./ ;;
7316    */) ;;
7317    *) as_dir=$as_dir/ ;;
7318  esac
7319    for ac_prog in fgrep
7320   do
7321    for ac_exec_ext in '' $ac_executable_extensions; do
7322      ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
7323      as_fn_executable_p "$ac_path_FGREP" || continue
7324# Check for GNU ac_path_FGREP and select it if it is found.
7325  # Check for GNU $ac_path_FGREP
7326case `"$ac_path_FGREP" --version 2>&1` in
7327*GNU*)
7328  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
7329*)
7330  ac_count=0
7331  printf %s 0123456789 >"conftest.in"
7332  while :
7333  do
7334    cat "conftest.in" "conftest.in" >"conftest.tmp"
7335    mv "conftest.tmp" "conftest.in"
7336    cp "conftest.in" "conftest.nl"
7337    printf "%s\n" 'FGREP' >> "conftest.nl"
7338    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
7339    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7340    as_fn_arith $ac_count + 1 && ac_count=$as_val
7341    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
7342      # Best one so far, save it but keep looking for a better one
7343      ac_cv_path_FGREP="$ac_path_FGREP"
7344      ac_path_FGREP_max=$ac_count
7345    fi
7346    # 10*(2^10) chars as input seems more than enough
7347    test $ac_count -gt 10 && break
7348  done
7349  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7350esac
7351
7352      $ac_path_FGREP_found && break 3
7353    done
7354  done
7355  done
7356IFS=$as_save_IFS
7357  if test -z "$ac_cv_path_FGREP"; then
7358    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
7359  fi
7360else
7361  ac_cv_path_FGREP=$FGREP
7362fi
7363
7364   fi
7365fi
7366{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
7367printf "%s\n" "$ac_cv_path_FGREP" >&6; }
7368 FGREP="$ac_cv_path_FGREP"
7369
7370
7371test -z "$GREP" && GREP=grep
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391# Check whether --with-gnu-ld was given.
7392if test ${with_gnu_ld+y}
7393then :
7394  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
7395else $as_nop
7396  with_gnu_ld=no
7397fi
7398
7399ac_prog=ld
7400if test yes = "$GCC"; then
7401  # Check if gcc -print-prog-name=ld gives a path.
7402  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
7403printf %s "checking for ld used by $CC... " >&6; }
7404  case $host in
7405  *-*-mingw*)
7406    # gcc leaves a trailing carriage return, which upsets mingw
7407    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
7408  *)
7409    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
7410  esac
7411  case $ac_prog in
7412    # Accept absolute paths.
7413    [\\/]* | ?:[\\/]*)
7414      re_direlt='/[^/][^/]*/\.\./'
7415      # Canonicalize the pathname of ld
7416      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
7417      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
7418	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
7419      done
7420      test -z "$LD" && LD=$ac_prog
7421      ;;
7422  "")
7423    # If it fails, then pretend we aren't using GCC.
7424    ac_prog=ld
7425    ;;
7426  *)
7427    # If it is relative, then search for the first ld in PATH.
7428    with_gnu_ld=unknown
7429    ;;
7430  esac
7431elif test yes = "$with_gnu_ld"; then
7432  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
7433printf %s "checking for GNU ld... " >&6; }
7434else
7435  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
7436printf %s "checking for non-GNU ld... " >&6; }
7437fi
7438if test ${lt_cv_path_LD+y}
7439then :
7440  printf %s "(cached) " >&6
7441else $as_nop
7442  if test -z "$LD"; then
7443  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7444  for ac_dir in $PATH; do
7445    IFS=$lt_save_ifs
7446    test -z "$ac_dir" && ac_dir=.
7447    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
7448      lt_cv_path_LD=$ac_dir/$ac_prog
7449      # Check to see if the program is GNU ld.  I'd rather use --version,
7450      # but apparently some variants of GNU ld only accept -v.
7451      # Break only if it was the GNU/non-GNU ld that we prefer.
7452      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
7453      *GNU* | *'with BFD'*)
7454	test no != "$with_gnu_ld" && break
7455	;;
7456      *)
7457	test yes != "$with_gnu_ld" && break
7458	;;
7459      esac
7460    fi
7461  done
7462  IFS=$lt_save_ifs
7463else
7464  lt_cv_path_LD=$LD # Let the user override the test with a path.
7465fi
7466fi
7467
7468LD=$lt_cv_path_LD
7469if test -n "$LD"; then
7470  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
7471printf "%s\n" "$LD" >&6; }
7472else
7473  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474printf "%s\n" "no" >&6; }
7475fi
7476test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
7477{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
7478printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
7479if test ${lt_cv_prog_gnu_ld+y}
7480then :
7481  printf %s "(cached) " >&6
7482else $as_nop
7483  # I'd rather use --version here, but apparently some GNU lds only accept -v.
7484case `$LD -v 2>&1 </dev/null` in
7485*GNU* | *'with BFD'*)
7486  lt_cv_prog_gnu_ld=yes
7487  ;;
7488*)
7489  lt_cv_prog_gnu_ld=no
7490  ;;
7491esac
7492fi
7493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
7494printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
7495with_gnu_ld=$lt_cv_prog_gnu_ld
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
7506printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
7507if test ${lt_cv_path_NM+y}
7508then :
7509  printf %s "(cached) " >&6
7510else $as_nop
7511  if test -n "$NM"; then
7512  # Let the user override the test.
7513  lt_cv_path_NM=$NM
7514else
7515  lt_nm_to_check=${ac_tool_prefix}nm
7516  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
7517    lt_nm_to_check="$lt_nm_to_check nm"
7518  fi
7519  for lt_tmp_nm in $lt_nm_to_check; do
7520    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
7521    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
7522      IFS=$lt_save_ifs
7523      test -z "$ac_dir" && ac_dir=.
7524      tmp_nm=$ac_dir/$lt_tmp_nm
7525      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
7526	# Check to see if the nm accepts a BSD-compat flag.
7527	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
7528	#   nm: unknown option "B" ignored
7529	# Tru64's nm complains that /dev/null is an invalid object file
7530	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
7531	case $build_os in
7532	mingw*) lt_bad_file=conftest.nm/nofile ;;
7533	*) lt_bad_file=/dev/null ;;
7534	esac
7535	case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
7536	*$lt_bad_file* | *'Invalid file or object type'*)
7537	  lt_cv_path_NM="$tmp_nm -B"
7538	  break 2
7539	  ;;
7540	*)
7541	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
7542	  */dev/null*)
7543	    lt_cv_path_NM="$tmp_nm -p"
7544	    break 2
7545	    ;;
7546	  *)
7547	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
7548	    continue # so that we can try to find one that supports BSD flags
7549	    ;;
7550	  esac
7551	  ;;
7552	esac
7553      fi
7554    done
7555    IFS=$lt_save_ifs
7556  done
7557  : ${lt_cv_path_NM=no}
7558fi
7559fi
7560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
7561printf "%s\n" "$lt_cv_path_NM" >&6; }
7562if test no != "$lt_cv_path_NM"; then
7563  NM=$lt_cv_path_NM
7564else
7565  # Didn't find any BSD compatible name lister, look for dumpbin.
7566  if test -n "$DUMPBIN"; then :
7567    # Let the user override the test.
7568  else
7569    if test -n "$ac_tool_prefix"; then
7570  for ac_prog in dumpbin "link -dump"
7571  do
7572    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7573set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575printf %s "checking for $ac_word... " >&6; }
7576if test ${ac_cv_prog_DUMPBIN+y}
7577then :
7578  printf %s "(cached) " >&6
7579else $as_nop
7580  if test -n "$DUMPBIN"; then
7581  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
7582else
7583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7584for as_dir in $PATH
7585do
7586  IFS=$as_save_IFS
7587  case $as_dir in #(((
7588    '') as_dir=./ ;;
7589    */) ;;
7590    *) as_dir=$as_dir/ ;;
7591  esac
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7594    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
7595    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602fi
7603fi
7604DUMPBIN=$ac_cv_prog_DUMPBIN
7605if test -n "$DUMPBIN"; then
7606  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
7607printf "%s\n" "$DUMPBIN" >&6; }
7608else
7609  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7610printf "%s\n" "no" >&6; }
7611fi
7612
7613
7614    test -n "$DUMPBIN" && break
7615  done
7616fi
7617if test -z "$DUMPBIN"; then
7618  ac_ct_DUMPBIN=$DUMPBIN
7619  for ac_prog in dumpbin "link -dump"
7620do
7621  # Extract the first word of "$ac_prog", so it can be a program name with args.
7622set dummy $ac_prog; ac_word=$2
7623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7624printf %s "checking for $ac_word... " >&6; }
7625if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
7626then :
7627  printf %s "(cached) " >&6
7628else $as_nop
7629  if test -n "$ac_ct_DUMPBIN"; then
7630  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
7631else
7632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633for as_dir in $PATH
7634do
7635  IFS=$as_save_IFS
7636  case $as_dir in #(((
7637    '') as_dir=./ ;;
7638    */) ;;
7639    *) as_dir=$as_dir/ ;;
7640  esac
7641    for ac_exec_ext in '' $ac_executable_extensions; do
7642  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7643    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
7644    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7645    break 2
7646  fi
7647done
7648  done
7649IFS=$as_save_IFS
7650
7651fi
7652fi
7653ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
7654if test -n "$ac_ct_DUMPBIN"; then
7655  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
7656printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
7657else
7658  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7659printf "%s\n" "no" >&6; }
7660fi
7661
7662
7663  test -n "$ac_ct_DUMPBIN" && break
7664done
7665
7666  if test "x$ac_ct_DUMPBIN" = x; then
7667    DUMPBIN=":"
7668  else
7669    case $cross_compiling:$ac_tool_warned in
7670yes:)
7671{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7672printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7673ac_tool_warned=yes ;;
7674esac
7675    DUMPBIN=$ac_ct_DUMPBIN
7676  fi
7677fi
7678
7679    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
7680    *COFF*)
7681      DUMPBIN="$DUMPBIN -symbols -headers"
7682      ;;
7683    *)
7684      DUMPBIN=:
7685      ;;
7686    esac
7687  fi
7688
7689  if test : != "$DUMPBIN"; then
7690    NM=$DUMPBIN
7691  fi
7692fi
7693test -z "$NM" && NM=nm
7694
7695
7696
7697
7698
7699
7700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
7701printf %s "checking the name lister ($NM) interface... " >&6; }
7702if test ${lt_cv_nm_interface+y}
7703then :
7704  printf %s "(cached) " >&6
7705else $as_nop
7706  lt_cv_nm_interface="BSD nm"
7707  echo "int some_variable = 0;" > conftest.$ac_ext
7708  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
7709  (eval "$ac_compile" 2>conftest.err)
7710  cat conftest.err >&5
7711  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
7712  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
7713  cat conftest.err >&5
7714  (eval echo "\"\$as_me:$LINENO: output\"" >&5)
7715  cat conftest.out >&5
7716  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
7717    lt_cv_nm_interface="MS dumpbin"
7718  fi
7719  rm -f conftest*
7720fi
7721{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
7722printf "%s\n" "$lt_cv_nm_interface" >&6; }
7723
7724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7725printf %s "checking whether ln -s works... " >&6; }
7726LN_S=$as_ln_s
7727if test "$LN_S" = "ln -s"; then
7728  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7729printf "%s\n" "yes" >&6; }
7730else
7731  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7732printf "%s\n" "no, using $LN_S" >&6; }
7733fi
7734
7735# find the maximum length of command line arguments
7736{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
7737printf %s "checking the maximum length of command line arguments... " >&6; }
7738if test ${lt_cv_sys_max_cmd_len+y}
7739then :
7740  printf %s "(cached) " >&6
7741else $as_nop
7742    i=0
7743  teststring=ABCD
7744
7745  case $build_os in
7746  msdosdjgpp*)
7747    # On DJGPP, this test can blow up pretty badly due to problems in libc
7748    # (any single argument exceeding 2000 bytes causes a buffer overrun
7749    # during glob expansion).  Even if it were fixed, the result of this
7750    # check would be larger than it should be.
7751    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
7752    ;;
7753
7754  gnu*)
7755    # Under GNU Hurd, this test is not required because there is
7756    # no limit to the length of command line arguments.
7757    # Libtool will interpret -1 as no limit whatsoever
7758    lt_cv_sys_max_cmd_len=-1;
7759    ;;
7760
7761  cygwin* | mingw* | cegcc*)
7762    # On Win9x/ME, this test blows up -- it succeeds, but takes
7763    # about 5 minutes as the teststring grows exponentially.
7764    # Worse, since 9x/ME are not pre-emptively multitasking,
7765    # you end up with a "frozen" computer, even though with patience
7766    # the test eventually succeeds (with a max line length of 256k).
7767    # Instead, let's just punt: use the minimum linelength reported by
7768    # all of the supported platforms: 8192 (on NT/2K/XP).
7769    lt_cv_sys_max_cmd_len=8192;
7770    ;;
7771
7772  mint*)
7773    # On MiNT this can take a long time and run out of memory.
7774    lt_cv_sys_max_cmd_len=8192;
7775    ;;
7776
7777  amigaos*)
7778    # On AmigaOS with pdksh, this test takes hours, literally.
7779    # So we just punt and use a minimum line length of 8192.
7780    lt_cv_sys_max_cmd_len=8192;
7781    ;;
7782
7783  bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
7784    # This has been around since 386BSD, at least.  Likely further.
7785    if test -x /sbin/sysctl; then
7786      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
7787    elif test -x /usr/sbin/sysctl; then
7788      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
7789    else
7790      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
7791    fi
7792    # And add a safety zone
7793    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7794    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7795    ;;
7796
7797  interix*)
7798    # We know the value 262144 and hardcode it with a safety zone (like BSD)
7799    lt_cv_sys_max_cmd_len=196608
7800    ;;
7801
7802  os2*)
7803    # The test takes a long time on OS/2.
7804    lt_cv_sys_max_cmd_len=8192
7805    ;;
7806
7807  osf*)
7808    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
7809    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
7810    # nice to cause kernel panics so lets avoid the loop below.
7811    # First set a reasonable default.
7812    lt_cv_sys_max_cmd_len=16384
7813    #
7814    if test -x /sbin/sysconfig; then
7815      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
7816        *1*) lt_cv_sys_max_cmd_len=-1 ;;
7817      esac
7818    fi
7819    ;;
7820  sco3.2v5*)
7821    lt_cv_sys_max_cmd_len=102400
7822    ;;
7823  sysv5* | sco5v6* | sysv4.2uw2*)
7824    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
7825    if test -n "$kargmax"; then
7826      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[	 ]//'`
7827    else
7828      lt_cv_sys_max_cmd_len=32768
7829    fi
7830    ;;
7831  *)
7832    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
7833    if test -n "$lt_cv_sys_max_cmd_len" && \
7834       test undefined != "$lt_cv_sys_max_cmd_len"; then
7835      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
7836      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
7837    else
7838      # Make teststring a little bigger before we do anything with it.
7839      # a 1K string should be a reasonable start.
7840      for i in 1 2 3 4 5 6 7 8; do
7841        teststring=$teststring$teststring
7842      done
7843      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
7844      # If test is not a shell built-in, we'll probably end up computing a
7845      # maximum length that is only half of the actual maximum length, but
7846      # we can't tell.
7847      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
7848	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
7849	      test 17 != "$i" # 1/2 MB should be enough
7850      do
7851        i=`expr $i + 1`
7852        teststring=$teststring$teststring
7853      done
7854      # Only check the string length outside the loop.
7855      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
7856      teststring=
7857      # Add a significant safety factor because C++ compilers can tack on
7858      # massive amounts of additional arguments before passing them to the
7859      # linker.  It appears as though 1/2 is a usable value.
7860      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
7861    fi
7862    ;;
7863  esac
7864
7865fi
7866
7867if test -n "$lt_cv_sys_max_cmd_len"; then
7868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
7869printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
7870else
7871  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
7872printf "%s\n" "none" >&6; }
7873fi
7874max_cmd_len=$lt_cv_sys_max_cmd_len
7875
7876
7877
7878
7879
7880
7881: ${CP="cp -f"}
7882: ${MV="mv -f"}
7883: ${RM="rm -f"}
7884
7885if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
7886  lt_unset=unset
7887else
7888  lt_unset=false
7889fi
7890
7891
7892
7893
7894
7895# test EBCDIC or ASCII
7896case `echo X|tr X '\101'` in
7897 A) # ASCII based system
7898    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
7899  lt_SP2NL='tr \040 \012'
7900  lt_NL2SP='tr \015\012 \040\040'
7901  ;;
7902 *) # EBCDIC based system
7903  lt_SP2NL='tr \100 \n'
7904  lt_NL2SP='tr \r\n \100\100'
7905  ;;
7906esac
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
7917printf %s "checking how to convert $build file names to $host format... " >&6; }
7918if test ${lt_cv_to_host_file_cmd+y}
7919then :
7920  printf %s "(cached) " >&6
7921else $as_nop
7922  case $host in
7923  *-*-mingw* )
7924    case $build in
7925      *-*-mingw* ) # actually msys
7926        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
7927        ;;
7928      *-*-cygwin* )
7929        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
7930        ;;
7931      * ) # otherwise, assume *nix
7932        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
7933        ;;
7934    esac
7935    ;;
7936  *-*-cygwin* )
7937    case $build in
7938      *-*-mingw* ) # actually msys
7939        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
7940        ;;
7941      *-*-cygwin* )
7942        lt_cv_to_host_file_cmd=func_convert_file_noop
7943        ;;
7944      * ) # otherwise, assume *nix
7945        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
7946        ;;
7947    esac
7948    ;;
7949  * ) # unhandled hosts (and "normal" native builds)
7950    lt_cv_to_host_file_cmd=func_convert_file_noop
7951    ;;
7952esac
7953
7954fi
7955
7956to_host_file_cmd=$lt_cv_to_host_file_cmd
7957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
7958printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
7959
7960
7961
7962
7963
7964{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
7965printf %s "checking how to convert $build file names to toolchain format... " >&6; }
7966if test ${lt_cv_to_tool_file_cmd+y}
7967then :
7968  printf %s "(cached) " >&6
7969else $as_nop
7970  #assume ordinary cross tools, or native build.
7971lt_cv_to_tool_file_cmd=func_convert_file_noop
7972case $host in
7973  *-*-mingw* )
7974    case $build in
7975      *-*-mingw* ) # actually msys
7976        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
7977        ;;
7978    esac
7979    ;;
7980esac
7981
7982fi
7983
7984to_tool_file_cmd=$lt_cv_to_tool_file_cmd
7985{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
7986printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
7987
7988
7989
7990
7991
7992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
7993printf %s "checking for $LD option to reload object files... " >&6; }
7994if test ${lt_cv_ld_reload_flag+y}
7995then :
7996  printf %s "(cached) " >&6
7997else $as_nop
7998  lt_cv_ld_reload_flag='-r'
7999fi
8000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
8001printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
8002reload_flag=$lt_cv_ld_reload_flag
8003case $reload_flag in
8004"" | " "*) ;;
8005*) reload_flag=" $reload_flag" ;;
8006esac
8007reload_cmds='$LD$reload_flag -o $output$reload_objs'
8008case $host_os in
8009  cygwin* | mingw* | pw32* | cegcc*)
8010    if test yes != "$GCC"; then
8011      reload_cmds=false
8012    fi
8013    ;;
8014  darwin*)
8015    if test yes = "$GCC"; then
8016      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
8017    else
8018      reload_cmds='$LD$reload_flag -o $output$reload_objs'
8019    fi
8020    ;;
8021esac
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031if test -n "$ac_tool_prefix"; then
8032  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
8033set dummy ${ac_tool_prefix}objdump; ac_word=$2
8034{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8035printf %s "checking for $ac_word... " >&6; }
8036if test ${ac_cv_prog_OBJDUMP+y}
8037then :
8038  printf %s "(cached) " >&6
8039else $as_nop
8040  if test -n "$OBJDUMP"; then
8041  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
8042else
8043as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8044for as_dir in $PATH
8045do
8046  IFS=$as_save_IFS
8047  case $as_dir in #(((
8048    '') as_dir=./ ;;
8049    */) ;;
8050    *) as_dir=$as_dir/ ;;
8051  esac
8052    for ac_exec_ext in '' $ac_executable_extensions; do
8053  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8054    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
8055    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8056    break 2
8057  fi
8058done
8059  done
8060IFS=$as_save_IFS
8061
8062fi
8063fi
8064OBJDUMP=$ac_cv_prog_OBJDUMP
8065if test -n "$OBJDUMP"; then
8066  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
8067printf "%s\n" "$OBJDUMP" >&6; }
8068else
8069  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8070printf "%s\n" "no" >&6; }
8071fi
8072
8073
8074fi
8075if test -z "$ac_cv_prog_OBJDUMP"; then
8076  ac_ct_OBJDUMP=$OBJDUMP
8077  # Extract the first word of "objdump", so it can be a program name with args.
8078set dummy objdump; ac_word=$2
8079{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8080printf %s "checking for $ac_word... " >&6; }
8081if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
8082then :
8083  printf %s "(cached) " >&6
8084else $as_nop
8085  if test -n "$ac_ct_OBJDUMP"; then
8086  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
8087else
8088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8089for as_dir in $PATH
8090do
8091  IFS=$as_save_IFS
8092  case $as_dir in #(((
8093    '') as_dir=./ ;;
8094    */) ;;
8095    *) as_dir=$as_dir/ ;;
8096  esac
8097    for ac_exec_ext in '' $ac_executable_extensions; do
8098  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8099    ac_cv_prog_ac_ct_OBJDUMP="objdump"
8100    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8101    break 2
8102  fi
8103done
8104  done
8105IFS=$as_save_IFS
8106
8107fi
8108fi
8109ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
8110if test -n "$ac_ct_OBJDUMP"; then
8111  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
8112printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
8113else
8114  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115printf "%s\n" "no" >&6; }
8116fi
8117
8118  if test "x$ac_ct_OBJDUMP" = x; then
8119    OBJDUMP="false"
8120  else
8121    case $cross_compiling:$ac_tool_warned in
8122yes:)
8123{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8124printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8125ac_tool_warned=yes ;;
8126esac
8127    OBJDUMP=$ac_ct_OBJDUMP
8128  fi
8129else
8130  OBJDUMP="$ac_cv_prog_OBJDUMP"
8131fi
8132
8133test -z "$OBJDUMP" && OBJDUMP=objdump
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
8144printf %s "checking how to recognize dependent libraries... " >&6; }
8145if test ${lt_cv_deplibs_check_method+y}
8146then :
8147  printf %s "(cached) " >&6
8148else $as_nop
8149  lt_cv_file_magic_cmd='$MAGIC_CMD'
8150lt_cv_file_magic_test_file=
8151lt_cv_deplibs_check_method='unknown'
8152# Need to set the preceding variable on all platforms that support
8153# interlibrary dependencies.
8154# 'none' -- dependencies not supported.
8155# 'unknown' -- same as none, but documents that we really don't know.
8156# 'pass_all' -- all dependencies passed with no checks.
8157# 'test_compile' -- check by making test program.
8158# 'file_magic [[regex]]' -- check by looking for files in library path
8159# that responds to the $file_magic_cmd with a given extended regex.
8160# If you have 'file' or equivalent on your system and you're not sure
8161# whether 'pass_all' will *always* work, you probably want this one.
8162
8163case $host_os in
8164aix[4-9]*)
8165  lt_cv_deplibs_check_method=pass_all
8166  ;;
8167
8168beos*)
8169  lt_cv_deplibs_check_method=pass_all
8170  ;;
8171
8172bsdi[45]*)
8173  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
8174  lt_cv_file_magic_cmd='/usr/bin/file -L'
8175  lt_cv_file_magic_test_file=/shlib/libc.so
8176  ;;
8177
8178cygwin*)
8179  # func_win32_libid is a shell function defined in ltmain.sh
8180  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8181  lt_cv_file_magic_cmd='func_win32_libid'
8182  ;;
8183
8184mingw* | pw32*)
8185  # Base MSYS/MinGW do not provide the 'file' command needed by
8186  # func_win32_libid shell function, so use a weaker test based on 'objdump',
8187  # unless we find 'file', for example because we are cross-compiling.
8188  if ( file / ) >/dev/null 2>&1; then
8189    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
8190    lt_cv_file_magic_cmd='func_win32_libid'
8191  else
8192    # Keep this pattern in sync with the one in func_win32_libid.
8193    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
8194    lt_cv_file_magic_cmd='$OBJDUMP -f'
8195  fi
8196  ;;
8197
8198cegcc*)
8199  # use the weaker test based on 'objdump'. See mingw*.
8200  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
8201  lt_cv_file_magic_cmd='$OBJDUMP -f'
8202  ;;
8203
8204darwin* | rhapsody*)
8205  lt_cv_deplibs_check_method=pass_all
8206  ;;
8207
8208freebsd* | dragonfly*)
8209  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8210    case $host_cpu in
8211    i*86 )
8212      # Not sure whether the presence of OpenBSD here was a mistake.
8213      # Let's accept both of them until this is cleared up.
8214      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
8215      lt_cv_file_magic_cmd=/usr/bin/file
8216      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
8217      ;;
8218    esac
8219  else
8220    lt_cv_deplibs_check_method=pass_all
8221  fi
8222  ;;
8223
8224haiku*)
8225  lt_cv_deplibs_check_method=pass_all
8226  ;;
8227
8228hpux10.20* | hpux11*)
8229  lt_cv_file_magic_cmd=/usr/bin/file
8230  case $host_cpu in
8231  ia64*)
8232    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
8233    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
8234    ;;
8235  hppa*64*)
8236    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]'
8237    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
8238    ;;
8239  *)
8240    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
8241    lt_cv_file_magic_test_file=/usr/lib/libc.sl
8242    ;;
8243  esac
8244  ;;
8245
8246interix[3-9]*)
8247  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
8248  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
8249  ;;
8250
8251irix5* | irix6* | nonstopux*)
8252  case $LD in
8253  *-32|*"-32 ") libmagic=32-bit;;
8254  *-n32|*"-n32 ") libmagic=N32;;
8255  *-64|*"-64 ") libmagic=64-bit;;
8256  *) libmagic=never-match;;
8257  esac
8258  lt_cv_deplibs_check_method=pass_all
8259  ;;
8260
8261# This must be glibc/ELF.
8262linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
8263  lt_cv_deplibs_check_method=pass_all
8264  ;;
8265
8266netbsd*)
8267  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
8268    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8269  else
8270    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
8271  fi
8272  ;;
8273
8274newos6*)
8275  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
8276  lt_cv_file_magic_cmd=/usr/bin/file
8277  lt_cv_file_magic_test_file=/usr/lib/libnls.so
8278  ;;
8279
8280*nto* | *qnx*)
8281  lt_cv_deplibs_check_method=pass_all
8282  ;;
8283
8284openbsd* | bitrig*)
8285  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
8286    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
8287  else
8288    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
8289  fi
8290  ;;
8291
8292osf3* | osf4* | osf5*)
8293  lt_cv_deplibs_check_method=pass_all
8294  ;;
8295
8296rdos*)
8297  lt_cv_deplibs_check_method=pass_all
8298  ;;
8299
8300solaris*)
8301  lt_cv_deplibs_check_method=pass_all
8302  ;;
8303
8304sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
8305  lt_cv_deplibs_check_method=pass_all
8306  ;;
8307
8308sysv4 | sysv4.3*)
8309  case $host_vendor in
8310  motorola)
8311    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]'
8312    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
8313    ;;
8314  ncr)
8315    lt_cv_deplibs_check_method=pass_all
8316    ;;
8317  sequent)
8318    lt_cv_file_magic_cmd='/bin/file'
8319    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
8320    ;;
8321  sni)
8322    lt_cv_file_magic_cmd='/bin/file'
8323    lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
8324    lt_cv_file_magic_test_file=/lib/libc.so
8325    ;;
8326  siemens)
8327    lt_cv_deplibs_check_method=pass_all
8328    ;;
8329  pc)
8330    lt_cv_deplibs_check_method=pass_all
8331    ;;
8332  esac
8333  ;;
8334
8335tpf*)
8336  lt_cv_deplibs_check_method=pass_all
8337  ;;
8338os2*)
8339  lt_cv_deplibs_check_method=pass_all
8340  ;;
8341esac
8342
8343fi
8344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
8345printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
8346
8347file_magic_glob=
8348want_nocaseglob=no
8349if test "$build" = "$host"; then
8350  case $host_os in
8351  mingw* | pw32*)
8352    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
8353      want_nocaseglob=yes
8354    else
8355      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
8356    fi
8357    ;;
8358  esac
8359fi
8360
8361file_magic_cmd=$lt_cv_file_magic_cmd
8362deplibs_check_method=$lt_cv_deplibs_check_method
8363test -z "$deplibs_check_method" && deplibs_check_method=unknown
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386if test -n "$ac_tool_prefix"; then
8387  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
8388set dummy ${ac_tool_prefix}dlltool; ac_word=$2
8389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8390printf %s "checking for $ac_word... " >&6; }
8391if test ${ac_cv_prog_DLLTOOL+y}
8392then :
8393  printf %s "(cached) " >&6
8394else $as_nop
8395  if test -n "$DLLTOOL"; then
8396  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
8397else
8398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8399for as_dir in $PATH
8400do
8401  IFS=$as_save_IFS
8402  case $as_dir in #(((
8403    '') as_dir=./ ;;
8404    */) ;;
8405    *) as_dir=$as_dir/ ;;
8406  esac
8407    for ac_exec_ext in '' $ac_executable_extensions; do
8408  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8409    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
8410    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8411    break 2
8412  fi
8413done
8414  done
8415IFS=$as_save_IFS
8416
8417fi
8418fi
8419DLLTOOL=$ac_cv_prog_DLLTOOL
8420if test -n "$DLLTOOL"; then
8421  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
8422printf "%s\n" "$DLLTOOL" >&6; }
8423else
8424  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8425printf "%s\n" "no" >&6; }
8426fi
8427
8428
8429fi
8430if test -z "$ac_cv_prog_DLLTOOL"; then
8431  ac_ct_DLLTOOL=$DLLTOOL
8432  # Extract the first word of "dlltool", so it can be a program name with args.
8433set dummy dlltool; ac_word=$2
8434{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8435printf %s "checking for $ac_word... " >&6; }
8436if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
8437then :
8438  printf %s "(cached) " >&6
8439else $as_nop
8440  if test -n "$ac_ct_DLLTOOL"; then
8441  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
8442else
8443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8444for as_dir in $PATH
8445do
8446  IFS=$as_save_IFS
8447  case $as_dir in #(((
8448    '') as_dir=./ ;;
8449    */) ;;
8450    *) as_dir=$as_dir/ ;;
8451  esac
8452    for ac_exec_ext in '' $ac_executable_extensions; do
8453  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8454    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
8455    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8456    break 2
8457  fi
8458done
8459  done
8460IFS=$as_save_IFS
8461
8462fi
8463fi
8464ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
8465if test -n "$ac_ct_DLLTOOL"; then
8466  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
8467printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
8468else
8469  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8470printf "%s\n" "no" >&6; }
8471fi
8472
8473  if test "x$ac_ct_DLLTOOL" = x; then
8474    DLLTOOL="false"
8475  else
8476    case $cross_compiling:$ac_tool_warned in
8477yes:)
8478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8479printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8480ac_tool_warned=yes ;;
8481esac
8482    DLLTOOL=$ac_ct_DLLTOOL
8483  fi
8484else
8485  DLLTOOL="$ac_cv_prog_DLLTOOL"
8486fi
8487
8488test -z "$DLLTOOL" && DLLTOOL=dlltool
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
8500printf %s "checking how to associate runtime and link libraries... " >&6; }
8501if test ${lt_cv_sharedlib_from_linklib_cmd+y}
8502then :
8503  printf %s "(cached) " >&6
8504else $as_nop
8505  lt_cv_sharedlib_from_linklib_cmd='unknown'
8506
8507case $host_os in
8508cygwin* | mingw* | pw32* | cegcc*)
8509  # two different shell functions defined in ltmain.sh;
8510  # decide which one to use based on capabilities of $DLLTOOL
8511  case `$DLLTOOL --help 2>&1` in
8512  *--identify-strict*)
8513    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
8514    ;;
8515  *)
8516    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
8517    ;;
8518  esac
8519  ;;
8520*)
8521  # fallback: assume linklib IS sharedlib
8522  lt_cv_sharedlib_from_linklib_cmd=$ECHO
8523  ;;
8524esac
8525
8526fi
8527{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
8528printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
8529sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
8530test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
8531
8532
8533
8534
8535
8536
8537
8538if test -n "$ac_tool_prefix"; then
8539  for ac_prog in ar
8540  do
8541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544printf %s "checking for $ac_word... " >&6; }
8545if test ${ac_cv_prog_AR+y}
8546then :
8547  printf %s "(cached) " >&6
8548else $as_nop
8549  if test -n "$AR"; then
8550  ac_cv_prog_AR="$AR" # Let the user override the test.
8551else
8552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8553for as_dir in $PATH
8554do
8555  IFS=$as_save_IFS
8556  case $as_dir in #(((
8557    '') as_dir=./ ;;
8558    */) ;;
8559    *) as_dir=$as_dir/ ;;
8560  esac
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8563    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
8564    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571fi
8572fi
8573AR=$ac_cv_prog_AR
8574if test -n "$AR"; then
8575  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8576printf "%s\n" "$AR" >&6; }
8577else
8578  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579printf "%s\n" "no" >&6; }
8580fi
8581
8582
8583    test -n "$AR" && break
8584  done
8585fi
8586if test -z "$AR"; then
8587  ac_ct_AR=$AR
8588  for ac_prog in ar
8589do
8590  # Extract the first word of "$ac_prog", so it can be a program name with args.
8591set dummy $ac_prog; ac_word=$2
8592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8593printf %s "checking for $ac_word... " >&6; }
8594if test ${ac_cv_prog_ac_ct_AR+y}
8595then :
8596  printf %s "(cached) " >&6
8597else $as_nop
8598  if test -n "$ac_ct_AR"; then
8599  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8600else
8601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8602for as_dir in $PATH
8603do
8604  IFS=$as_save_IFS
8605  case $as_dir in #(((
8606    '') as_dir=./ ;;
8607    */) ;;
8608    *) as_dir=$as_dir/ ;;
8609  esac
8610    for ac_exec_ext in '' $ac_executable_extensions; do
8611  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8612    ac_cv_prog_ac_ct_AR="$ac_prog"
8613    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8614    break 2
8615  fi
8616done
8617  done
8618IFS=$as_save_IFS
8619
8620fi
8621fi
8622ac_ct_AR=$ac_cv_prog_ac_ct_AR
8623if test -n "$ac_ct_AR"; then
8624  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8625printf "%s\n" "$ac_ct_AR" >&6; }
8626else
8627  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8628printf "%s\n" "no" >&6; }
8629fi
8630
8631
8632  test -n "$ac_ct_AR" && break
8633done
8634
8635  if test "x$ac_ct_AR" = x; then
8636    AR="false"
8637  else
8638    case $cross_compiling:$ac_tool_warned in
8639yes:)
8640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8641printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8642ac_tool_warned=yes ;;
8643esac
8644    AR=$ac_ct_AR
8645  fi
8646fi
8647
8648: ${AR=ar}
8649: ${AR_FLAGS=cru}
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
8662printf %s "checking for archiver @FILE support... " >&6; }
8663if test ${lt_cv_ar_at_file+y}
8664then :
8665  printf %s "(cached) " >&6
8666else $as_nop
8667  lt_cv_ar_at_file=no
8668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h.  */
8670
8671int
8672main (void)
8673{
8674
8675  ;
8676  return 0;
8677}
8678_ACEOF
8679if ac_fn_c_try_compile "$LINENO"
8680then :
8681  echo conftest.$ac_objext > conftest.lst
8682      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
8683      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8684  (eval $lt_ar_try) 2>&5
8685  ac_status=$?
8686  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8687  test $ac_status = 0; }
8688      if test 0 -eq "$ac_status"; then
8689	# Ensure the archiver fails upon bogus file names.
8690	rm -f conftest.$ac_objext libconftest.a
8691	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
8692  (eval $lt_ar_try) 2>&5
8693  ac_status=$?
8694  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8695  test $ac_status = 0; }
8696	if test 0 -ne "$ac_status"; then
8697          lt_cv_ar_at_file=@
8698        fi
8699      fi
8700      rm -f conftest.* libconftest.a
8701
8702fi
8703rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8704
8705fi
8706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
8707printf "%s\n" "$lt_cv_ar_at_file" >&6; }
8708
8709if test no = "$lt_cv_ar_at_file"; then
8710  archiver_list_spec=
8711else
8712  archiver_list_spec=$lt_cv_ar_at_file
8713fi
8714
8715
8716
8717
8718
8719
8720
8721if test -n "$ac_tool_prefix"; then
8722  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
8723set dummy ${ac_tool_prefix}strip; ac_word=$2
8724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8725printf %s "checking for $ac_word... " >&6; }
8726if test ${ac_cv_prog_STRIP+y}
8727then :
8728  printf %s "(cached) " >&6
8729else $as_nop
8730  if test -n "$STRIP"; then
8731  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
8732else
8733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8734for as_dir in $PATH
8735do
8736  IFS=$as_save_IFS
8737  case $as_dir in #(((
8738    '') as_dir=./ ;;
8739    */) ;;
8740    *) as_dir=$as_dir/ ;;
8741  esac
8742    for ac_exec_ext in '' $ac_executable_extensions; do
8743  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8744    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
8745    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8746    break 2
8747  fi
8748done
8749  done
8750IFS=$as_save_IFS
8751
8752fi
8753fi
8754STRIP=$ac_cv_prog_STRIP
8755if test -n "$STRIP"; then
8756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
8757printf "%s\n" "$STRIP" >&6; }
8758else
8759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8760printf "%s\n" "no" >&6; }
8761fi
8762
8763
8764fi
8765if test -z "$ac_cv_prog_STRIP"; then
8766  ac_ct_STRIP=$STRIP
8767  # Extract the first word of "strip", so it can be a program name with args.
8768set dummy strip; ac_word=$2
8769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8770printf %s "checking for $ac_word... " >&6; }
8771if test ${ac_cv_prog_ac_ct_STRIP+y}
8772then :
8773  printf %s "(cached) " >&6
8774else $as_nop
8775  if test -n "$ac_ct_STRIP"; then
8776  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
8777else
8778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8779for as_dir in $PATH
8780do
8781  IFS=$as_save_IFS
8782  case $as_dir in #(((
8783    '') as_dir=./ ;;
8784    */) ;;
8785    *) as_dir=$as_dir/ ;;
8786  esac
8787    for ac_exec_ext in '' $ac_executable_extensions; do
8788  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8789    ac_cv_prog_ac_ct_STRIP="strip"
8790    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8791    break 2
8792  fi
8793done
8794  done
8795IFS=$as_save_IFS
8796
8797fi
8798fi
8799ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
8800if test -n "$ac_ct_STRIP"; then
8801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
8802printf "%s\n" "$ac_ct_STRIP" >&6; }
8803else
8804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8805printf "%s\n" "no" >&6; }
8806fi
8807
8808  if test "x$ac_ct_STRIP" = x; then
8809    STRIP=":"
8810  else
8811    case $cross_compiling:$ac_tool_warned in
8812yes:)
8813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8814printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8815ac_tool_warned=yes ;;
8816esac
8817    STRIP=$ac_ct_STRIP
8818  fi
8819else
8820  STRIP="$ac_cv_prog_STRIP"
8821fi
8822
8823test -z "$STRIP" && STRIP=:
8824
8825
8826
8827
8828
8829
8830if test -n "$ac_tool_prefix"; then
8831  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8832set dummy ${ac_tool_prefix}ranlib; ac_word=$2
8833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8834printf %s "checking for $ac_word... " >&6; }
8835if test ${ac_cv_prog_RANLIB+y}
8836then :
8837  printf %s "(cached) " >&6
8838else $as_nop
8839  if test -n "$RANLIB"; then
8840  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8841else
8842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8843for as_dir in $PATH
8844do
8845  IFS=$as_save_IFS
8846  case $as_dir in #(((
8847    '') as_dir=./ ;;
8848    */) ;;
8849    *) as_dir=$as_dir/ ;;
8850  esac
8851    for ac_exec_ext in '' $ac_executable_extensions; do
8852  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8853    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
8854    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8855    break 2
8856  fi
8857done
8858  done
8859IFS=$as_save_IFS
8860
8861fi
8862fi
8863RANLIB=$ac_cv_prog_RANLIB
8864if test -n "$RANLIB"; then
8865  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8866printf "%s\n" "$RANLIB" >&6; }
8867else
8868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8869printf "%s\n" "no" >&6; }
8870fi
8871
8872
8873fi
8874if test -z "$ac_cv_prog_RANLIB"; then
8875  ac_ct_RANLIB=$RANLIB
8876  # Extract the first word of "ranlib", so it can be a program name with args.
8877set dummy ranlib; ac_word=$2
8878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8879printf %s "checking for $ac_word... " >&6; }
8880if test ${ac_cv_prog_ac_ct_RANLIB+y}
8881then :
8882  printf %s "(cached) " >&6
8883else $as_nop
8884  if test -n "$ac_ct_RANLIB"; then
8885  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8886else
8887as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8888for as_dir in $PATH
8889do
8890  IFS=$as_save_IFS
8891  case $as_dir in #(((
8892    '') as_dir=./ ;;
8893    */) ;;
8894    *) as_dir=$as_dir/ ;;
8895  esac
8896    for ac_exec_ext in '' $ac_executable_extensions; do
8897  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8898    ac_cv_prog_ac_ct_RANLIB="ranlib"
8899    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8900    break 2
8901  fi
8902done
8903  done
8904IFS=$as_save_IFS
8905
8906fi
8907fi
8908ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8909if test -n "$ac_ct_RANLIB"; then
8910  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8911printf "%s\n" "$ac_ct_RANLIB" >&6; }
8912else
8913  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914printf "%s\n" "no" >&6; }
8915fi
8916
8917  if test "x$ac_ct_RANLIB" = x; then
8918    RANLIB=":"
8919  else
8920    case $cross_compiling:$ac_tool_warned in
8921yes:)
8922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8923printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8924ac_tool_warned=yes ;;
8925esac
8926    RANLIB=$ac_ct_RANLIB
8927  fi
8928else
8929  RANLIB="$ac_cv_prog_RANLIB"
8930fi
8931
8932test -z "$RANLIB" && RANLIB=:
8933
8934
8935
8936
8937
8938
8939# Determine commands to create old-style static archives.
8940old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
8941old_postinstall_cmds='chmod 644 $oldlib'
8942old_postuninstall_cmds=
8943
8944if test -n "$RANLIB"; then
8945  case $host_os in
8946  bitrig* | openbsd*)
8947    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
8948    ;;
8949  *)
8950    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
8951    ;;
8952  esac
8953  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
8954fi
8955
8956case $host_os in
8957  darwin*)
8958    lock_old_archive_extraction=yes ;;
8959  *)
8960    lock_old_archive_extraction=no ;;
8961esac
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001# If no C compiler was specified, use CC.
9002LTCC=${LTCC-"$CC"}
9003
9004# If no C compiler flags were specified, use CFLAGS.
9005LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9006
9007# Allow CC to be a program name with arguments.
9008compiler=$CC
9009
9010
9011# Check for command to grab the raw symbol name followed by C symbol from nm.
9012{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
9013printf %s "checking command to parse $NM output from $compiler object... " >&6; }
9014if test ${lt_cv_sys_global_symbol_pipe+y}
9015then :
9016  printf %s "(cached) " >&6
9017else $as_nop
9018
9019# These are sane defaults that work on at least a few old systems.
9020# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
9021
9022# Character class describing NM global symbol codes.
9023symcode='[BCDEGRST]'
9024
9025# Regexp to match symbols that can be accessed directly from C.
9026sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
9027
9028# Define system-specific variables.
9029case $host_os in
9030aix*)
9031  symcode='[BCDT]'
9032  ;;
9033cygwin* | mingw* | pw32* | cegcc*)
9034  symcode='[ABCDGISTW]'
9035  ;;
9036hpux*)
9037  if test ia64 = "$host_cpu"; then
9038    symcode='[ABCDEGRST]'
9039  fi
9040  ;;
9041irix* | nonstopux*)
9042  symcode='[BCDEGRST]'
9043  ;;
9044osf*)
9045  symcode='[BCDEGQRST]'
9046  ;;
9047solaris*)
9048  symcode='[BDRT]'
9049  ;;
9050sco3.2v5*)
9051  symcode='[DT]'
9052  ;;
9053sysv4.2uw2*)
9054  symcode='[DT]'
9055  ;;
9056sysv5* | sco5v6* | unixware* | OpenUNIX*)
9057  symcode='[ABDT]'
9058  ;;
9059sysv4)
9060  symcode='[DFNSTU]'
9061  ;;
9062esac
9063
9064# If we're using GNU nm, then use its standard symbol codes.
9065case `$NM -V 2>&1` in
9066*GNU* | *'with BFD'*)
9067  symcode='[ABCDGIRSTW]' ;;
9068esac
9069
9070if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9071  # Gets list of data symbols to import.
9072  lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
9073  # Adjust the below global symbol transforms to fixup imported variables.
9074  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
9075  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
9076  lt_c_name_lib_hook="\
9077  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
9078  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
9079else
9080  # Disable hooks by default.
9081  lt_cv_sys_global_symbol_to_import=
9082  lt_cdecl_hook=
9083  lt_c_name_hook=
9084  lt_c_name_lib_hook=
9085fi
9086
9087# Transform an extracted symbol line into a proper C declaration.
9088# Some systems (esp. on ia64) link data and code symbols differently,
9089# so use this general approach.
9090lt_cv_sys_global_symbol_to_cdecl="sed -n"\
9091$lt_cdecl_hook\
9092" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
9093" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
9094
9095# Transform an extracted symbol line into symbol name and symbol address
9096lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
9097$lt_c_name_hook\
9098" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9099" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
9100
9101# Transform an extracted symbol line into symbol name with lib prefix and
9102# symbol address.
9103lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
9104$lt_c_name_lib_hook\
9105" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
9106" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
9107" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
9108
9109# Handle CRLF in mingw tool chain
9110opt_cr=
9111case $build_os in
9112mingw*)
9113  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
9114  ;;
9115esac
9116
9117# Try without a prefix underscore, then with it.
9118for ac_symprfx in "" "_"; do
9119
9120  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
9121  symxfrm="\\1 $ac_symprfx\\2 \\2"
9122
9123  # Write the raw and C identifiers.
9124  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9125    # Fake it for dumpbin and say T for any non-static function,
9126    # D for any global variable and I for any imported variable.
9127    # Also find C++ and __fastcall symbols from MSVC++,
9128    # which start with @ or ?.
9129    lt_cv_sys_global_symbol_pipe="$AWK '"\
9130"     {last_section=section; section=\$ 3};"\
9131"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
9132"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
9133"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
9134"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
9135"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
9136"     \$ 0!~/External *\|/{next};"\
9137"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
9138"     {if(hide[section]) next};"\
9139"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
9140"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
9141"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
9142"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
9143"     ' prfx=^$ac_symprfx"
9144  else
9145    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
9146  fi
9147  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
9148
9149  # Check to see that the pipe works correctly.
9150  pipe_works=no
9151
9152  rm -f conftest*
9153  cat > conftest.$ac_ext <<_LT_EOF
9154#ifdef __cplusplus
9155extern "C" {
9156#endif
9157char nm_test_var;
9158void nm_test_func(void);
9159void nm_test_func(void){}
9160#ifdef __cplusplus
9161}
9162#endif
9163int main(){nm_test_var='a';nm_test_func();return(0);}
9164_LT_EOF
9165
9166  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9167  (eval $ac_compile) 2>&5
9168  ac_status=$?
9169  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9170  test $ac_status = 0; }; then
9171    # Now try to grab the symbols.
9172    nlist=conftest.nm
9173    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
9174  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
9175  ac_status=$?
9176  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9177  test $ac_status = 0; } && test -s "$nlist"; then
9178      # Try sorting and uniquifying the output.
9179      if sort "$nlist" | uniq > "$nlist"T; then
9180	mv -f "$nlist"T "$nlist"
9181      else
9182	rm -f "$nlist"T
9183      fi
9184
9185      # Make sure that we snagged all the symbols we need.
9186      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
9187	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
9188	  cat <<_LT_EOF > conftest.$ac_ext
9189/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
9190#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
9191/* DATA imports from DLLs on WIN32 can't be const, because runtime
9192   relocations are performed -- see ld's documentation on pseudo-relocs.  */
9193# define LT_DLSYM_CONST
9194#elif defined __osf__
9195/* This system does not cope well with relocations in const data.  */
9196# define LT_DLSYM_CONST
9197#else
9198# define LT_DLSYM_CONST const
9199#endif
9200
9201#ifdef __cplusplus
9202extern "C" {
9203#endif
9204
9205_LT_EOF
9206	  # Now generate the symbol file.
9207	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
9208
9209	  cat <<_LT_EOF >> conftest.$ac_ext
9210
9211/* The mapping between symbol names and symbols.  */
9212LT_DLSYM_CONST struct {
9213  const char *name;
9214  void       *address;
9215}
9216lt__PROGRAM__LTX_preloaded_symbols[] =
9217{
9218  { "@PROGRAM@", (void *) 0 },
9219_LT_EOF
9220	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
9221	  cat <<\_LT_EOF >> conftest.$ac_ext
9222  {0, (void *) 0}
9223};
9224
9225/* This works around a problem in FreeBSD linker */
9226#ifdef FREEBSD_WORKAROUND
9227static const void *lt_preloaded_setup() {
9228  return lt__PROGRAM__LTX_preloaded_symbols;
9229}
9230#endif
9231
9232#ifdef __cplusplus
9233}
9234#endif
9235_LT_EOF
9236	  # Now try linking the two files.
9237	  mv conftest.$ac_objext conftstm.$ac_objext
9238	  lt_globsym_save_LIBS=$LIBS
9239	  lt_globsym_save_CFLAGS=$CFLAGS
9240	  LIBS=conftstm.$ac_objext
9241	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
9242	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9243  (eval $ac_link) 2>&5
9244  ac_status=$?
9245  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9246  test $ac_status = 0; } && test -s conftest$ac_exeext; then
9247	    pipe_works=yes
9248	  fi
9249	  LIBS=$lt_globsym_save_LIBS
9250	  CFLAGS=$lt_globsym_save_CFLAGS
9251	else
9252	  echo "cannot find nm_test_func in $nlist" >&5
9253	fi
9254      else
9255	echo "cannot find nm_test_var in $nlist" >&5
9256      fi
9257    else
9258      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
9259    fi
9260  else
9261    echo "$progname: failed program was:" >&5
9262    cat conftest.$ac_ext >&5
9263  fi
9264  rm -rf conftest* conftst*
9265
9266  # Do not use the global_symbol_pipe unless it works.
9267  if test yes = "$pipe_works"; then
9268    break
9269  else
9270    lt_cv_sys_global_symbol_pipe=
9271  fi
9272done
9273
9274fi
9275
9276if test -z "$lt_cv_sys_global_symbol_pipe"; then
9277  lt_cv_sys_global_symbol_to_cdecl=
9278fi
9279if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
9280  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
9281printf "%s\n" "failed" >&6; }
9282else
9283  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
9284printf "%s\n" "ok" >&6; }
9285fi
9286
9287# Response file support.
9288if test "$lt_cv_nm_interface" = "MS dumpbin"; then
9289  nm_file_list_spec='@'
9290elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
9291  nm_file_list_spec='@'
9292fi
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
9331printf %s "checking for sysroot... " >&6; }
9332
9333# Check whether --with-sysroot was given.
9334if test ${with_sysroot+y}
9335then :
9336  withval=$with_sysroot;
9337else $as_nop
9338  with_sysroot=no
9339fi
9340
9341
9342lt_sysroot=
9343case $with_sysroot in #(
9344 yes)
9345   if test yes = "$GCC"; then
9346     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
9347   fi
9348   ;; #(
9349 /*)
9350   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
9351   ;; #(
9352 no|'')
9353   ;; #(
9354 *)
9355   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
9356printf "%s\n" "$with_sysroot" >&6; }
9357   as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
9358   ;;
9359esac
9360
9361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
9362printf "%s\n" "${lt_sysroot:-no}" >&6; }
9363
9364
9365
9366
9367
9368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
9369printf %s "checking for a working dd... " >&6; }
9370if test ${ac_cv_path_lt_DD+y}
9371then :
9372  printf %s "(cached) " >&6
9373else $as_nop
9374  printf 0123456789abcdef0123456789abcdef >conftest.i
9375cat conftest.i conftest.i >conftest2.i
9376: ${lt_DD:=$DD}
9377if test -z "$lt_DD"; then
9378  ac_path_lt_DD_found=false
9379  # Loop through the user's path and test for each of PROGNAME-LIST
9380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381for as_dir in $PATH
9382do
9383  IFS=$as_save_IFS
9384  case $as_dir in #(((
9385    '') as_dir=./ ;;
9386    */) ;;
9387    *) as_dir=$as_dir/ ;;
9388  esac
9389    for ac_prog in dd
9390   do
9391    for ac_exec_ext in '' $ac_executable_extensions; do
9392      ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
9393      as_fn_executable_p "$ac_path_lt_DD" || continue
9394if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9395  cmp -s conftest.i conftest.out \
9396  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
9397fi
9398      $ac_path_lt_DD_found && break 3
9399    done
9400  done
9401  done
9402IFS=$as_save_IFS
9403  if test -z "$ac_cv_path_lt_DD"; then
9404    :
9405  fi
9406else
9407  ac_cv_path_lt_DD=$lt_DD
9408fi
9409
9410rm -f conftest.i conftest2.i conftest.out
9411fi
9412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
9413printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
9414
9415
9416{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
9417printf %s "checking how to truncate binary pipes... " >&6; }
9418if test ${lt_cv_truncate_bin+y}
9419then :
9420  printf %s "(cached) " >&6
9421else $as_nop
9422  printf 0123456789abcdef0123456789abcdef >conftest.i
9423cat conftest.i conftest.i >conftest2.i
9424lt_cv_truncate_bin=
9425if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
9426  cmp -s conftest.i conftest.out \
9427  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
9428fi
9429rm -f conftest.i conftest2.i conftest.out
9430test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
9431fi
9432{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
9433printf "%s\n" "$lt_cv_truncate_bin" >&6; }
9434
9435
9436
9437
9438
9439
9440
9441# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
9442func_cc_basename ()
9443{
9444    for cc_temp in $*""; do
9445      case $cc_temp in
9446        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
9447        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
9448        \-*) ;;
9449        *) break;;
9450      esac
9451    done
9452    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
9453}
9454
9455# Check whether --enable-libtool-lock was given.
9456if test ${enable_libtool_lock+y}
9457then :
9458  enableval=$enable_libtool_lock;
9459fi
9460
9461test no = "$enable_libtool_lock" || enable_libtool_lock=yes
9462
9463# Some flags need to be propagated to the compiler or linker for good
9464# libtool support.
9465case $host in
9466ia64-*-hpux*)
9467  # Find out what ABI is being produced by ac_compile, and set mode
9468  # options accordingly.
9469  echo 'int i;' > conftest.$ac_ext
9470  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9471  (eval $ac_compile) 2>&5
9472  ac_status=$?
9473  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9474  test $ac_status = 0; }; then
9475    case `/usr/bin/file conftest.$ac_objext` in
9476      *ELF-32*)
9477	HPUX_IA64_MODE=32
9478	;;
9479      *ELF-64*)
9480	HPUX_IA64_MODE=64
9481	;;
9482    esac
9483  fi
9484  rm -rf conftest*
9485  ;;
9486*-*-irix6*)
9487  # Find out what ABI is being produced by ac_compile, and set linker
9488  # options accordingly.
9489  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9490  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9491  (eval $ac_compile) 2>&5
9492  ac_status=$?
9493  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9494  test $ac_status = 0; }; then
9495    if test yes = "$lt_cv_prog_gnu_ld"; then
9496      case `/usr/bin/file conftest.$ac_objext` in
9497	*32-bit*)
9498	  LD="${LD-ld} -melf32bsmip"
9499	  ;;
9500	*N32*)
9501	  LD="${LD-ld} -melf32bmipn32"
9502	  ;;
9503	*64-bit*)
9504	  LD="${LD-ld} -melf64bmip"
9505	;;
9506      esac
9507    else
9508      case `/usr/bin/file conftest.$ac_objext` in
9509	*32-bit*)
9510	  LD="${LD-ld} -32"
9511	  ;;
9512	*N32*)
9513	  LD="${LD-ld} -n32"
9514	  ;;
9515	*64-bit*)
9516	  LD="${LD-ld} -64"
9517	  ;;
9518      esac
9519    fi
9520  fi
9521  rm -rf conftest*
9522  ;;
9523
9524mips64*-*linux*)
9525  # Find out what ABI is being produced by ac_compile, and set linker
9526  # options accordingly.
9527  echo '#line '$LINENO' "configure"' > conftest.$ac_ext
9528  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9529  (eval $ac_compile) 2>&5
9530  ac_status=$?
9531  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9532  test $ac_status = 0; }; then
9533    emul=elf
9534    case `/usr/bin/file conftest.$ac_objext` in
9535      *32-bit*)
9536	emul="${emul}32"
9537	;;
9538      *64-bit*)
9539	emul="${emul}64"
9540	;;
9541    esac
9542    case `/usr/bin/file conftest.$ac_objext` in
9543      *MSB*)
9544	emul="${emul}btsmip"
9545	;;
9546      *LSB*)
9547	emul="${emul}ltsmip"
9548	;;
9549    esac
9550    case `/usr/bin/file conftest.$ac_objext` in
9551      *N32*)
9552	emul="${emul}n32"
9553	;;
9554    esac
9555    LD="${LD-ld} -m $emul"
9556  fi
9557  rm -rf conftest*
9558  ;;
9559
9560x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9561s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
9562  # Find out what ABI is being produced by ac_compile, and set linker
9563  # options accordingly.  Note that the listed cases only cover the
9564  # situations where additional linker options are needed (such as when
9565  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
9566  # vice versa); the common cases where no linker options are needed do
9567  # not appear in the list.
9568  echo 'int i;' > conftest.$ac_ext
9569  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9570  (eval $ac_compile) 2>&5
9571  ac_status=$?
9572  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9573  test $ac_status = 0; }; then
9574    case `/usr/bin/file conftest.o` in
9575      *32-bit*)
9576	case $host in
9577	  x86_64-*kfreebsd*-gnu)
9578	    LD="${LD-ld} -m elf_i386_fbsd"
9579	    ;;
9580	  x86_64-*linux*)
9581	    case `/usr/bin/file conftest.o` in
9582	      *x86-64*)
9583		LD="${LD-ld} -m elf32_x86_64"
9584		;;
9585	      *)
9586		LD="${LD-ld} -m elf_i386"
9587		;;
9588	    esac
9589	    ;;
9590	  powerpc64le-*linux*)
9591	    LD="${LD-ld} -m elf32lppclinux"
9592	    ;;
9593	  powerpc64-*linux*)
9594	    LD="${LD-ld} -m elf32ppclinux"
9595	    ;;
9596	  s390x-*linux*)
9597	    LD="${LD-ld} -m elf_s390"
9598	    ;;
9599	  sparc64-*linux*)
9600	    LD="${LD-ld} -m elf32_sparc"
9601	    ;;
9602	esac
9603	;;
9604      *64-bit*)
9605	case $host in
9606	  x86_64-*kfreebsd*-gnu)
9607	    LD="${LD-ld} -m elf_x86_64_fbsd"
9608	    ;;
9609	  x86_64-*linux*)
9610	    LD="${LD-ld} -m elf_x86_64"
9611	    ;;
9612	  powerpcle-*linux*)
9613	    LD="${LD-ld} -m elf64lppc"
9614	    ;;
9615	  powerpc-*linux*)
9616	    LD="${LD-ld} -m elf64ppc"
9617	    ;;
9618	  s390*-*linux*|s390*-*tpf*)
9619	    LD="${LD-ld} -m elf64_s390"
9620	    ;;
9621	  sparc*-*linux*)
9622	    LD="${LD-ld} -m elf64_sparc"
9623	    ;;
9624	esac
9625	;;
9626    esac
9627  fi
9628  rm -rf conftest*
9629  ;;
9630
9631*-*-sco3.2v5*)
9632  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
9633  SAVE_CFLAGS=$CFLAGS
9634  CFLAGS="$CFLAGS -belf"
9635  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
9636printf %s "checking whether the C compiler needs -belf... " >&6; }
9637if test ${lt_cv_cc_needs_belf+y}
9638then :
9639  printf %s "(cached) " >&6
9640else $as_nop
9641  ac_ext=c
9642ac_cpp='$CPP $CPPFLAGS'
9643ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9644ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9645ac_compiler_gnu=$ac_cv_c_compiler_gnu
9646
9647     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9648/* end confdefs.h.  */
9649
9650int
9651main (void)
9652{
9653
9654  ;
9655  return 0;
9656}
9657_ACEOF
9658if ac_fn_c_try_link "$LINENO"
9659then :
9660  lt_cv_cc_needs_belf=yes
9661else $as_nop
9662  lt_cv_cc_needs_belf=no
9663fi
9664rm -f core conftest.err conftest.$ac_objext conftest.beam \
9665    conftest$ac_exeext conftest.$ac_ext
9666     ac_ext=c
9667ac_cpp='$CPP $CPPFLAGS'
9668ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9669ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9670ac_compiler_gnu=$ac_cv_c_compiler_gnu
9671
9672fi
9673{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
9674printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
9675  if test yes != "$lt_cv_cc_needs_belf"; then
9676    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
9677    CFLAGS=$SAVE_CFLAGS
9678  fi
9679  ;;
9680*-*solaris*)
9681  # Find out what ABI is being produced by ac_compile, and set linker
9682  # options accordingly.
9683  echo 'int i;' > conftest.$ac_ext
9684  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
9685  (eval $ac_compile) 2>&5
9686  ac_status=$?
9687  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9688  test $ac_status = 0; }; then
9689    case `/usr/bin/file conftest.o` in
9690    *64-bit*)
9691      case $lt_cv_prog_gnu_ld in
9692      yes*)
9693        case $host in
9694        i?86-*-solaris*|x86_64-*-solaris*)
9695          LD="${LD-ld} -m elf_x86_64"
9696          ;;
9697        sparc*-*-solaris*)
9698          LD="${LD-ld} -m elf64_sparc"
9699          ;;
9700        esac
9701        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
9702        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
9703          LD=${LD-ld}_sol2
9704        fi
9705        ;;
9706      *)
9707	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
9708	  LD="${LD-ld} -64"
9709	fi
9710	;;
9711      esac
9712      ;;
9713    esac
9714  fi
9715  rm -rf conftest*
9716  ;;
9717esac
9718
9719need_locks=$enable_libtool_lock
9720
9721if test -n "$ac_tool_prefix"; then
9722  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
9723set dummy ${ac_tool_prefix}mt; ac_word=$2
9724{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9725printf %s "checking for $ac_word... " >&6; }
9726if test ${ac_cv_prog_MANIFEST_TOOL+y}
9727then :
9728  printf %s "(cached) " >&6
9729else $as_nop
9730  if test -n "$MANIFEST_TOOL"; then
9731  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
9732else
9733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9734for as_dir in $PATH
9735do
9736  IFS=$as_save_IFS
9737  case $as_dir in #(((
9738    '') as_dir=./ ;;
9739    */) ;;
9740    *) as_dir=$as_dir/ ;;
9741  esac
9742    for ac_exec_ext in '' $ac_executable_extensions; do
9743  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9744    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
9745    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9746    break 2
9747  fi
9748done
9749  done
9750IFS=$as_save_IFS
9751
9752fi
9753fi
9754MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
9755if test -n "$MANIFEST_TOOL"; then
9756  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
9757printf "%s\n" "$MANIFEST_TOOL" >&6; }
9758else
9759  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9760printf "%s\n" "no" >&6; }
9761fi
9762
9763
9764fi
9765if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
9766  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
9767  # Extract the first word of "mt", so it can be a program name with args.
9768set dummy mt; ac_word=$2
9769{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9770printf %s "checking for $ac_word... " >&6; }
9771if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
9772then :
9773  printf %s "(cached) " >&6
9774else $as_nop
9775  if test -n "$ac_ct_MANIFEST_TOOL"; then
9776  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
9777else
9778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9779for as_dir in $PATH
9780do
9781  IFS=$as_save_IFS
9782  case $as_dir in #(((
9783    '') as_dir=./ ;;
9784    */) ;;
9785    *) as_dir=$as_dir/ ;;
9786  esac
9787    for ac_exec_ext in '' $ac_executable_extensions; do
9788  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9789    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
9790    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9791    break 2
9792  fi
9793done
9794  done
9795IFS=$as_save_IFS
9796
9797fi
9798fi
9799ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
9800if test -n "$ac_ct_MANIFEST_TOOL"; then
9801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
9802printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
9803else
9804  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805printf "%s\n" "no" >&6; }
9806fi
9807
9808  if test "x$ac_ct_MANIFEST_TOOL" = x; then
9809    MANIFEST_TOOL=":"
9810  else
9811    case $cross_compiling:$ac_tool_warned in
9812yes:)
9813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9814printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9815ac_tool_warned=yes ;;
9816esac
9817    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
9818  fi
9819else
9820  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
9821fi
9822
9823test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
9824{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
9825printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
9826if test ${lt_cv_path_mainfest_tool+y}
9827then :
9828  printf %s "(cached) " >&6
9829else $as_nop
9830  lt_cv_path_mainfest_tool=no
9831  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
9832  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
9833  cat conftest.err >&5
9834  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
9835    lt_cv_path_mainfest_tool=yes
9836  fi
9837  rm -f conftest*
9838fi
9839{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
9840printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; }
9841if test yes != "$lt_cv_path_mainfest_tool"; then
9842  MANIFEST_TOOL=:
9843fi
9844
9845
9846
9847
9848
9849
9850  case $host_os in
9851    rhapsody* | darwin*)
9852    if test -n "$ac_tool_prefix"; then
9853  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
9854set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
9855{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9856printf %s "checking for $ac_word... " >&6; }
9857if test ${ac_cv_prog_DSYMUTIL+y}
9858then :
9859  printf %s "(cached) " >&6
9860else $as_nop
9861  if test -n "$DSYMUTIL"; then
9862  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
9863else
9864as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  case $as_dir in #(((
9869    '') as_dir=./ ;;
9870    */) ;;
9871    *) as_dir=$as_dir/ ;;
9872  esac
9873    for ac_exec_ext in '' $ac_executable_extensions; do
9874  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9875    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
9876    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9877    break 2
9878  fi
9879done
9880  done
9881IFS=$as_save_IFS
9882
9883fi
9884fi
9885DSYMUTIL=$ac_cv_prog_DSYMUTIL
9886if test -n "$DSYMUTIL"; then
9887  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
9888printf "%s\n" "$DSYMUTIL" >&6; }
9889else
9890  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9891printf "%s\n" "no" >&6; }
9892fi
9893
9894
9895fi
9896if test -z "$ac_cv_prog_DSYMUTIL"; then
9897  ac_ct_DSYMUTIL=$DSYMUTIL
9898  # Extract the first word of "dsymutil", so it can be a program name with args.
9899set dummy dsymutil; ac_word=$2
9900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9901printf %s "checking for $ac_word... " >&6; }
9902if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
9903then :
9904  printf %s "(cached) " >&6
9905else $as_nop
9906  if test -n "$ac_ct_DSYMUTIL"; then
9907  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
9908else
9909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912  IFS=$as_save_IFS
9913  case $as_dir in #(((
9914    '') as_dir=./ ;;
9915    */) ;;
9916    *) as_dir=$as_dir/ ;;
9917  esac
9918    for ac_exec_ext in '' $ac_executable_extensions; do
9919  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9920    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
9921    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9922    break 2
9923  fi
9924done
9925  done
9926IFS=$as_save_IFS
9927
9928fi
9929fi
9930ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
9931if test -n "$ac_ct_DSYMUTIL"; then
9932  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
9933printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
9934else
9935  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9936printf "%s\n" "no" >&6; }
9937fi
9938
9939  if test "x$ac_ct_DSYMUTIL" = x; then
9940    DSYMUTIL=":"
9941  else
9942    case $cross_compiling:$ac_tool_warned in
9943yes:)
9944{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9945printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9946ac_tool_warned=yes ;;
9947esac
9948    DSYMUTIL=$ac_ct_DSYMUTIL
9949  fi
9950else
9951  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
9952fi
9953
9954    if test -n "$ac_tool_prefix"; then
9955  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
9956set dummy ${ac_tool_prefix}nmedit; ac_word=$2
9957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9958printf %s "checking for $ac_word... " >&6; }
9959if test ${ac_cv_prog_NMEDIT+y}
9960then :
9961  printf %s "(cached) " >&6
9962else $as_nop
9963  if test -n "$NMEDIT"; then
9964  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
9965else
9966as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9967for as_dir in $PATH
9968do
9969  IFS=$as_save_IFS
9970  case $as_dir in #(((
9971    '') as_dir=./ ;;
9972    */) ;;
9973    *) as_dir=$as_dir/ ;;
9974  esac
9975    for ac_exec_ext in '' $ac_executable_extensions; do
9976  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9977    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
9978    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9979    break 2
9980  fi
9981done
9982  done
9983IFS=$as_save_IFS
9984
9985fi
9986fi
9987NMEDIT=$ac_cv_prog_NMEDIT
9988if test -n "$NMEDIT"; then
9989  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
9990printf "%s\n" "$NMEDIT" >&6; }
9991else
9992  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993printf "%s\n" "no" >&6; }
9994fi
9995
9996
9997fi
9998if test -z "$ac_cv_prog_NMEDIT"; then
9999  ac_ct_NMEDIT=$NMEDIT
10000  # Extract the first word of "nmedit", so it can be a program name with args.
10001set dummy nmedit; ac_word=$2
10002{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10003printf %s "checking for $ac_word... " >&6; }
10004if test ${ac_cv_prog_ac_ct_NMEDIT+y}
10005then :
10006  printf %s "(cached) " >&6
10007else $as_nop
10008  if test -n "$ac_ct_NMEDIT"; then
10009  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
10010else
10011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10012for as_dir in $PATH
10013do
10014  IFS=$as_save_IFS
10015  case $as_dir in #(((
10016    '') as_dir=./ ;;
10017    */) ;;
10018    *) as_dir=$as_dir/ ;;
10019  esac
10020    for ac_exec_ext in '' $ac_executable_extensions; do
10021  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10022    ac_cv_prog_ac_ct_NMEDIT="nmedit"
10023    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10024    break 2
10025  fi
10026done
10027  done
10028IFS=$as_save_IFS
10029
10030fi
10031fi
10032ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
10033if test -n "$ac_ct_NMEDIT"; then
10034  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
10035printf "%s\n" "$ac_ct_NMEDIT" >&6; }
10036else
10037  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10038printf "%s\n" "no" >&6; }
10039fi
10040
10041  if test "x$ac_ct_NMEDIT" = x; then
10042    NMEDIT=":"
10043  else
10044    case $cross_compiling:$ac_tool_warned in
10045yes:)
10046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10047printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10048ac_tool_warned=yes ;;
10049esac
10050    NMEDIT=$ac_ct_NMEDIT
10051  fi
10052else
10053  NMEDIT="$ac_cv_prog_NMEDIT"
10054fi
10055
10056    if test -n "$ac_tool_prefix"; then
10057  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
10058set dummy ${ac_tool_prefix}lipo; ac_word=$2
10059{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10060printf %s "checking for $ac_word... " >&6; }
10061if test ${ac_cv_prog_LIPO+y}
10062then :
10063  printf %s "(cached) " >&6
10064else $as_nop
10065  if test -n "$LIPO"; then
10066  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
10067else
10068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10069for as_dir in $PATH
10070do
10071  IFS=$as_save_IFS
10072  case $as_dir in #(((
10073    '') as_dir=./ ;;
10074    */) ;;
10075    *) as_dir=$as_dir/ ;;
10076  esac
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10079    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
10080    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087fi
10088fi
10089LIPO=$ac_cv_prog_LIPO
10090if test -n "$LIPO"; then
10091  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
10092printf "%s\n" "$LIPO" >&6; }
10093else
10094  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095printf "%s\n" "no" >&6; }
10096fi
10097
10098
10099fi
10100if test -z "$ac_cv_prog_LIPO"; then
10101  ac_ct_LIPO=$LIPO
10102  # Extract the first word of "lipo", so it can be a program name with args.
10103set dummy lipo; ac_word=$2
10104{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10105printf %s "checking for $ac_word... " >&6; }
10106if test ${ac_cv_prog_ac_ct_LIPO+y}
10107then :
10108  printf %s "(cached) " >&6
10109else $as_nop
10110  if test -n "$ac_ct_LIPO"; then
10111  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
10112else
10113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  case $as_dir in #(((
10118    '') as_dir=./ ;;
10119    */) ;;
10120    *) as_dir=$as_dir/ ;;
10121  esac
10122    for ac_exec_ext in '' $ac_executable_extensions; do
10123  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10124    ac_cv_prog_ac_ct_LIPO="lipo"
10125    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10126    break 2
10127  fi
10128done
10129  done
10130IFS=$as_save_IFS
10131
10132fi
10133fi
10134ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
10135if test -n "$ac_ct_LIPO"; then
10136  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
10137printf "%s\n" "$ac_ct_LIPO" >&6; }
10138else
10139  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140printf "%s\n" "no" >&6; }
10141fi
10142
10143  if test "x$ac_ct_LIPO" = x; then
10144    LIPO=":"
10145  else
10146    case $cross_compiling:$ac_tool_warned in
10147yes:)
10148{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10149printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10150ac_tool_warned=yes ;;
10151esac
10152    LIPO=$ac_ct_LIPO
10153  fi
10154else
10155  LIPO="$ac_cv_prog_LIPO"
10156fi
10157
10158    if test -n "$ac_tool_prefix"; then
10159  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
10160set dummy ${ac_tool_prefix}otool; ac_word=$2
10161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10162printf %s "checking for $ac_word... " >&6; }
10163if test ${ac_cv_prog_OTOOL+y}
10164then :
10165  printf %s "(cached) " >&6
10166else $as_nop
10167  if test -n "$OTOOL"; then
10168  ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
10169else
10170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10171for as_dir in $PATH
10172do
10173  IFS=$as_save_IFS
10174  case $as_dir in #(((
10175    '') as_dir=./ ;;
10176    */) ;;
10177    *) as_dir=$as_dir/ ;;
10178  esac
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10181    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
10182    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189fi
10190fi
10191OTOOL=$ac_cv_prog_OTOOL
10192if test -n "$OTOOL"; then
10193  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10194printf "%s\n" "$OTOOL" >&6; }
10195else
10196  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197printf "%s\n" "no" >&6; }
10198fi
10199
10200
10201fi
10202if test -z "$ac_cv_prog_OTOOL"; then
10203  ac_ct_OTOOL=$OTOOL
10204  # Extract the first word of "otool", so it can be a program name with args.
10205set dummy otool; ac_word=$2
10206{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10207printf %s "checking for $ac_word... " >&6; }
10208if test ${ac_cv_prog_ac_ct_OTOOL+y}
10209then :
10210  printf %s "(cached) " >&6
10211else $as_nop
10212  if test -n "$ac_ct_OTOOL"; then
10213  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
10214else
10215as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10216for as_dir in $PATH
10217do
10218  IFS=$as_save_IFS
10219  case $as_dir in #(((
10220    '') as_dir=./ ;;
10221    */) ;;
10222    *) as_dir=$as_dir/ ;;
10223  esac
10224    for ac_exec_ext in '' $ac_executable_extensions; do
10225  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10226    ac_cv_prog_ac_ct_OTOOL="otool"
10227    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10228    break 2
10229  fi
10230done
10231  done
10232IFS=$as_save_IFS
10233
10234fi
10235fi
10236ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
10237if test -n "$ac_ct_OTOOL"; then
10238  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
10239printf "%s\n" "$ac_ct_OTOOL" >&6; }
10240else
10241  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10242printf "%s\n" "no" >&6; }
10243fi
10244
10245  if test "x$ac_ct_OTOOL" = x; then
10246    OTOOL=":"
10247  else
10248    case $cross_compiling:$ac_tool_warned in
10249yes:)
10250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10251printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10252ac_tool_warned=yes ;;
10253esac
10254    OTOOL=$ac_ct_OTOOL
10255  fi
10256else
10257  OTOOL="$ac_cv_prog_OTOOL"
10258fi
10259
10260    if test -n "$ac_tool_prefix"; then
10261  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
10262set dummy ${ac_tool_prefix}otool64; ac_word=$2
10263{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10264printf %s "checking for $ac_word... " >&6; }
10265if test ${ac_cv_prog_OTOOL64+y}
10266then :
10267  printf %s "(cached) " >&6
10268else $as_nop
10269  if test -n "$OTOOL64"; then
10270  ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
10271else
10272as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10273for as_dir in $PATH
10274do
10275  IFS=$as_save_IFS
10276  case $as_dir in #(((
10277    '') as_dir=./ ;;
10278    */) ;;
10279    *) as_dir=$as_dir/ ;;
10280  esac
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10283    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
10284    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291fi
10292fi
10293OTOOL64=$ac_cv_prog_OTOOL64
10294if test -n "$OTOOL64"; then
10295  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
10296printf "%s\n" "$OTOOL64" >&6; }
10297else
10298  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299printf "%s\n" "no" >&6; }
10300fi
10301
10302
10303fi
10304if test -z "$ac_cv_prog_OTOOL64"; then
10305  ac_ct_OTOOL64=$OTOOL64
10306  # Extract the first word of "otool64", so it can be a program name with args.
10307set dummy otool64; ac_word=$2
10308{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10309printf %s "checking for $ac_word... " >&6; }
10310if test ${ac_cv_prog_ac_ct_OTOOL64+y}
10311then :
10312  printf %s "(cached) " >&6
10313else $as_nop
10314  if test -n "$ac_ct_OTOOL64"; then
10315  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
10316else
10317as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318for as_dir in $PATH
10319do
10320  IFS=$as_save_IFS
10321  case $as_dir in #(((
10322    '') as_dir=./ ;;
10323    */) ;;
10324    *) as_dir=$as_dir/ ;;
10325  esac
10326    for ac_exec_ext in '' $ac_executable_extensions; do
10327  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10328    ac_cv_prog_ac_ct_OTOOL64="otool64"
10329    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10330    break 2
10331  fi
10332done
10333  done
10334IFS=$as_save_IFS
10335
10336fi
10337fi
10338ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
10339if test -n "$ac_ct_OTOOL64"; then
10340  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
10341printf "%s\n" "$ac_ct_OTOOL64" >&6; }
10342else
10343  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10344printf "%s\n" "no" >&6; }
10345fi
10346
10347  if test "x$ac_ct_OTOOL64" = x; then
10348    OTOOL64=":"
10349  else
10350    case $cross_compiling:$ac_tool_warned in
10351yes:)
10352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10353printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10354ac_tool_warned=yes ;;
10355esac
10356    OTOOL64=$ac_ct_OTOOL64
10357  fi
10358else
10359  OTOOL64="$ac_cv_prog_OTOOL64"
10360fi
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
10389printf %s "checking for -single_module linker flag... " >&6; }
10390if test ${lt_cv_apple_cc_single_mod+y}
10391then :
10392  printf %s "(cached) " >&6
10393else $as_nop
10394  lt_cv_apple_cc_single_mod=no
10395      if test -z "$LT_MULTI_MODULE"; then
10396	# By default we will add the -single_module flag. You can override
10397	# by either setting the environment variable LT_MULTI_MODULE
10398	# non-empty at configure time, or by adding -multi_module to the
10399	# link flags.
10400	rm -rf libconftest.dylib*
10401	echo "int foo(void){return 1;}" > conftest.c
10402	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10403-dynamiclib -Wl,-single_module conftest.c" >&5
10404	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
10405	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
10406        _lt_result=$?
10407	# If there is a non-empty error log, and "single_module"
10408	# appears in it, assume the flag caused a linker warning
10409        if test -s conftest.err && $GREP single_module conftest.err; then
10410	  cat conftest.err >&5
10411	# Otherwise, if the output was created with a 0 exit code from
10412	# the compiler, it worked.
10413	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
10414	  lt_cv_apple_cc_single_mod=yes
10415	else
10416	  cat conftest.err >&5
10417	fi
10418	rm -rf libconftest.dylib*
10419	rm -f conftest.*
10420      fi
10421fi
10422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
10423printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
10424
10425    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
10426printf %s "checking for -exported_symbols_list linker flag... " >&6; }
10427if test ${lt_cv_ld_exported_symbols_list+y}
10428then :
10429  printf %s "(cached) " >&6
10430else $as_nop
10431  lt_cv_ld_exported_symbols_list=no
10432      save_LDFLAGS=$LDFLAGS
10433      echo "_main" > conftest.sym
10434      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
10435      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10436/* end confdefs.h.  */
10437
10438int
10439main (void)
10440{
10441
10442  ;
10443  return 0;
10444}
10445_ACEOF
10446if ac_fn_c_try_link "$LINENO"
10447then :
10448  lt_cv_ld_exported_symbols_list=yes
10449else $as_nop
10450  lt_cv_ld_exported_symbols_list=no
10451fi
10452rm -f core conftest.err conftest.$ac_objext conftest.beam \
10453    conftest$ac_exeext conftest.$ac_ext
10454	LDFLAGS=$save_LDFLAGS
10455
10456fi
10457{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
10458printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
10459
10460    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
10461printf %s "checking for -force_load linker flag... " >&6; }
10462if test ${lt_cv_ld_force_load+y}
10463then :
10464  printf %s "(cached) " >&6
10465else $as_nop
10466  lt_cv_ld_force_load=no
10467      cat > conftest.c << _LT_EOF
10468int forced_loaded() { return 2;}
10469_LT_EOF
10470      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
10471      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
10472      echo "$AR cru libconftest.a conftest.o" >&5
10473      $AR cru libconftest.a conftest.o 2>&5
10474      echo "$RANLIB libconftest.a" >&5
10475      $RANLIB libconftest.a 2>&5
10476      cat > conftest.c << _LT_EOF
10477int main() { return 0;}
10478_LT_EOF
10479      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
10480      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
10481      _lt_result=$?
10482      if test -s conftest.err && $GREP force_load conftest.err; then
10483	cat conftest.err >&5
10484      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
10485	lt_cv_ld_force_load=yes
10486      else
10487	cat conftest.err >&5
10488      fi
10489        rm -f conftest.err libconftest.a conftest conftest.c
10490        rm -rf conftest.dSYM
10491
10492fi
10493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
10494printf "%s\n" "$lt_cv_ld_force_load" >&6; }
10495    case $host_os in
10496    rhapsody* | darwin1.[012])
10497      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
10498    darwin1.*)
10499      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10500    darwin*) # darwin 5.x on
10501      # if running on 10.5 or later, the deployment target defaults
10502      # to the OS version, if on x86, and 10.4, the deployment
10503      # target defaults to 10.4. Don't you love it?
10504      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10505	10.0,*86*-darwin8*|10.0,*-darwin[91]*)
10506	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10507	10.[012][,.]*)
10508	  _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10509	10.*)
10510	  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10511      esac
10512    ;;
10513  esac
10514    if test yes = "$lt_cv_apple_cc_single_mod"; then
10515      _lt_dar_single_mod='$single_module'
10516    fi
10517    if test yes = "$lt_cv_ld_exported_symbols_list"; then
10518      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
10519    else
10520      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
10521    fi
10522    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
10523      _lt_dsymutil='~$DSYMUTIL $lib || :'
10524    else
10525      _lt_dsymutil=
10526    fi
10527    ;;
10528  esac
10529
10530# func_munge_path_list VARIABLE PATH
10531# -----------------------------------
10532# VARIABLE is name of variable containing _space_ separated list of
10533# directories to be munged by the contents of PATH, which is string
10534# having a format:
10535# "DIR[:DIR]:"
10536#       string "DIR[ DIR]" will be prepended to VARIABLE
10537# ":DIR[:DIR]"
10538#       string "DIR[ DIR]" will be appended to VARIABLE
10539# "DIRP[:DIRP]::[DIRA:]DIRA"
10540#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
10541#       "DIRA[ DIRA]" will be appended to VARIABLE
10542# "DIR[:DIR]"
10543#       VARIABLE will be replaced by "DIR[ DIR]"
10544func_munge_path_list ()
10545{
10546    case x$2 in
10547    x)
10548        ;;
10549    *:)
10550        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
10551        ;;
10552    x:*)
10553        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
10554        ;;
10555    *::*)
10556        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
10557        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
10558        ;;
10559    *)
10560        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
10561        ;;
10562    esac
10563}
10564
10565ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
10566"
10567if test "x$ac_cv_header_dlfcn_h" = xyes
10568then :
10569  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
10570
10571fi
10572
10573
10574
10575
10576
10577# Set options
10578
10579
10580
10581        enable_dlopen=no
10582
10583
10584  enable_win32_dll=no
10585
10586
10587
10588  # Check whether --enable-static was given.
10589if test ${enable_static+y}
10590then :
10591  enableval=$enable_static; p=${PACKAGE-default}
10592    case $enableval in
10593    yes) enable_static=yes ;;
10594    no) enable_static=no ;;
10595    *)
10596     enable_static=no
10597      # Look at the argument we got.  We use all the common list separators.
10598      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10599      for pkg in $enableval; do
10600	IFS=$lt_save_ifs
10601	if test "X$pkg" = "X$p"; then
10602	  enable_static=yes
10603	fi
10604      done
10605      IFS=$lt_save_ifs
10606      ;;
10607    esac
10608else $as_nop
10609  enable_static=yes
10610fi
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621# Check whether --with-pic was given.
10622if test ${with_pic+y}
10623then :
10624  withval=$with_pic; lt_p=${PACKAGE-default}
10625    case $withval in
10626    yes|no) pic_mode=$withval ;;
10627    *)
10628      pic_mode=default
10629      # Look at the argument we got.  We use all the common list separators.
10630      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10631      for lt_pkg in $withval; do
10632	IFS=$lt_save_ifs
10633	if test "X$lt_pkg" = "X$lt_p"; then
10634	  pic_mode=yes
10635	fi
10636      done
10637      IFS=$lt_save_ifs
10638      ;;
10639    esac
10640else $as_nop
10641  pic_mode=default
10642fi
10643
10644
10645
10646
10647
10648
10649
10650
10651  # Check whether --enable-fast-install was given.
10652if test ${enable_fast_install+y}
10653then :
10654  enableval=$enable_fast_install; p=${PACKAGE-default}
10655    case $enableval in
10656    yes) enable_fast_install=yes ;;
10657    no) enable_fast_install=no ;;
10658    *)
10659      enable_fast_install=no
10660      # Look at the argument we got.  We use all the common list separators.
10661      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
10662      for pkg in $enableval; do
10663	IFS=$lt_save_ifs
10664	if test "X$pkg" = "X$p"; then
10665	  enable_fast_install=yes
10666	fi
10667      done
10668      IFS=$lt_save_ifs
10669      ;;
10670    esac
10671else $as_nop
10672  enable_fast_install=yes
10673fi
10674
10675
10676
10677
10678
10679
10680
10681
10682  shared_archive_member_spec=
10683case $host,$enable_shared in
10684power*-*-aix[5-9]*,yes)
10685  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
10686printf %s "checking which variant of shared library versioning to provide... " >&6; }
10687
10688# Check whether --with-aix-soname was given.
10689if test ${with_aix_soname+y}
10690then :
10691  withval=$with_aix_soname; case $withval in
10692    aix|svr4|both)
10693      ;;
10694    *)
10695      as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
10696      ;;
10697    esac
10698    lt_cv_with_aix_soname=$with_aix_soname
10699else $as_nop
10700  if test ${lt_cv_with_aix_soname+y}
10701then :
10702  printf %s "(cached) " >&6
10703else $as_nop
10704  lt_cv_with_aix_soname=aix
10705fi
10706
10707    with_aix_soname=$lt_cv_with_aix_soname
10708fi
10709
10710  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
10711printf "%s\n" "$with_aix_soname" >&6; }
10712  if test aix != "$with_aix_soname"; then
10713    # For the AIX way of multilib, we name the shared archive member
10714    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
10715    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
10716    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
10717    # the AIX toolchain works better with OBJECT_MODE set (default 32).
10718    if test 64 = "${OBJECT_MODE-32}"; then
10719      shared_archive_member_spec=shr_64
10720    else
10721      shared_archive_member_spec=shr
10722    fi
10723  fi
10724  ;;
10725*)
10726  with_aix_soname=aix
10727  ;;
10728esac
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739# This can be used to rebuild libtool when needed
10740LIBTOOL_DEPS=$ltmain
10741
10742# Always use our own libtool.
10743LIBTOOL='$(SHELL) $(top_builddir)/libtool'
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774test -z "$LN_S" && LN_S="ln -s"
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789if test -n "${ZSH_VERSION+set}"; then
10790   setopt NO_GLOB_SUBST
10791fi
10792
10793{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
10794printf %s "checking for objdir... " >&6; }
10795if test ${lt_cv_objdir+y}
10796then :
10797  printf %s "(cached) " >&6
10798else $as_nop
10799  rm -f .libs 2>/dev/null
10800mkdir .libs 2>/dev/null
10801if test -d .libs; then
10802  lt_cv_objdir=.libs
10803else
10804  # MS-DOS does not allow filenames that begin with a dot.
10805  lt_cv_objdir=_libs
10806fi
10807rmdir .libs 2>/dev/null
10808fi
10809{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
10810printf "%s\n" "$lt_cv_objdir" >&6; }
10811objdir=$lt_cv_objdir
10812
10813
10814
10815
10816
10817printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
10818
10819
10820
10821
10822case $host_os in
10823aix3*)
10824  # AIX sometimes has problems with the GCC collect2 program.  For some
10825  # reason, if we set the COLLECT_NAMES environment variable, the problems
10826  # vanish in a puff of smoke.
10827  if test set != "${COLLECT_NAMES+set}"; then
10828    COLLECT_NAMES=
10829    export COLLECT_NAMES
10830  fi
10831  ;;
10832esac
10833
10834# Global variables:
10835ofile=libtool
10836can_build_shared=yes
10837
10838# All known linkers require a '.a' archive for static linking (except MSVC,
10839# which needs '.lib').
10840libext=a
10841
10842with_gnu_ld=$lt_cv_prog_gnu_ld
10843
10844old_CC=$CC
10845old_CFLAGS=$CFLAGS
10846
10847# Set sane defaults for various variables
10848test -z "$CC" && CC=cc
10849test -z "$LTCC" && LTCC=$CC
10850test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
10851test -z "$LD" && LD=ld
10852test -z "$ac_objext" && ac_objext=o
10853
10854func_cc_basename $compiler
10855cc_basename=$func_cc_basename_result
10856
10857
10858# Only perform the check for file, if the check method requires it
10859test -z "$MAGIC_CMD" && MAGIC_CMD=file
10860case $deplibs_check_method in
10861file_magic*)
10862  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
10863    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
10864printf %s "checking for ${ac_tool_prefix}file... " >&6; }
10865if test ${lt_cv_path_MAGIC_CMD+y}
10866then :
10867  printf %s "(cached) " >&6
10868else $as_nop
10869  case $MAGIC_CMD in
10870[\\/*] |  ?:[\\/]*)
10871  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10872  ;;
10873*)
10874  lt_save_MAGIC_CMD=$MAGIC_CMD
10875  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10876  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10877  for ac_dir in $ac_dummy; do
10878    IFS=$lt_save_ifs
10879    test -z "$ac_dir" && ac_dir=.
10880    if test -f "$ac_dir/${ac_tool_prefix}file"; then
10881      lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
10882      if test -n "$file_magic_test_file"; then
10883	case $deplibs_check_method in
10884	"file_magic "*)
10885	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10886	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10887	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10888	    $EGREP "$file_magic_regex" > /dev/null; then
10889	    :
10890	  else
10891	    cat <<_LT_EOF 1>&2
10892
10893*** Warning: the command libtool uses to detect shared libraries,
10894*** $file_magic_cmd, produces output that libtool cannot recognize.
10895*** The result is that libtool may fail to recognize shared libraries
10896*** as such.  This will affect the creation of libtool libraries that
10897*** depend on shared libraries, but programs linked with such libtool
10898*** libraries will work regardless of this problem.  Nevertheless, you
10899*** may want to report the problem to your system manager and/or to
10900*** bug-libtool@gnu.org
10901
10902_LT_EOF
10903	  fi ;;
10904	esac
10905      fi
10906      break
10907    fi
10908  done
10909  IFS=$lt_save_ifs
10910  MAGIC_CMD=$lt_save_MAGIC_CMD
10911  ;;
10912esac
10913fi
10914
10915MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10916if test -n "$MAGIC_CMD"; then
10917  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10918printf "%s\n" "$MAGIC_CMD" >&6; }
10919else
10920  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921printf "%s\n" "no" >&6; }
10922fi
10923
10924
10925
10926
10927
10928if test -z "$lt_cv_path_MAGIC_CMD"; then
10929  if test -n "$ac_tool_prefix"; then
10930    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
10931printf %s "checking for file... " >&6; }
10932if test ${lt_cv_path_MAGIC_CMD+y}
10933then :
10934  printf %s "(cached) " >&6
10935else $as_nop
10936  case $MAGIC_CMD in
10937[\\/*] |  ?:[\\/]*)
10938  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
10939  ;;
10940*)
10941  lt_save_MAGIC_CMD=$MAGIC_CMD
10942  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
10943  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
10944  for ac_dir in $ac_dummy; do
10945    IFS=$lt_save_ifs
10946    test -z "$ac_dir" && ac_dir=.
10947    if test -f "$ac_dir/file"; then
10948      lt_cv_path_MAGIC_CMD=$ac_dir/"file"
10949      if test -n "$file_magic_test_file"; then
10950	case $deplibs_check_method in
10951	"file_magic "*)
10952	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
10953	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10954	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
10955	    $EGREP "$file_magic_regex" > /dev/null; then
10956	    :
10957	  else
10958	    cat <<_LT_EOF 1>&2
10959
10960*** Warning: the command libtool uses to detect shared libraries,
10961*** $file_magic_cmd, produces output that libtool cannot recognize.
10962*** The result is that libtool may fail to recognize shared libraries
10963*** as such.  This will affect the creation of libtool libraries that
10964*** depend on shared libraries, but programs linked with such libtool
10965*** libraries will work regardless of this problem.  Nevertheless, you
10966*** may want to report the problem to your system manager and/or to
10967*** bug-libtool@gnu.org
10968
10969_LT_EOF
10970	  fi ;;
10971	esac
10972      fi
10973      break
10974    fi
10975  done
10976  IFS=$lt_save_ifs
10977  MAGIC_CMD=$lt_save_MAGIC_CMD
10978  ;;
10979esac
10980fi
10981
10982MAGIC_CMD=$lt_cv_path_MAGIC_CMD
10983if test -n "$MAGIC_CMD"; then
10984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
10985printf "%s\n" "$MAGIC_CMD" >&6; }
10986else
10987  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988printf "%s\n" "no" >&6; }
10989fi
10990
10991
10992  else
10993    MAGIC_CMD=:
10994  fi
10995fi
10996
10997  fi
10998  ;;
10999esac
11000
11001# Use C for the default configuration in the libtool script
11002
11003lt_save_CC=$CC
11004ac_ext=c
11005ac_cpp='$CPP $CPPFLAGS'
11006ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11007ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11008ac_compiler_gnu=$ac_cv_c_compiler_gnu
11009
11010
11011# Source file extension for C test sources.
11012ac_ext=c
11013
11014# Object file extension for compiled C test sources.
11015objext=o
11016objext=$objext
11017
11018# Code to be used in simple compile tests
11019lt_simple_compile_test_code="int some_variable = 0;"
11020
11021# Code to be used in simple link tests
11022lt_simple_link_test_code='int main(){return(0);}'
11023
11024
11025
11026
11027
11028
11029
11030# If no C compiler was specified, use CC.
11031LTCC=${LTCC-"$CC"}
11032
11033# If no C compiler flags were specified, use CFLAGS.
11034LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
11035
11036# Allow CC to be a program name with arguments.
11037compiler=$CC
11038
11039# Save the default compiler, since it gets overwritten when the other
11040# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
11041compiler_DEFAULT=$CC
11042
11043# save warnings/boilerplate of simple test code
11044ac_outfile=conftest.$ac_objext
11045echo "$lt_simple_compile_test_code" >conftest.$ac_ext
11046eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11047_lt_compiler_boilerplate=`cat conftest.err`
11048$RM conftest*
11049
11050ac_outfile=conftest.$ac_objext
11051echo "$lt_simple_link_test_code" >conftest.$ac_ext
11052eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
11053_lt_linker_boilerplate=`cat conftest.err`
11054$RM -r conftest*
11055
11056
11057## CAVEAT EMPTOR:
11058## There is no encapsulation within the following macros, do not change
11059## the running order or otherwise move them around unless you know exactly
11060## what you are doing...
11061if test -n "$compiler"; then
11062
11063lt_prog_compiler_no_builtin_flag=
11064
11065if test yes = "$GCC"; then
11066  case $cc_basename in
11067  nvcc*)
11068    lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
11069  *)
11070    lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
11071  esac
11072
11073  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
11074printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
11075if test ${lt_cv_prog_compiler_rtti_exceptions+y}
11076then :
11077  printf %s "(cached) " >&6
11078else $as_nop
11079  lt_cv_prog_compiler_rtti_exceptions=no
11080   ac_outfile=conftest.$ac_objext
11081   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11082   lt_compiler_flag="-fno-rtti -fno-exceptions"  ## exclude from sc_useless_quotes_in_assignment
11083   # Insert the option either (1) after the last *FLAGS variable, or
11084   # (2) before a word containing "conftest.", or (3) at the end.
11085   # Note that $ac_compile itself does not contain backslashes and begins
11086   # with a dollar sign (not a hyphen), so the echo should work correctly.
11087   # The option is referenced via a variable to avoid confusing sed.
11088   lt_compile=`echo "$ac_compile" | $SED \
11089   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11090   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11091   -e 's:$: $lt_compiler_flag:'`
11092   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11093   (eval "$lt_compile" 2>conftest.err)
11094   ac_status=$?
11095   cat conftest.err >&5
11096   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11097   if (exit $ac_status) && test -s "$ac_outfile"; then
11098     # The compiler can only warn and ignore the option if not recognized
11099     # So say no if there are warnings other than the usual output.
11100     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11101     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11102     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11103       lt_cv_prog_compiler_rtti_exceptions=yes
11104     fi
11105   fi
11106   $RM conftest*
11107
11108fi
11109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
11110printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
11111
11112if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
11113    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
11114else
11115    :
11116fi
11117
11118fi
11119
11120
11121
11122
11123
11124
11125  lt_prog_compiler_wl=
11126lt_prog_compiler_pic=
11127lt_prog_compiler_static=
11128
11129
11130  if test yes = "$GCC"; then
11131    lt_prog_compiler_wl='-Wl,'
11132    lt_prog_compiler_static='-static'
11133
11134    case $host_os in
11135      aix*)
11136      # All AIX code is PIC.
11137      if test ia64 = "$host_cpu"; then
11138	# AIX 5 now supports IA64 processor
11139	lt_prog_compiler_static='-Bstatic'
11140      fi
11141      lt_prog_compiler_pic='-fPIC'
11142      ;;
11143
11144    amigaos*)
11145      case $host_cpu in
11146      powerpc)
11147            # see comment about AmigaOS4 .so support
11148            lt_prog_compiler_pic='-fPIC'
11149        ;;
11150      m68k)
11151            # FIXME: we need at least 68020 code to build shared libraries, but
11152            # adding the '-m68020' flag to GCC prevents building anything better,
11153            # like '-m68040'.
11154            lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
11155        ;;
11156      esac
11157      ;;
11158
11159    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
11160      # PIC is the default for these OSes.
11161      ;;
11162
11163    mingw* | cygwin* | pw32* | os2* | cegcc*)
11164      # This hack is so that the source file can tell whether it is being
11165      # built for inclusion in a dll (and should export symbols for example).
11166      # Although the cygwin gcc ignores -fPIC, still need this for old-style
11167      # (--disable-auto-import) libraries
11168      lt_prog_compiler_pic='-DDLL_EXPORT'
11169      case $host_os in
11170      os2*)
11171	lt_prog_compiler_static='$wl-static'
11172	;;
11173      esac
11174      ;;
11175
11176    darwin* | rhapsody*)
11177      # PIC is the default on this platform
11178      # Common symbols not allowed in MH_DYLIB files
11179      lt_prog_compiler_pic='-fno-common'
11180      ;;
11181
11182    haiku*)
11183      # PIC is the default for Haiku.
11184      # The "-static" flag exists, but is broken.
11185      lt_prog_compiler_static=
11186      ;;
11187
11188    hpux*)
11189      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
11190      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
11191      # sets the default TLS model and affects inlining.
11192      case $host_cpu in
11193      hppa*64*)
11194	# +Z the default
11195	;;
11196      *)
11197	lt_prog_compiler_pic='-fPIC'
11198	;;
11199      esac
11200      ;;
11201
11202    interix[3-9]*)
11203      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
11204      # Instead, we relocate shared libraries at runtime.
11205      ;;
11206
11207    msdosdjgpp*)
11208      # Just because we use GCC doesn't mean we suddenly get shared libraries
11209      # on systems that don't support them.
11210      lt_prog_compiler_can_build_shared=no
11211      enable_shared=no
11212      ;;
11213
11214    *nto* | *qnx*)
11215      # QNX uses GNU C++, but need to define -shared option too, otherwise
11216      # it will coredump.
11217      lt_prog_compiler_pic='-fPIC -shared'
11218      ;;
11219
11220    sysv4*MP*)
11221      if test -d /usr/nec; then
11222	lt_prog_compiler_pic=-Kconform_pic
11223      fi
11224      ;;
11225
11226    *)
11227      lt_prog_compiler_pic='-fPIC'
11228      ;;
11229    esac
11230
11231    case $cc_basename in
11232    nvcc*) # Cuda Compiler Driver 2.2
11233      lt_prog_compiler_wl='-Xlinker '
11234      if test -n "$lt_prog_compiler_pic"; then
11235        lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
11236      fi
11237      ;;
11238    esac
11239  else
11240    # PORTME Check for flag to pass linker flags through the system compiler.
11241    case $host_os in
11242    aix*)
11243      lt_prog_compiler_wl='-Wl,'
11244      if test ia64 = "$host_cpu"; then
11245	# AIX 5 now supports IA64 processor
11246	lt_prog_compiler_static='-Bstatic'
11247      else
11248	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
11249      fi
11250      ;;
11251
11252    darwin* | rhapsody*)
11253      # PIC is the default on this platform
11254      # Common symbols not allowed in MH_DYLIB files
11255      lt_prog_compiler_pic='-fno-common'
11256      case $cc_basename in
11257      nagfor*)
11258        # NAG Fortran compiler
11259        lt_prog_compiler_wl='-Wl,-Wl,,'
11260        lt_prog_compiler_pic='-PIC'
11261        lt_prog_compiler_static='-Bstatic'
11262        ;;
11263      esac
11264      ;;
11265
11266    mingw* | cygwin* | pw32* | os2* | cegcc*)
11267      # This hack is so that the source file can tell whether it is being
11268      # built for inclusion in a dll (and should export symbols for example).
11269      lt_prog_compiler_pic='-DDLL_EXPORT'
11270      case $host_os in
11271      os2*)
11272	lt_prog_compiler_static='$wl-static'
11273	;;
11274      esac
11275      ;;
11276
11277    hpux9* | hpux10* | hpux11*)
11278      lt_prog_compiler_wl='-Wl,'
11279      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
11280      # not for PA HP-UX.
11281      case $host_cpu in
11282      hppa*64*|ia64*)
11283	# +Z the default
11284	;;
11285      *)
11286	lt_prog_compiler_pic='+Z'
11287	;;
11288      esac
11289      # Is there a better lt_prog_compiler_static that works with the bundled CC?
11290      lt_prog_compiler_static='$wl-a ${wl}archive'
11291      ;;
11292
11293    irix5* | irix6* | nonstopux*)
11294      lt_prog_compiler_wl='-Wl,'
11295      # PIC (with -KPIC) is the default.
11296      lt_prog_compiler_static='-non_shared'
11297      ;;
11298
11299    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
11300      case $cc_basename in
11301      # old Intel for x86_64, which still supported -KPIC.
11302      ecc*)
11303	lt_prog_compiler_wl='-Wl,'
11304	lt_prog_compiler_pic='-KPIC'
11305	lt_prog_compiler_static='-static'
11306        ;;
11307      # icc used to be incompatible with GCC.
11308      # ICC 10 doesn't accept -KPIC any more.
11309      icc* | ifort*)
11310	lt_prog_compiler_wl='-Wl,'
11311	lt_prog_compiler_pic='-fPIC'
11312	lt_prog_compiler_static='-static'
11313        ;;
11314      # Lahey Fortran 8.1.
11315      lf95*)
11316	lt_prog_compiler_wl='-Wl,'
11317	lt_prog_compiler_pic='--shared'
11318	lt_prog_compiler_static='--static'
11319	;;
11320      nagfor*)
11321	# NAG Fortran compiler
11322	lt_prog_compiler_wl='-Wl,-Wl,,'
11323	lt_prog_compiler_pic='-PIC'
11324	lt_prog_compiler_static='-Bstatic'
11325	;;
11326      tcc*)
11327	# Fabrice Bellard et al's Tiny C Compiler
11328	lt_prog_compiler_wl='-Wl,'
11329	lt_prog_compiler_pic='-fPIC'
11330	lt_prog_compiler_static='-static'
11331	;;
11332      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
11333        # Portland Group compilers (*not* the Pentium gcc compiler,
11334	# which looks to be a dead project)
11335	lt_prog_compiler_wl='-Wl,'
11336	lt_prog_compiler_pic='-fpic'
11337	lt_prog_compiler_static='-Bstatic'
11338        ;;
11339      ccc*)
11340        lt_prog_compiler_wl='-Wl,'
11341        # All Alpha code is PIC.
11342        lt_prog_compiler_static='-non_shared'
11343        ;;
11344      xl* | bgxl* | bgf* | mpixl*)
11345	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
11346	lt_prog_compiler_wl='-Wl,'
11347	lt_prog_compiler_pic='-qpic'
11348	lt_prog_compiler_static='-qstaticlink'
11349	;;
11350      *)
11351	case `$CC -V 2>&1 | sed 5q` in
11352	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
11353	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
11354	  lt_prog_compiler_pic='-KPIC'
11355	  lt_prog_compiler_static='-Bstatic'
11356	  lt_prog_compiler_wl=''
11357	  ;;
11358	*Sun\ F* | *Sun*Fortran*)
11359	  lt_prog_compiler_pic='-KPIC'
11360	  lt_prog_compiler_static='-Bstatic'
11361	  lt_prog_compiler_wl='-Qoption ld '
11362	  ;;
11363	*Sun\ C*)
11364	  # Sun C 5.9
11365	  lt_prog_compiler_pic='-KPIC'
11366	  lt_prog_compiler_static='-Bstatic'
11367	  lt_prog_compiler_wl='-Wl,'
11368	  ;;
11369        *Intel*\ [CF]*Compiler*)
11370	  lt_prog_compiler_wl='-Wl,'
11371	  lt_prog_compiler_pic='-fPIC'
11372	  lt_prog_compiler_static='-static'
11373	  ;;
11374	*Portland\ Group*)
11375	  lt_prog_compiler_wl='-Wl,'
11376	  lt_prog_compiler_pic='-fpic'
11377	  lt_prog_compiler_static='-Bstatic'
11378	  ;;
11379	esac
11380	;;
11381      esac
11382      ;;
11383
11384    newsos6)
11385      lt_prog_compiler_pic='-KPIC'
11386      lt_prog_compiler_static='-Bstatic'
11387      ;;
11388
11389    *nto* | *qnx*)
11390      # QNX uses GNU C++, but need to define -shared option too, otherwise
11391      # it will coredump.
11392      lt_prog_compiler_pic='-fPIC -shared'
11393      ;;
11394
11395    osf3* | osf4* | osf5*)
11396      lt_prog_compiler_wl='-Wl,'
11397      # All OSF/1 code is PIC.
11398      lt_prog_compiler_static='-non_shared'
11399      ;;
11400
11401    rdos*)
11402      lt_prog_compiler_static='-non_shared'
11403      ;;
11404
11405    solaris*)
11406      lt_prog_compiler_pic='-KPIC'
11407      lt_prog_compiler_static='-Bstatic'
11408      case $cc_basename in
11409      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
11410	lt_prog_compiler_wl='-Qoption ld ';;
11411      *)
11412	lt_prog_compiler_wl='-Wl,';;
11413      esac
11414      ;;
11415
11416    sunos4*)
11417      lt_prog_compiler_wl='-Qoption ld '
11418      lt_prog_compiler_pic='-PIC'
11419      lt_prog_compiler_static='-Bstatic'
11420      ;;
11421
11422    sysv4 | sysv4.2uw2* | sysv4.3*)
11423      lt_prog_compiler_wl='-Wl,'
11424      lt_prog_compiler_pic='-KPIC'
11425      lt_prog_compiler_static='-Bstatic'
11426      ;;
11427
11428    sysv4*MP*)
11429      if test -d /usr/nec; then
11430	lt_prog_compiler_pic='-Kconform_pic'
11431	lt_prog_compiler_static='-Bstatic'
11432      fi
11433      ;;
11434
11435    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
11436      lt_prog_compiler_wl='-Wl,'
11437      lt_prog_compiler_pic='-KPIC'
11438      lt_prog_compiler_static='-Bstatic'
11439      ;;
11440
11441    unicos*)
11442      lt_prog_compiler_wl='-Wl,'
11443      lt_prog_compiler_can_build_shared=no
11444      ;;
11445
11446    uts4*)
11447      lt_prog_compiler_pic='-pic'
11448      lt_prog_compiler_static='-Bstatic'
11449      ;;
11450
11451    *)
11452      lt_prog_compiler_can_build_shared=no
11453      ;;
11454    esac
11455  fi
11456
11457case $host_os in
11458  # For platforms that do not support PIC, -DPIC is meaningless:
11459  *djgpp*)
11460    lt_prog_compiler_pic=
11461    ;;
11462  *)
11463    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
11464    ;;
11465esac
11466
11467{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
11468printf %s "checking for $compiler option to produce PIC... " >&6; }
11469if test ${lt_cv_prog_compiler_pic+y}
11470then :
11471  printf %s "(cached) " >&6
11472else $as_nop
11473  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
11474fi
11475{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
11476printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
11477lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
11478
11479#
11480# Check to make sure the PIC flag actually works.
11481#
11482if test -n "$lt_prog_compiler_pic"; then
11483  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
11484printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
11485if test ${lt_cv_prog_compiler_pic_works+y}
11486then :
11487  printf %s "(cached) " >&6
11488else $as_nop
11489  lt_cv_prog_compiler_pic_works=no
11490   ac_outfile=conftest.$ac_objext
11491   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11492   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"  ## exclude from sc_useless_quotes_in_assignment
11493   # Insert the option either (1) after the last *FLAGS variable, or
11494   # (2) before a word containing "conftest.", or (3) at the end.
11495   # Note that $ac_compile itself does not contain backslashes and begins
11496   # with a dollar sign (not a hyphen), so the echo should work correctly.
11497   # The option is referenced via a variable to avoid confusing sed.
11498   lt_compile=`echo "$ac_compile" | $SED \
11499   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11500   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11501   -e 's:$: $lt_compiler_flag:'`
11502   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11503   (eval "$lt_compile" 2>conftest.err)
11504   ac_status=$?
11505   cat conftest.err >&5
11506   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507   if (exit $ac_status) && test -s "$ac_outfile"; then
11508     # The compiler can only warn and ignore the option if not recognized
11509     # So say no if there are warnings other than the usual output.
11510     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
11511     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11512     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
11513       lt_cv_prog_compiler_pic_works=yes
11514     fi
11515   fi
11516   $RM conftest*
11517
11518fi
11519{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
11520printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
11521
11522if test yes = "$lt_cv_prog_compiler_pic_works"; then
11523    case $lt_prog_compiler_pic in
11524     "" | " "*) ;;
11525     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
11526     esac
11527else
11528    lt_prog_compiler_pic=
11529     lt_prog_compiler_can_build_shared=no
11530fi
11531
11532fi
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544#
11545# Check to make sure the static flag actually works.
11546#
11547wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
11548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
11549printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
11550if test ${lt_cv_prog_compiler_static_works+y}
11551then :
11552  printf %s "(cached) " >&6
11553else $as_nop
11554  lt_cv_prog_compiler_static_works=no
11555   save_LDFLAGS=$LDFLAGS
11556   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
11557   echo "$lt_simple_link_test_code" > conftest.$ac_ext
11558   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11559     # The linker can only warn and ignore the option if not recognized
11560     # So say no if there are warnings
11561     if test -s conftest.err; then
11562       # Append any errors to the config.log.
11563       cat conftest.err 1>&5
11564       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11565       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11566       if diff conftest.exp conftest.er2 >/dev/null; then
11567         lt_cv_prog_compiler_static_works=yes
11568       fi
11569     else
11570       lt_cv_prog_compiler_static_works=yes
11571     fi
11572   fi
11573   $RM -r conftest*
11574   LDFLAGS=$save_LDFLAGS
11575
11576fi
11577{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
11578printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
11579
11580if test yes = "$lt_cv_prog_compiler_static_works"; then
11581    :
11582else
11583    lt_prog_compiler_static=
11584fi
11585
11586
11587
11588
11589
11590
11591
11592  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11593printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11594if test ${lt_cv_prog_compiler_c_o+y}
11595then :
11596  printf %s "(cached) " >&6
11597else $as_nop
11598  lt_cv_prog_compiler_c_o=no
11599   $RM -r conftest 2>/dev/null
11600   mkdir conftest
11601   cd conftest
11602   mkdir out
11603   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11604
11605   lt_compiler_flag="-o out/conftest2.$ac_objext"
11606   # Insert the option either (1) after the last *FLAGS variable, or
11607   # (2) before a word containing "conftest.", or (3) at the end.
11608   # Note that $ac_compile itself does not contain backslashes and begins
11609   # with a dollar sign (not a hyphen), so the echo should work correctly.
11610   lt_compile=`echo "$ac_compile" | $SED \
11611   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11612   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11613   -e 's:$: $lt_compiler_flag:'`
11614   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11615   (eval "$lt_compile" 2>out/conftest.err)
11616   ac_status=$?
11617   cat out/conftest.err >&5
11618   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11619   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11620   then
11621     # The compiler can only warn and ignore the option if not recognized
11622     # So say no if there are warnings
11623     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11624     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11625     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11626       lt_cv_prog_compiler_c_o=yes
11627     fi
11628   fi
11629   chmod u+w . 2>&5
11630   $RM conftest*
11631   # SGI C++ compiler will create directory out/ii_files/ for
11632   # template instantiation
11633   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11634   $RM out/* && rmdir out
11635   cd ..
11636   $RM -r conftest
11637   $RM conftest*
11638
11639fi
11640{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11641printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
11642
11643
11644
11645
11646
11647
11648  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
11649printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
11650if test ${lt_cv_prog_compiler_c_o+y}
11651then :
11652  printf %s "(cached) " >&6
11653else $as_nop
11654  lt_cv_prog_compiler_c_o=no
11655   $RM -r conftest 2>/dev/null
11656   mkdir conftest
11657   cd conftest
11658   mkdir out
11659   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11660
11661   lt_compiler_flag="-o out/conftest2.$ac_objext"
11662   # Insert the option either (1) after the last *FLAGS variable, or
11663   # (2) before a word containing "conftest.", or (3) at the end.
11664   # Note that $ac_compile itself does not contain backslashes and begins
11665   # with a dollar sign (not a hyphen), so the echo should work correctly.
11666   lt_compile=`echo "$ac_compile" | $SED \
11667   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
11668   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
11669   -e 's:$: $lt_compiler_flag:'`
11670   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
11671   (eval "$lt_compile" 2>out/conftest.err)
11672   ac_status=$?
11673   cat out/conftest.err >&5
11674   echo "$as_me:$LINENO: \$? = $ac_status" >&5
11675   if (exit $ac_status) && test -s out/conftest2.$ac_objext
11676   then
11677     # The compiler can only warn and ignore the option if not recognized
11678     # So say no if there are warnings
11679     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
11680     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
11681     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
11682       lt_cv_prog_compiler_c_o=yes
11683     fi
11684   fi
11685   chmod u+w . 2>&5
11686   $RM conftest*
11687   # SGI C++ compiler will create directory out/ii_files/ for
11688   # template instantiation
11689   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
11690   $RM out/* && rmdir out
11691   cd ..
11692   $RM -r conftest
11693   $RM conftest*
11694
11695fi
11696{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
11697printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
11698
11699
11700
11701
11702hard_links=nottested
11703if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
11704  # do not overwrite the value of need_locks provided by the user
11705  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
11706printf %s "checking if we can lock with hard links... " >&6; }
11707  hard_links=yes
11708  $RM conftest*
11709  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11710  touch conftest.a
11711  ln conftest.a conftest.b 2>&5 || hard_links=no
11712  ln conftest.a conftest.b 2>/dev/null && hard_links=no
11713  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
11714printf "%s\n" "$hard_links" >&6; }
11715  if test no = "$hard_links"; then
11716    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
11717printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
11718    need_locks=warn
11719  fi
11720else
11721  need_locks=no
11722fi
11723
11724
11725
11726
11727
11728
11729  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
11730printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
11731
11732  runpath_var=
11733  allow_undefined_flag=
11734  always_export_symbols=no
11735  archive_cmds=
11736  archive_expsym_cmds=
11737  compiler_needs_object=no
11738  enable_shared_with_static_runtimes=no
11739  export_dynamic_flag_spec=
11740  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
11741  hardcode_automatic=no
11742  hardcode_direct=no
11743  hardcode_direct_absolute=no
11744  hardcode_libdir_flag_spec=
11745  hardcode_libdir_separator=
11746  hardcode_minus_L=no
11747  hardcode_shlibpath_var=unsupported
11748  inherit_rpath=no
11749  link_all_deplibs=unknown
11750  module_cmds=
11751  module_expsym_cmds=
11752  old_archive_from_new_cmds=
11753  old_archive_from_expsyms_cmds=
11754  thread_safe_flag_spec=
11755  whole_archive_flag_spec=
11756  # include_expsyms should be a list of space-separated symbols to be *always*
11757  # included in the symbol list
11758  include_expsyms=
11759  # exclude_expsyms can be an extended regexp of symbols to exclude
11760  # it will be wrapped by ' (' and ')$', so one must not match beginning or
11761  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
11762  # as well as any symbol that contains 'd'.
11763  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
11764  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
11765  # platforms (ab)use it in PIC code, but their linkers get confused if
11766  # the symbol is explicitly referenced.  Since portable code cannot
11767  # rely on this symbol name, it's probably fine to never include it in
11768  # preloaded symbol tables.
11769  # Exclude shared library initialization/finalization symbols.
11770  extract_expsyms_cmds=
11771
11772  case $host_os in
11773  cygwin* | mingw* | pw32* | cegcc*)
11774    # FIXME: the MSVC++ port hasn't been tested in a loooong time
11775    # When not using gcc, we currently assume that we are using
11776    # Microsoft Visual C++.
11777    if test yes != "$GCC"; then
11778      with_gnu_ld=no
11779    fi
11780    ;;
11781  interix*)
11782    # we just hope/assume this is gcc and not c89 (= MSVC++)
11783    with_gnu_ld=yes
11784    ;;
11785  openbsd* | bitrig*)
11786    with_gnu_ld=no
11787    ;;
11788  esac
11789
11790  ld_shlibs=yes
11791
11792  # On some targets, GNU ld is compatible enough with the native linker
11793  # that we're better off using the native interface for both.
11794  lt_use_gnu_ld_interface=no
11795  if test yes = "$with_gnu_ld"; then
11796    case $host_os in
11797      aix*)
11798	# The AIX port of GNU ld has always aspired to compatibility
11799	# with the native linker.  However, as the warning in the GNU ld
11800	# block says, versions before 2.19.5* couldn't really create working
11801	# shared libraries, regardless of the interface used.
11802	case `$LD -v 2>&1` in
11803	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
11804	  *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
11805	  *\ \(GNU\ Binutils\)\ [3-9]*) ;;
11806	  *)
11807	    lt_use_gnu_ld_interface=yes
11808	    ;;
11809	esac
11810	;;
11811      *)
11812	lt_use_gnu_ld_interface=yes
11813	;;
11814    esac
11815  fi
11816
11817  if test yes = "$lt_use_gnu_ld_interface"; then
11818    # If archive_cmds runs LD, not CC, wlarc should be empty
11819    wlarc='$wl'
11820
11821    # Set some defaults for GNU ld with shared library support. These
11822    # are reset later if shared libraries are not supported. Putting them
11823    # here allows them to be overridden if necessary.
11824    runpath_var=LD_RUN_PATH
11825    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11826    export_dynamic_flag_spec='$wl--export-dynamic'
11827    # ancient GNU ld didn't support --whole-archive et. al.
11828    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
11829      whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
11830    else
11831      whole_archive_flag_spec=
11832    fi
11833    supports_anon_versioning=no
11834    case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
11835      *GNU\ gold*) supports_anon_versioning=yes ;;
11836      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
11837      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
11838      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
11839      *\ 2.11.*) ;; # other 2.11 versions
11840      *) supports_anon_versioning=yes ;;
11841    esac
11842
11843    # See if GNU ld supports shared libraries.
11844    case $host_os in
11845    aix[3-9]*)
11846      # On AIX/PPC, the GNU linker is very broken
11847      if test ia64 != "$host_cpu"; then
11848	ld_shlibs=no
11849	cat <<_LT_EOF 1>&2
11850
11851*** Warning: the GNU linker, at least up to release 2.19, is reported
11852*** to be unable to reliably create shared libraries on AIX.
11853*** Therefore, libtool is disabling shared libraries support.  If you
11854*** really care for shared libraries, you may want to install binutils
11855*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
11856*** You will then need to restart the configuration process.
11857
11858_LT_EOF
11859      fi
11860      ;;
11861
11862    amigaos*)
11863      case $host_cpu in
11864      powerpc)
11865            # see comment about AmigaOS4 .so support
11866            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11867            archive_expsym_cmds=''
11868        ;;
11869      m68k)
11870            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)'
11871            hardcode_libdir_flag_spec='-L$libdir'
11872            hardcode_minus_L=yes
11873        ;;
11874      esac
11875      ;;
11876
11877    beos*)
11878      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11879	allow_undefined_flag=unsupported
11880	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
11881	# support --undefined.  This deserves some investigation.  FIXME
11882	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11883      else
11884	ld_shlibs=no
11885      fi
11886      ;;
11887
11888    cygwin* | mingw* | pw32* | cegcc*)
11889      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
11890      # as there is no search path for DLLs.
11891      hardcode_libdir_flag_spec='-L$libdir'
11892      export_dynamic_flag_spec='$wl--export-all-symbols'
11893      allow_undefined_flag=unsupported
11894      always_export_symbols=no
11895      enable_shared_with_static_runtimes=yes
11896      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'
11897      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
11898
11899      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
11900        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11901	# If the export-symbols file already is a .def file, use it as
11902	# is; otherwise, prepend EXPORTS...
11903	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
11904          cp $export_symbols $output_objdir/$soname.def;
11905        else
11906          echo EXPORTS > $output_objdir/$soname.def;
11907          cat $export_symbols >> $output_objdir/$soname.def;
11908        fi~
11909        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
11910      else
11911	ld_shlibs=no
11912      fi
11913      ;;
11914
11915    haiku*)
11916      archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11917      link_all_deplibs=yes
11918      ;;
11919
11920    os2*)
11921      hardcode_libdir_flag_spec='-L$libdir'
11922      hardcode_minus_L=yes
11923      allow_undefined_flag=unsupported
11924      shrext_cmds=.dll
11925      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11926	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11927	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11928	$ECHO EXPORTS >> $output_objdir/$libname.def~
11929	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11930	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11931	emximp -o $lib $output_objdir/$libname.def'
11932      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11933	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11934	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11935	$ECHO EXPORTS >> $output_objdir/$libname.def~
11936	prefix_cmds="$SED"~
11937	if test EXPORTS = "`$SED 1q $export_symbols`"; then
11938	  prefix_cmds="$prefix_cmds -e 1d";
11939	fi~
11940	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11941	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11942	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11943	emximp -o $lib $output_objdir/$libname.def'
11944      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11945      enable_shared_with_static_runtimes=yes
11946      ;;
11947
11948    interix[3-9]*)
11949      hardcode_direct=no
11950      hardcode_shlibpath_var=no
11951      hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11952      export_dynamic_flag_spec='$wl-E'
11953      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
11954      # Instead, shared libraries are loaded at an image base (0x10000000 by
11955      # default) and relocated if they conflict, which is a slow very memory
11956      # consuming and fragmenting process.  To avoid this, we pick a random,
11957      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
11958      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
11959      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
11960      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'
11961      ;;
11962
11963    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
11964      tmp_diet=no
11965      if test linux-dietlibc = "$host_os"; then
11966	case $cc_basename in
11967	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
11968	esac
11969      fi
11970      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
11971	 && test no = "$tmp_diet"
11972      then
11973	tmp_addflag=' $pic_flag'
11974	tmp_sharedflag='-shared'
11975	case $cc_basename,$host_cpu in
11976        pgcc*)				# Portland Group C compiler
11977	  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'
11978	  tmp_addflag=' $pic_flag'
11979	  ;;
11980	pgf77* | pgf90* | pgf95* | pgfortran*)
11981					# Portland Group f77 and f90 compilers
11982	  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'
11983	  tmp_addflag=' $pic_flag -Mnomain' ;;
11984	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
11985	  tmp_addflag=' -i_dynamic' ;;
11986	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
11987	  tmp_addflag=' -i_dynamic -nofor_main' ;;
11988	ifc* | ifort*)			# Intel Fortran compiler
11989	  tmp_addflag=' -nofor_main' ;;
11990	lf95*)				# Lahey Fortran 8.1
11991	  whole_archive_flag_spec=
11992	  tmp_sharedflag='--shared' ;;
11993        nagfor*)                        # NAGFOR 5.3
11994          tmp_sharedflag='-Wl,-shared' ;;
11995	xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
11996	  tmp_sharedflag='-qmkshrobj'
11997	  tmp_addflag= ;;
11998	nvcc*)	# Cuda Compiler Driver 2.2
11999	  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'
12000	  compiler_needs_object=yes
12001	  ;;
12002	esac
12003	case `$CC -V 2>&1 | sed 5q` in
12004	*Sun\ C*)			# Sun C 5.9
12005	  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'
12006	  compiler_needs_object=yes
12007	  tmp_sharedflag='-G' ;;
12008	*Sun\ F*)			# Sun Fortran 8.3
12009	  tmp_sharedflag='-G' ;;
12010	esac
12011	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12012
12013        if test yes = "$supports_anon_versioning"; then
12014          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12015            cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12016            echo "local: *; };" >> $output_objdir/$libname.ver~
12017            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
12018        fi
12019
12020	case $cc_basename in
12021	tcc*)
12022	  export_dynamic_flag_spec='-rdynamic'
12023	  ;;
12024	xlf* | bgf* | bgxlf* | mpixlf*)
12025	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
12026	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
12027	  hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12028	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
12029	  if test yes = "$supports_anon_versioning"; then
12030	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
12031              cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
12032              echo "local: *; };" >> $output_objdir/$libname.ver~
12033              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
12034	  fi
12035	  ;;
12036	esac
12037      else
12038        ld_shlibs=no
12039      fi
12040      ;;
12041
12042    netbsd*)
12043      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12044	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
12045	wlarc=
12046      else
12047	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12048	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12049      fi
12050      ;;
12051
12052    solaris*)
12053      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
12054	ld_shlibs=no
12055	cat <<_LT_EOF 1>&2
12056
12057*** Warning: The releases 2.8.* of the GNU linker cannot reliably
12058*** create shared libraries on Solaris systems.  Therefore, libtool
12059*** is disabling shared libraries support.  We urge you to upgrade GNU
12060*** binutils to release 2.9.1 or newer.  Another option is to modify
12061*** your PATH or compiler configuration so that the native linker is
12062*** used, and then restart.
12063
12064_LT_EOF
12065      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12066	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12067	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12068      else
12069	ld_shlibs=no
12070      fi
12071      ;;
12072
12073    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
12074      case `$LD -v 2>&1` in
12075        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
12076	ld_shlibs=no
12077	cat <<_LT_EOF 1>&2
12078
12079*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
12080*** reliably create shared libraries on SCO systems.  Therefore, libtool
12081*** is disabling shared libraries support.  We urge you to upgrade GNU
12082*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
12083*** your PATH or compiler configuration so that the native linker is
12084*** used, and then restart.
12085
12086_LT_EOF
12087	;;
12088	*)
12089	  # For security reasons, it is highly recommended that you always
12090	  # use absolute paths for naming shared libraries, and exclude the
12091	  # DT_RUNPATH tag from executables and libraries.  But doing so
12092	  # requires that you compile everything twice, which is a pain.
12093	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12094	    hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12095	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12096	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12097	  else
12098	    ld_shlibs=no
12099	  fi
12100	;;
12101      esac
12102      ;;
12103
12104    sunos4*)
12105      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12106      wlarc=
12107      hardcode_direct=yes
12108      hardcode_shlibpath_var=no
12109      ;;
12110
12111    *)
12112      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
12113	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12114	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
12115      else
12116	ld_shlibs=no
12117      fi
12118      ;;
12119    esac
12120
12121    if test no = "$ld_shlibs"; then
12122      runpath_var=
12123      hardcode_libdir_flag_spec=
12124      export_dynamic_flag_spec=
12125      whole_archive_flag_spec=
12126    fi
12127  else
12128    # PORTME fill in a description of your system's linker (not GNU ld)
12129    case $host_os in
12130    aix3*)
12131      allow_undefined_flag=unsupported
12132      always_export_symbols=yes
12133      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'
12134      # Note: this linker hardcodes the directories in LIBPATH if there
12135      # are no directories specified by -L.
12136      hardcode_minus_L=yes
12137      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
12138	# Neither direct hardcoding nor static linking is supported with a
12139	# broken collect2.
12140	hardcode_direct=unsupported
12141      fi
12142      ;;
12143
12144    aix[4-9]*)
12145      if test ia64 = "$host_cpu"; then
12146	# On IA64, the linker does run time linking by default, so we don't
12147	# have to do anything special.
12148	aix_use_runtimelinking=no
12149	exp_sym_flag='-Bexport'
12150	no_entry_flag=
12151      else
12152	# If we're using GNU nm, then we don't want the "-C" option.
12153	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
12154	# Without the "-l" option, or with the "-B" option, AIX nm treats
12155	# weak defined symbols like other global defined symbols, whereas
12156	# GNU nm marks them as "W".
12157	# While the 'weak' keyword is ignored in the Export File, we need
12158	# it in the Import File for the 'aix-soname' feature, so we have
12159	# to replace the "-B" option with "-P" for AIX nm.
12160	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
12161	  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'
12162	else
12163	  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'
12164	fi
12165	aix_use_runtimelinking=no
12166
12167	# Test if we are trying to use run time linking or normal
12168	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
12169	# have runtime linking enabled, and use it for executables.
12170	# For shared libraries, we enable/disable runtime linking
12171	# depending on the kind of the shared library created -
12172	# when "with_aix_soname,aix_use_runtimelinking" is:
12173	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
12174	# "aix,yes"  lib.so          shared, rtl:yes, for executables
12175	#            lib.a           static archive
12176	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
12177	#            lib.a(lib.so.V) shared, rtl:no,  for executables
12178	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
12179	#            lib.a(lib.so.V) shared, rtl:no
12180	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
12181	#            lib.a           static archive
12182	case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
12183	  for ld_flag in $LDFLAGS; do
12184	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
12185	    aix_use_runtimelinking=yes
12186	    break
12187	  fi
12188	  done
12189	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
12190	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
12191	    # so we don't have lib.a shared libs to link our executables.
12192	    # We have to force runtime linking in this case.
12193	    aix_use_runtimelinking=yes
12194	    LDFLAGS="$LDFLAGS -Wl,-brtl"
12195	  fi
12196	  ;;
12197	esac
12198
12199	exp_sym_flag='-bexport'
12200	no_entry_flag='-bnoentry'
12201      fi
12202
12203      # When large executables or shared objects are built, AIX ld can
12204      # have problems creating the table of contents.  If linking a library
12205      # or program results in "error TOC overflow" add -mminimal-toc to
12206      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
12207      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
12208
12209      archive_cmds=''
12210      hardcode_direct=yes
12211      hardcode_direct_absolute=yes
12212      hardcode_libdir_separator=':'
12213      link_all_deplibs=yes
12214      file_list_spec='$wl-f,'
12215      case $with_aix_soname,$aix_use_runtimelinking in
12216      aix,*) ;; # traditional, no import file
12217      svr4,* | *,yes) # use import file
12218	# The Import File defines what to hardcode.
12219	hardcode_direct=no
12220	hardcode_direct_absolute=no
12221	;;
12222      esac
12223
12224      if test yes = "$GCC"; then
12225	case $host_os in aix4.[012]|aix4.[012].*)
12226	# We only want to do this on AIX 4.2 and lower, the check
12227	# below for broken collect2 doesn't work under 4.3+
12228	  collect2name=`$CC -print-prog-name=collect2`
12229	  if test -f "$collect2name" &&
12230	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
12231	  then
12232	  # We have reworked collect2
12233	  :
12234	  else
12235	  # We have old collect2
12236	  hardcode_direct=unsupported
12237	  # It fails to find uninstalled libraries when the uninstalled
12238	  # path is not listed in the libpath.  Setting hardcode_minus_L
12239	  # to unsupported forces relinking
12240	  hardcode_minus_L=yes
12241	  hardcode_libdir_flag_spec='-L$libdir'
12242	  hardcode_libdir_separator=
12243	  fi
12244	  ;;
12245	esac
12246	shared_flag='-shared'
12247	if test yes = "$aix_use_runtimelinking"; then
12248	  shared_flag="$shared_flag "'$wl-G'
12249	fi
12250	# Need to ensure runtime linking is disabled for the traditional
12251	# shared library, or the linker may eventually find shared libraries
12252	# /with/ Import File - we do not want to mix them.
12253	shared_flag_aix='-shared'
12254	shared_flag_svr4='-shared $wl-G'
12255      else
12256	# not using gcc
12257	if test ia64 = "$host_cpu"; then
12258	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
12259	# chokes on -Wl,-G. The following line is correct:
12260	  shared_flag='-G'
12261	else
12262	  if test yes = "$aix_use_runtimelinking"; then
12263	    shared_flag='$wl-G'
12264	  else
12265	    shared_flag='$wl-bM:SRE'
12266	  fi
12267	  shared_flag_aix='$wl-bM:SRE'
12268	  shared_flag_svr4='$wl-G'
12269	fi
12270      fi
12271
12272      export_dynamic_flag_spec='$wl-bexpall'
12273      # It seems that -bexpall does not export symbols beginning with
12274      # underscore (_), so it is better to generate a list of symbols to export.
12275      always_export_symbols=yes
12276      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
12277	# Warning - without using the other runtime loading flags (-brtl),
12278	# -berok will link without error, but may produce a broken library.
12279	allow_undefined_flag='-berok'
12280        # Determine the default libpath from the value encoded in an
12281        # empty executable.
12282        if test set = "${lt_cv_aix_libpath+set}"; then
12283  aix_libpath=$lt_cv_aix_libpath
12284else
12285  if test ${lt_cv_aix_libpath_+y}
12286then :
12287  printf %s "(cached) " >&6
12288else $as_nop
12289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12290/* end confdefs.h.  */
12291
12292int
12293main (void)
12294{
12295
12296  ;
12297  return 0;
12298}
12299_ACEOF
12300if ac_fn_c_try_link "$LINENO"
12301then :
12302
12303  lt_aix_libpath_sed='
12304      /Import File Strings/,/^$/ {
12305	  /^0/ {
12306	      s/^0  *\([^ ]*\) *$/\1/
12307	      p
12308	  }
12309      }'
12310  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12311  # Check for a 64-bit object if we didn't find anything.
12312  if test -z "$lt_cv_aix_libpath_"; then
12313    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12314  fi
12315fi
12316rm -f core conftest.err conftest.$ac_objext conftest.beam \
12317    conftest$ac_exeext conftest.$ac_ext
12318  if test -z "$lt_cv_aix_libpath_"; then
12319    lt_cv_aix_libpath_=/usr/lib:/lib
12320  fi
12321
12322fi
12323
12324  aix_libpath=$lt_cv_aix_libpath_
12325fi
12326
12327        hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12328        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
12329      else
12330	if test ia64 = "$host_cpu"; then
12331	  hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
12332	  allow_undefined_flag="-z nodefs"
12333	  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"
12334	else
12335	 # Determine the default libpath from the value encoded in an
12336	 # empty executable.
12337	 if test set = "${lt_cv_aix_libpath+set}"; then
12338  aix_libpath=$lt_cv_aix_libpath
12339else
12340  if test ${lt_cv_aix_libpath_+y}
12341then :
12342  printf %s "(cached) " >&6
12343else $as_nop
12344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12345/* end confdefs.h.  */
12346
12347int
12348main (void)
12349{
12350
12351  ;
12352  return 0;
12353}
12354_ACEOF
12355if ac_fn_c_try_link "$LINENO"
12356then :
12357
12358  lt_aix_libpath_sed='
12359      /Import File Strings/,/^$/ {
12360	  /^0/ {
12361	      s/^0  *\([^ ]*\) *$/\1/
12362	      p
12363	  }
12364      }'
12365  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12366  # Check for a 64-bit object if we didn't find anything.
12367  if test -z "$lt_cv_aix_libpath_"; then
12368    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
12369  fi
12370fi
12371rm -f core conftest.err conftest.$ac_objext conftest.beam \
12372    conftest$ac_exeext conftest.$ac_ext
12373  if test -z "$lt_cv_aix_libpath_"; then
12374    lt_cv_aix_libpath_=/usr/lib:/lib
12375  fi
12376
12377fi
12378
12379  aix_libpath=$lt_cv_aix_libpath_
12380fi
12381
12382	 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
12383	  # Warning - without using the other run time loading flags,
12384	  # -berok will link without error, but may produce a broken library.
12385	  no_undefined_flag=' $wl-bernotok'
12386	  allow_undefined_flag=' $wl-berok'
12387	  if test yes = "$with_gnu_ld"; then
12388	    # We only use this code for GNU lds that support --whole-archive.
12389	    whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
12390	  else
12391	    # Exported symbols can be pulled into shared objects from archives
12392	    whole_archive_flag_spec='$convenience'
12393	  fi
12394	  archive_cmds_need_lc=yes
12395	  archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
12396	  # -brtl affects multiple linker settings, -berok does not and is overridden later
12397	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
12398	  if test svr4 != "$with_aix_soname"; then
12399	    # This is similar to how AIX traditionally builds its shared libraries.
12400	    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'
12401	  fi
12402	  if test aix != "$with_aix_soname"; then
12403	    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'
12404	  else
12405	    # used by -dlpreopen to get the symbols
12406	    archive_expsym_cmds="$archive_expsym_cmds"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
12407	  fi
12408	  archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
12409	fi
12410      fi
12411      ;;
12412
12413    amigaos*)
12414      case $host_cpu in
12415      powerpc)
12416            # see comment about AmigaOS4 .so support
12417            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
12418            archive_expsym_cmds=''
12419        ;;
12420      m68k)
12421            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)'
12422            hardcode_libdir_flag_spec='-L$libdir'
12423            hardcode_minus_L=yes
12424        ;;
12425      esac
12426      ;;
12427
12428    bsdi[45]*)
12429      export_dynamic_flag_spec=-rdynamic
12430      ;;
12431
12432    cygwin* | mingw* | pw32* | cegcc*)
12433      # When not using gcc, we currently assume that we are using
12434      # Microsoft Visual C++.
12435      # hardcode_libdir_flag_spec is actually meaningless, as there is
12436      # no search path for DLLs.
12437      case $cc_basename in
12438      cl*)
12439	# Native MSVC
12440	hardcode_libdir_flag_spec=' '
12441	allow_undefined_flag=unsupported
12442	always_export_symbols=yes
12443	file_list_spec='@'
12444	# Tell ltmain to make .lib files, not .a files.
12445	libext=lib
12446	# Tell ltmain to make .dll files, not .so files.
12447	shrext_cmds=.dll
12448	# FIXME: Setting linknames here is a bad hack.
12449	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
12450	archive_expsym_cmds='if   test DEF = "`$SED -n     -e '\''s/^[	 ]*//'\''     -e '\''/^\(;.*\)*$/d'\''     -e '\''s/^\(EXPORTS\|LIBRARY\)\([	 ].*\)*$/DEF/p'\''     -e q     $export_symbols`" ; then
12451            cp "$export_symbols" "$output_objdir/$soname.def";
12452            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
12453          else
12454            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
12455          fi~
12456          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
12457          linknames='
12458	# The linker will not automatically build a static lib if we build a DLL.
12459	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
12460	enable_shared_with_static_runtimes=yes
12461	exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
12462	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
12463	# Don't use ranlib
12464	old_postinstall_cmds='chmod 644 $oldlib'
12465	postlink_cmds='lt_outputfile="@OUTPUT@"~
12466          lt_tool_outputfile="@TOOL_OUTPUT@"~
12467          case $lt_outputfile in
12468            *.exe|*.EXE) ;;
12469            *)
12470              lt_outputfile=$lt_outputfile.exe
12471              lt_tool_outputfile=$lt_tool_outputfile.exe
12472              ;;
12473          esac~
12474          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
12475            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
12476            $RM "$lt_outputfile.manifest";
12477          fi'
12478	;;
12479      *)
12480	# Assume MSVC wrapper
12481	hardcode_libdir_flag_spec=' '
12482	allow_undefined_flag=unsupported
12483	# Tell ltmain to make .lib files, not .a files.
12484	libext=lib
12485	# Tell ltmain to make .dll files, not .so files.
12486	shrext_cmds=.dll
12487	# FIXME: Setting linknames here is a bad hack.
12488	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
12489	# The linker will automatically build a .lib file if we build a DLL.
12490	old_archive_from_new_cmds='true'
12491	# FIXME: Should let the user specify the lib program.
12492	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
12493	enable_shared_with_static_runtimes=yes
12494	;;
12495      esac
12496      ;;
12497
12498    darwin* | rhapsody*)
12499
12500
12501  archive_cmds_need_lc=no
12502  hardcode_direct=no
12503  hardcode_automatic=yes
12504  hardcode_shlibpath_var=unsupported
12505  if test yes = "$lt_cv_ld_force_load"; then
12506    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\"`'
12507
12508  else
12509    whole_archive_flag_spec=''
12510  fi
12511  link_all_deplibs=yes
12512  allow_undefined_flag=$_lt_dar_allow_undefined
12513  case $cc_basename in
12514     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
12515     *) _lt_dar_can_shared=$GCC ;;
12516  esac
12517  if test yes = "$_lt_dar_can_shared"; then
12518    output_verbose_link_cmd=func_echo_all
12519    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
12520    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
12521    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"
12522    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"
12523
12524  else
12525  ld_shlibs=no
12526  fi
12527
12528      ;;
12529
12530    dgux*)
12531      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12532      hardcode_libdir_flag_spec='-L$libdir'
12533      hardcode_shlibpath_var=no
12534      ;;
12535
12536    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12537    # support.  Future versions do this automatically, but an explicit c++rt0.o
12538    # does not break anything, and helps significantly (at the cost of a little
12539    # extra space).
12540    freebsd2.2*)
12541      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
12542      hardcode_libdir_flag_spec='-R$libdir'
12543      hardcode_direct=yes
12544      hardcode_shlibpath_var=no
12545      ;;
12546
12547    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
12548    freebsd2.*)
12549      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
12550      hardcode_direct=yes
12551      hardcode_minus_L=yes
12552      hardcode_shlibpath_var=no
12553      ;;
12554
12555    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
12556    freebsd* | dragonfly*)
12557      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12558      hardcode_libdir_flag_spec='-R$libdir'
12559      hardcode_direct=yes
12560      hardcode_shlibpath_var=no
12561      ;;
12562
12563    hpux9*)
12564      if test yes = "$GCC"; then
12565	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'
12566      else
12567	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'
12568      fi
12569      hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12570      hardcode_libdir_separator=:
12571      hardcode_direct=yes
12572
12573      # hardcode_minus_L: Not really in the search PATH,
12574      # but as the default location of the library.
12575      hardcode_minus_L=yes
12576      export_dynamic_flag_spec='$wl-E'
12577      ;;
12578
12579    hpux10*)
12580      if test yes,no = "$GCC,$with_gnu_ld"; then
12581	archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12582      else
12583	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12584      fi
12585      if test no = "$with_gnu_ld"; then
12586	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12587	hardcode_libdir_separator=:
12588	hardcode_direct=yes
12589	hardcode_direct_absolute=yes
12590	export_dynamic_flag_spec='$wl-E'
12591	# hardcode_minus_L: Not really in the search PATH,
12592	# but as the default location of the library.
12593	hardcode_minus_L=yes
12594      fi
12595      ;;
12596
12597    hpux11*)
12598      if test yes,no = "$GCC,$with_gnu_ld"; then
12599	case $host_cpu in
12600	hppa*64*)
12601	  archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12602	  ;;
12603	ia64*)
12604	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12605	  ;;
12606	*)
12607	  archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12608	  ;;
12609	esac
12610      else
12611	case $host_cpu in
12612	hppa*64*)
12613	  archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12614	  ;;
12615	ia64*)
12616	  archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
12617	  ;;
12618	*)
12619
12620	  # Older versions of the 11.00 compiler do not understand -b yet
12621	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
12622	  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
12623printf %s "checking if $CC understands -b... " >&6; }
12624if test ${lt_cv_prog_compiler__b+y}
12625then :
12626  printf %s "(cached) " >&6
12627else $as_nop
12628  lt_cv_prog_compiler__b=no
12629   save_LDFLAGS=$LDFLAGS
12630   LDFLAGS="$LDFLAGS -b"
12631   echo "$lt_simple_link_test_code" > conftest.$ac_ext
12632   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
12633     # The linker can only warn and ignore the option if not recognized
12634     # So say no if there are warnings
12635     if test -s conftest.err; then
12636       # Append any errors to the config.log.
12637       cat conftest.err 1>&5
12638       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
12639       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
12640       if diff conftest.exp conftest.er2 >/dev/null; then
12641         lt_cv_prog_compiler__b=yes
12642       fi
12643     else
12644       lt_cv_prog_compiler__b=yes
12645     fi
12646   fi
12647   $RM -r conftest*
12648   LDFLAGS=$save_LDFLAGS
12649
12650fi
12651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
12652printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
12653
12654if test yes = "$lt_cv_prog_compiler__b"; then
12655    archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
12656else
12657    archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
12658fi
12659
12660	  ;;
12661	esac
12662      fi
12663      if test no = "$with_gnu_ld"; then
12664	hardcode_libdir_flag_spec='$wl+b $wl$libdir'
12665	hardcode_libdir_separator=:
12666
12667	case $host_cpu in
12668	hppa*64*|ia64*)
12669	  hardcode_direct=no
12670	  hardcode_shlibpath_var=no
12671	  ;;
12672	*)
12673	  hardcode_direct=yes
12674	  hardcode_direct_absolute=yes
12675	  export_dynamic_flag_spec='$wl-E'
12676
12677	  # hardcode_minus_L: Not really in the search PATH,
12678	  # but as the default location of the library.
12679	  hardcode_minus_L=yes
12680	  ;;
12681	esac
12682      fi
12683      ;;
12684
12685    irix5* | irix6* | nonstopux*)
12686      if test yes = "$GCC"; then
12687	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'
12688	# Try to use the -exported_symbol ld option, if it does not
12689	# work, assume that -exports_file does not work either and
12690	# implicitly export all symbols.
12691	# This should be the same for all languages, so no per-tag cache variable.
12692	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
12693printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
12694if test ${lt_cv_irix_exported_symbol+y}
12695then :
12696  printf %s "(cached) " >&6
12697else $as_nop
12698  save_LDFLAGS=$LDFLAGS
12699	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
12700	   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12701/* end confdefs.h.  */
12702int foo (void) { return 0; }
12703_ACEOF
12704if ac_fn_c_try_link "$LINENO"
12705then :
12706  lt_cv_irix_exported_symbol=yes
12707else $as_nop
12708  lt_cv_irix_exported_symbol=no
12709fi
12710rm -f core conftest.err conftest.$ac_objext conftest.beam \
12711    conftest$ac_exeext conftest.$ac_ext
12712           LDFLAGS=$save_LDFLAGS
12713fi
12714{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
12715printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
12716	if test yes = "$lt_cv_irix_exported_symbol"; then
12717          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'
12718	fi
12719      else
12720	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'
12721	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'
12722      fi
12723      archive_cmds_need_lc='no'
12724      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12725      hardcode_libdir_separator=:
12726      inherit_rpath=yes
12727      link_all_deplibs=yes
12728      ;;
12729
12730    linux*)
12731      case $cc_basename in
12732      tcc*)
12733	# Fabrice Bellard et al's Tiny C Compiler
12734	ld_shlibs=yes
12735	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12736	;;
12737      esac
12738      ;;
12739
12740    netbsd*)
12741      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12742	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
12743      else
12744	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
12745      fi
12746      hardcode_libdir_flag_spec='-R$libdir'
12747      hardcode_direct=yes
12748      hardcode_shlibpath_var=no
12749      ;;
12750
12751    newsos6)
12752      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12753      hardcode_direct=yes
12754      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12755      hardcode_libdir_separator=:
12756      hardcode_shlibpath_var=no
12757      ;;
12758
12759    *nto* | *qnx*)
12760      ;;
12761
12762    openbsd* | bitrig*)
12763      if test -f /usr/libexec/ld.so; then
12764	hardcode_direct=yes
12765	hardcode_shlibpath_var=no
12766	hardcode_direct_absolute=yes
12767	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12768	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12769	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
12770	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12771	  export_dynamic_flag_spec='$wl-E'
12772	else
12773	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
12774	  hardcode_libdir_flag_spec='$wl-rpath,$libdir'
12775	fi
12776      else
12777	ld_shlibs=no
12778      fi
12779      ;;
12780
12781    os2*)
12782      hardcode_libdir_flag_spec='-L$libdir'
12783      hardcode_minus_L=yes
12784      allow_undefined_flag=unsupported
12785      shrext_cmds=.dll
12786      archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12787	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12788	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12789	$ECHO EXPORTS >> $output_objdir/$libname.def~
12790	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
12791	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12792	emximp -o $lib $output_objdir/$libname.def'
12793      archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
12794	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
12795	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
12796	$ECHO EXPORTS >> $output_objdir/$libname.def~
12797	prefix_cmds="$SED"~
12798	if test EXPORTS = "`$SED 1q $export_symbols`"; then
12799	  prefix_cmds="$prefix_cmds -e 1d";
12800	fi~
12801	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
12802	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
12803	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
12804	emximp -o $lib $output_objdir/$libname.def'
12805      old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
12806      enable_shared_with_static_runtimes=yes
12807      ;;
12808
12809    osf3*)
12810      if test yes = "$GCC"; then
12811	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12812	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'
12813      else
12814	allow_undefined_flag=' -expect_unresolved \*'
12815	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'
12816      fi
12817      archive_cmds_need_lc='no'
12818      hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12819      hardcode_libdir_separator=:
12820      ;;
12821
12822    osf4* | osf5*)	# as osf3* with the addition of -msym flag
12823      if test yes = "$GCC"; then
12824	allow_undefined_flag=' $wl-expect_unresolved $wl\*'
12825	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'
12826	hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12827      else
12828	allow_undefined_flag=' -expect_unresolved \*'
12829	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'
12830	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~
12831          $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'
12832
12833	# Both c and cxx compiler support -rpath directly
12834	hardcode_libdir_flag_spec='-rpath $libdir'
12835      fi
12836      archive_cmds_need_lc='no'
12837      hardcode_libdir_separator=:
12838      ;;
12839
12840    solaris*)
12841      no_undefined_flag=' -z defs'
12842      if test yes = "$GCC"; then
12843	wlarc='$wl'
12844	archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
12845	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12846          $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'
12847      else
12848	case `$CC -V 2>&1` in
12849	*"Compilers 5.0"*)
12850	  wlarc=''
12851	  archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
12852	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12853            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
12854	  ;;
12855	*)
12856	  wlarc='$wl'
12857	  archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
12858	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
12859            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
12860	  ;;
12861	esac
12862      fi
12863      hardcode_libdir_flag_spec='-R$libdir'
12864      hardcode_shlibpath_var=no
12865      case $host_os in
12866      solaris2.[0-5] | solaris2.[0-5].*) ;;
12867      *)
12868	# The compiler driver will combine and reorder linker options,
12869	# but understands '-z linker_flag'.  GCC discards it without '$wl',
12870	# but is careful enough not to reorder.
12871	# Supported since Solaris 2.6 (maybe 2.5.1?)
12872	if test yes = "$GCC"; then
12873	  whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
12874	else
12875	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
12876	fi
12877	;;
12878      esac
12879      link_all_deplibs=yes
12880      ;;
12881
12882    sunos4*)
12883      if test sequent = "$host_vendor"; then
12884	# Use $CC to link under sequent, because it throws in some extra .o
12885	# files that make .init and .fini sections work.
12886	archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
12887      else
12888	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
12889      fi
12890      hardcode_libdir_flag_spec='-L$libdir'
12891      hardcode_direct=yes
12892      hardcode_minus_L=yes
12893      hardcode_shlibpath_var=no
12894      ;;
12895
12896    sysv4)
12897      case $host_vendor in
12898	sni)
12899	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12900	  hardcode_direct=yes # is this really true???
12901	;;
12902	siemens)
12903	  ## LD is ld it makes a PLAMLIB
12904	  ## CC just makes a GrossModule.
12905	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
12906	  reload_cmds='$CC -r -o $output$reload_objs'
12907	  hardcode_direct=no
12908        ;;
12909	motorola)
12910	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12911	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
12912	;;
12913      esac
12914      runpath_var='LD_RUN_PATH'
12915      hardcode_shlibpath_var=no
12916      ;;
12917
12918    sysv4.3*)
12919      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12920      hardcode_shlibpath_var=no
12921      export_dynamic_flag_spec='-Bexport'
12922      ;;
12923
12924    sysv4*MP*)
12925      if test -d /usr/nec; then
12926	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12927	hardcode_shlibpath_var=no
12928	runpath_var=LD_RUN_PATH
12929	hardcode_runpath_var=yes
12930	ld_shlibs=yes
12931      fi
12932      ;;
12933
12934    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
12935      no_undefined_flag='$wl-z,text'
12936      archive_cmds_need_lc=no
12937      hardcode_shlibpath_var=no
12938      runpath_var='LD_RUN_PATH'
12939
12940      if test yes = "$GCC"; then
12941	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12942	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12943      else
12944	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12945	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12946      fi
12947      ;;
12948
12949    sysv5* | sco3.2v5* | sco5v6*)
12950      # Note: We CANNOT use -z defs as we might desire, because we do not
12951      # link with -lc, and that would cause any symbols used from libc to
12952      # always be unresolved, which means just about no library would
12953      # ever link correctly.  If we're not using GNU ld we use -z text
12954      # though, which does catch some bad symbols but isn't as heavy-handed
12955      # as -z defs.
12956      no_undefined_flag='$wl-z,text'
12957      allow_undefined_flag='$wl-z,nodefs'
12958      archive_cmds_need_lc=no
12959      hardcode_shlibpath_var=no
12960      hardcode_libdir_flag_spec='$wl-R,$libdir'
12961      hardcode_libdir_separator=':'
12962      link_all_deplibs=yes
12963      export_dynamic_flag_spec='$wl-Bexport'
12964      runpath_var='LD_RUN_PATH'
12965
12966      if test yes = "$GCC"; then
12967	archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12968	archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12969      else
12970	archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12971	archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
12972      fi
12973      ;;
12974
12975    uts4*)
12976      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
12977      hardcode_libdir_flag_spec='-L$libdir'
12978      hardcode_shlibpath_var=no
12979      ;;
12980
12981    *)
12982      ld_shlibs=no
12983      ;;
12984    esac
12985
12986    if test sni = "$host_vendor"; then
12987      case $host in
12988      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
12989	export_dynamic_flag_spec='$wl-Blargedynsym'
12990	;;
12991      esac
12992    fi
12993  fi
12994
12995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
12996printf "%s\n" "$ld_shlibs" >&6; }
12997test no = "$ld_shlibs" && can_build_shared=no
12998
12999with_gnu_ld=$with_gnu_ld
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015#
13016# Do we need to explicitly link libc?
13017#
13018case "x$archive_cmds_need_lc" in
13019x|xyes)
13020  # Assume -lc should be added
13021  archive_cmds_need_lc=yes
13022
13023  if test yes,yes = "$GCC,$enable_shared"; then
13024    case $archive_cmds in
13025    *'~'*)
13026      # FIXME: we may have to deal with multi-command sequences.
13027      ;;
13028    '$CC '*)
13029      # Test whether the compiler implicitly links with -lc since on some
13030      # systems, -lgcc has to come before -lc. If gcc already passes -lc
13031      # to ld, don't add -lc before -lgcc.
13032      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
13033printf %s "checking whether -lc should be explicitly linked in... " >&6; }
13034if test ${lt_cv_archive_cmds_need_lc+y}
13035then :
13036  printf %s "(cached) " >&6
13037else $as_nop
13038  $RM conftest*
13039	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13040
13041	if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
13042  (eval $ac_compile) 2>&5
13043  ac_status=$?
13044  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13045  test $ac_status = 0; } 2>conftest.err; then
13046	  soname=conftest
13047	  lib=conftest
13048	  libobjs=conftest.$ac_objext
13049	  deplibs=
13050	  wl=$lt_prog_compiler_wl
13051	  pic_flag=$lt_prog_compiler_pic
13052	  compiler_flags=-v
13053	  linker_flags=-v
13054	  verstring=
13055	  output_objdir=.
13056	  libname=conftest
13057	  lt_save_allow_undefined_flag=$allow_undefined_flag
13058	  allow_undefined_flag=
13059	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
13060  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
13061  ac_status=$?
13062  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13063  test $ac_status = 0; }
13064	  then
13065	    lt_cv_archive_cmds_need_lc=no
13066	  else
13067	    lt_cv_archive_cmds_need_lc=yes
13068	  fi
13069	  allow_undefined_flag=$lt_save_allow_undefined_flag
13070	else
13071	  cat conftest.err 1>&5
13072	fi
13073	$RM conftest*
13074
13075fi
13076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
13077printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
13078      archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
13079      ;;
13080    esac
13081  fi
13082  ;;
13083esac
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
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
13237printf %s "checking dynamic linker characteristics... " >&6; }
13238
13239if test yes = "$GCC"; then
13240  case $host_os in
13241    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
13242    *) lt_awk_arg='/^libraries:/' ;;
13243  esac
13244  case $host_os in
13245    mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
13246    *) lt_sed_strip_eq='s|=/|/|g' ;;
13247  esac
13248  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
13249  case $lt_search_path_spec in
13250  *\;*)
13251    # if the path contains ";" then we assume it to be the separator
13252    # otherwise default to the standard path separator (i.e. ":") - it is
13253    # assumed that no part of a normal pathname contains ";" but that should
13254    # okay in the real world where ";" in dirpaths is itself problematic.
13255    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
13256    ;;
13257  *)
13258    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
13259    ;;
13260  esac
13261  # Ok, now we have the path, separated by spaces, we can step through it
13262  # and add multilib dir if necessary...
13263  lt_tmp_lt_search_path_spec=
13264  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13265  # ...but if some path component already ends with the multilib dir we assume
13266  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
13267  case "$lt_multi_os_dir; $lt_search_path_spec " in
13268  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
13269    lt_multi_os_dir=
13270    ;;
13271  esac
13272  for lt_sys_path in $lt_search_path_spec; do
13273    if test -d "$lt_sys_path$lt_multi_os_dir"; then
13274      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
13275    elif test -n "$lt_multi_os_dir"; then
13276      test -d "$lt_sys_path" && \
13277	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13278    fi
13279  done
13280  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
13281BEGIN {RS = " "; FS = "/|\n";} {
13282  lt_foo = "";
13283  lt_count = 0;
13284  for (lt_i = NF; lt_i > 0; lt_i--) {
13285    if ($lt_i != "" && $lt_i != ".") {
13286      if ($lt_i == "..") {
13287        lt_count++;
13288      } else {
13289        if (lt_count == 0) {
13290          lt_foo = "/" $lt_i lt_foo;
13291        } else {
13292          lt_count--;
13293        }
13294      }
13295    }
13296  }
13297  if (lt_foo != "") { lt_freq[lt_foo]++; }
13298  if (lt_freq[lt_foo] == 1) { print lt_foo; }
13299}'`
13300  # AWK program above erroneously prepends '/' to C:/dos/paths
13301  # for these hosts.
13302  case $host_os in
13303    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
13304      $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
13305  esac
13306  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
13307else
13308  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13309fi
13310library_names_spec=
13311libname_spec='lib$name'
13312soname_spec=
13313shrext_cmds=.so
13314postinstall_cmds=
13315postuninstall_cmds=
13316finish_cmds=
13317finish_eval=
13318shlibpath_var=
13319shlibpath_overrides_runpath=unknown
13320version_type=none
13321dynamic_linker="$host_os ld.so"
13322sys_lib_dlsearch_path_spec="/lib /usr/lib"
13323need_lib_prefix=unknown
13324hardcode_into_libs=no
13325
13326# when you set need_version to no, make sure it does not cause -set_version
13327# flags to be left without arguments
13328need_version=unknown
13329
13330
13331
13332case $host_os in
13333aix3*)
13334  version_type=linux # correct to gnu/linux during the next big refactor
13335  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
13336  shlibpath_var=LIBPATH
13337
13338  # AIX 3 has no versioning support, so we append a major version to the name.
13339  soname_spec='$libname$release$shared_ext$major'
13340  ;;
13341
13342aix[4-9]*)
13343  version_type=linux # correct to gnu/linux during the next big refactor
13344  need_lib_prefix=no
13345  need_version=no
13346  hardcode_into_libs=yes
13347  if test ia64 = "$host_cpu"; then
13348    # AIX 5 supports IA64
13349    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
13350    shlibpath_var=LD_LIBRARY_PATH
13351  else
13352    # With GCC up to 2.95.x, collect2 would create an import file
13353    # for dependence libraries.  The import file would start with
13354    # the line '#! .'.  This would cause the generated library to
13355    # depend on '.', always an invalid library.  This was fixed in
13356    # development snapshots of GCC prior to 3.0.
13357    case $host_os in
13358      aix4 | aix4.[01] | aix4.[01].*)
13359      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
13360	   echo ' yes '
13361	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
13362	:
13363      else
13364	can_build_shared=no
13365      fi
13366      ;;
13367    esac
13368    # Using Import Files as archive members, it is possible to support
13369    # filename-based versioning of shared library archives on AIX. While
13370    # this would work for both with and without runtime linking, it will
13371    # prevent static linking of such archives. So we do filename-based
13372    # shared library versioning with .so extension only, which is used
13373    # when both runtime linking and shared linking is enabled.
13374    # Unfortunately, runtime linking may impact performance, so we do
13375    # not want this to be the default eventually. Also, we use the
13376    # versioned .so libs for executables only if there is the -brtl
13377    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
13378    # To allow for filename-based versioning support, we need to create
13379    # libNAME.so.V as an archive file, containing:
13380    # *) an Import File, referring to the versioned filename of the
13381    #    archive as well as the shared archive member, telling the
13382    #    bitwidth (32 or 64) of that shared object, and providing the
13383    #    list of exported symbols of that shared object, eventually
13384    #    decorated with the 'weak' keyword
13385    # *) the shared object with the F_LOADONLY flag set, to really avoid
13386    #    it being seen by the linker.
13387    # At run time we better use the real file rather than another symlink,
13388    # but for link time we create the symlink libNAME.so -> libNAME.so.V
13389
13390    case $with_aix_soname,$aix_use_runtimelinking in
13391    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
13392    # soname into executable. Probably we can add versioning support to
13393    # collect2, so additional links can be useful in future.
13394    aix,yes) # traditional libtool
13395      dynamic_linker='AIX unversionable lib.so'
13396      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
13397      # instead of lib<name>.a to let people know that these are not
13398      # typical AIX shared libraries.
13399      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13400      ;;
13401    aix,no) # traditional AIX only
13402      dynamic_linker='AIX lib.a(lib.so.V)'
13403      # We preserve .a as extension for shared libraries through AIX4.2
13404      # and later when we are not doing run time linking.
13405      library_names_spec='$libname$release.a $libname.a'
13406      soname_spec='$libname$release$shared_ext$major'
13407      ;;
13408    svr4,*) # full svr4 only
13409      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
13410      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13411      # We do not specify a path in Import Files, so LIBPATH fires.
13412      shlibpath_overrides_runpath=yes
13413      ;;
13414    *,yes) # both, prefer svr4
13415      dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
13416      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
13417      # unpreferred sharedlib libNAME.a needs extra handling
13418      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"'
13419      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"'
13420      # We do not specify a path in Import Files, so LIBPATH fires.
13421      shlibpath_overrides_runpath=yes
13422      ;;
13423    *,no) # both, prefer aix
13424      dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
13425      library_names_spec='$libname$release.a $libname.a'
13426      soname_spec='$libname$release$shared_ext$major'
13427      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
13428      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)'
13429      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"'
13430      ;;
13431    esac
13432    shlibpath_var=LIBPATH
13433  fi
13434  ;;
13435
13436amigaos*)
13437  case $host_cpu in
13438  powerpc)
13439    # Since July 2007 AmigaOS4 officially supports .so libraries.
13440    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
13441    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13442    ;;
13443  m68k)
13444    library_names_spec='$libname.ixlibrary $libname.a'
13445    # Create ${libname}_ixlibrary.a entries in /sys/libs.
13446    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'
13447    ;;
13448  esac
13449  ;;
13450
13451beos*)
13452  library_names_spec='$libname$shared_ext'
13453  dynamic_linker="$host_os ld.so"
13454  shlibpath_var=LIBRARY_PATH
13455  ;;
13456
13457bsdi[45]*)
13458  version_type=linux # correct to gnu/linux during the next big refactor
13459  need_version=no
13460  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13461  soname_spec='$libname$release$shared_ext$major'
13462  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
13463  shlibpath_var=LD_LIBRARY_PATH
13464  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
13465  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
13466  # the default ld.so.conf also contains /usr/contrib/lib and
13467  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
13468  # libtool to hard-code these into programs
13469  ;;
13470
13471cygwin* | mingw* | pw32* | cegcc*)
13472  version_type=windows
13473  shrext_cmds=.dll
13474  need_version=no
13475  need_lib_prefix=no
13476
13477  case $GCC,$cc_basename in
13478  yes,*)
13479    # gcc
13480    library_names_spec='$libname.dll.a'
13481    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13482    postinstall_cmds='base_file=`basename \$file`~
13483      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13484      dldir=$destdir/`dirname \$dlpath`~
13485      test -d \$dldir || mkdir -p \$dldir~
13486      $install_prog $dir/$dlname \$dldir/$dlname~
13487      chmod a+x \$dldir/$dlname~
13488      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13489        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13490      fi'
13491    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13492      dlpath=$dir/\$dldll~
13493       $RM \$dlpath'
13494    shlibpath_overrides_runpath=yes
13495
13496    case $host_os in
13497    cygwin*)
13498      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
13499      soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13500
13501      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
13502      ;;
13503    mingw* | cegcc*)
13504      # MinGW DLLs use traditional 'lib' prefix
13505      soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13506      ;;
13507    pw32*)
13508      # pw32 DLLs use 'pw' prefix rather than 'lib'
13509      library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13510      ;;
13511    esac
13512    dynamic_linker='Win32 ld.exe'
13513    ;;
13514
13515  *,cl*)
13516    # Native MSVC
13517    libname_spec='$name'
13518    soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
13519    library_names_spec='$libname.dll.lib'
13520
13521    case $build_os in
13522    mingw*)
13523      sys_lib_search_path_spec=
13524      lt_save_ifs=$IFS
13525      IFS=';'
13526      for lt_path in $LIB
13527      do
13528        IFS=$lt_save_ifs
13529        # Let DOS variable expansion print the short 8.3 style file name.
13530        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
13531        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
13532      done
13533      IFS=$lt_save_ifs
13534      # Convert to MSYS style.
13535      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
13536      ;;
13537    cygwin*)
13538      # Convert to unix form, then to dos form, then back to unix form
13539      # but this time dos style (no spaces!) so that the unix form looks
13540      # like /cygdrive/c/PROGRA~1:/cygdr...
13541      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
13542      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
13543      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13544      ;;
13545    *)
13546      sys_lib_search_path_spec=$LIB
13547      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
13548        # It is most probably a Windows format PATH.
13549        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
13550      else
13551        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
13552      fi
13553      # FIXME: find the short name or the path components, as spaces are
13554      # common. (e.g. "Program Files" -> "PROGRA~1")
13555      ;;
13556    esac
13557
13558    # DLL is installed to $(libdir)/../bin by postinstall_cmds
13559    postinstall_cmds='base_file=`basename \$file`~
13560      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
13561      dldir=$destdir/`dirname \$dlpath`~
13562      test -d \$dldir || mkdir -p \$dldir~
13563      $install_prog $dir/$dlname \$dldir/$dlname'
13564    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
13565      dlpath=$dir/\$dldll~
13566       $RM \$dlpath'
13567    shlibpath_overrides_runpath=yes
13568    dynamic_linker='Win32 link.exe'
13569    ;;
13570
13571  *)
13572    # Assume MSVC wrapper
13573    library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
13574    dynamic_linker='Win32 ld.exe'
13575    ;;
13576  esac
13577  # FIXME: first we should search . and the directory the executable is in
13578  shlibpath_var=PATH
13579  ;;
13580
13581darwin* | rhapsody*)
13582  dynamic_linker="$host_os dyld"
13583  version_type=darwin
13584  need_lib_prefix=no
13585  need_version=no
13586  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
13587  soname_spec='$libname$release$major$shared_ext'
13588  shlibpath_overrides_runpath=yes
13589  shlibpath_var=DYLD_LIBRARY_PATH
13590  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
13591
13592  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
13593  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
13594  ;;
13595
13596dgux*)
13597  version_type=linux # correct to gnu/linux during the next big refactor
13598  need_lib_prefix=no
13599  need_version=no
13600  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13601  soname_spec='$libname$release$shared_ext$major'
13602  shlibpath_var=LD_LIBRARY_PATH
13603  ;;
13604
13605freebsd* | dragonfly*)
13606  # DragonFly does not have aout.  When/if they implement a new
13607  # versioning mechanism, adjust this.
13608  if test -x /usr/bin/objformat; then
13609    objformat=`/usr/bin/objformat`
13610  else
13611    case $host_os in
13612    freebsd[23].*) objformat=aout ;;
13613    *) objformat=elf ;;
13614    esac
13615  fi
13616  version_type=freebsd-$objformat
13617  case $version_type in
13618    freebsd-elf*)
13619      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13620      soname_spec='$libname$release$shared_ext$major'
13621      need_version=no
13622      need_lib_prefix=no
13623      ;;
13624    freebsd-*)
13625      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13626      need_version=yes
13627      ;;
13628  esac
13629  shlibpath_var=LD_LIBRARY_PATH
13630  case $host_os in
13631  freebsd2.*)
13632    shlibpath_overrides_runpath=yes
13633    ;;
13634  freebsd3.[01]* | freebsdelf3.[01]*)
13635    shlibpath_overrides_runpath=yes
13636    hardcode_into_libs=yes
13637    ;;
13638  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
13639  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
13640    shlibpath_overrides_runpath=no
13641    hardcode_into_libs=yes
13642    ;;
13643  *) # from 4.6 on, and DragonFly
13644    shlibpath_overrides_runpath=yes
13645    hardcode_into_libs=yes
13646    ;;
13647  esac
13648  ;;
13649
13650haiku*)
13651  version_type=linux # correct to gnu/linux during the next big refactor
13652  need_lib_prefix=no
13653  need_version=no
13654  dynamic_linker="$host_os runtime_loader"
13655  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13656  soname_spec='$libname$release$shared_ext$major'
13657  shlibpath_var=LIBRARY_PATH
13658  shlibpath_overrides_runpath=no
13659  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
13660  hardcode_into_libs=yes
13661  ;;
13662
13663hpux9* | hpux10* | hpux11*)
13664  # Give a soname corresponding to the major version so that dld.sl refuses to
13665  # link against other versions.
13666  version_type=sunos
13667  need_lib_prefix=no
13668  need_version=no
13669  case $host_cpu in
13670  ia64*)
13671    shrext_cmds='.so'
13672    hardcode_into_libs=yes
13673    dynamic_linker="$host_os dld.so"
13674    shlibpath_var=LD_LIBRARY_PATH
13675    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13676    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13677    soname_spec='$libname$release$shared_ext$major'
13678    if test 32 = "$HPUX_IA64_MODE"; then
13679      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
13680      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
13681    else
13682      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
13683      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
13684    fi
13685    ;;
13686  hppa*64*)
13687    shrext_cmds='.sl'
13688    hardcode_into_libs=yes
13689    dynamic_linker="$host_os dld.sl"
13690    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
13691    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
13692    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13693    soname_spec='$libname$release$shared_ext$major'
13694    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
13695    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13696    ;;
13697  *)
13698    shrext_cmds='.sl'
13699    dynamic_linker="$host_os dld.sl"
13700    shlibpath_var=SHLIB_PATH
13701    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
13702    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13703    soname_spec='$libname$release$shared_ext$major'
13704    ;;
13705  esac
13706  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
13707  postinstall_cmds='chmod 555 $lib'
13708  # or fails outright, so override atomically:
13709  install_override_mode=555
13710  ;;
13711
13712interix[3-9]*)
13713  version_type=linux # correct to gnu/linux during the next big refactor
13714  need_lib_prefix=no
13715  need_version=no
13716  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13717  soname_spec='$libname$release$shared_ext$major'
13718  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
13719  shlibpath_var=LD_LIBRARY_PATH
13720  shlibpath_overrides_runpath=no
13721  hardcode_into_libs=yes
13722  ;;
13723
13724irix5* | irix6* | nonstopux*)
13725  case $host_os in
13726    nonstopux*) version_type=nonstopux ;;
13727    *)
13728	if test yes = "$lt_cv_prog_gnu_ld"; then
13729		version_type=linux # correct to gnu/linux during the next big refactor
13730	else
13731		version_type=irix
13732	fi ;;
13733  esac
13734  need_lib_prefix=no
13735  need_version=no
13736  soname_spec='$libname$release$shared_ext$major'
13737  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
13738  case $host_os in
13739  irix5* | nonstopux*)
13740    libsuff= shlibsuff=
13741    ;;
13742  *)
13743    case $LD in # libtool.m4 will add one of these switches to LD
13744    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
13745      libsuff= shlibsuff= libmagic=32-bit;;
13746    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
13747      libsuff=32 shlibsuff=N32 libmagic=N32;;
13748    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
13749      libsuff=64 shlibsuff=64 libmagic=64-bit;;
13750    *) libsuff= shlibsuff= libmagic=never-match;;
13751    esac
13752    ;;
13753  esac
13754  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
13755  shlibpath_overrides_runpath=no
13756  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
13757  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
13758  hardcode_into_libs=yes
13759  ;;
13760
13761# No shared lib support for Linux oldld, aout, or coff.
13762linux*oldld* | linux*aout* | linux*coff*)
13763  dynamic_linker=no
13764  ;;
13765
13766linux*android*)
13767  version_type=none # Android doesn't support versioned libraries.
13768  need_lib_prefix=no
13769  need_version=no
13770  library_names_spec='$libname$release$shared_ext'
13771  soname_spec='$libname$release$shared_ext'
13772  finish_cmds=
13773  shlibpath_var=LD_LIBRARY_PATH
13774  shlibpath_overrides_runpath=yes
13775
13776  # This implies no fast_install, which is unacceptable.
13777  # Some rework will be needed to allow for fast_install
13778  # before this can be enabled.
13779  hardcode_into_libs=yes
13780
13781  dynamic_linker='Android linker'
13782  # Don't embed -rpath directories since the linker doesn't support them.
13783  hardcode_libdir_flag_spec='-L$libdir'
13784  ;;
13785
13786# This must be glibc/ELF.
13787linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13788  version_type=linux # correct to gnu/linux during the next big refactor
13789  need_lib_prefix=no
13790  need_version=no
13791  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13792  soname_spec='$libname$release$shared_ext$major'
13793  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
13794  shlibpath_var=LD_LIBRARY_PATH
13795  shlibpath_overrides_runpath=no
13796
13797  # Some binutils ld are patched to set DT_RUNPATH
13798  if test ${lt_cv_shlibpath_overrides_runpath+y}
13799then :
13800  printf %s "(cached) " >&6
13801else $as_nop
13802  lt_cv_shlibpath_overrides_runpath=no
13803    save_LDFLAGS=$LDFLAGS
13804    save_libdir=$libdir
13805    eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
13806	 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
13807    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13808/* end confdefs.h.  */
13809
13810int
13811main (void)
13812{
13813
13814  ;
13815  return 0;
13816}
13817_ACEOF
13818if ac_fn_c_try_link "$LINENO"
13819then :
13820  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
13821then :
13822  lt_cv_shlibpath_overrides_runpath=yes
13823fi
13824fi
13825rm -f core conftest.err conftest.$ac_objext conftest.beam \
13826    conftest$ac_exeext conftest.$ac_ext
13827    LDFLAGS=$save_LDFLAGS
13828    libdir=$save_libdir
13829
13830fi
13831
13832  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
13833
13834  # This implies no fast_install, which is unacceptable.
13835  # Some rework will be needed to allow for fast_install
13836  # before this can be enabled.
13837  hardcode_into_libs=yes
13838
13839  # Ideally, we could use ldconfig to report *all* directores which are
13840  # searched for libraries, however this is still not possible.  Aside from not
13841  # being certain /sbin/ldconfig is available, command
13842  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
13843  # even though it is searched at run-time.  Try to do the best guess by
13844  # appending ld.so.conf contents (and includes) to the search path.
13845  if test -f /etc/ld.so.conf; then
13846    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' ' '`
13847    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
13848  fi
13849
13850  # We used to test for /lib/ld.so.1 and disable shared libraries on
13851  # powerpc, because MkLinux only supported shared libraries with the
13852  # GNU dynamic linker.  Since this was broken with cross compilers,
13853  # most powerpc-linux boxes support dynamic linking these days and
13854  # people can always --disable-shared, the test was removed, and we
13855  # assume the GNU/Linux dynamic linker is in use.
13856  dynamic_linker='GNU/Linux ld.so'
13857  ;;
13858
13859netbsd*)
13860  version_type=sunos
13861  need_lib_prefix=no
13862  need_version=no
13863  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
13864    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13865    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13866    dynamic_linker='NetBSD (a.out) ld.so'
13867  else
13868    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13869    soname_spec='$libname$release$shared_ext$major'
13870    dynamic_linker='NetBSD ld.elf_so'
13871  fi
13872  shlibpath_var=LD_LIBRARY_PATH
13873  shlibpath_overrides_runpath=yes
13874  hardcode_into_libs=yes
13875  ;;
13876
13877newsos6)
13878  version_type=linux # correct to gnu/linux during the next big refactor
13879  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13880  shlibpath_var=LD_LIBRARY_PATH
13881  shlibpath_overrides_runpath=yes
13882  ;;
13883
13884*nto* | *qnx*)
13885  version_type=qnx
13886  need_lib_prefix=no
13887  need_version=no
13888  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13889  soname_spec='$libname$release$shared_ext$major'
13890  shlibpath_var=LD_LIBRARY_PATH
13891  shlibpath_overrides_runpath=no
13892  hardcode_into_libs=yes
13893  dynamic_linker='ldqnx.so'
13894  ;;
13895
13896openbsd* | bitrig*)
13897  version_type=sunos
13898  sys_lib_dlsearch_path_spec=/usr/lib
13899  need_lib_prefix=no
13900  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
13901    need_version=no
13902  else
13903    need_version=yes
13904  fi
13905  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13906  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
13907  shlibpath_var=LD_LIBRARY_PATH
13908  shlibpath_overrides_runpath=yes
13909  ;;
13910
13911os2*)
13912  libname_spec='$name'
13913  version_type=windows
13914  shrext_cmds=.dll
13915  need_version=no
13916  need_lib_prefix=no
13917  # OS/2 can only load a DLL with a base name of 8 characters or less.
13918  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
13919    v=$($ECHO $release$versuffix | tr -d .-);
13920    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
13921    $ECHO $n$v`$shared_ext'
13922  library_names_spec='${libname}_dll.$libext'
13923  dynamic_linker='OS/2 ld.exe'
13924  shlibpath_var=BEGINLIBPATH
13925  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13926  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13927  postinstall_cmds='base_file=`basename \$file`~
13928    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
13929    dldir=$destdir/`dirname \$dlpath`~
13930    test -d \$dldir || mkdir -p \$dldir~
13931    $install_prog $dir/$dlname \$dldir/$dlname~
13932    chmod a+x \$dldir/$dlname~
13933    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
13934      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
13935    fi'
13936  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
13937    dlpath=$dir/\$dldll~
13938    $RM \$dlpath'
13939  ;;
13940
13941osf3* | osf4* | osf5*)
13942  version_type=osf
13943  need_lib_prefix=no
13944  need_version=no
13945  soname_spec='$libname$release$shared_ext$major'
13946  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13947  shlibpath_var=LD_LIBRARY_PATH
13948  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
13949  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
13950  ;;
13951
13952rdos*)
13953  dynamic_linker=no
13954  ;;
13955
13956solaris*)
13957  version_type=linux # correct to gnu/linux during the next big refactor
13958  need_lib_prefix=no
13959  need_version=no
13960  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13961  soname_spec='$libname$release$shared_ext$major'
13962  shlibpath_var=LD_LIBRARY_PATH
13963  shlibpath_overrides_runpath=yes
13964  hardcode_into_libs=yes
13965  # ldd complains unless libraries are executable
13966  postinstall_cmds='chmod +x $lib'
13967  ;;
13968
13969sunos4*)
13970  version_type=sunos
13971  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
13972  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
13973  shlibpath_var=LD_LIBRARY_PATH
13974  shlibpath_overrides_runpath=yes
13975  if test yes = "$with_gnu_ld"; then
13976    need_lib_prefix=no
13977  fi
13978  need_version=yes
13979  ;;
13980
13981sysv4 | sysv4.3*)
13982  version_type=linux # correct to gnu/linux during the next big refactor
13983  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13984  soname_spec='$libname$release$shared_ext$major'
13985  shlibpath_var=LD_LIBRARY_PATH
13986  case $host_vendor in
13987    sni)
13988      shlibpath_overrides_runpath=no
13989      need_lib_prefix=no
13990      runpath_var=LD_RUN_PATH
13991      ;;
13992    siemens)
13993      need_lib_prefix=no
13994      ;;
13995    motorola)
13996      need_lib_prefix=no
13997      need_version=no
13998      shlibpath_overrides_runpath=no
13999      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
14000      ;;
14001  esac
14002  ;;
14003
14004sysv4*MP*)
14005  if test -d /usr/nec; then
14006    version_type=linux # correct to gnu/linux during the next big refactor
14007    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
14008    soname_spec='$libname$shared_ext.$major'
14009    shlibpath_var=LD_LIBRARY_PATH
14010  fi
14011  ;;
14012
14013sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
14014  version_type=sco
14015  need_lib_prefix=no
14016  need_version=no
14017  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
14018  soname_spec='$libname$release$shared_ext$major'
14019  shlibpath_var=LD_LIBRARY_PATH
14020  shlibpath_overrides_runpath=yes
14021  hardcode_into_libs=yes
14022  if test yes = "$with_gnu_ld"; then
14023    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
14024  else
14025    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
14026    case $host_os in
14027      sco3.2v5*)
14028        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
14029	;;
14030    esac
14031  fi
14032  sys_lib_dlsearch_path_spec='/usr/lib'
14033  ;;
14034
14035tpf*)
14036  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
14037  version_type=linux # correct to gnu/linux during the next big refactor
14038  need_lib_prefix=no
14039  need_version=no
14040  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14041  shlibpath_var=LD_LIBRARY_PATH
14042  shlibpath_overrides_runpath=no
14043  hardcode_into_libs=yes
14044  ;;
14045
14046uts4*)
14047  version_type=linux # correct to gnu/linux during the next big refactor
14048  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
14049  soname_spec='$libname$release$shared_ext$major'
14050  shlibpath_var=LD_LIBRARY_PATH
14051  ;;
14052
14053*)
14054  dynamic_linker=no
14055  ;;
14056esac
14057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
14058printf "%s\n" "$dynamic_linker" >&6; }
14059test no = "$dynamic_linker" && can_build_shared=no
14060
14061variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
14062if test yes = "$GCC"; then
14063  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
14064fi
14065
14066if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
14067  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
14068fi
14069
14070if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
14071  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
14072fi
14073
14074# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
14075configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
14076
14077# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
14078func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
14079
14080# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
14081configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
14180printf %s "checking how to hardcode library paths into programs... " >&6; }
14181hardcode_action=
14182if test -n "$hardcode_libdir_flag_spec" ||
14183   test -n "$runpath_var" ||
14184   test yes = "$hardcode_automatic"; then
14185
14186  # We can hardcode non-existent directories.
14187  if test no != "$hardcode_direct" &&
14188     # If the only mechanism to avoid hardcoding is shlibpath_var, we
14189     # have to relink, otherwise we might link with an installed library
14190     # when we should be linking with a yet-to-be-installed one
14191     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
14192     test no != "$hardcode_minus_L"; then
14193    # Linking always hardcodes the temporary library directory.
14194    hardcode_action=relink
14195  else
14196    # We can link without hardcoding, and we can hardcode nonexisting dirs.
14197    hardcode_action=immediate
14198  fi
14199else
14200  # We cannot hardcode anything, or else we can only hardcode existing
14201  # directories.
14202  hardcode_action=unsupported
14203fi
14204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
14205printf "%s\n" "$hardcode_action" >&6; }
14206
14207if test relink = "$hardcode_action" ||
14208   test yes = "$inherit_rpath"; then
14209  # Fast installation is not supported
14210  enable_fast_install=no
14211elif test yes = "$shlibpath_overrides_runpath" ||
14212     test no = "$enable_shared"; then
14213  # Fast installation is not necessary
14214  enable_fast_install=needless
14215fi
14216
14217
14218
14219
14220
14221
14222  if test yes != "$enable_dlopen"; then
14223  enable_dlopen=unknown
14224  enable_dlopen_self=unknown
14225  enable_dlopen_self_static=unknown
14226else
14227  lt_cv_dlopen=no
14228  lt_cv_dlopen_libs=
14229
14230  case $host_os in
14231  beos*)
14232    lt_cv_dlopen=load_add_on
14233    lt_cv_dlopen_libs=
14234    lt_cv_dlopen_self=yes
14235    ;;
14236
14237  mingw* | pw32* | cegcc*)
14238    lt_cv_dlopen=LoadLibrary
14239    lt_cv_dlopen_libs=
14240    ;;
14241
14242  cygwin*)
14243    lt_cv_dlopen=dlopen
14244    lt_cv_dlopen_libs=
14245    ;;
14246
14247  darwin*)
14248    # if libdl is installed we need to link against it
14249    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14250printf %s "checking for dlopen in -ldl... " >&6; }
14251if test ${ac_cv_lib_dl_dlopen+y}
14252then :
14253  printf %s "(cached) " >&6
14254else $as_nop
14255  ac_check_lib_save_LIBS=$LIBS
14256LIBS="-ldl  $LIBS"
14257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14258/* end confdefs.h.  */
14259
14260/* Override any GCC internal prototype to avoid an error.
14261   Use char because int might match the return type of a GCC
14262   builtin and then its argument prototype would still apply.  */
14263char dlopen ();
14264int
14265main (void)
14266{
14267return dlopen ();
14268  ;
14269  return 0;
14270}
14271_ACEOF
14272if ac_fn_c_try_link "$LINENO"
14273then :
14274  ac_cv_lib_dl_dlopen=yes
14275else $as_nop
14276  ac_cv_lib_dl_dlopen=no
14277fi
14278rm -f core conftest.err conftest.$ac_objext conftest.beam \
14279    conftest$ac_exeext conftest.$ac_ext
14280LIBS=$ac_check_lib_save_LIBS
14281fi
14282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14283printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
14284if test "x$ac_cv_lib_dl_dlopen" = xyes
14285then :
14286  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14287else $as_nop
14288
14289    lt_cv_dlopen=dyld
14290    lt_cv_dlopen_libs=
14291    lt_cv_dlopen_self=yes
14292
14293fi
14294
14295    ;;
14296
14297  tpf*)
14298    # Don't try to run any link tests for TPF.  We know it's impossible
14299    # because TPF is a cross-compiler, and we know how we open DSOs.
14300    lt_cv_dlopen=dlopen
14301    lt_cv_dlopen_libs=
14302    lt_cv_dlopen_self=no
14303    ;;
14304
14305  *)
14306    ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
14307if test "x$ac_cv_func_shl_load" = xyes
14308then :
14309  lt_cv_dlopen=shl_load
14310else $as_nop
14311  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
14312printf %s "checking for shl_load in -ldld... " >&6; }
14313if test ${ac_cv_lib_dld_shl_load+y}
14314then :
14315  printf %s "(cached) " >&6
14316else $as_nop
14317  ac_check_lib_save_LIBS=$LIBS
14318LIBS="-ldld  $LIBS"
14319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14320/* end confdefs.h.  */
14321
14322/* Override any GCC internal prototype to avoid an error.
14323   Use char because int might match the return type of a GCC
14324   builtin and then its argument prototype would still apply.  */
14325char shl_load ();
14326int
14327main (void)
14328{
14329return shl_load ();
14330  ;
14331  return 0;
14332}
14333_ACEOF
14334if ac_fn_c_try_link "$LINENO"
14335then :
14336  ac_cv_lib_dld_shl_load=yes
14337else $as_nop
14338  ac_cv_lib_dld_shl_load=no
14339fi
14340rm -f core conftest.err conftest.$ac_objext conftest.beam \
14341    conftest$ac_exeext conftest.$ac_ext
14342LIBS=$ac_check_lib_save_LIBS
14343fi
14344{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
14345printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
14346if test "x$ac_cv_lib_dld_shl_load" = xyes
14347then :
14348  lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
14349else $as_nop
14350  ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
14351if test "x$ac_cv_func_dlopen" = xyes
14352then :
14353  lt_cv_dlopen=dlopen
14354else $as_nop
14355  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14356printf %s "checking for dlopen in -ldl... " >&6; }
14357if test ${ac_cv_lib_dl_dlopen+y}
14358then :
14359  printf %s "(cached) " >&6
14360else $as_nop
14361  ac_check_lib_save_LIBS=$LIBS
14362LIBS="-ldl  $LIBS"
14363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14364/* end confdefs.h.  */
14365
14366/* Override any GCC internal prototype to avoid an error.
14367   Use char because int might match the return type of a GCC
14368   builtin and then its argument prototype would still apply.  */
14369char dlopen ();
14370int
14371main (void)
14372{
14373return dlopen ();
14374  ;
14375  return 0;
14376}
14377_ACEOF
14378if ac_fn_c_try_link "$LINENO"
14379then :
14380  ac_cv_lib_dl_dlopen=yes
14381else $as_nop
14382  ac_cv_lib_dl_dlopen=no
14383fi
14384rm -f core conftest.err conftest.$ac_objext conftest.beam \
14385    conftest$ac_exeext conftest.$ac_ext
14386LIBS=$ac_check_lib_save_LIBS
14387fi
14388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14389printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
14390if test "x$ac_cv_lib_dl_dlopen" = xyes
14391then :
14392  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
14393else $as_nop
14394  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
14395printf %s "checking for dlopen in -lsvld... " >&6; }
14396if test ${ac_cv_lib_svld_dlopen+y}
14397then :
14398  printf %s "(cached) " >&6
14399else $as_nop
14400  ac_check_lib_save_LIBS=$LIBS
14401LIBS="-lsvld  $LIBS"
14402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14403/* end confdefs.h.  */
14404
14405/* Override any GCC internal prototype to avoid an error.
14406   Use char because int might match the return type of a GCC
14407   builtin and then its argument prototype would still apply.  */
14408char dlopen ();
14409int
14410main (void)
14411{
14412return dlopen ();
14413  ;
14414  return 0;
14415}
14416_ACEOF
14417if ac_fn_c_try_link "$LINENO"
14418then :
14419  ac_cv_lib_svld_dlopen=yes
14420else $as_nop
14421  ac_cv_lib_svld_dlopen=no
14422fi
14423rm -f core conftest.err conftest.$ac_objext conftest.beam \
14424    conftest$ac_exeext conftest.$ac_ext
14425LIBS=$ac_check_lib_save_LIBS
14426fi
14427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
14428printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
14429if test "x$ac_cv_lib_svld_dlopen" = xyes
14430then :
14431  lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
14432else $as_nop
14433  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
14434printf %s "checking for dld_link in -ldld... " >&6; }
14435if test ${ac_cv_lib_dld_dld_link+y}
14436then :
14437  printf %s "(cached) " >&6
14438else $as_nop
14439  ac_check_lib_save_LIBS=$LIBS
14440LIBS="-ldld  $LIBS"
14441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14442/* end confdefs.h.  */
14443
14444/* Override any GCC internal prototype to avoid an error.
14445   Use char because int might match the return type of a GCC
14446   builtin and then its argument prototype would still apply.  */
14447char dld_link ();
14448int
14449main (void)
14450{
14451return dld_link ();
14452  ;
14453  return 0;
14454}
14455_ACEOF
14456if ac_fn_c_try_link "$LINENO"
14457then :
14458  ac_cv_lib_dld_dld_link=yes
14459else $as_nop
14460  ac_cv_lib_dld_dld_link=no
14461fi
14462rm -f core conftest.err conftest.$ac_objext conftest.beam \
14463    conftest$ac_exeext conftest.$ac_ext
14464LIBS=$ac_check_lib_save_LIBS
14465fi
14466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
14467printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
14468if test "x$ac_cv_lib_dld_dld_link" = xyes
14469then :
14470  lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
14471fi
14472
14473
14474fi
14475
14476
14477fi
14478
14479
14480fi
14481
14482
14483fi
14484
14485
14486fi
14487
14488    ;;
14489  esac
14490
14491  if test no = "$lt_cv_dlopen"; then
14492    enable_dlopen=no
14493  else
14494    enable_dlopen=yes
14495  fi
14496
14497  case $lt_cv_dlopen in
14498  dlopen)
14499    save_CPPFLAGS=$CPPFLAGS
14500    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
14501
14502    save_LDFLAGS=$LDFLAGS
14503    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
14504
14505    save_LIBS=$LIBS
14506    LIBS="$lt_cv_dlopen_libs $LIBS"
14507
14508    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
14509printf %s "checking whether a program can dlopen itself... " >&6; }
14510if test ${lt_cv_dlopen_self+y}
14511then :
14512  printf %s "(cached) " >&6
14513else $as_nop
14514  	  if test yes = "$cross_compiling"; then :
14515  lt_cv_dlopen_self=cross
14516else
14517  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14518  lt_status=$lt_dlunknown
14519  cat > conftest.$ac_ext <<_LT_EOF
14520#line $LINENO "configure"
14521#include "confdefs.h"
14522
14523#if HAVE_DLFCN_H
14524#include <dlfcn.h>
14525#endif
14526
14527#include <stdio.h>
14528
14529#ifdef RTLD_GLOBAL
14530#  define LT_DLGLOBAL		RTLD_GLOBAL
14531#else
14532#  ifdef DL_GLOBAL
14533#    define LT_DLGLOBAL		DL_GLOBAL
14534#  else
14535#    define LT_DLGLOBAL		0
14536#  endif
14537#endif
14538
14539/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14540   find out it does not work in some platform. */
14541#ifndef LT_DLLAZY_OR_NOW
14542#  ifdef RTLD_LAZY
14543#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14544#  else
14545#    ifdef DL_LAZY
14546#      define LT_DLLAZY_OR_NOW		DL_LAZY
14547#    else
14548#      ifdef RTLD_NOW
14549#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14550#      else
14551#        ifdef DL_NOW
14552#          define LT_DLLAZY_OR_NOW	DL_NOW
14553#        else
14554#          define LT_DLLAZY_OR_NOW	0
14555#        endif
14556#      endif
14557#    endif
14558#  endif
14559#endif
14560
14561/* When -fvisibility=hidden is used, assume the code has been annotated
14562   correspondingly for the symbols needed.  */
14563#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14564int fnord () __attribute__((visibility("default")));
14565#endif
14566
14567int fnord () { return 42; }
14568int main ()
14569{
14570  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14571  int status = $lt_dlunknown;
14572
14573  if (self)
14574    {
14575      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14576      else
14577        {
14578	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14579          else puts (dlerror ());
14580	}
14581      /* dlclose (self); */
14582    }
14583  else
14584    puts (dlerror ());
14585
14586  return status;
14587}
14588_LT_EOF
14589  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14590  (eval $ac_link) 2>&5
14591  ac_status=$?
14592  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14593  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14594    (./conftest; exit; ) >&5 2>/dev/null
14595    lt_status=$?
14596    case x$lt_status in
14597      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14598      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14599      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14600    esac
14601  else :
14602    # compilation failed
14603    lt_cv_dlopen_self=no
14604  fi
14605fi
14606rm -fr conftest*
14607
14608
14609fi
14610{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14611printf "%s\n" "$lt_cv_dlopen_self" >&6; }
14612
14613    if test yes = "$lt_cv_dlopen_self"; then
14614      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14615      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14616printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
14617if test ${lt_cv_dlopen_self_static+y}
14618then :
14619  printf %s "(cached) " >&6
14620else $as_nop
14621  	  if test yes = "$cross_compiling"; then :
14622  lt_cv_dlopen_self_static=cross
14623else
14624  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14625  lt_status=$lt_dlunknown
14626  cat > conftest.$ac_ext <<_LT_EOF
14627#line $LINENO "configure"
14628#include "confdefs.h"
14629
14630#if HAVE_DLFCN_H
14631#include <dlfcn.h>
14632#endif
14633
14634#include <stdio.h>
14635
14636#ifdef RTLD_GLOBAL
14637#  define LT_DLGLOBAL		RTLD_GLOBAL
14638#else
14639#  ifdef DL_GLOBAL
14640#    define LT_DLGLOBAL		DL_GLOBAL
14641#  else
14642#    define LT_DLGLOBAL		0
14643#  endif
14644#endif
14645
14646/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14647   find out it does not work in some platform. */
14648#ifndef LT_DLLAZY_OR_NOW
14649#  ifdef RTLD_LAZY
14650#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
14651#  else
14652#    ifdef DL_LAZY
14653#      define LT_DLLAZY_OR_NOW		DL_LAZY
14654#    else
14655#      ifdef RTLD_NOW
14656#        define LT_DLLAZY_OR_NOW	RTLD_NOW
14657#      else
14658#        ifdef DL_NOW
14659#          define LT_DLLAZY_OR_NOW	DL_NOW
14660#        else
14661#          define LT_DLLAZY_OR_NOW	0
14662#        endif
14663#      endif
14664#    endif
14665#  endif
14666#endif
14667
14668/* When -fvisibility=hidden is used, assume the code has been annotated
14669   correspondingly for the symbols needed.  */
14670#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14671int fnord () __attribute__((visibility("default")));
14672#endif
14673
14674int fnord () { return 42; }
14675int main ()
14676{
14677  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14678  int status = $lt_dlunknown;
14679
14680  if (self)
14681    {
14682      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
14683      else
14684        {
14685	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
14686          else puts (dlerror ());
14687	}
14688      /* dlclose (self); */
14689    }
14690  else
14691    puts (dlerror ());
14692
14693  return status;
14694}
14695_LT_EOF
14696  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14697  (eval $ac_link) 2>&5
14698  ac_status=$?
14699  printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14700  test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14701    (./conftest; exit; ) >&5 2>/dev/null
14702    lt_status=$?
14703    case x$lt_status in
14704      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14705      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14706      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14707    esac
14708  else :
14709    # compilation failed
14710    lt_cv_dlopen_self_static=no
14711  fi
14712fi
14713rm -fr conftest*
14714
14715
14716fi
14717{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14718printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
14719    fi
14720
14721    CPPFLAGS=$save_CPPFLAGS
14722    LDFLAGS=$save_LDFLAGS
14723    LIBS=$save_LIBS
14724    ;;
14725  esac
14726
14727  case $lt_cv_dlopen_self in
14728  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14729  *) enable_dlopen_self=unknown ;;
14730  esac
14731
14732  case $lt_cv_dlopen_self_static in
14733  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14734  *) enable_dlopen_self_static=unknown ;;
14735  esac
14736fi
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754striplib=
14755old_striplib=
14756{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14757printf %s "checking whether stripping libraries is possible... " >&6; }
14758if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14759  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
14760  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
14761  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14762printf "%s\n" "yes" >&6; }
14763else
14764# FIXME - insert some real tests, host_os isn't really good enough
14765  case $host_os in
14766  darwin*)
14767    if test -n "$STRIP"; then
14768      striplib="$STRIP -x"
14769      old_striplib="$STRIP -S"
14770      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14771printf "%s\n" "yes" >&6; }
14772    else
14773      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14774printf "%s\n" "no" >&6; }
14775    fi
14776    ;;
14777  *)
14778    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14779printf "%s\n" "no" >&6; }
14780    ;;
14781  esac
14782fi
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795  # Report what library types will actually be built
14796  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14797printf %s "checking if libtool supports shared libraries... " >&6; }
14798  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14799printf "%s\n" "$can_build_shared" >&6; }
14800
14801  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14802printf %s "checking whether to build shared libraries... " >&6; }
14803  test no = "$can_build_shared" && enable_shared=no
14804
14805  # On AIX, shared libraries and static libraries use the same namespace, and
14806  # are all built from PIC.
14807  case $host_os in
14808  aix3*)
14809    test yes = "$enable_shared" && enable_static=no
14810    if test -n "$RANLIB"; then
14811      archive_cmds="$archive_cmds~\$RANLIB \$lib"
14812      postinstall_cmds='$RANLIB $lib'
14813    fi
14814    ;;
14815
14816  aix[4-9]*)
14817    if test ia64 != "$host_cpu"; then
14818      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14819      yes,aix,yes) ;;			# shared object as lib.so file only
14820      yes,svr4,*) ;;			# shared object as lib.so archive member only
14821      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
14822      esac
14823    fi
14824    ;;
14825  esac
14826  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14827printf "%s\n" "$enable_shared" >&6; }
14828
14829  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14830printf %s "checking whether to build static libraries... " >&6; }
14831  # Make sure either enable_shared or enable_static is yes.
14832  test yes = "$enable_shared" || enable_static=yes
14833  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14834printf "%s\n" "$enable_static" >&6; }
14835
14836
14837
14838
14839fi
14840ac_ext=c
14841ac_cpp='$CPP $CPPFLAGS'
14842ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14843ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14844ac_compiler_gnu=$ac_cv_c_compiler_gnu
14845
14846CC=$lt_save_CC
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862        ac_config_commands="$ac_config_commands libtool"
14863
14864
14865
14866
14867# Only expand once:
14868
14869
14870
14871
14872# NTP has (so far) been relying on leading-edge autogen, which
14873# means we need the appropriate corresponding libopts as well.
14874# Therefore, by default:
14875# - use the version of libopts we ship with
14876# - do not install it
14877# - build a static copy (AC_DISABLE_SHARED - done earlier)
14878case "${enable_local_libopts+set}" in
14879 set) ;;
14880 *) enable_local_libopts=yes ;;
14881esac
14882case "${enable_libopts_install+set}" in
14883 set) ;;
14884 *) enable_libopts_install=no ;;
14885esac
14886enable_nls=no
14887# Autoupdate added the next two lines to ensure that your configure
14888# script's behavior did not change.  They are probably safe to remove.
14889
14890{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
14891printf %s "checking for egrep... " >&6; }
14892if test ${ac_cv_path_EGREP+y}
14893then :
14894  printf %s "(cached) " >&6
14895else $as_nop
14896  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
14897   then ac_cv_path_EGREP="$GREP -E"
14898   else
14899     if test -z "$EGREP"; then
14900  ac_path_EGREP_found=false
14901  # Loop through the user's path and test for each of PROGNAME-LIST
14902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14903for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
14904do
14905  IFS=$as_save_IFS
14906  case $as_dir in #(((
14907    '') as_dir=./ ;;
14908    */) ;;
14909    *) as_dir=$as_dir/ ;;
14910  esac
14911    for ac_prog in egrep
14912   do
14913    for ac_exec_ext in '' $ac_executable_extensions; do
14914      ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
14915      as_fn_executable_p "$ac_path_EGREP" || continue
14916# Check for GNU ac_path_EGREP and select it if it is found.
14917  # Check for GNU $ac_path_EGREP
14918case `"$ac_path_EGREP" --version 2>&1` in
14919*GNU*)
14920  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
14921*)
14922  ac_count=0
14923  printf %s 0123456789 >"conftest.in"
14924  while :
14925  do
14926    cat "conftest.in" "conftest.in" >"conftest.tmp"
14927    mv "conftest.tmp" "conftest.in"
14928    cp "conftest.in" "conftest.nl"
14929    printf "%s\n" 'EGREP' >> "conftest.nl"
14930    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
14931    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14932    as_fn_arith $ac_count + 1 && ac_count=$as_val
14933    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
14934      # Best one so far, save it but keep looking for a better one
14935      ac_cv_path_EGREP="$ac_path_EGREP"
14936      ac_path_EGREP_max=$ac_count
14937    fi
14938    # 10*(2^10) chars as input seems more than enough
14939    test $ac_count -gt 10 && break
14940  done
14941  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14942esac
14943
14944      $ac_path_EGREP_found && break 3
14945    done
14946  done
14947  done
14948IFS=$as_save_IFS
14949  if test -z "$ac_cv_path_EGREP"; then
14950    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14951  fi
14952else
14953  ac_cv_path_EGREP=$EGREP
14954fi
14955
14956   fi
14957fi
14958{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
14959printf "%s\n" "$ac_cv_path_EGREP" >&6; }
14960 EGREP="$ac_cv_path_EGREP"
14961
14962
14963
14964ac_func=
14965for ac_item in $ac_func_c_list
14966do
14967  if test $ac_func; then
14968    ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
14969    if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
14970      echo "#define $ac_item 1" >> confdefs.h
14971    fi
14972    ac_func=
14973  else
14974    ac_func=$ac_item
14975  fi
14976done
14977
14978  ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
14979"
14980if test "x$ac_cv_type_pid_t" = xyes
14981then :
14982
14983else $as_nop
14984                                          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14985/* end confdefs.h.  */
14986
14987          #if defined _WIN64 && !defined __CYGWIN__
14988          LLP64
14989          #endif
14990
14991int
14992main (void)
14993{
14994
14995  ;
14996  return 0;
14997}
14998
14999_ACEOF
15000if ac_fn_c_try_compile "$LINENO"
15001then :
15002  ac_pid_type='int'
15003else $as_nop
15004  ac_pid_type='__int64'
15005fi
15006rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15007
15008printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
15009
15010
15011fi
15012
15013
15014
15015
15016
15017
15018
15019  ac_header_dirent=no
15020for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
15021  as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
15022{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
15023printf %s "checking for $ac_hdr that defines DIR... " >&6; }
15024if eval test \${$as_ac_Header+y}
15025then :
15026  printf %s "(cached) " >&6
15027else $as_nop
15028  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15029/* end confdefs.h.  */
15030#include <sys/types.h>
15031#include <$ac_hdr>
15032
15033int
15034main (void)
15035{
15036if ((DIR *) 0)
15037return 0;
15038  ;
15039  return 0;
15040}
15041_ACEOF
15042if ac_fn_c_try_compile "$LINENO"
15043then :
15044  eval "$as_ac_Header=yes"
15045else $as_nop
15046  eval "$as_ac_Header=no"
15047fi
15048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15049fi
15050eval ac_res=\$$as_ac_Header
15051	       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15052printf "%s\n" "$ac_res" >&6; }
15053if eval test \"x\$"$as_ac_Header"\" = x"yes"
15054then :
15055  cat >>confdefs.h <<_ACEOF
15056#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1
15057_ACEOF
15058
15059ac_header_dirent=$ac_hdr; break
15060fi
15061
15062done
15063# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
15064if test $ac_header_dirent = dirent.h; then
15065  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
15066printf %s "checking for library containing opendir... " >&6; }
15067if test ${ac_cv_search_opendir+y}
15068then :
15069  printf %s "(cached) " >&6
15070else $as_nop
15071  ac_func_search_save_LIBS=$LIBS
15072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15073/* end confdefs.h.  */
15074
15075/* Override any GCC internal prototype to avoid an error.
15076   Use char because int might match the return type of a GCC
15077   builtin and then its argument prototype would still apply.  */
15078char opendir ();
15079int
15080main (void)
15081{
15082return opendir ();
15083  ;
15084  return 0;
15085}
15086_ACEOF
15087for ac_lib in '' dir
15088do
15089  if test -z "$ac_lib"; then
15090    ac_res="none required"
15091  else
15092    ac_res=-l$ac_lib
15093    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15094  fi
15095  if ac_fn_c_try_link "$LINENO"
15096then :
15097  ac_cv_search_opendir=$ac_res
15098fi
15099rm -f core conftest.err conftest.$ac_objext conftest.beam \
15100    conftest$ac_exeext
15101  if test ${ac_cv_search_opendir+y}
15102then :
15103  break
15104fi
15105done
15106if test ${ac_cv_search_opendir+y}
15107then :
15108
15109else $as_nop
15110  ac_cv_search_opendir=no
15111fi
15112rm conftest.$ac_ext
15113LIBS=$ac_func_search_save_LIBS
15114fi
15115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
15116printf "%s\n" "$ac_cv_search_opendir" >&6; }
15117ac_res=$ac_cv_search_opendir
15118if test "$ac_res" != no
15119then :
15120  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15121
15122fi
15123
15124else
15125  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
15126printf %s "checking for library containing opendir... " >&6; }
15127if test ${ac_cv_search_opendir+y}
15128then :
15129  printf %s "(cached) " >&6
15130else $as_nop
15131  ac_func_search_save_LIBS=$LIBS
15132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133/* end confdefs.h.  */
15134
15135/* Override any GCC internal prototype to avoid an error.
15136   Use char because int might match the return type of a GCC
15137   builtin and then its argument prototype would still apply.  */
15138char opendir ();
15139int
15140main (void)
15141{
15142return opendir ();
15143  ;
15144  return 0;
15145}
15146_ACEOF
15147for ac_lib in '' x
15148do
15149  if test -z "$ac_lib"; then
15150    ac_res="none required"
15151  else
15152    ac_res=-l$ac_lib
15153    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15154  fi
15155  if ac_fn_c_try_link "$LINENO"
15156then :
15157  ac_cv_search_opendir=$ac_res
15158fi
15159rm -f core conftest.err conftest.$ac_objext conftest.beam \
15160    conftest$ac_exeext
15161  if test ${ac_cv_search_opendir+y}
15162then :
15163  break
15164fi
15165done
15166if test ${ac_cv_search_opendir+y}
15167then :
15168
15169else $as_nop
15170  ac_cv_search_opendir=no
15171fi
15172rm conftest.$ac_ext
15173LIBS=$ac_func_search_save_LIBS
15174fi
15175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
15176printf "%s\n" "$ac_cv_search_opendir" >&6; }
15177ac_res=$ac_cv_search_opendir
15178if test "$ac_res" != no
15179then :
15180  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15181
15182fi
15183
15184fi
15185
15186
15187  # =================
15188  # AC_CHECK_HEADERS
15189  # =================
15190  ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
15191if test "x$ac_cv_header_sys_mman_h" = xyes
15192then :
15193  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
15194
15195fi
15196ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
15197if test "x$ac_cv_header_sys_param_h" = xyes
15198then :
15199  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
15200
15201fi
15202ac_fn_c_check_header_compile "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default"
15203if test "x$ac_cv_header_sys_poll_h" = xyes
15204then :
15205  printf "%s\n" "#define HAVE_SYS_POLL_H 1" >>confdefs.h
15206
15207fi
15208ac_fn_c_check_header_compile "$LINENO" "sys/procset.h" "ac_cv_header_sys_procset_h" "$ac_includes_default"
15209if test "x$ac_cv_header_sys_procset_h" = xyes
15210then :
15211  printf "%s\n" "#define HAVE_SYS_PROCSET_H 1" >>confdefs.h
15212
15213fi
15214ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
15215if test "x$ac_cv_header_sys_select_h" = xyes
15216then :
15217  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
15218
15219fi
15220ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
15221if test "x$ac_cv_header_sys_socket_h" = xyes
15222then :
15223  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
15224
15225fi
15226ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
15227if test "x$ac_cv_header_sys_stropts_h" = xyes
15228then :
15229  printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
15230
15231fi
15232ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
15233if test "x$ac_cv_header_sys_time_h" = xyes
15234then :
15235  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
15236
15237fi
15238ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default"
15239if test "x$ac_cv_header_sys_un_h" = xyes
15240then :
15241  printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h
15242
15243fi
15244ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
15245if test "x$ac_cv_header_sys_wait_h" = xyes
15246then :
15247  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
15248
15249fi
15250ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default"
15251if test "x$ac_cv_header_dlfcn_h" = xyes
15252then :
15253  printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
15254
15255fi
15256ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
15257if test "x$ac_cv_header_errno_h" = xyes
15258then :
15259  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
15260
15261fi
15262ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
15263if test "x$ac_cv_header_fcntl_h" = xyes
15264then :
15265  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
15266
15267fi
15268ac_fn_c_check_header_compile "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
15269if test "x$ac_cv_header_libgen_h" = xyes
15270then :
15271  printf "%s\n" "#define HAVE_LIBGEN_H 1" >>confdefs.h
15272
15273fi
15274ac_fn_c_check_header_compile "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
15275if test "x$ac_cv_header_libintl_h" = xyes
15276then :
15277  printf "%s\n" "#define HAVE_LIBINTL_H 1" >>confdefs.h
15278
15279fi
15280ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
15281if test "x$ac_cv_header_memory_h" = xyes
15282then :
15283  printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
15284
15285fi
15286ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
15287if test "x$ac_cv_header_netinet_in_h" = xyes
15288then :
15289  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
15290
15291fi
15292ac_fn_c_check_header_compile "$LINENO" "setjmp.h" "ac_cv_header_setjmp_h" "$ac_includes_default"
15293if test "x$ac_cv_header_setjmp_h" = xyes
15294then :
15295  printf "%s\n" "#define HAVE_SETJMP_H 1" >>confdefs.h
15296
15297fi
15298ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default"
15299if test "x$ac_cv_header_stdbool_h" = xyes
15300then :
15301  printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
15302
15303fi
15304ac_fn_c_check_header_compile "$LINENO" "sysexits.h" "ac_cv_header_sysexits_h" "$ac_includes_default"
15305if test "x$ac_cv_header_sysexits_h" = xyes
15306then :
15307  printf "%s\n" "#define HAVE_SYSEXITS_H 1" >>confdefs.h
15308
15309fi
15310ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
15311if test "x$ac_cv_header_unistd_h" = xyes
15312then :
15313  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
15314
15315fi
15316ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
15317if test "x$ac_cv_header_utime_h" = xyes
15318then :
15319  printf "%s\n" "#define HAVE_UTIME_H 1" >>confdefs.h
15320
15321fi
15322
15323
15324         for ac_header in stdarg.h varargs.h
15325do :
15326  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15327ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15328if eval test \"x\$"$as_ac_Header"\" = x"yes"
15329then :
15330  cat >>confdefs.h <<_ACEOF
15331#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15332_ACEOF
15333 lo_have_arg_hdr=true;break
15334else $as_nop
15335  lo_have_arg_hdr=false
15336fi
15337
15338done
15339
15340         for ac_header in string.h strings.h
15341do :
15342  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15343ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15344if eval test \"x\$"$as_ac_Header"\" = x"yes"
15345then :
15346  cat >>confdefs.h <<_ACEOF
15347#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15348_ACEOF
15349 lo_have_str_hdr=true;break
15350else $as_nop
15351  lo_have_str_hdr=false
15352fi
15353
15354done
15355
15356         for ac_header in limits.h sys/limits.h values.h
15357do :
15358  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15359ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15360if eval test \"x\$"$as_ac_Header"\" = x"yes"
15361then :
15362  cat >>confdefs.h <<_ACEOF
15363#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15364_ACEOF
15365 lo_have_lim_hdr=true;break
15366else $as_nop
15367  lo_have_lim_hdr=false
15368fi
15369
15370done
15371
15372         for ac_header in inttypes.h stdint.h
15373do :
15374  as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
15375ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15376if eval test \"x\$"$as_ac_Header"\" = x"yes"
15377then :
15378  cat >>confdefs.h <<_ACEOF
15379#define `printf "%s\n" "HAVE_$ac_header" | $as_tr_cpp` 1
15380_ACEOF
15381 lo_have_typ_hdr=true;break
15382else $as_nop
15383  lo_have_typ_hdr=false
15384fi
15385
15386done
15387
15388
15389  case "$host_os" in
15390    cygwin*)
15391                        STDNORETURN_H='stdnoreturn.h'
15392      ;;
15393    *)
15394      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working stdnoreturn.h" >&5
15395printf %s "checking for working stdnoreturn.h... " >&6; }
15396if test ${gl_cv_header_working_stdnoreturn_h+y}
15397then :
15398  printf %s "(cached) " >&6
15399else $as_nop
15400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15401/* end confdefs.h.  */
15402#include <stdlib.h>
15403                #include <stdnoreturn.h>
15404                /* Do not check for 'noreturn' after the return type.
15405                   C11 allows it, but it's rarely done that way
15406                   and circa-2012 bleeding-edge GCC rejects it when given
15407                   -Werror=old-style-declaration.  */
15408                noreturn void foo1 (void) { exit (0); }
15409                _Noreturn void foo2 (void) { exit (0); }
15410                int testit (int argc, char **argv)
15411                {
15412                  if (argc & 1)
15413                    return 0;
15414                  (argv[0][0] ? foo1 : foo2) ();
15415                }
15416
15417int
15418main (void)
15419{
15420
15421  ;
15422  return 0;
15423}
15424_ACEOF
15425if ac_fn_c_try_compile "$LINENO"
15426then :
15427  gl_cv_header_working_stdnoreturn_h=yes
15428else $as_nop
15429  gl_cv_header_working_stdnoreturn_h=no
15430fi
15431rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15432fi
15433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdnoreturn_h" >&5
15434printf "%s\n" "$gl_cv_header_working_stdnoreturn_h" >&6; }
15435      if test $gl_cv_header_working_stdnoreturn_h = yes; then
15436        STDNORETURN_H=''
15437      else
15438        STDNORETURN_H='stdnoreturn.h'
15439      fi
15440      ;;
15441  esac
15442
15443   if test -n "$STDNORETURN_H"; then
15444  GL_GENERATE_STDNORETURN_H_TRUE=
15445  GL_GENERATE_STDNORETURN_H_FALSE='#'
15446else
15447  GL_GENERATE_STDNORETURN_H_TRUE='#'
15448  GL_GENERATE_STDNORETURN_H_FALSE=
15449fi
15450
15451
15452
15453  # ----------------------------------------------------------------------
15454  # check for various programs used during the build.
15455  # On OS/X, "wchar.h" needs "runetype.h" to work properly.
15456  # ----------------------------------------------------------------------
15457  ac_fn_c_check_header_compile "$LINENO" "runetype.h" "ac_cv_header_runetype_h" "
15458  $ac_includes_default
15459  #if HAVE_RUNETYPE_H
15460  # include <runetype.h>
15461  #endif
15462
15463"
15464if test "x$ac_cv_header_runetype_h" = xyes
15465then :
15466  printf "%s\n" "#define HAVE_RUNETYPE_H 1" >>confdefs.h
15467
15468fi
15469ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "
15470  $ac_includes_default
15471  #if HAVE_RUNETYPE_H
15472  # include <runetype.h>
15473  #endif
15474
15475"
15476if test "x$ac_cv_header_wchar_h" = xyes
15477then :
15478  printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h
15479
15480fi
15481
15482
15483  # Check whether --enable-nls was given.
15484if test ${enable_nls+y}
15485then :
15486  enableval=$enable_nls;
15487fi
15488
15489  if test "x$enable_nls" != "xno" && \
15490  test "X${ac_cv_header_libintl_h}" = Xyes
15491then :
15492
15493
15494printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h
15495
15496fi
15497
15498  # --------------------------------------------
15499  # Verify certain entries from AC_CHECK_HEADERS
15500  # --------------------------------------------
15501  ${lo_have_arg_hdr} || \
15502    as_fn_error $? "you must have stdarg.h or varargs.h on your system" "$LINENO" 5
15503
15504  ${lo_have_str_hdr} || \
15505    as_fn_error $? "you must have string.h or strings.h on your system" "$LINENO" 5
15506
15507  ${lo_have_lim_hdr} || \
15508    as_fn_error $? "you must have one of limits.h, sys/limits.h or values.h" "$LINENO" 5
15509
15510  ${lo_have_typ_hdr} || \
15511    as_fn_error $? "you must have inttypes.h or stdint.h on your system" "$LINENO" 5
15512
15513  for f in sys_types sys_param sys_stat string errno stdlib memory setjmp
15514  do eval as_ac_var=\${ac_cv_header_${f}_h}
15515     test "X${as_ac_var}" = Xyes || {
15516       as_fn_error $? "you must have ${f}.h on your system" "$LINENO" 5
15517     }
15518  done
15519  test "X${ac_cv_header_inttypes_h-no}" = Xyes || \
15520    echo '#include <stdint.h>' > inttypes.h
15521
15522  # ----------------------------------------------------------------------
15523  # Checks for typedefs
15524  # ----------------------------------------------------------------------
15525  ac_fn_c_check_type "$LINENO" "wchar_t" "ac_cv_type_wchar_t" "$ac_includes_default"
15526if test "x$ac_cv_type_wchar_t" = xyes
15527then :
15528
15529printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h
15530
15531
15532fi
15533
15534  ac_fn_c_check_type "$LINENO" "wint_t" "ac_cv_type_wint_t" "
15535    $ac_includes_default
15536    #if HAVE_RUNETYPE_H
15537    # include <runetype.h>
15538    #endif
15539    #if HAVE_WCHAR_H
15540    # include <wchar.h>
15541    #endif
15542
15543"
15544if test "x$ac_cv_type_wint_t" = xyes
15545then :
15546
15547printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h
15548
15549
15550fi
15551
15552  ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default"
15553if test "x$ac_cv_type_int8_t" = xyes
15554then :
15555
15556printf "%s\n" "#define HAVE_INT8_T 1" >>confdefs.h
15557
15558
15559fi
15560ac_fn_c_check_type "$LINENO" "uint8_t" "ac_cv_type_uint8_t" "$ac_includes_default"
15561if test "x$ac_cv_type_uint8_t" = xyes
15562then :
15563
15564printf "%s\n" "#define HAVE_UINT8_T 1" >>confdefs.h
15565
15566
15567fi
15568ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
15569if test "x$ac_cv_type_int16_t" = xyes
15570then :
15571
15572printf "%s\n" "#define HAVE_INT16_T 1" >>confdefs.h
15573
15574
15575fi
15576ac_fn_c_check_type "$LINENO" "uint16_t" "ac_cv_type_uint16_t" "$ac_includes_default"
15577if test "x$ac_cv_type_uint16_t" = xyes
15578then :
15579
15580printf "%s\n" "#define HAVE_UINT16_T 1" >>confdefs.h
15581
15582
15583fi
15584ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
15585if test "x$ac_cv_type_int32_t" = xyes
15586then :
15587
15588printf "%s\n" "#define HAVE_INT32_T 1" >>confdefs.h
15589
15590
15591fi
15592ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
15593if test "x$ac_cv_type_uint32_t" = xyes
15594then :
15595
15596printf "%s\n" "#define HAVE_UINT32_T 1" >>confdefs.h
15597
15598
15599fi
15600ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default"
15601if test "x$ac_cv_type_intptr_t" = xyes
15602then :
15603
15604printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h
15605
15606
15607fi
15608ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
15609if test "x$ac_cv_type_uintptr_t" = xyes
15610then :
15611
15612printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
15613
15614
15615fi
15616ac_fn_c_check_type "$LINENO" "uint_t" "ac_cv_type_uint_t" "$ac_includes_default"
15617if test "x$ac_cv_type_uint_t" = xyes
15618then :
15619
15620printf "%s\n" "#define HAVE_UINT_T 1" >>confdefs.h
15621
15622
15623fi
15624ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
15625if test "x$ac_cv_type_pid_t" = xyes
15626then :
15627
15628printf "%s\n" "#define HAVE_PID_T 1" >>confdefs.h
15629
15630
15631fi
15632ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
15633if test "x$ac_cv_type_size_t" = xyes
15634then :
15635
15636printf "%s\n" "#define HAVE_SIZE_T 1" >>confdefs.h
15637
15638
15639fi
15640ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
15641if test "x$ac_cv_type_ptrdiff_t" = xyes
15642then :
15643
15644printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
15645
15646
15647fi
15648
15649  # The cast to long int works around a bug in the HP C Compiler
15650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15652# This bug is HP SR number 8606223364.
15653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5
15654printf %s "checking size of char *... " >&6; }
15655if test ${ac_cv_sizeof_char_p+y}
15656then :
15657  printf %s "(cached) " >&6
15658else $as_nop
15659  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p"        "$ac_includes_default"
15660then :
15661
15662else $as_nop
15663  if test "$ac_cv_type_char_p" = yes; then
15664     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15665printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15666as_fn_error 77 "cannot compute sizeof (char *)
15667See \`config.log' for more details" "$LINENO" 5; }
15668   else
15669     ac_cv_sizeof_char_p=0
15670   fi
15671fi
15672
15673fi
15674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5
15675printf "%s\n" "$ac_cv_sizeof_char_p" >&6; }
15676
15677
15678
15679printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h
15680
15681
15682  # The cast to long int works around a bug in the HP C Compiler
15683# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15684# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15685# This bug is HP SR number 8606223364.
15686{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15687printf %s "checking size of int... " >&6; }
15688if test ${ac_cv_sizeof_int+y}
15689then :
15690  printf %s "(cached) " >&6
15691else $as_nop
15692  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
15693then :
15694
15695else $as_nop
15696  if test "$ac_cv_type_int" = yes; then
15697     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15698printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15699as_fn_error 77 "cannot compute sizeof (int)
15700See \`config.log' for more details" "$LINENO" 5; }
15701   else
15702     ac_cv_sizeof_int=0
15703   fi
15704fi
15705
15706fi
15707{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15708printf "%s\n" "$ac_cv_sizeof_int" >&6; }
15709
15710
15711
15712printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
15713
15714
15715  # The cast to long int works around a bug in the HP C Compiler
15716# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15717# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15718# This bug is HP SR number 8606223364.
15719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
15720printf %s "checking size of long... " >&6; }
15721if test ${ac_cv_sizeof_long+y}
15722then :
15723  printf %s "(cached) " >&6
15724else $as_nop
15725  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
15726then :
15727
15728else $as_nop
15729  if test "$ac_cv_type_long" = yes; then
15730     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15731printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15732as_fn_error 77 "cannot compute sizeof (long)
15733See \`config.log' for more details" "$LINENO" 5; }
15734   else
15735     ac_cv_sizeof_long=0
15736   fi
15737fi
15738
15739fi
15740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
15741printf "%s\n" "$ac_cv_sizeof_long" >&6; }
15742
15743
15744
15745printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
15746
15747
15748  # The cast to long int works around a bug in the HP C Compiler
15749# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15750# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15751# This bug is HP SR number 8606223364.
15752{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
15753printf %s "checking size of short... " >&6; }
15754if test ${ac_cv_sizeof_short+y}
15755then :
15756  printf %s "(cached) " >&6
15757else $as_nop
15758  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
15759then :
15760
15761else $as_nop
15762  if test "$ac_cv_type_short" = yes; then
15763     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15764printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
15765as_fn_error 77 "cannot compute sizeof (short)
15766See \`config.log' for more details" "$LINENO" 5; }
15767   else
15768     ac_cv_sizeof_short=0
15769   fi
15770fi
15771
15772fi
15773{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
15774printf "%s\n" "$ac_cv_sizeof_short" >&6; }
15775
15776
15777
15778printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
15779
15780
15781
15782  # ------------
15783  # AC_CHECK_LIB
15784  # ------------
15785  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pathfind in -lgen" >&5
15786printf %s "checking for pathfind in -lgen... " >&6; }
15787if test ${ac_cv_lib_gen_pathfind+y}
15788then :
15789  printf %s "(cached) " >&6
15790else $as_nop
15791  ac_check_lib_save_LIBS=$LIBS
15792LIBS="-lgen  $LIBS"
15793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15794/* end confdefs.h.  */
15795
15796/* Override any GCC internal prototype to avoid an error.
15797   Use char because int might match the return type of a GCC
15798   builtin and then its argument prototype would still apply.  */
15799char pathfind ();
15800int
15801main (void)
15802{
15803return pathfind ();
15804  ;
15805  return 0;
15806}
15807_ACEOF
15808if ac_fn_c_try_link "$LINENO"
15809then :
15810  ac_cv_lib_gen_pathfind=yes
15811else $as_nop
15812  ac_cv_lib_gen_pathfind=no
15813fi
15814rm -f core conftest.err conftest.$ac_objext conftest.beam \
15815    conftest$ac_exeext conftest.$ac_ext
15816LIBS=$ac_check_lib_save_LIBS
15817fi
15818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_pathfind" >&5
15819printf "%s\n" "$ac_cv_lib_gen_pathfind" >&6; }
15820if test "x$ac_cv_lib_gen_pathfind" = xyes
15821then :
15822  printf "%s\n" "#define HAVE_LIBGEN 1" >>confdefs.h
15823
15824  LIBS="-lgen $LIBS"
15825
15826fi
15827
15828  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gettext in -lintl" >&5
15829printf %s "checking for gettext in -lintl... " >&6; }
15830if test ${ac_cv_lib_intl_gettext+y}
15831then :
15832  printf %s "(cached) " >&6
15833else $as_nop
15834  ac_check_lib_save_LIBS=$LIBS
15835LIBS="-lintl  $LIBS"
15836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15837/* end confdefs.h.  */
15838
15839/* Override any GCC internal prototype to avoid an error.
15840   Use char because int might match the return type of a GCC
15841   builtin and then its argument prototype would still apply.  */
15842char gettext ();
15843int
15844main (void)
15845{
15846return gettext ();
15847  ;
15848  return 0;
15849}
15850_ACEOF
15851if ac_fn_c_try_link "$LINENO"
15852then :
15853  ac_cv_lib_intl_gettext=yes
15854else $as_nop
15855  ac_cv_lib_intl_gettext=no
15856fi
15857rm -f core conftest.err conftest.$ac_objext conftest.beam \
15858    conftest$ac_exeext conftest.$ac_ext
15859LIBS=$ac_check_lib_save_LIBS
15860fi
15861{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_gettext" >&5
15862printf "%s\n" "$ac_cv_lib_intl_gettext" >&6; }
15863if test "x$ac_cv_lib_intl_gettext" = xyes
15864then :
15865  printf "%s\n" "#define HAVE_LIBINTL 1" >>confdefs.h
15866
15867  LIBS="-lintl $LIBS"
15868
15869fi
15870
15871
15872if test "x$ac_cv_func_vprintf" = xno
15873then :
15874  ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt"
15875if test "x$ac_cv_func__doprnt" = xyes
15876then :
15877
15878printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h
15879
15880fi
15881
15882fi
15883
15884
15885if test "x$ac_cv_func_fork" = xyes; then
15886  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
15887printf %s "checking for working fork... " >&6; }
15888if test ${ac_cv_func_fork_works+y}
15889then :
15890  printf %s "(cached) " >&6
15891else $as_nop
15892  if test "$cross_compiling" = yes
15893then :
15894  ac_cv_func_fork_works=cross
15895else $as_nop
15896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15897/* end confdefs.h.  */
15898$ac_includes_default
15899int
15900main (void)
15901{
15902
15903	  /* By Ruediger Kuhlmann. */
15904	  return fork () < 0;
15905
15906  ;
15907  return 0;
15908}
15909_ACEOF
15910if ac_fn_c_try_run "$LINENO"
15911then :
15912  ac_cv_func_fork_works=yes
15913else $as_nop
15914  ac_cv_func_fork_works=no
15915fi
15916rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15917  conftest.$ac_objext conftest.beam conftest.$ac_ext
15918fi
15919
15920fi
15921{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
15922printf "%s\n" "$ac_cv_func_fork_works" >&6; }
15923
15924else
15925  ac_cv_func_fork_works=$ac_cv_func_fork
15926fi
15927if test "x$ac_cv_func_fork_works" = xcross; then
15928  case $host in
15929    *-*-amigaos* | *-*-msdosdjgpp*)
15930      # Override, as these systems have only a dummy fork() stub
15931      ac_cv_func_fork_works=no
15932      ;;
15933    *)
15934      ac_cv_func_fork_works=yes
15935      ;;
15936  esac
15937  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
15938printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
15939fi
15940ac_cv_func_vfork_works=$ac_cv_func_vfork
15941if test "x$ac_cv_func_vfork" = xyes; then
15942  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
15943printf %s "checking for working vfork... " >&6; }
15944if test ${ac_cv_func_vfork_works+y}
15945then :
15946  printf %s "(cached) " >&6
15947else $as_nop
15948  if test "$cross_compiling" = yes
15949then :
15950  ac_cv_func_vfork_works=cross
15951else $as_nop
15952  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15953/* end confdefs.h.  */
15954/* Thanks to Paul Eggert for this test.  */
15955$ac_includes_default
15956#include <signal.h>
15957#include <sys/wait.h>
15958#ifdef HAVE_VFORK_H
15959# include <vfork.h>
15960#endif
15961
15962static void
15963do_nothing (int sig)
15964{
15965  (void) sig;
15966}
15967
15968/* On some sparc systems, changes by the child to local and incoming
15969   argument registers are propagated back to the parent.  The compiler
15970   is told about this with #include <vfork.h>, but some compilers
15971   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15972   static variable whose address is put into a register that is
15973   clobbered by the vfork.  */
15974static void
15975sparc_address_test (int arg)
15976{
15977  static pid_t child;
15978  if (!child) {
15979    child = vfork ();
15980    if (child < 0) {
15981      perror ("vfork");
15982      _exit(2);
15983    }
15984    if (!child) {
15985      arg = getpid();
15986      write(-1, "", 0);
15987      _exit (arg);
15988    }
15989  }
15990}
15991
15992int
15993main (void)
15994{
15995  pid_t parent = getpid ();
15996  pid_t child;
15997
15998  sparc_address_test (0);
15999
16000  /* On Solaris 2.4, changes by the child to the signal handler
16001     also munge signal handlers in the parent.  To detect this,
16002     start by putting the parent's handler in a known state.  */
16003  signal (SIGTERM, SIG_DFL);
16004
16005  child = vfork ();
16006
16007  if (child == 0) {
16008    /* Here is another test for sparc vfork register problems.  This
16009       test uses lots of local variables, at least as many local
16010       variables as main has allocated so far including compiler
16011       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16012       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16013       reuse the register of parent for one of the local variables,
16014       since it will think that parent can't possibly be used any more
16015       in this routine.  Assigning to the local variable will thus
16016       munge parent in the parent process.  */
16017    pid_t
16018      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16019      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16020    /* Convince the compiler that p..p7 are live; otherwise, it might
16021       use the same hardware register for all 8 local variables.  */
16022    if (p != p1 || p != p2 || p != p3 || p != p4
16023	|| p != p5 || p != p6 || p != p7)
16024      _exit(1);
16025
16026    /* Alter the child's signal handler.  */
16027    if (signal (SIGTERM, do_nothing) != SIG_DFL)
16028      _exit(1);
16029
16030    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16031       from child file descriptors.  If the child closes a descriptor
16032       before it execs or exits, this munges the parent's descriptor
16033       as well.  Test for this by closing stdout in the child.  */
16034    _exit(close(fileno(stdout)) != 0);
16035  } else {
16036    int status;
16037    struct stat st;
16038
16039    while (wait(&status) != child)
16040      ;
16041    return (
16042	 /* Was there some problem with vforking?  */
16043	 child < 0
16044
16045	 /* Did the child munge the parent's signal handler?  */
16046	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
16047
16048	 /* Did the child fail?  (This shouldn't happen.)  */
16049	 || status
16050
16051	 /* Did the vfork/compiler bug occur?  */
16052	 || parent != getpid()
16053
16054	 /* Did the file descriptor bug occur?  */
16055	 || fstat(fileno(stdout), &st) != 0
16056	 );
16057  }
16058}
16059_ACEOF
16060if ac_fn_c_try_run "$LINENO"
16061then :
16062  ac_cv_func_vfork_works=yes
16063else $as_nop
16064  ac_cv_func_vfork_works=no
16065fi
16066rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16067  conftest.$ac_objext conftest.beam conftest.$ac_ext
16068fi
16069
16070fi
16071{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
16072printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
16073
16074fi;
16075if test "x$ac_cv_func_fork_works" = xcross; then
16076  ac_cv_func_vfork_works=$ac_cv_func_vfork
16077  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
16078printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
16079fi
16080
16081if test "x$ac_cv_func_vfork_works" = xyes; then
16082
16083printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
16084
16085else
16086
16087printf "%s\n" "#define vfork fork" >>confdefs.h
16088
16089fi
16090if test "x$ac_cv_func_fork_works" = xyes; then
16091
16092printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
16093
16094fi
16095
16096  ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
16097if test "x$ac_cv_func_mmap" = xyes
16098then :
16099  printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h
16100
16101fi
16102ac_fn_c_check_func "$LINENO" "canonicalize_file_name" "ac_cv_func_canonicalize_file_name"
16103if test "x$ac_cv_func_canonicalize_file_name" = xyes
16104then :
16105  printf "%s\n" "#define HAVE_CANONICALIZE_FILE_NAME 1" >>confdefs.h
16106
16107fi
16108ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
16109if test "x$ac_cv_func_snprintf" = xyes
16110then :
16111  printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
16112
16113fi
16114ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
16115if test "x$ac_cv_func_strdup" = xyes
16116then :
16117  printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
16118
16119fi
16120ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
16121if test "x$ac_cv_func_strchr" = xyes
16122then :
16123  printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
16124
16125fi
16126ac_fn_c_check_func "$LINENO" "strrchr" "ac_cv_func_strrchr"
16127if test "x$ac_cv_func_strrchr" = xyes
16128then :
16129  printf "%s\n" "#define HAVE_STRRCHR 1" >>confdefs.h
16130
16131fi
16132ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
16133if test "x$ac_cv_func_strsignal" = xyes
16134then :
16135  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
16136
16137fi
16138ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
16139if test "x$ac_cv_func_fchmod" = xyes
16140then :
16141  printf "%s\n" "#define HAVE_FCHMOD 1" >>confdefs.h
16142
16143fi
16144ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat"
16145if test "x$ac_cv_func_fstat" = xyes
16146then :
16147  printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h
16148
16149fi
16150ac_fn_c_check_func "$LINENO" "chmod" "ac_cv_func_chmod"
16151if test "x$ac_cv_func_chmod" = xyes
16152then :
16153  printf "%s\n" "#define HAVE_CHMOD 1" >>confdefs.h
16154
16155fi
16156
16157  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
16158printf %s "checking for a sed that does not truncate output... " >&6; }
16159if test ${ac_cv_path_SED+y}
16160then :
16161  printf %s "(cached) " >&6
16162else $as_nop
16163            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
16164     for ac_i in 1 2 3 4 5 6 7; do
16165       ac_script="$ac_script$as_nl$ac_script"
16166     done
16167     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
16168     { ac_script=; unset ac_script;}
16169     if test -z "$SED"; then
16170  ac_path_SED_found=false
16171  # Loop through the user's path and test for each of PROGNAME-LIST
16172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16173for as_dir in $PATH
16174do
16175  IFS=$as_save_IFS
16176  case $as_dir in #(((
16177    '') as_dir=./ ;;
16178    */) ;;
16179    *) as_dir=$as_dir/ ;;
16180  esac
16181    for ac_prog in sed gsed
16182   do
16183    for ac_exec_ext in '' $ac_executable_extensions; do
16184      ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
16185      as_fn_executable_p "$ac_path_SED" || continue
16186# Check for GNU ac_path_SED and select it if it is found.
16187  # Check for GNU $ac_path_SED
16188case `"$ac_path_SED" --version 2>&1` in
16189*GNU*)
16190  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
16191*)
16192  ac_count=0
16193  printf %s 0123456789 >"conftest.in"
16194  while :
16195  do
16196    cat "conftest.in" "conftest.in" >"conftest.tmp"
16197    mv "conftest.tmp" "conftest.in"
16198    cp "conftest.in" "conftest.nl"
16199    printf "%s\n" '' >> "conftest.nl"
16200    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
16201    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
16202    as_fn_arith $ac_count + 1 && ac_count=$as_val
16203    if test $ac_count -gt ${ac_path_SED_max-0}; then
16204      # Best one so far, save it but keep looking for a better one
16205      ac_cv_path_SED="$ac_path_SED"
16206      ac_path_SED_max=$ac_count
16207    fi
16208    # 10*(2^10) chars as input seems more than enough
16209    test $ac_count -gt 10 && break
16210  done
16211  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
16212esac
16213
16214      $ac_path_SED_found && break 3
16215    done
16216  done
16217  done
16218IFS=$as_save_IFS
16219  if test -z "$ac_cv_path_SED"; then
16220    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
16221  fi
16222else
16223  ac_cv_path_SED=$SED
16224fi
16225
16226fi
16227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
16228printf "%s\n" "$ac_cv_path_SED" >&6; }
16229 SED="$ac_cv_path_SED"
16230  rm -f conftest.sed
16231
16232  while :
16233  do
16234      test -x "$POSIX_SHELL" && break
16235      POSIX_SHELL=`which bash`
16236      test -x "$POSIX_SHELL" && break
16237      POSIX_SHELL=`which dash`
16238      test -x "$POSIX_SHELL" && break
16239      POSIX_SHELL=/usr/xpg4/bin/sh
16240      test -x "$POSIX_SHELL" && break
16241      POSIX_SHELL=`/bin/sh -c '
16242          exec 2>/dev/null
16243          if ! true ; then exit 1 ; fi
16244          echo /bin/sh'`
16245      test -x "$POSIX_SHELL" && break
16246      as_fn_error $? "cannot locate a working POSIX shell" "$LINENO" 5
16247  done
16248
16249printf "%s\n" "#define POSIX_SHELL \"${POSIX_SHELL}\"" >>confdefs.h
16250
16251
16252
16253
16254
16255  LIBOPTS_BUILD_BLOCKED=true
16256
16257
16258  NEED_LIBOPTS_DIR=''
16259
16260  # Check whether --enable-local-libopts was given.
16261if test ${enable_local_libopts+y}
16262then :
16263  enableval=$enable_local_libopts;
16264    if test x$enableval = xyes ; then
16265       { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using supplied libopts tearoff" >&5
16266printf "%s\n" "$as_me: Using supplied libopts tearoff" >&6;}
16267       LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
16268       NEED_LIBOPTS_DIR=true
16269       LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
16270    fi
16271fi
16272
16273
16274  # Check whether --enable-libopts-install was given.
16275if test ${enable_libopts_install+y}
16276then :
16277  enableval=$enable_libopts_install;
16278fi
16279
16280   if test "X${enable_libopts_install}" = Xyes; then
16281  INSTALL_LIBOPTS_TRUE=
16282  INSTALL_LIBOPTS_FALSE='#'
16283else
16284  INSTALL_LIBOPTS_TRUE='#'
16285  INSTALL_LIBOPTS_FALSE=
16286fi
16287
16288
16289  if test -z "${NEED_LIBOPTS_DIR}" ; then
16290     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config can be found" >&5
16291printf %s "checking whether autoopts-config can be found... " >&6; }
16292
16293# Check whether --with-autoopts-config was given.
16294if test ${with_autoopts_config+y}
16295then :
16296  withval=$with_autoopts_config; lo_cv_with_autoopts_config=${with_autoopts_config}
16297else $as_nop
16298  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether autoopts-config is specified" >&5
16299printf %s "checking whether autoopts-config is specified... " >&6; }
16300if test ${lo_cv_with_autoopts_config+y}
16301then :
16302  printf %s "(cached) " >&6
16303else $as_nop
16304  if autoopts-config --help 2>/dev/null 1>&2
16305        then lo_cv_with_autoopts_config=autoopts-config
16306        elif libopts-config --help 2>/dev/null 1>&2
16307        then lo_cv_with_autoopts_config=libopts-config
16308        else lo_cv_with_autoopts_config=no ; fi
16309fi
16310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lo_cv_with_autoopts_config" >&5
16311printf "%s\n" "$lo_cv_with_autoopts_config" >&6; }
16312
16313fi
16314 # end of AC_ARG_WITH
16315
16316     if test ${lo_cv_test_autoopts+y}
16317then :
16318  printf %s "(cached) " >&6
16319else $as_nop
16320
16321        if test -z "${lo_cv_with_autoopts_config}" \
16322                -o X"${lo_cv_with_autoopts_config}" = Xno
16323        then
16324           if autoopts-config --help 2>/dev/null 1>&2
16325           then lo_cv_with_autoopts_config=autoopts-config
16326           elif libopts-config --help 2>/dev/null 1>&2
16327           then lo_cv_with_autoopts_config=libopts-config
16328           else lo_cv_with_autoopts_config=false ; fi
16329        fi
16330        lo_cv_test_autoopts=`
16331            ${lo_cv_with_autoopts_config} --libs` 2> /dev/null
16332        if test $? -ne 0 -o -z "${lo_cv_test_autoopts}"
16333        then lo_cv_test_autoopts=no ; fi
16334
16335fi
16336 # end of CACHE_VAL
16337     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lo_cv_test_autoopts}" >&5
16338printf "%s\n" "${lo_cv_test_autoopts}" >&6; }
16339
16340     if test "X${lo_cv_test_autoopts}" != Xno
16341     then
16342        LIBOPTS_LDADD="${lo_cv_test_autoopts}"
16343        LIBOPTS_CFLAGS="`${lo_cv_with_autoopts_config} --cflags`"
16344     else
16345        LIBOPTS_LDADD='$(top_builddir)/sntp/libopts/libopts.la'
16346        LIBOPTS_CFLAGS='-I$(top_srcdir)/sntp/libopts'
16347        NEED_LIBOPTS_DIR=true
16348     fi
16349  fi # end of if test -z "${NEED_LIBOPTS_DIR}"
16350  if test -n "${LIBOPTS_BUILD_BLOCKED}" ; then
16351    NEED_LIBOPTS_DIR=''
16352  fi
16353   if test -n "${NEED_LIBOPTS_DIR}"; then
16354  NEED_LIBOPTS_TRUE=
16355  NEED_LIBOPTS_FALSE='#'
16356else
16357  NEED_LIBOPTS_TRUE='#'
16358  NEED_LIBOPTS_FALSE=
16359fi
16360
16361
16362
16363  LIBOPTS_DIR=sntp/libopts
16364
16365
16366# end of AC_DEFUN of LIBOPTS_CHECK_COMMON
16367
16368  # end of AC_DEFUN of LIBOPTS_CHECK_NOBUILD
16369
16370
16371
16372
16373ntp_pkgconfig_min_version='0.15.0'
16374if test -n "$ac_tool_prefix"; then
16375  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16376set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16377{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16378printf %s "checking for $ac_word... " >&6; }
16379if test ${ac_cv_path_PKG_CONFIG+y}
16380then :
16381  printf %s "(cached) " >&6
16382else $as_nop
16383  case $PKG_CONFIG in
16384  [\\/]* | ?:[\\/]*)
16385  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
16386  ;;
16387  *)
16388  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16389for as_dir in $PATH
16390do
16391  IFS=$as_save_IFS
16392  case $as_dir in #(((
16393    '') as_dir=./ ;;
16394    */) ;;
16395    *) as_dir=$as_dir/ ;;
16396  esac
16397    for ac_exec_ext in '' $ac_executable_extensions; do
16398  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16399    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16400    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16401    break 2
16402  fi
16403done
16404  done
16405IFS=$as_save_IFS
16406
16407  ;;
16408esac
16409fi
16410PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16411if test -n "$PKG_CONFIG"; then
16412  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16413printf "%s\n" "$PKG_CONFIG" >&6; }
16414else
16415  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16416printf "%s\n" "no" >&6; }
16417fi
16418
16419
16420fi
16421if test -z "$ac_cv_path_PKG_CONFIG"; then
16422  ac_pt_PKG_CONFIG=$PKG_CONFIG
16423  # Extract the first word of "pkg-config", so it can be a program name with args.
16424set dummy pkg-config; ac_word=$2
16425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16426printf %s "checking for $ac_word... " >&6; }
16427if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
16428then :
16429  printf %s "(cached) " >&6
16430else $as_nop
16431  case $ac_pt_PKG_CONFIG in
16432  [\\/]* | ?:[\\/]*)
16433  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16434  ;;
16435  *)
16436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16437for as_dir in $PATH
16438do
16439  IFS=$as_save_IFS
16440  case $as_dir in #(((
16441    '') as_dir=./ ;;
16442    */) ;;
16443    *) as_dir=$as_dir/ ;;
16444  esac
16445    for ac_exec_ext in '' $ac_executable_extensions; do
16446  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16447    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
16448    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16449    break 2
16450  fi
16451done
16452  done
16453IFS=$as_save_IFS
16454
16455  ;;
16456esac
16457fi
16458ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16459if test -n "$ac_pt_PKG_CONFIG"; then
16460  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
16461printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
16462else
16463  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464printf "%s\n" "no" >&6; }
16465fi
16466
16467  if test "x$ac_pt_PKG_CONFIG" = x; then
16468    PKG_CONFIG=""
16469  else
16470    case $cross_compiling:$ac_tool_warned in
16471yes:)
16472{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16473printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16474ac_tool_warned=yes ;;
16475esac
16476    PKG_CONFIG=$ac_pt_PKG_CONFIG
16477  fi
16478else
16479  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16480fi
16481
16482{ ac_cv_path_PKG_CONFIG=; unset ac_cv_path_PKG_CONFIG;}
16483{ ac_cv_path_ac_pt_PKG_CONFIG=; unset ac_cv_path_ac_pt_PKG_CONFIG;}
16484
16485case "$PKG_CONFIG" in
16486 /*)
16487    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pkg-config is at least version $ntp_pkgconfig_min_version" >&5
16488printf %s "checking if pkg-config is at least version $ntp_pkgconfig_min_version... " >&6; }
16489    if $PKG_CONFIG --atleast-pkgconfig-version $ntp_pkgconfig_min_version; then
16490	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16491printf "%s\n" "yes" >&6; }
16492    else
16493	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16494printf "%s\n" "no" >&6; }
16495	PKG_CONFIG=""
16496    fi
16497    ;;
16498esac
16499
16500
16501
16502
16503# Check whether --enable-local-libevent was given.
16504if test ${enable_local_libevent+y}
16505then :
16506  enableval=$enable_local_libevent; ntp_use_local_libevent=$enableval
16507else $as_nop
16508  ntp_use_local_libevent=${ntp_use_local_libevent-detect}
16509
16510fi
16511
16512
16513
16514
16515
16516ntp_libevent_min_version=2
16517ntp_libevent_tearoff=sntp/libevent
16518
16519
16520
16521
16522
16523case "$ntp_use_local_libevent" in
16524 yes)
16525    ;;
16526 *) # If we have (a good enough) pkg-config, see if it can find libevent
16527    case "$PKG_CONFIG" in
16528     /*)
16529	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libevent $ntp_libevent_min_version or later is installed" >&5
16530printf %s "checking if libevent $ntp_libevent_min_version or later is installed... " >&6; }
16531	if $PKG_CONFIG --atleast-version=$ntp_libevent_min_version libevent
16532	then
16533	    ntp_use_local_libevent=no
16534	    ntp_libevent_version="`$PKG_CONFIG --modversion libevent`"
16535	    case "$ntp_libevent_version" in
16536	     *.*) ;;
16537	     *) ntp_libevent_version='(unknown)' ;;
16538	    esac
16539	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_libevent_version" >&5
16540printf "%s\n" "yes, version $ntp_libevent_version" >&6; }
16541	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
16542	    CPPFLAGS_LIBEVENT=`$PKG_CONFIG --cflags-only-I libevent`
16543	    # HMS: I hope the following is accurate.
16544	    # We don't need -levent, we only need  -levent_core.
16545	    # While we could grab only the -L stuff, there *might* be
16546	    # other flags there we want.  Originally we just removed -levent
16547	    # but then somebody decided to install -levent-2.0
16548	    # LDADD_LIBEVENT=`$PKG_CONFIG --libs libevent | sed 's:-levent::'`
16549	    # So now we dance...
16550	    LDADD_LIBEVENT=
16551	    for i in `$PKG_CONFIG --libs libevent` `$PKG_CONFIG --cflags-only-other libevent_pthreads`
16552	    do
16553		case "$i" in
16554		 -D*) ;;
16555		 -levent*) ;;
16556		 *) case "$LDADD_LIBEVENT" in
16557		     '') LDADD_LIBEVENT="$i" ;;
16558		     *) LDADD_LIBEVENT="$LDADD_LIBEVENT $i" ;;
16559		    esac
16560		    ;;
16561		esac
16562	    done
16563	    case "$LIBISC_PTHREADS_NOTHREADS" in
16564	     pthreads)
16565		LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_pthreads"
16566	    esac
16567	    LDADD_LIBEVENT="$LDADD_LIBEVENT -levent_core"
16568	else
16569	    ntp_use_local_libevent=yes
16570	    # HMS: do we only need to do this if LIBISC_PTHREADS_NOTHREADS
16571	    # is "pthreads"?
16572	    CFLAGS_LIBEVENT=`$PKG_CONFIG --cflags libevent_pthreads`
16573	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16574printf "%s\n" "no" >&6; }
16575	fi
16576	;;
16577     *)
16578	ntp_use_local_libevent=yes
16579	;;
16580    esac
16581    ;;
16582esac
16583
16584case "$ntp_use_local_libevent" in
16585 yes)
16586    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using libevent tearoff" >&5
16587printf "%s\n" "$as_me: Using libevent tearoff" >&6;}
16588    CPPFLAGS_LIBEVENT="-I\$(top_builddir)/$ntp_libevent_tearoff/include -I\$(top_srcdir)/$ntp_libevent_tearoff/include"
16589    case "$LIBISC_PTHREADS_NOTHREADS" in
16590     pthreads)
16591	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_pthreads.la \$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
16592	;;
16593     *)
16594	LDADD_LIBEVENT="\$(top_builddir)/$ntp_libevent_tearoff/libevent_core.la"
16595    esac
16596esac
16597
16598
16599 if test "x$ntp_use_local_libevent" = "xyes"; then
16600  BUILD_LIBEVENT_TRUE=
16601  BUILD_LIBEVENT_FALSE='#'
16602else
16603  BUILD_LIBEVENT_TRUE='#'
16604  BUILD_LIBEVENT_FALSE=
16605fi
16606
16607
16608
16609
16610
16611
16612# Expose a cross-compilation indicator to makefiles
16613 if test $build != $host; then
16614  NTP_CROSSCOMPILE_TRUE=
16615  NTP_CROSSCOMPILE_FALSE='#'
16616else
16617  NTP_CROSSCOMPILE_TRUE='#'
16618  NTP_CROSSCOMPILE_FALSE=
16619fi
16620
16621
16622
16623ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
16624if test "x$ac_cv_type_size_t" = xyes
16625then :
16626
16627else $as_nop
16628
16629printf "%s\n" "#define size_t unsigned int" >>confdefs.h
16630
16631fi
16632
16633{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
16634printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
16635if test ${ac_cv_c_undeclared_builtin_options+y}
16636then :
16637  printf %s "(cached) " >&6
16638else $as_nop
16639  ac_save_CFLAGS=$CFLAGS
16640   ac_cv_c_undeclared_builtin_options='cannot detect'
16641   for ac_arg in '' -fno-builtin; do
16642     CFLAGS="$ac_save_CFLAGS $ac_arg"
16643     # This test program should *not* compile successfully.
16644     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16645/* end confdefs.h.  */
16646
16647int
16648main (void)
16649{
16650(void) strchr;
16651  ;
16652  return 0;
16653}
16654_ACEOF
16655if ac_fn_c_try_compile "$LINENO"
16656then :
16657
16658else $as_nop
16659  # This test program should compile successfully.
16660        # No library function is consistently available on
16661        # freestanding implementations, so test against a dummy
16662        # declaration.  Include always-available headers on the
16663        # off chance that they somehow elicit warnings.
16664        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16665/* end confdefs.h.  */
16666#include <float.h>
16667#include <limits.h>
16668#include <stdarg.h>
16669#include <stddef.h>
16670extern void ac_decl (int, char *);
16671
16672int
16673main (void)
16674{
16675(void) ac_decl (0, (char *) 0);
16676  (void) ac_decl;
16677
16678  ;
16679  return 0;
16680}
16681_ACEOF
16682if ac_fn_c_try_compile "$LINENO"
16683then :
16684  if test x"$ac_arg" = x
16685then :
16686  ac_cv_c_undeclared_builtin_options='none needed'
16687else $as_nop
16688  ac_cv_c_undeclared_builtin_options=$ac_arg
16689fi
16690          break
16691fi
16692rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16693fi
16694rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16695    done
16696    CFLAGS=$ac_save_CFLAGS
16697
16698fi
16699{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
16700printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
16701  case $ac_cv_c_undeclared_builtin_options in #(
16702  'cannot detect') :
16703    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16704printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16705as_fn_error $? "cannot make $CC report undeclared builtins
16706See \`config.log' for more details" "$LINENO" 5; } ;; #(
16707  'none needed') :
16708    ac_c_undeclared_builtin_options='' ;; #(
16709  *) :
16710    ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
16711esac
16712
16713ac_fn_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS"
16714if test "x$ac_cv_have_decl_strerror_r" = xyes
16715then :
16716  ac_have_decl=1
16717else $as_nop
16718  ac_have_decl=0
16719fi
16720printf "%s\n" "#define HAVE_DECL_STRERROR_R $ac_have_decl" >>confdefs.h
16721
16722
16723
16724            # Check whether --enable-c99-snprintf was given.
16725if test ${enable_c99_snprintf+y}
16726then :
16727  enableval=$enable_c99_snprintf; force_c99_snprintf=$enableval
16728else $as_nop
16729  force_c99_snprintf=no
16730
16731fi
16732
16733    case "$force_c99_snprintf" in
16734     yes)
16735	hw_force_rpl_snprintf=yes
16736	hw_force_rpl_vsnprintf=yes
16737    esac
16738
16739
16740
16741
16742
16743
16744
16745
16746  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
16747printf %s "checking for unsigned long long int... " >&6; }
16748if test ${ac_cv_type_unsigned_long_long_int+y}
16749then :
16750  printf %s "(cached) " >&6
16751else $as_nop
16752  ac_cv_type_unsigned_long_long_int=yes
16753     case $ac_prog_cc_stdc in
16754       no | c89) ;;
16755       *)
16756	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757/* end confdefs.h.  */
16758
16759  /* For now, do not test the preprocessor; as of 2007 there are too many
16760	 implementations with broken preprocessors.  Perhaps this can
16761	 be revisited in 2012.  In the meantime, code should not expect
16762	 #if to work with literals wider than 32 bits.  */
16763      /* Test literals.  */
16764      long long int ll = 9223372036854775807ll;
16765      long long int nll = -9223372036854775807LL;
16766      unsigned long long int ull = 18446744073709551615ULL;
16767      /* Test constant expressions.   */
16768      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
16769		     ? 1 : -1)];
16770      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
16771		     ? 1 : -1)];
16772      int i = 63;
16773int
16774main (void)
16775{
16776/* Test availability of runtime routines for shift and division.  */
16777      long long int llmax = 9223372036854775807ll;
16778      unsigned long long int ullmax = 18446744073709551615ull;
16779      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
16780	      | (llmax / ll) | (llmax % ll)
16781	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
16782	      | (ullmax / ull) | (ullmax % ull));
16783  ;
16784  return 0;
16785}
16786
16787_ACEOF
16788if ac_fn_c_try_link "$LINENO"
16789then :
16790
16791else $as_nop
16792  ac_cv_type_unsigned_long_long_int=no
16793fi
16794rm -f core conftest.err conftest.$ac_objext conftest.beam \
16795    conftest$ac_exeext conftest.$ac_ext;;
16796     esac
16797fi
16798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
16799printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
16800  if test $ac_cv_type_unsigned_long_long_int = yes; then
16801
16802printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
16803
16804  fi
16805
16806
16807      ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
16808if test "x$ac_cv_func_vsnprintf" = xyes
16809then :
16810  hw_cv_func_vsnprintf=yes
16811else $as_nop
16812  hw_cv_func_vsnprintf=no
16813fi
16814
16815  if test "$hw_cv_func_vsnprintf" = yes
16816then :
16817  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf is C99 compliant" >&5
16818printf %s "checking whether vsnprintf is C99 compliant... " >&6; }
16819if test ${hw_cv_func_vsnprintf_c99+y}
16820then :
16821  printf %s "(cached) " >&6
16822else $as_nop
16823  if test "$cross_compiling" = yes
16824then :
16825  hw_cv_func_vsnprintf_c99=no
16826else $as_nop
16827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828/* end confdefs.h.  */
16829#if HAVE_STDARG_H
16830          #include <stdarg.h>
16831          #endif
16832          #include <stdio.h>
16833          static int testprintf(char *buf, size_t size, const char *format, ...)
16834          {
16835            int result;
16836            va_list ap;
16837            va_start(ap, format);
16838            result = vsnprintf(buf, size, format, ap);
16839            va_end(ap);
16840            return result;
16841          }
16842int
16843main (void)
16844{
16845char buf[43];
16846          if (testprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
16847              testprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
16848              buf[0] != 'T' || buf[3] != '\0')
16849            return 1;
16850  ;
16851  return 0;
16852}
16853_ACEOF
16854if ac_fn_c_try_run "$LINENO"
16855then :
16856  hw_cv_func_vsnprintf_c99=yes
16857else $as_nop
16858  hw_cv_func_vsnprintf_c99=no
16859fi
16860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16861  conftest.$ac_objext conftest.beam conftest.$ac_ext
16862fi
16863
16864fi
16865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_vsnprintf_c99" >&5
16866printf "%s\n" "$hw_cv_func_vsnprintf_c99" >&6; }
16867else $as_nop
16868  hw_cv_func_vsnprintf_c99=no
16869fi
16870
16871printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h
16872
16873  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement vsnprintf will be used" >&5
16874printf %s "checking if C99-snprintf replacement vsnprintf will be used... " >&6; }
16875  if test "${hw_force_rpl_vsnprintf=no}" = yes -o "$hw_cv_func_vsnprintf_c99" = no
16876then :
16877  hw_use_rpl_vsnprintf=yes
16878else $as_nop
16879  hw_use_rpl_vsnprintf=no
16880fi
16881  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_vsnprintf" >&5
16882printf "%s\n" "$hw_use_rpl_vsnprintf" >&6; }
16883  if test "$hw_use_rpl_vsnprintf" = yes
16884then :
16885
16886printf "%s\n" "#define HW_WANT_RPL_VSNPRINTF 1" >>confdefs.h
16887
16888    if test ${hw_nodef_vsnprintf=no} = no
16889then :
16890
16891printf "%s\n" "#define vsnprintf rpl_vsnprintf" >>confdefs.h
16892
16893fi
16894    ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
16895if test "x$ac_cv_header_inttypes_h" = xyes
16896then :
16897  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
16898
16899fi
16900ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
16901if test "x$ac_cv_header_locale_h" = xyes
16902then :
16903  printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h
16904
16905fi
16906ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default"
16907if test "x$ac_cv_header_stddef_h" = xyes
16908then :
16909  printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h
16910
16911fi
16912ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
16913if test "x$ac_cv_header_stdint_h" = xyes
16914then :
16915  printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h
16916
16917fi
16918
16919    ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
16920"
16921if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes
16922then :
16923
16924printf "%s\n" "#define HAVE_STRUCT_LCONV_DECIMAL_POINT 1" >>confdefs.h
16925
16926
16927fi
16928ac_fn_c_check_member "$LINENO" "struct lconv" "thousands_sep" "ac_cv_member_struct_lconv_thousands_sep" "#include <locale.h>
16929"
16930if test "x$ac_cv_member_struct_lconv_thousands_sep" = xyes
16931then :
16932
16933printf "%s\n" "#define HAVE_STRUCT_LCONV_THOUSANDS_SEP 1" >>confdefs.h
16934
16935
16936fi
16937
16938
16939  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
16940printf %s "checking for long double... " >&6; }
16941if test ${ac_cv_type_long_double+y}
16942then :
16943  printf %s "(cached) " >&6
16944else $as_nop
16945  if test "$GCC" = yes; then
16946       ac_cv_type_long_double=yes
16947     else
16948       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16949/* end confdefs.h.  */
16950/* The Stardent Vistra knows sizeof (long double), but does
16951		 not support it.  */
16952	      long double foo = 0.0L;
16953int
16954main (void)
16955{
16956static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
16957	      sizeof (double) <= sizeof (long double))];
16958test_array [0] = 0;
16959return test_array [0];
16960
16961  ;
16962  return 0;
16963}
16964_ACEOF
16965if ac_fn_c_try_compile "$LINENO"
16966then :
16967  ac_cv_type_long_double=yes
16968else $as_nop
16969  ac_cv_type_long_double=no
16970fi
16971rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
16972     fi
16973fi
16974{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
16975printf "%s\n" "$ac_cv_type_long_double" >&6; }
16976  if test $ac_cv_type_long_double = yes; then
16977
16978printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16979
16980  fi
16981
16982
16983
16984  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
16985printf %s "checking for long long int... " >&6; }
16986if test ${ac_cv_type_long_long_int+y}
16987then :
16988  printf %s "(cached) " >&6
16989else $as_nop
16990  ac_cv_type_long_long_int=yes
16991      case $ac_prog_cc_stdc in
16992	no | c89) ;;
16993	*)
16994	  ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
16995	  if test $ac_cv_type_long_long_int = yes; then
16996	    	    	    	    if test "$cross_compiling" = yes
16997then :
16998  :
16999else $as_nop
17000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17001/* end confdefs.h.  */
17002#include <limits.h>
17003		   #ifndef LLONG_MAX
17004		   # define HALF \
17005			    (1LL << (sizeof (long long int) * CHAR_BIT - 2))
17006		   # define LLONG_MAX (HALF - 1 + HALF)
17007		   #endif
17008int
17009main (void)
17010{
17011long long int n = 1;
17012		   int i;
17013		   for (i = 0; ; i++)
17014		     {
17015		       long long int m = n << i;
17016		       if (m >> i != n)
17017			 return 1;
17018		       if (LLONG_MAX / 2 < m)
17019			 break;
17020		     }
17021		   return 0;
17022  ;
17023  return 0;
17024}
17025_ACEOF
17026if ac_fn_c_try_run "$LINENO"
17027then :
17028
17029else $as_nop
17030  ac_cv_type_long_long_int=no
17031fi
17032rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17033  conftest.$ac_objext conftest.beam conftest.$ac_ext
17034fi
17035
17036	  fi;;
17037      esac
17038fi
17039{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
17040printf "%s\n" "$ac_cv_type_long_long_int" >&6; }
17041  if test $ac_cv_type_long_long_int = yes; then
17042
17043printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
17044
17045  fi
17046
17047
17048  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
17049printf %s "checking for unsigned long long int... " >&6; }
17050if test ${ac_cv_type_unsigned_long_long_int+y}
17051then :
17052  printf %s "(cached) " >&6
17053else $as_nop
17054  ac_cv_type_unsigned_long_long_int=yes
17055     case $ac_prog_cc_stdc in
17056       no | c89) ;;
17057       *)
17058	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17059/* end confdefs.h.  */
17060
17061  /* For now, do not test the preprocessor; as of 2007 there are too many
17062	 implementations with broken preprocessors.  Perhaps this can
17063	 be revisited in 2012.  In the meantime, code should not expect
17064	 #if to work with literals wider than 32 bits.  */
17065      /* Test literals.  */
17066      long long int ll = 9223372036854775807ll;
17067      long long int nll = -9223372036854775807LL;
17068      unsigned long long int ull = 18446744073709551615ULL;
17069      /* Test constant expressions.   */
17070      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
17071		     ? 1 : -1)];
17072      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
17073		     ? 1 : -1)];
17074      int i = 63;
17075int
17076main (void)
17077{
17078/* Test availability of runtime routines for shift and division.  */
17079      long long int llmax = 9223372036854775807ll;
17080      unsigned long long int ullmax = 18446744073709551615ull;
17081      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
17082	      | (llmax / ll) | (llmax % ll)
17083	      | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
17084	      | (ullmax / ull) | (ullmax % ull));
17085  ;
17086  return 0;
17087}
17088
17089_ACEOF
17090if ac_fn_c_try_link "$LINENO"
17091then :
17092
17093else $as_nop
17094  ac_cv_type_unsigned_long_long_int=no
17095fi
17096rm -f core conftest.err conftest.$ac_objext conftest.beam \
17097    conftest$ac_exeext conftest.$ac_ext;;
17098     esac
17099fi
17100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
17101printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; }
17102  if test $ac_cv_type_unsigned_long_long_int = yes; then
17103
17104printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
17105
17106  fi
17107
17108    ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
17109if test "x$ac_cv_type_size_t" = xyes
17110then :
17111
17112else $as_nop
17113
17114printf "%s\n" "#define size_t unsigned int" >>confdefs.h
17115
17116fi
17117
17118
17119
17120  ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default"
17121if test "x$ac_cv_type_intmax_t" = xyes
17122then :
17123
17124printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h
17125
17126else $as_nop
17127  test $ac_cv_type_long_long_int = yes \
17128       && ac_type='long long int' \
17129       || ac_type='long int'
17130
17131printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h
17132
17133fi
17134
17135
17136
17137
17138  ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default"
17139if test "x$ac_cv_type_uintmax_t" = xyes
17140then :
17141
17142printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h
17143
17144else $as_nop
17145  test $ac_cv_type_unsigned_long_long_int = yes \
17146       && ac_type='unsigned long long int' \
17147       || ac_type='unsigned long int'
17148
17149printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h
17150
17151fi
17152
17153
17154
17155  ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
17156if test "x$ac_cv_type_uintptr_t" = xyes
17157then :
17158
17159printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
17160
17161else $as_nop
17162  for ac_type in 'unsigned int' 'unsigned long int' \
17163	'unsigned long long int'; do
17164       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17165/* end confdefs.h.  */
17166$ac_includes_default
17167int
17168main (void)
17169{
17170static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
17171test_array [0] = 0;
17172return test_array [0];
17173
17174  ;
17175  return 0;
17176}
17177_ACEOF
17178if ac_fn_c_try_compile "$LINENO"
17179then :
17180
17181printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h
17182
17183	  ac_type=
17184fi
17185rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17186       test -z "$ac_type" && break
17187     done
17188fi
17189
17190
17191    ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
17192if test "x$ac_cv_type_ptrdiff_t" = xyes
17193then :
17194
17195printf "%s\n" "#define HAVE_PTRDIFF_T 1" >>confdefs.h
17196
17197
17198fi
17199
17200    ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv"
17201if test "x$ac_cv_func_localeconv" = xyes
17202then :
17203  printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h
17204
17205fi
17206
17207
17208  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
17209then :
17210  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
17211printf %s "checking for an ANSI C-conforming const... " >&6; }
17212if test ${ac_cv_c_const+y}
17213then :
17214  printf %s "(cached) " >&6
17215else $as_nop
17216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17217/* end confdefs.h.  */
17218
17219int
17220main (void)
17221{
17222
17223#ifndef __cplusplus
17224  /* Ultrix mips cc rejects this sort of thing.  */
17225  typedef int charset[2];
17226  const charset cs = { 0, 0 };
17227  /* SunOS 4.1.1 cc rejects this.  */
17228  char const *const *pcpcc;
17229  char **ppc;
17230  /* NEC SVR4.0.2 mips cc rejects this.  */
17231  struct point {int x, y;};
17232  static struct point const zero = {0,0};
17233  /* IBM XL C 1.02.0.0 rejects this.
17234     It does not let you subtract one const X* pointer from another in
17235     an arm of an if-expression whose if-part is not a constant
17236     expression */
17237  const char *g = "string";
17238  pcpcc = &g + (g ? g-g : 0);
17239  /* HPUX 7.0 cc rejects these. */
17240  ++pcpcc;
17241  ppc = (char**) pcpcc;
17242  pcpcc = (char const *const *) ppc;
17243  { /* SCO 3.2v4 cc rejects this sort of thing.  */
17244    char tx;
17245    char *t = &tx;
17246    char const *s = 0 ? (char *) 0 : (char const *) 0;
17247
17248    *t++ = 0;
17249    if (s) return 0;
17250  }
17251  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17252    int x[] = {25, 17};
17253    const int *foo = &x[0];
17254    ++foo;
17255  }
17256  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17257    typedef const int *iptr;
17258    iptr p = 0;
17259    ++p;
17260  }
17261  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
17262       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17263    struct s { int j; const int *ap[3]; } bx;
17264    struct s *b = &bx; b->j = 5;
17265  }
17266  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17267    const int foo = 10;
17268    if (!foo) return 0;
17269  }
17270  return !cs[0] && !zero.x;
17271#endif
17272
17273  ;
17274  return 0;
17275}
17276_ACEOF
17277if ac_fn_c_try_compile "$LINENO"
17278then :
17279  ac_cv_c_const=yes
17280else $as_nop
17281  ac_cv_c_const=no
17282fi
17283rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17284fi
17285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
17286printf "%s\n" "$ac_cv_c_const" >&6; }
17287if test $ac_cv_c_const = no; then
17288
17289printf "%s\n" "#define const /**/" >>confdefs.h
17290
17291fi
17292
17293
17294
17295
17296    case " $LIBOBJS " in
17297  *" snprintf.$ac_objext "* ) ;;
17298  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
17299 ;;
17300esac
17301
17302    _hw_cv_func_xprintf_replace_done=yes
17303fi
17304
17305fi
17306
17307
17308    ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
17309if test "x$ac_cv_func_snprintf" = xyes
17310then :
17311  hw_cv_func_snprintf=yes
17312else $as_nop
17313  hw_cv_func_snprintf=no
17314fi
17315
17316  if test "$hw_cv_func_snprintf" = yes
17317then :
17318  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is C99 compliant" >&5
17319printf %s "checking whether snprintf is C99 compliant... " >&6; }
17320if test ${hw_cv_func_snprintf_c99+y}
17321then :
17322  printf %s "(cached) " >&6
17323else $as_nop
17324  if test "$cross_compiling" = yes
17325then :
17326  hw_cv_func_snprintf_c99=no
17327else $as_nop
17328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17329/* end confdefs.h.  */
17330#include <stdio.h>
17331int
17332main (void)
17333{
17334char buf[43];
17335          if (snprintf(buf, 4, "The answer is %27.2g.", 42.0) != 42 ||
17336              snprintf(buf, 0, "No, it's %32zu.", (size_t)42) != 42 ||
17337              buf[0] != 'T' || buf[3] != '\0')
17338            return 1;
17339  ;
17340  return 0;
17341}
17342_ACEOF
17343if ac_fn_c_try_run "$LINENO"
17344then :
17345  hw_cv_func_snprintf_c99=yes
17346else $as_nop
17347  hw_cv_func_snprintf_c99=no
17348fi
17349rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17350  conftest.$ac_objext conftest.beam conftest.$ac_ext
17351fi
17352
17353fi
17354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_cv_func_snprintf_c99" >&5
17355printf "%s\n" "$hw_cv_func_snprintf_c99" >&6; }
17356else $as_nop
17357  hw_cv_func_snprintf_c99=no
17358fi
17359
17360printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h
17361
17362  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if C99-snprintf replacement snprintf will be used" >&5
17363printf %s "checking if C99-snprintf replacement snprintf will be used... " >&6; }
17364  if test "${hw_force_rpl_snprintf=no}" = yes -o "$hw_cv_func_snprintf_c99" = no
17365then :
17366  hw_use_rpl_snprintf=yes
17367else $as_nop
17368  hw_use_rpl_snprintf=no
17369fi
17370  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hw_use_rpl_snprintf" >&5
17371printf "%s\n" "$hw_use_rpl_snprintf" >&6; }
17372  if test "$hw_use_rpl_snprintf" = yes
17373then :
17374
17375printf "%s\n" "#define HW_WANT_RPL_SNPRINTF 1" >>confdefs.h
17376
17377    if test ${hw_nodef_snprintf=no} = no
17378then :
17379
17380printf "%s\n" "#define snprintf rpl_snprintf" >>confdefs.h
17381
17382fi
17383
17384  if test "x$_hw_cv_func_xprintf_replace_done" != xyes
17385then :
17386  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
17387printf %s "checking for an ANSI C-conforming const... " >&6; }
17388if test ${ac_cv_c_const+y}
17389then :
17390  printf %s "(cached) " >&6
17391else $as_nop
17392  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17393/* end confdefs.h.  */
17394
17395int
17396main (void)
17397{
17398
17399#ifndef __cplusplus
17400  /* Ultrix mips cc rejects this sort of thing.  */
17401  typedef int charset[2];
17402  const charset cs = { 0, 0 };
17403  /* SunOS 4.1.1 cc rejects this.  */
17404  char const *const *pcpcc;
17405  char **ppc;
17406  /* NEC SVR4.0.2 mips cc rejects this.  */
17407  struct point {int x, y;};
17408  static struct point const zero = {0,0};
17409  /* IBM XL C 1.02.0.0 rejects this.
17410     It does not let you subtract one const X* pointer from another in
17411     an arm of an if-expression whose if-part is not a constant
17412     expression */
17413  const char *g = "string";
17414  pcpcc = &g + (g ? g-g : 0);
17415  /* HPUX 7.0 cc rejects these. */
17416  ++pcpcc;
17417  ppc = (char**) pcpcc;
17418  pcpcc = (char const *const *) ppc;
17419  { /* SCO 3.2v4 cc rejects this sort of thing.  */
17420    char tx;
17421    char *t = &tx;
17422    char const *s = 0 ? (char *) 0 : (char const *) 0;
17423
17424    *t++ = 0;
17425    if (s) return 0;
17426  }
17427  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17428    int x[] = {25, 17};
17429    const int *foo = &x[0];
17430    ++foo;
17431  }
17432  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
17433    typedef const int *iptr;
17434    iptr p = 0;
17435    ++p;
17436  }
17437  { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying
17438       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
17439    struct s { int j; const int *ap[3]; } bx;
17440    struct s *b = &bx; b->j = 5;
17441  }
17442  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
17443    const int foo = 10;
17444    if (!foo) return 0;
17445  }
17446  return !cs[0] && !zero.x;
17447#endif
17448
17449  ;
17450  return 0;
17451}
17452_ACEOF
17453if ac_fn_c_try_compile "$LINENO"
17454then :
17455  ac_cv_c_const=yes
17456else $as_nop
17457  ac_cv_c_const=no
17458fi
17459rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17460fi
17461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
17462printf "%s\n" "$ac_cv_c_const" >&6; }
17463if test $ac_cv_c_const = no; then
17464
17465printf "%s\n" "#define const /**/" >>confdefs.h
17466
17467fi
17468
17469
17470
17471
17472    case " $LIBOBJS " in
17473  *" snprintf.$ac_objext "* ) ;;
17474  *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
17475 ;;
17476esac
17477
17478    _hw_cv_func_xprintf_replace_done=yes
17479fi
17480
17481fi
17482
17483
17484
17485
17486
17487# HMS: Save $LIBS and empty it.
17488# any LIBS we add here should go in to LDADD_LIBNTP
17489
17490__LIBS=$LIBS
17491LIBS=
17492
17493
17494
17495# [Bug 2332] because we need to know if we are using GNU ld...
17496
17497
17498# Check whether --with-gnu-ld was given.
17499if test ${with_gnu_ld+y}
17500then :
17501  withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
17502else $as_nop
17503  with_gnu_ld=no
17504fi
17505
17506ac_prog=ld
17507if test yes = "$GCC"; then
17508  # Check if gcc -print-prog-name=ld gives a path.
17509  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
17510printf %s "checking for ld used by $CC... " >&6; }
17511  case $host in
17512  *-*-mingw*)
17513    # gcc leaves a trailing carriage return, which upsets mingw
17514    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
17515  *)
17516    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
17517  esac
17518  case $ac_prog in
17519    # Accept absolute paths.
17520    [\\/]* | ?:[\\/]*)
17521      re_direlt='/[^/][^/]*/\.\./'
17522      # Canonicalize the pathname of ld
17523      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
17524      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
17525	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
17526      done
17527      test -z "$LD" && LD=$ac_prog
17528      ;;
17529  "")
17530    # If it fails, then pretend we aren't using GCC.
17531    ac_prog=ld
17532    ;;
17533  *)
17534    # If it is relative, then search for the first ld in PATH.
17535    with_gnu_ld=unknown
17536    ;;
17537  esac
17538elif test yes = "$with_gnu_ld"; then
17539  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
17540printf %s "checking for GNU ld... " >&6; }
17541else
17542  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
17543printf %s "checking for non-GNU ld... " >&6; }
17544fi
17545if test ${lt_cv_path_LD+y}
17546then :
17547  printf %s "(cached) " >&6
17548else $as_nop
17549  if test -z "$LD"; then
17550  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
17551  for ac_dir in $PATH; do
17552    IFS=$lt_save_ifs
17553    test -z "$ac_dir" && ac_dir=.
17554    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
17555      lt_cv_path_LD=$ac_dir/$ac_prog
17556      # Check to see if the program is GNU ld.  I'd rather use --version,
17557      # but apparently some variants of GNU ld only accept -v.
17558      # Break only if it was the GNU/non-GNU ld that we prefer.
17559      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
17560      *GNU* | *'with BFD'*)
17561	test no != "$with_gnu_ld" && break
17562	;;
17563      *)
17564	test yes != "$with_gnu_ld" && break
17565	;;
17566      esac
17567    fi
17568  done
17569  IFS=$lt_save_ifs
17570else
17571  lt_cv_path_LD=$LD # Let the user override the test with a path.
17572fi
17573fi
17574
17575LD=$lt_cv_path_LD
17576if test -n "$LD"; then
17577  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
17578printf "%s\n" "$LD" >&6; }
17579else
17580  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17581printf "%s\n" "no" >&6; }
17582fi
17583test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
17584{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
17585printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
17586if test ${lt_cv_prog_gnu_ld+y}
17587then :
17588  printf %s "(cached) " >&6
17589else $as_nop
17590  # I'd rather use --version here, but apparently some GNU lds only accept -v.
17591case `$LD -v 2>&1 </dev/null` in
17592*GNU* | *'with BFD'*)
17593  lt_cv_prog_gnu_ld=yes
17594  ;;
17595*)
17596  lt_cv_prog_gnu_ld=no
17597  ;;
17598esac
17599fi
17600{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
17601printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
17602with_gnu_ld=$lt_cv_prog_gnu_ld
17603
17604
17605
17606
17607
17608
17609
17610
17611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory path separator" >&5
17612printf %s "checking for directory path separator... " >&6; }
17613if test ${ntp_cv_dir_sep+y}
17614then :
17615  printf %s "(cached) " >&6
17616else $as_nop
17617
17618	case "$ntp_cv_dir_sep" in
17619	 '')
17620	    case "$host_os" in
17621	     *djgpp | *mingw32* | *emx*)
17622		ntp_cv_dir_sep="'\\'"
17623		;;
17624	     *)
17625		ntp_cv_dir_sep="'/'"
17626		;;
17627	    esac
17628	esac
17629
17630
17631fi
17632{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_dir_sep" >&5
17633printf "%s\n" "$ntp_cv_dir_sep" >&6; }
17634
17635printf "%s\n" "#define DIR_SEP $ntp_cv_dir_sep" >>confdefs.h
17636
17637
17638
17639    NTP_ORIG_LIBS="$LIBS"
17640
17641# Check whether --with-lineeditlibs was given.
17642if test ${with_lineeditlibs+y}
17643then :
17644  withval=$with_lineeditlibs; use_lineeditlibs="$withval"
17645else $as_nop
17646  use_lineeditlibs="edit,editline"
17647
17648fi
17649
17650    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking line editing libraries" >&5
17651printf %s "checking line editing libraries... " >&6; }
17652    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $use_lineeditlibs" >&5
17653printf "%s\n" "$use_lineeditlibs" >&6; }
17654    case "$use_lineeditlibs" in
17655     no)
17656	ntp_lib_lineedit=no
17657	;;
17658     *)
17659	for lineedit_lib in `echo $use_lineeditlibs | sed -e 's/,/ /'`; do
17660	    for term_lib in "" termcap curses ncurses; do
17661		case "$term_lib" in
17662		 '')
17663		    TRY_LIB="-l$lineedit_lib"
17664		    ;;
17665		 *)
17666		    TRY_LIB="-l$lineedit_lib -l$term_lib"
17667		    ;;
17668		esac
17669		LIBS="$NTP_ORIG_LIBS $TRY_LIB"
17670		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline() with $TRY_LIB" >&5
17671printf %s "checking for readline() with $TRY_LIB... " >&6; }
17672		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17673/* end confdefs.h.  */
17674
17675/* Override any GCC internal prototype to avoid an error.
17676   Use char because int might match the return type of a GCC
17677   builtin and then its argument prototype would still apply.  */
17678char readline ();
17679int
17680main (void)
17681{
17682return readline ();
17683  ;
17684  return 0;
17685}
17686_ACEOF
17687if ac_fn_c_try_link "$LINENO"
17688then :
17689  ntp_lib_lineedit="$TRY_LIB"
17690fi
17691rm -f core conftest.err conftest.$ac_objext conftest.beam \
17692    conftest$ac_exeext conftest.$ac_ext
17693		case "$ntp_lib_lineedit" in
17694		 '')
17695		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17696printf "%s\n" "no" >&6; }
17697		    ;;
17698		 *)
17699		    # Use readline()
17700		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17701printf "%s\n" "yes" >&6; }
17702		    break
17703		esac
17704		case "$term_lib" in
17705		 '')
17706		    # do not try el_gets without a terminal library
17707		    ;;
17708		 *)
17709		    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for el_gets() with $TRY_LIB" >&5
17710printf %s "checking for el_gets() with $TRY_LIB... " >&6; }
17711		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17712/* end confdefs.h.  */
17713
17714/* Override any GCC internal prototype to avoid an error.
17715   Use char because int might match the return type of a GCC
17716   builtin and then its argument prototype would still apply.  */
17717char el_gets ();
17718int
17719main (void)
17720{
17721return el_gets ();
17722  ;
17723  return 0;
17724}
17725_ACEOF
17726if ac_fn_c_try_link "$LINENO"
17727then :
17728  ntp_lib_lineedit="$TRY_LIB"
17729fi
17730rm -f core conftest.err conftest.$ac_objext conftest.beam \
17731    conftest$ac_exeext conftest.$ac_ext
17732		    case "$ntp_lib_lineedit" in
17733		     '')
17734			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17735printf "%s\n" "no" >&6; }
17736			;;
17737		     *) # Use el_gets()
17738			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17739printf "%s\n" "yes" >&6; }
17740			break
17741			;;
17742		    esac	# $ntp_lib_lineedit
17743		esac		# $term_lib
17744	    done
17745	    case "$ntp_lib_lineedit" in
17746	     '')
17747		;;
17748	     *)
17749		break
17750		;;
17751	    esac
17752	done
17753	LIBS="$NTP_ORIG_LIBS"
17754	;;
17755    esac	# $use_lineeditlibs
17756
17757    case "$ntp_lib_lineedit" in
17758     '')
17759	ntp_lib_lineedit="no"
17760	;;
17761     no)
17762	;;
17763     *)
17764	EDITLINE_LIBS="$ntp_lib_lineedit"
17765
17766	;;
17767    esac	# $ntp_lib_lineedit
17768
17769    case "$ntp_lib_lineedit" in
17770     no)
17771	;;
17772     *)
17773	ac_fn_c_check_header_compile "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
17774if test "x$ac_cv_header_readline_h" = xyes
17775then :
17776  printf "%s\n" "#define HAVE_READLINE_H 1" >>confdefs.h
17777
17778fi
17779ac_fn_c_check_header_compile "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
17780if test "x$ac_cv_header_readline_readline_h" = xyes
17781then :
17782  printf "%s\n" "#define HAVE_READLINE_READLINE_H 1" >>confdefs.h
17783
17784fi
17785ac_fn_c_check_header_compile "$LINENO" "histedit.h" "ac_cv_header_histedit_h" "$ac_includes_default"
17786if test "x$ac_cv_header_histedit_h" = xyes
17787then :
17788  printf "%s\n" "#define HAVE_HISTEDIT_H 1" >>confdefs.h
17789
17790fi
17791
17792	ac_fn_c_check_header_compile "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
17793if test "x$ac_cv_header_history_h" = xyes
17794then :
17795  printf "%s\n" "#define HAVE_HISTORY_H 1" >>confdefs.h
17796
17797fi
17798ac_fn_c_check_header_compile "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
17799if test "x$ac_cv_header_readline_history_h" = xyes
17800then :
17801  printf "%s\n" "#define HAVE_READLINE_HISTORY_H 1" >>confdefs.h
17802
17803fi
17804
17805
17806	case "$ac_cv_header_histedit_h" in
17807	 yes)
17808	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to el_init()" >&5
17809printf %s "checking number of arguments to el_init()... " >&6; }
17810if test ${ntp_cv_el_init_args+y}
17811then :
17812  printf %s "(cached) " >&6
17813else $as_nop
17814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17815/* end confdefs.h.  */
17816
17817			    #include <stdio.h>
17818			    #include <histedit.h>
17819
17820int
17821main (void)
17822{
17823
17824			    el_init("conftest", stdin, stdout, stderr);
17825
17826
17827  ;
17828  return 0;
17829}
17830_ACEOF
17831if ac_fn_c_try_compile "$LINENO"
17832then :
17833  ntp_cv_el_init_args=4
17834else $as_nop
17835  ntp_cv_el_init_args=3
17836
17837fi
17838rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17839
17840fi
17841{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_el_init_args" >&5
17842printf "%s\n" "$ntp_cv_el_init_args" >&6; }
17843
17844printf "%s\n" "#define EL_INIT_ARGS $ntp_cv_el_init_args" >>confdefs.h
17845
17846	esac
17847
17848	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether readline supports history" >&5
17849printf %s "checking whether readline supports history... " >&6; }
17850
17851	ntp_lib_lineedit_history="no"
17852	ORIG_LIBS="$LIBS"
17853	LIBS="$ORIG_LIBS $ntp_lib_lineedit"
17854	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17855/* end confdefs.h.  */
17856
17857/* Override any GCC internal prototype to avoid an error.
17858   Use char because int might match the return type of a GCC
17859   builtin and then its argument prototype would still apply.  */
17860char add_history ();
17861int
17862main (void)
17863{
17864return add_history ();
17865  ;
17866  return 0;
17867}
17868_ACEOF
17869if ac_fn_c_try_link "$LINENO"
17870then :
17871  ntp_lib_lineedit_history="yes"
17872fi
17873rm -f core conftest.err conftest.$ac_objext conftest.beam \
17874    conftest$ac_exeext conftest.$ac_ext
17875	LIBS="$ORIG_LIBS"
17876
17877	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_lib_lineedit_history" >&5
17878printf "%s\n" "$ntp_lib_lineedit_history" >&6; }
17879
17880	case "$ntp_lib_lineedit_history" in
17881	 yes)
17882
17883printf "%s\n" "#define HAVE_READLINE_HISTORY 1" >>confdefs.h
17884
17885	esac
17886    esac	# $ntp_lib_lineedit
17887    { NTP_ORIG_LIBS=; unset NTP_ORIG_LIBS;}
17888    { ORIG_LIBS=; unset ORIG_LIBS;}
17889    { TRY_LIB=; unset TRY_LIB;}
17890    { use_lineeditlibs=; unset use_lineeditlibs;}
17891
17892
17893LIBM=
17894case "$host" in
17895 *-*-darwin*)
17896    ;;
17897 *)
17898    _libs=$LIBS
17899    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
17900printf %s "checking for library containing cos... " >&6; }
17901if test ${ac_cv_search_cos+y}
17902then :
17903  printf %s "(cached) " >&6
17904else $as_nop
17905  ac_func_search_save_LIBS=$LIBS
17906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17907/* end confdefs.h.  */
17908
17909/* Override any GCC internal prototype to avoid an error.
17910   Use char because int might match the return type of a GCC
17911   builtin and then its argument prototype would still apply.  */
17912char cos ();
17913int
17914main (void)
17915{
17916return cos ();
17917  ;
17918  return 0;
17919}
17920_ACEOF
17921for ac_lib in '' m
17922do
17923  if test -z "$ac_lib"; then
17924    ac_res="none required"
17925  else
17926    ac_res=-l$ac_lib
17927    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17928  fi
17929  if ac_fn_c_try_link "$LINENO"
17930then :
17931  ac_cv_search_cos=$ac_res
17932fi
17933rm -f core conftest.err conftest.$ac_objext conftest.beam \
17934    conftest$ac_exeext
17935  if test ${ac_cv_search_cos+y}
17936then :
17937  break
17938fi
17939done
17940if test ${ac_cv_search_cos+y}
17941then :
17942
17943else $as_nop
17944  ac_cv_search_cos=no
17945fi
17946rm conftest.$ac_ext
17947LIBS=$ac_func_search_save_LIBS
17948fi
17949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
17950printf "%s\n" "$ac_cv_search_cos" >&6; }
17951ac_res=$ac_cv_search_cos
17952if test "$ac_res" != no
17953then :
17954  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17955  LIBM="-lm"
17956fi
17957
17958    LIBS=$_libs
17959    ;;
17960esac
17961
17962{ _libs=; unset _libs;}
17963
17964
17965
17966
17967if test "x$ac_cv_func_fork" = xyes; then
17968  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
17969printf %s "checking for working fork... " >&6; }
17970if test ${ac_cv_func_fork_works+y}
17971then :
17972  printf %s "(cached) " >&6
17973else $as_nop
17974  if test "$cross_compiling" = yes
17975then :
17976  ac_cv_func_fork_works=cross
17977else $as_nop
17978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17979/* end confdefs.h.  */
17980$ac_includes_default
17981int
17982main (void)
17983{
17984
17985	  /* By Ruediger Kuhlmann. */
17986	  return fork () < 0;
17987
17988  ;
17989  return 0;
17990}
17991_ACEOF
17992if ac_fn_c_try_run "$LINENO"
17993then :
17994  ac_cv_func_fork_works=yes
17995else $as_nop
17996  ac_cv_func_fork_works=no
17997fi
17998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17999  conftest.$ac_objext conftest.beam conftest.$ac_ext
18000fi
18001
18002fi
18003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
18004printf "%s\n" "$ac_cv_func_fork_works" >&6; }
18005
18006else
18007  ac_cv_func_fork_works=$ac_cv_func_fork
18008fi
18009if test "x$ac_cv_func_fork_works" = xcross; then
18010  case $host in
18011    *-*-amigaos* | *-*-msdosdjgpp*)
18012      # Override, as these systems have only a dummy fork() stub
18013      ac_cv_func_fork_works=no
18014      ;;
18015    *)
18016      ac_cv_func_fork_works=yes
18017      ;;
18018  esac
18019  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
18020printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
18021fi
18022ac_cv_func_vfork_works=$ac_cv_func_vfork
18023if test "x$ac_cv_func_vfork" = xyes; then
18024  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
18025printf %s "checking for working vfork... " >&6; }
18026if test ${ac_cv_func_vfork_works+y}
18027then :
18028  printf %s "(cached) " >&6
18029else $as_nop
18030  if test "$cross_compiling" = yes
18031then :
18032  ac_cv_func_vfork_works=cross
18033else $as_nop
18034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18035/* end confdefs.h.  */
18036/* Thanks to Paul Eggert for this test.  */
18037$ac_includes_default
18038#include <signal.h>
18039#include <sys/wait.h>
18040#ifdef HAVE_VFORK_H
18041# include <vfork.h>
18042#endif
18043
18044static void
18045do_nothing (int sig)
18046{
18047  (void) sig;
18048}
18049
18050/* On some sparc systems, changes by the child to local and incoming
18051   argument registers are propagated back to the parent.  The compiler
18052   is told about this with #include <vfork.h>, but some compilers
18053   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18054   static variable whose address is put into a register that is
18055   clobbered by the vfork.  */
18056static void
18057sparc_address_test (int arg)
18058{
18059  static pid_t child;
18060  if (!child) {
18061    child = vfork ();
18062    if (child < 0) {
18063      perror ("vfork");
18064      _exit(2);
18065    }
18066    if (!child) {
18067      arg = getpid();
18068      write(-1, "", 0);
18069      _exit (arg);
18070    }
18071  }
18072}
18073
18074int
18075main (void)
18076{
18077  pid_t parent = getpid ();
18078  pid_t child;
18079
18080  sparc_address_test (0);
18081
18082  /* On Solaris 2.4, changes by the child to the signal handler
18083     also munge signal handlers in the parent.  To detect this,
18084     start by putting the parent's handler in a known state.  */
18085  signal (SIGTERM, SIG_DFL);
18086
18087  child = vfork ();
18088
18089  if (child == 0) {
18090    /* Here is another test for sparc vfork register problems.  This
18091       test uses lots of local variables, at least as many local
18092       variables as main has allocated so far including compiler
18093       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18094       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18095       reuse the register of parent for one of the local variables,
18096       since it will think that parent can't possibly be used any more
18097       in this routine.  Assigning to the local variable will thus
18098       munge parent in the parent process.  */
18099    pid_t
18100      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18101      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18102    /* Convince the compiler that p..p7 are live; otherwise, it might
18103       use the same hardware register for all 8 local variables.  */
18104    if (p != p1 || p != p2 || p != p3 || p != p4
18105	|| p != p5 || p != p6 || p != p7)
18106      _exit(1);
18107
18108    /* Alter the child's signal handler.  */
18109    if (signal (SIGTERM, do_nothing) != SIG_DFL)
18110      _exit(1);
18111
18112    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18113       from child file descriptors.  If the child closes a descriptor
18114       before it execs or exits, this munges the parent's descriptor
18115       as well.  Test for this by closing stdout in the child.  */
18116    _exit(close(fileno(stdout)) != 0);
18117  } else {
18118    int status;
18119    struct stat st;
18120
18121    while (wait(&status) != child)
18122      ;
18123    return (
18124	 /* Was there some problem with vforking?  */
18125	 child < 0
18126
18127	 /* Did the child munge the parent's signal handler?  */
18128	 || signal (SIGTERM, SIG_DFL) != SIG_DFL
18129
18130	 /* Did the child fail?  (This shouldn't happen.)  */
18131	 || status
18132
18133	 /* Did the vfork/compiler bug occur?  */
18134	 || parent != getpid()
18135
18136	 /* Did the file descriptor bug occur?  */
18137	 || fstat(fileno(stdout), &st) != 0
18138	 );
18139  }
18140}
18141_ACEOF
18142if ac_fn_c_try_run "$LINENO"
18143then :
18144  ac_cv_func_vfork_works=yes
18145else $as_nop
18146  ac_cv_func_vfork_works=no
18147fi
18148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18149  conftest.$ac_objext conftest.beam conftest.$ac_ext
18150fi
18151
18152fi
18153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
18154printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
18155
18156fi;
18157if test "x$ac_cv_func_fork_works" = xcross; then
18158  ac_cv_func_vfork_works=$ac_cv_func_vfork
18159  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
18160printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
18161fi
18162
18163if test "x$ac_cv_func_vfork_works" = xyes; then
18164
18165printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
18166
18167else
18168
18169printf "%s\n" "#define vfork fork" >>confdefs.h
18170
18171fi
18172if test "x$ac_cv_func_fork_works" = xyes; then
18173
18174printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
18175
18176fi
18177
18178# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
18179# for constant arguments.  Useless!
18180{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
18181printf %s "checking for working alloca.h... " >&6; }
18182if test ${ac_cv_working_alloca_h+y}
18183then :
18184  printf %s "(cached) " >&6
18185else $as_nop
18186  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18187/* end confdefs.h.  */
18188#include <alloca.h>
18189int
18190main (void)
18191{
18192char *p = (char *) alloca (2 * sizeof (int));
18193			  if (p) return 0;
18194  ;
18195  return 0;
18196}
18197_ACEOF
18198if ac_fn_c_try_link "$LINENO"
18199then :
18200  ac_cv_working_alloca_h=yes
18201else $as_nop
18202  ac_cv_working_alloca_h=no
18203fi
18204rm -f core conftest.err conftest.$ac_objext conftest.beam \
18205    conftest$ac_exeext conftest.$ac_ext
18206fi
18207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
18208printf "%s\n" "$ac_cv_working_alloca_h" >&6; }
18209if test $ac_cv_working_alloca_h = yes; then
18210
18211printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h
18212
18213fi
18214
18215{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
18216printf %s "checking for alloca... " >&6; }
18217if test ${ac_cv_func_alloca_works+y}
18218then :
18219  printf %s "(cached) " >&6
18220else $as_nop
18221  if test $ac_cv_working_alloca_h = yes; then
18222  ac_cv_func_alloca_works=yes
18223else
18224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18225/* end confdefs.h.  */
18226#include <stdlib.h>
18227#include <stddef.h>
18228#ifndef alloca
18229# ifdef __GNUC__
18230#  define alloca __builtin_alloca
18231# elif defined _MSC_VER
18232#  include <malloc.h>
18233#  define alloca _alloca
18234# else
18235#  ifdef  __cplusplus
18236extern "C"
18237#  endif
18238void *alloca (size_t);
18239# endif
18240#endif
18241
18242int
18243main (void)
18244{
18245char *p = (char *) alloca (1);
18246				    if (p) return 0;
18247  ;
18248  return 0;
18249}
18250_ACEOF
18251if ac_fn_c_try_link "$LINENO"
18252then :
18253  ac_cv_func_alloca_works=yes
18254else $as_nop
18255  ac_cv_func_alloca_works=no
18256fi
18257rm -f core conftest.err conftest.$ac_objext conftest.beam \
18258    conftest$ac_exeext conftest.$ac_ext
18259fi
18260{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
18261printf "%s\n" "$ac_cv_func_alloca_works" >&6; }
18262fi
18263
18264if test $ac_cv_func_alloca_works = yes; then
18265
18266printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h
18267
18268else
18269  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
18270# that cause trouble.  Some versions do not even contain alloca or
18271# contain a buggy version.  If you still want to use their alloca,
18272# use ar to extract alloca.o from them instead of compiling alloca.c.
18273
18274ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
18275
18276printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h
18277
18278
18279{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
18280printf %s "checking stack direction for C alloca... " >&6; }
18281if test ${ac_cv_c_stack_direction+y}
18282then :
18283  printf %s "(cached) " >&6
18284else $as_nop
18285  if test "$cross_compiling" = yes
18286then :
18287  ac_cv_c_stack_direction=0
18288else $as_nop
18289  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18290/* end confdefs.h.  */
18291$ac_includes_default
18292int
18293find_stack_direction (int *addr, int depth)
18294{
18295  int dir, dummy = 0;
18296  if (! addr)
18297    addr = &dummy;
18298  *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
18299  dir = depth ? find_stack_direction (addr, depth - 1) : 0;
18300  return dir + dummy;
18301}
18302
18303int
18304main (int argc, char **argv)
18305{
18306  return find_stack_direction (0, argc + !argv + 20) < 0;
18307}
18308_ACEOF
18309if ac_fn_c_try_run "$LINENO"
18310then :
18311  ac_cv_c_stack_direction=1
18312else $as_nop
18313  ac_cv_c_stack_direction=-1
18314fi
18315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18316  conftest.$ac_objext conftest.beam conftest.$ac_ext
18317fi
18318
18319fi
18320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
18321printf "%s\n" "$ac_cv_c_stack_direction" >&6; }
18322printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h
18323
18324
18325fi
18326
18327
18328if test $ac_cv_have_decl_strerror_r = yes; then
18329  # For backward compatibility's sake, define HAVE_STRERROR_R.
18330  # (We used to run AC_CHECK_FUNCS_ONCE for strerror_r, as well
18331  # as AC_CHECK_DECLS_ONCE.)
18332
18333printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h
18334
18335fi
18336
18337{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
18338printf %s "checking whether strerror_r returns char *... " >&6; }
18339if test ${ac_cv_func_strerror_r_char_p+y}
18340then :
18341  printf %s "(cached) " >&6
18342else $as_nop
18343
18344    ac_cv_func_strerror_r_char_p=no
18345    if test $ac_cv_have_decl_strerror_r = yes; then
18346      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18347/* end confdefs.h.  */
18348#include <string.h>
18349int
18350main (void)
18351{
18352
18353	  char buf[100];
18354	  char x = *strerror_r (0, buf, sizeof buf);
18355	  char *p = strerror_r (0, buf, sizeof buf);
18356	  return !p || x;
18357
18358  ;
18359  return 0;
18360}
18361_ACEOF
18362if ac_fn_c_try_compile "$LINENO"
18363then :
18364  ac_cv_func_strerror_r_char_p=yes
18365fi
18366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18367
18368    fi
18369
18370fi
18371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
18372printf "%s\n" "$ac_cv_func_strerror_r_char_p" >&6; }
18373if test $ac_cv_func_strerror_r_char_p = yes; then
18374
18375printf "%s\n" "#define STRERROR_R_CHAR_P 1" >>confdefs.h
18376
18377fi
18378
18379
18380ac_busted_vpath_in_make=no
18381case "$build" in
18382 *-*-irix6.1*)	# 64 bit only
18383    # busted vpath?
18384    ;;
18385 *-*-irix6*)	# 6.2 (and later?)
18386    ac_busted_vpath_in_make=yes
18387    ;;
18388 *-*-solaris2.5.1)
18389    ac_busted_vpath_in_make=yes
18390    ;;
18391 *-*-unicosmp*)
18392    ac_busted_vpath_in_make=yes
18393    ;;
18394esac
18395
18396case "$ac_busted_vpath_in_make$srcdir" in
18397 yes.|no*)
18398    ;;
18399 *) case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make'`" in
18400     '')
18401	as_fn_error $? "building outside of the main directory requires GNU make" "$LINENO" 5
18402    esac
18403    ;;
18404esac
18405
18406case "$host" in
18407 *-*-aix4*)
18408	# Bug 2516:
18409	# Was *-*-aix[[4-9]]*
18410	# XXX only verified thru AIX6.  But...
18411	# Ken Link says this is fine for AIX 5.3 and 7.1, and sees no reason
18412	# that this support would be in 5.3, removed in 6, and added back.
18413	#
18414	# (prr) aix 4.1 doesn't have clock_settime, but in aix 4.3 it's a stub
18415	# (returning ENOSYS).  I didn't check 4.2.  If, in the future,
18416	# IBM pulls its thumbs out long enough to implement clock_settime,
18417	# this conditional will need to change.  Maybe use AC_TRY_RUN
18418	# instead to try to set the time to itself and check errno.
18419    ;;
18420 *)
18421    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18422printf %s "checking for library containing clock_gettime... " >&6; }
18423if test ${ac_cv_search_clock_gettime+y}
18424then :
18425  printf %s "(cached) " >&6
18426else $as_nop
18427  ac_func_search_save_LIBS=$LIBS
18428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18429/* end confdefs.h.  */
18430
18431/* Override any GCC internal prototype to avoid an error.
18432   Use char because int might match the return type of a GCC
18433   builtin and then its argument prototype would still apply.  */
18434char clock_gettime ();
18435int
18436main (void)
18437{
18438return clock_gettime ();
18439  ;
18440  return 0;
18441}
18442_ACEOF
18443for ac_lib in '' rt
18444do
18445  if test -z "$ac_lib"; then
18446    ac_res="none required"
18447  else
18448    ac_res=-l$ac_lib
18449    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18450  fi
18451  if ac_fn_c_try_link "$LINENO"
18452then :
18453  ac_cv_search_clock_gettime=$ac_res
18454fi
18455rm -f core conftest.err conftest.$ac_objext conftest.beam \
18456    conftest$ac_exeext
18457  if test ${ac_cv_search_clock_gettime+y}
18458then :
18459  break
18460fi
18461done
18462if test ${ac_cv_search_clock_gettime+y}
18463then :
18464
18465else $as_nop
18466  ac_cv_search_clock_gettime=no
18467fi
18468rm conftest.$ac_ext
18469LIBS=$ac_func_search_save_LIBS
18470fi
18471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18472printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
18473ac_res=$ac_cv_search_clock_gettime
18474if test "$ac_res" != no
18475then :
18476  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18477  case "$ac_cv_search_clock_gettime" in
18478 'none required') ;;
18479 no) ;;
18480 *) LDADD_LIBNTP="$ac_cv_search_clock_gettime $LDADD_LIBNTP" ;;
18481 esac
18482
18483fi
18484
18485    ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
18486if test "x$ac_cv_func_clock_getres" = xyes
18487then :
18488  printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
18489
18490fi
18491ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
18492if test "x$ac_cv_func_clock_gettime" = xyes
18493then :
18494  printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
18495
18496fi
18497ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
18498if test "x$ac_cv_func_clock_settime" = xyes
18499then :
18500  printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
18501
18502fi
18503
18504    ;;
18505esac
18506
18507ac_fn_c_check_func "$LINENO" "getclock" "ac_cv_func_getclock"
18508if test "x$ac_cv_func_getclock" = xyes
18509then :
18510  printf "%s\n" "#define HAVE_GETCLOCK 1" >>confdefs.h
18511
18512fi
18513ac_fn_c_check_func "$LINENO" "stime" "ac_cv_func_stime"
18514if test "x$ac_cv_func_stime" = xyes
18515then :
18516  printf "%s\n" "#define HAVE_STIME 1" >>confdefs.h
18517
18518fi
18519ac_fn_c_check_func "$LINENO" "timegm" "ac_cv_func_timegm"
18520if test "x$ac_cv_func_timegm" = xyes
18521then :
18522  printf "%s\n" "#define HAVE_TIMEGM 1" >>confdefs.h
18523
18524fi
18525ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
18526if test "x$ac_cv_func_strlcpy" = xyes
18527then :
18528  printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h
18529
18530fi
18531ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
18532if test "x$ac_cv_func_strlcat" = xyes
18533then :
18534  printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h
18535
18536fi
18537
18538
18539# Bug 2713
18540LDADD_LIBUTIL=
18541
18542{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing snprintb" >&5
18543printf %s "checking for library containing snprintb... " >&6; }
18544if test ${ac_cv_search_snprintb+y}
18545then :
18546  printf %s "(cached) " >&6
18547else $as_nop
18548  ac_func_search_save_LIBS=$LIBS
18549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18550/* end confdefs.h.  */
18551
18552/* Override any GCC internal prototype to avoid an error.
18553   Use char because int might match the return type of a GCC
18554   builtin and then its argument prototype would still apply.  */
18555char snprintb ();
18556int
18557main (void)
18558{
18559return snprintb ();
18560  ;
18561  return 0;
18562}
18563_ACEOF
18564for ac_lib in '' util
18565do
18566  if test -z "$ac_lib"; then
18567    ac_res="none required"
18568  else
18569    ac_res=-l$ac_lib
18570    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18571  fi
18572  if ac_fn_c_try_link "$LINENO"
18573then :
18574  ac_cv_search_snprintb=$ac_res
18575fi
18576rm -f core conftest.err conftest.$ac_objext conftest.beam \
18577    conftest$ac_exeext
18578  if test ${ac_cv_search_snprintb+y}
18579then :
18580  break
18581fi
18582done
18583if test ${ac_cv_search_snprintb+y}
18584then :
18585
18586else $as_nop
18587  ac_cv_search_snprintb=no
18588fi
18589rm conftest.$ac_ext
18590LIBS=$ac_func_search_save_LIBS
18591fi
18592{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_snprintb" >&5
18593printf "%s\n" "$ac_cv_search_snprintb" >&6; }
18594ac_res=$ac_cv_search_snprintb
18595if test "$ac_res" != no
18596then :
18597  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18598  case "$ac_cv_search_snprintb" in
18599 'none required') ;;
18600 no) ;;
18601 *) LDADD_LIBUTIL="$ac_cv_search_snprintb $LDADD_LIBUTIL" ;;
18602 esac
18603
18604printf "%s\n" "#define USE_SNPRINTB 1" >>confdefs.h
18605
18606fi
18607
18608
18609#
18610ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default"
18611if test "x$ac_cv_header_errno_h" = xyes
18612then :
18613  printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h
18614
18615fi
18616ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
18617if test "x$ac_cv_header_sys_socket_h" = xyes
18618then :
18619  printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h
18620
18621fi
18622ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
18623if test "x$ac_cv_header_sys_types_h" = xyes
18624then :
18625  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
18626
18627fi
18628ac_fn_c_check_header_compile "$LINENO" "time.h" "ac_cv_header_time_h" "$ac_includes_default"
18629if test "x$ac_cv_header_time_h" = xyes
18630then :
18631  printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h
18632
18633fi
18634
18635ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "
18636    #ifdef HAVE_SYS_SOCKET_H
18637    # include <sys/socket.h>
18638    #endif
18639
18640"
18641if test "x$ac_cv_header_net_if_h" = xyes
18642then :
18643  printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h
18644
18645fi
18646
18647case "$host" in
18648 *-hp-hpux*)
18649    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/if.h requires mpinfou predeclaration" >&5
18650printf %s "checking if net/if.h requires mpinfou predeclaration... " >&6; }
18651if test ${ntp_cv_predecl_mpinfou+y}
18652then :
18653  printf %s "(cached) " >&6
18654else $as_nop
18655
18656	    np_cv_predecl_mpinfou=no
18657	    case "$ac_cv_header_net_if_h" in
18658	     no)
18659		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18660/* end confdefs.h.  */
18661
18662			    typedef union mpinfou {
18663				    struct pdk_mpinfo *pdkptr;
18664				    struct mpinfo *pikptr;
18665			    } mpinfou_t;
18666			    #ifdef HAVE_SYS_SOCKET_H
18667			    # include <sys/socket.h>
18668			    #endif
18669			    #include <net/if.h>
18670
18671int
18672main (void)
18673{
18674
18675
18676
18677  ;
18678  return 0;
18679}
18680_ACEOF
18681if ac_fn_c_try_compile "$LINENO"
18682then :
18683
18684			ntp_cv_predecl_mpinfou=yes
18685			ac_cv_header_net_if_h=yes
18686
18687
18688fi
18689rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18690	    esac
18691
18692
18693fi
18694{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_predecl_mpinfou" >&5
18695printf "%s\n" "$ntp_cv_predecl_mpinfou" >&6; }
18696    case "$ntp_cv_predecl_mpinfou" in
18697     yes)
18698	cat >>confdefs.h <<_ACEOF
18699#ifndef MPINFOU_PREDECLARED
18700# define MPINFOU_PREDECLARED
18701typedef union mpinfou {
18702	struct pdk_mpinfo *pdkptr;
18703	struct mpinfo *pikptr;
18704} mpinfou_t;
18705#endif
18706_ACEOF
18707
18708    esac
18709esac
18710
18711case "$host" in
18712 *-linux*)
18713    ac_fn_c_check_header_compile "$LINENO" "linux/if_addr.h" "ac_cv_header_linux_if_addr_h" "
18714	#ifdef HAVE_SYS_SOCKET_H
18715	# include <sys/socket.h>
18716	#endif
18717
18718"
18719if test "x$ac_cv_header_linux_if_addr_h" = xyes
18720then :
18721  printf "%s\n" "#define HAVE_LINUX_IF_ADDR_H 1" >>confdefs.h
18722
18723fi
18724
18725
18726printf "%s\n" "#define NEED_EARLY_FORK 1" >>confdefs.h
18727
18728esac
18729
18730ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default"
18731if test "x$ac_cv_header_arpa_nameser_h" = xyes
18732then :
18733  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
18734
18735fi
18736ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
18737if test "x$ac_cv_header_sys_param_h" = xyes
18738then :
18739  printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h
18740
18741fi
18742ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
18743if test "x$ac_cv_header_sys_time_h" = xyes
18744then :
18745  printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
18746
18747fi
18748ac_fn_c_check_header_compile "$LINENO" "sys/timers.h" "ac_cv_header_sys_timers_h" "$ac_includes_default"
18749if test "x$ac_cv_header_sys_timers_h" = xyes
18750then :
18751  printf "%s\n" "#define HAVE_SYS_TIMERS_H 1" >>confdefs.h
18752
18753fi
18754
18755# sys/sysctl.h depends on sys/param.h on OpenBSD - Bug 1576
18756ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "
18757    #if defined HAVE_SYS_PARAM_H
18758    # include <sys/param.h>
18759    #endif
18760
18761"
18762if test "x$ac_cv_header_sys_sysctl_h" = xyes
18763then :
18764  printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h
18765
18766fi
18767
18768ac_fn_c_check_header_compile "$LINENO" "netinet/in_system.h" "ac_cv_header_netinet_in_system_h" "$ac_includes_default"
18769if test "x$ac_cv_header_netinet_in_system_h" = xyes
18770then :
18771  printf "%s\n" "#define HAVE_NETINET_IN_SYSTEM_H 1" >>confdefs.h
18772
18773fi
18774ac_fn_c_check_header_compile "$LINENO" "netinet/in_systm.h" "ac_cv_header_netinet_in_systm_h" "$ac_includes_default"
18775if test "x$ac_cv_header_netinet_in_systm_h" = xyes
18776then :
18777  printf "%s\n" "#define HAVE_NETINET_IN_SYSTM_H 1" >>confdefs.h
18778
18779fi
18780ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
18781if test "x$ac_cv_header_netinet_in_h" = xyes
18782then :
18783  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
18784
18785fi
18786
18787
18788ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "
18789    #ifdef HAVE_SYS_TYPES_H
18790    # include <sys/types.h>
18791    #endif
18792    #ifdef HAVE_NETINET_IN_H
18793    # include <netinet/in.h>
18794    #endif
18795    #ifdef HAVE_ARPA_NAMESER_H
18796    # include <arpa/nameser.h>
18797    #endif
18798
18799"
18800if test "x$ac_cv_header_resolv_h" = xyes
18801then :
18802  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
18803
18804fi
18805
18806
18807ac_fn_c_check_header_compile "$LINENO" "net/if_var.h" "ac_cv_header_net_if_var_h" "
18808    #if HAVE_SYS_TYPES_H
18809    # include <sys/types.h>
18810    #endif
18811    #ifdef HAVE_SYS_SOCKET_H
18812    # include <sys/socket.h>
18813    #endif
18814    #ifdef HAVE_NETINET_IN_H
18815    # include <netinet/in.h>
18816    #endif
18817    #ifdef HAVE_NET_IF_H
18818    # include <net/if.h>
18819    #endif
18820
18821"
18822if test "x$ac_cv_header_net_if_var_h" = xyes
18823then :
18824  printf "%s\n" "#define HAVE_NET_IF_VAR_H 1" >>confdefs.h
18825
18826fi
18827
18828
18829ac_fn_c_check_header_compile "$LINENO" "netinet/ip.h" "ac_cv_header_netinet_ip_h" "
18830    #ifdef HAVE_SYS_TYPES_H
18831    # include <sys/types.h>
18832    #endif
18833    #ifdef HAVE_SYS_SOCKET_H
18834    # include <sys/socket.h>
18835    #endif
18836    #ifdef HAVE_NET_IF_H
18837    # include <net/if.h>
18838    #endif
18839    #ifdef HAVE_NETINET_IN_H
18840    # include <netinet/in.h>
18841    #endif
18842    #ifdef HAVE_NET_IF_VAR_H
18843    # include <net/if_var.h>
18844    #endif
18845    #ifdef HAVE_NETINET_IN_SYSTM_H
18846    # include <netinet/in_systm.h>
18847    #endif
18848
18849"
18850if test "x$ac_cv_header_netinet_ip_h" = xyes
18851then :
18852  printf "%s\n" "#define HAVE_NETINET_IP_H 1" >>confdefs.h
18853
18854fi
18855ac_fn_c_check_header_compile "$LINENO" "netinet/in_var.h" "ac_cv_header_netinet_in_var_h" "
18856    #ifdef HAVE_SYS_TYPES_H
18857    # include <sys/types.h>
18858    #endif
18859    #ifdef HAVE_SYS_SOCKET_H
18860    # include <sys/socket.h>
18861    #endif
18862    #ifdef HAVE_NET_IF_H
18863    # include <net/if.h>
18864    #endif
18865    #ifdef HAVE_NETINET_IN_H
18866    # include <netinet/in.h>
18867    #endif
18868    #ifdef HAVE_NET_IF_VAR_H
18869    # include <net/if_var.h>
18870    #endif
18871    #ifdef HAVE_NETINET_IN_SYSTM_H
18872    # include <netinet/in_systm.h>
18873    #endif
18874
18875"
18876if test "x$ac_cv_header_netinet_in_var_h" = xyes
18877then :
18878  printf "%s\n" "#define HAVE_NETINET_IN_VAR_H 1" >>confdefs.h
18879
18880fi
18881
18882
18883# HMS: Do we need to check for -lsocket before or after these tests?
18884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_pton" >&5
18885printf %s "checking for library containing inet_pton... " >&6; }
18886if test ${ac_cv_search_inet_pton+y}
18887then :
18888  printf %s "(cached) " >&6
18889else $as_nop
18890  ac_func_search_save_LIBS=$LIBS
18891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18892/* end confdefs.h.  */
18893
18894/* Override any GCC internal prototype to avoid an error.
18895   Use char because int might match the return type of a GCC
18896   builtin and then its argument prototype would still apply.  */
18897char inet_pton ();
18898int
18899main (void)
18900{
18901return inet_pton ();
18902  ;
18903  return 0;
18904}
18905_ACEOF
18906for ac_lib in '' nsl
18907do
18908  if test -z "$ac_lib"; then
18909    ac_res="none required"
18910  else
18911    ac_res=-l$ac_lib
18912    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18913  fi
18914  if ac_fn_c_try_link "$LINENO"
18915then :
18916  ac_cv_search_inet_pton=$ac_res
18917fi
18918rm -f core conftest.err conftest.$ac_objext conftest.beam \
18919    conftest$ac_exeext
18920  if test ${ac_cv_search_inet_pton+y}
18921then :
18922  break
18923fi
18924done
18925if test ${ac_cv_search_inet_pton+y}
18926then :
18927
18928else $as_nop
18929  ac_cv_search_inet_pton=no
18930fi
18931rm conftest.$ac_ext
18932LIBS=$ac_func_search_save_LIBS
18933fi
18934{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_pton" >&5
18935printf "%s\n" "$ac_cv_search_inet_pton" >&6; }
18936ac_res=$ac_cv_search_inet_pton
18937if test "$ac_res" != no
18938then :
18939  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18940  case "$ac_cv_search_inet_pton" in
18941 'none required') ;;
18942 no) ;;
18943 *) LDADD_LIBNTP="$ac_cv_search_inet_pton $LDADD_LIBNTP" ;;
18944 esac
18945
18946fi
18947
18948{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
18949printf %s "checking for library containing inet_ntop... " >&6; }
18950if test ${ac_cv_search_inet_ntop+y}
18951then :
18952  printf %s "(cached) " >&6
18953else $as_nop
18954  ac_func_search_save_LIBS=$LIBS
18955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18956/* end confdefs.h.  */
18957
18958/* Override any GCC internal prototype to avoid an error.
18959   Use char because int might match the return type of a GCC
18960   builtin and then its argument prototype would still apply.  */
18961char inet_ntop ();
18962int
18963main (void)
18964{
18965return inet_ntop ();
18966  ;
18967  return 0;
18968}
18969_ACEOF
18970for ac_lib in '' resolv
18971do
18972  if test -z "$ac_lib"; then
18973    ac_res="none required"
18974  else
18975    ac_res=-l$ac_lib
18976    LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
18977  fi
18978  if ac_fn_c_try_link "$LINENO"
18979then :
18980  ac_cv_search_inet_ntop=$ac_res
18981fi
18982rm -f core conftest.err conftest.$ac_objext conftest.beam \
18983    conftest$ac_exeext
18984  if test ${ac_cv_search_inet_ntop+y}
18985then :
18986  break
18987fi
18988done
18989if test ${ac_cv_search_inet_ntop+y}
18990then :
18991
18992else $as_nop
18993  ac_cv_search_inet_ntop=no
18994fi
18995rm conftest.$ac_ext
18996LIBS=$ac_func_search_save_LIBS
18997fi
18998{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
18999printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
19000ac_res=$ac_cv_search_inet_ntop
19001if test "$ac_res" != no
19002then :
19003  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19004  case "$ac_cv_search_inet_ntop" in
19005 'none required') ;;
19006 no) ;;
19007 *) LDADD_LIBNTP="$ac_cv_search_inet_ntop $LDADD_LIBNTP" ;;
19008 esac
19009
19010fi
19011
19012
19013# [Bug 1628] On Solaris, we need -lxnet -lsocket.  Generalize this to
19014# avoid keying on the OS name:  If we find socket functions in
19015# libsocket, next try for them in libxnet without libsocket, if found,
19016# list both.  If we simply tested libxnet first, we would find the
19017# functions there and never add libsocket.  See also [Bug 660]
19018# http://bugs.ntp.org/show_bug.cgi?id=660#c9
19019saved_LIBS=$LIBS
19020{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
19021printf %s "checking for library containing setsockopt... " >&6; }
19022if test ${ac_cv_search_setsockopt+y}
19023then :
19024  printf %s "(cached) " >&6
19025else $as_nop
19026  ac_func_search_save_LIBS=$LIBS
19027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19028/* end confdefs.h.  */
19029
19030/* Override any GCC internal prototype to avoid an error.
19031   Use char because int might match the return type of a GCC
19032   builtin and then its argument prototype would still apply.  */
19033char setsockopt ();
19034int
19035main (void)
19036{
19037return setsockopt ();
19038  ;
19039  return 0;
19040}
19041_ACEOF
19042for ac_lib in '' socket
19043do
19044  if test -z "$ac_lib"; then
19045    ac_res="none required"
19046  else
19047    ac_res=-l$ac_lib
19048    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19049  fi
19050  if ac_fn_c_try_link "$LINENO"
19051then :
19052  ac_cv_search_setsockopt=$ac_res
19053fi
19054rm -f core conftest.err conftest.$ac_objext conftest.beam \
19055    conftest$ac_exeext
19056  if test ${ac_cv_search_setsockopt+y}
19057then :
19058  break
19059fi
19060done
19061if test ${ac_cv_search_setsockopt+y}
19062then :
19063
19064else $as_nop
19065  ac_cv_search_setsockopt=no
19066fi
19067rm conftest.$ac_ext
19068LIBS=$ac_func_search_save_LIBS
19069fi
19070{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
19071printf "%s\n" "$ac_cv_search_setsockopt" >&6; }
19072ac_res=$ac_cv_search_setsockopt
19073if test "$ac_res" != no
19074then :
19075  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19076  case "$ac_cv_search_setsockopt" in
19077 'none required') ;;
19078 no) ;;
19079 *) LDADD_LIBNTP="$ac_cv_search_setsockopt $LDADD_LIBNTP" ;;
19080 esac
19081
19082fi
19083
19084case "$ac_cv_search_setsockopt" in
19085 -lsocket)
19086    LIBS="$saved_LIBS"
19087    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsockopt" >&5
19088printf %s "checking for library containing getsockopt... " >&6; }
19089if test ${ac_cv_search_getsockopt+y}
19090then :
19091  printf %s "(cached) " >&6
19092else $as_nop
19093  ac_func_search_save_LIBS=$LIBS
19094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19095/* end confdefs.h.  */
19096
19097/* Override any GCC internal prototype to avoid an error.
19098   Use char because int might match the return type of a GCC
19099   builtin and then its argument prototype would still apply.  */
19100char getsockopt ();
19101int
19102main (void)
19103{
19104return getsockopt ();
19105  ;
19106  return 0;
19107}
19108_ACEOF
19109for ac_lib in '' xnet
19110do
19111  if test -z "$ac_lib"; then
19112    ac_res="none required"
19113  else
19114    ac_res=-l$ac_lib
19115    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
19116  fi
19117  if ac_fn_c_try_link "$LINENO"
19118then :
19119  ac_cv_search_getsockopt=$ac_res
19120fi
19121rm -f core conftest.err conftest.$ac_objext conftest.beam \
19122    conftest$ac_exeext
19123  if test ${ac_cv_search_getsockopt+y}
19124then :
19125  break
19126fi
19127done
19128if test ${ac_cv_search_getsockopt+y}
19129then :
19130
19131else $as_nop
19132  ac_cv_search_getsockopt=no
19133fi
19134rm conftest.$ac_ext
19135LIBS=$ac_func_search_save_LIBS
19136fi
19137{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsockopt" >&5
19138printf "%s\n" "$ac_cv_search_getsockopt" >&6; }
19139ac_res=$ac_cv_search_getsockopt
19140if test "$ac_res" != no
19141then :
19142  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19143  case "$ac_cv_search_getsockopt" in
19144 'none required') ;;
19145 no) ;;
19146 *) LDADD_LIBNTP="$ac_cv_search_getsockopt $LDADD_LIBNTP" ;;
19147 esac
19148
19149fi
19150
19151    # XXX Possible trouble here - reading the comments above and looking at the
19152    # code below I wonder if we'll add -lxnet when we don't need it.
19153    # Also, do we need to add -lxnet to LDADD_LIBNTP, or perhaps see if it's
19154    # there when it is not needed?
19155    case "$ac_cv_search_getsockopt" in
19156     -lxnet)
19157	LIBS="-lxnet -lsocket $saved_LIBS"
19158	;;
19159     *) LIBS="-lsocket $saved_LIBS"
19160	;;
19161    esac
19162    ;;
19163esac
19164{ saved_LIBS=; unset saved_LIBS;}
19165
19166# Bug 2427 - look for recvmsg here.
19167ac_fn_c_check_func "$LINENO" "recvmsg" "ac_cv_func_recvmsg"
19168if test "x$ac_cv_func_recvmsg" = xyes
19169then :
19170  printf "%s\n" "#define HAVE_RECVMSG 1" >>confdefs.h
19171
19172fi
19173
19174
19175{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
19176printf %s "checking for inline... " >&6; }
19177if test ${ac_cv_c_inline+y}
19178then :
19179  printf %s "(cached) " >&6
19180else $as_nop
19181  ac_cv_c_inline=no
19182for ac_kw in inline __inline__ __inline; do
19183  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19184/* end confdefs.h.  */
19185#ifndef __cplusplus
19186typedef int foo_t;
19187static $ac_kw foo_t static_foo (void) {return 0; }
19188$ac_kw foo_t foo (void) {return 0; }
19189#endif
19190
19191_ACEOF
19192if ac_fn_c_try_compile "$LINENO"
19193then :
19194  ac_cv_c_inline=$ac_kw
19195fi
19196rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19197  test "$ac_cv_c_inline" != no && break
19198done
19199
19200fi
19201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
19202printf "%s\n" "$ac_cv_c_inline" >&6; }
19203
19204case $ac_cv_c_inline in
19205  inline | yes) ;;
19206  *)
19207    case $ac_cv_c_inline in
19208      no) ac_val=;;
19209      *) ac_val=$ac_cv_c_inline;;
19210    esac
19211    cat >>confdefs.h <<_ACEOF
19212#ifndef __cplusplus
19213#define inline $ac_val
19214#endif
19215_ACEOF
19216    ;;
19217esac
19218
19219
19220case "$ac_cv_c_inline" in
19221 '')
19222    ;;
19223 *)
19224
19225printf "%s\n" "#define HAVE_INLINE 1" >>confdefs.h
19226
19227
19228esac
19229
19230
19231# Obsolete code to be removed.
19232if test $ac_cv_header_sys_time_h = yes; then
19233
19234printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
19235
19236fi
19237# End of obsolete code.
19238
19239# The cast to long int works around a bug in the HP C Compiler
19240# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19241# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19242# This bug is HP SR number 8606223364.
19243{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
19244printf %s "checking size of time_t... " >&6; }
19245if test ${ac_cv_sizeof_time_t+y}
19246then :
19247  printf %s "(cached) " >&6
19248else $as_nop
19249  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"
19250then :
19251
19252else $as_nop
19253  if test "$ac_cv_type_time_t" = yes; then
19254     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19255printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19256as_fn_error 77 "cannot compute sizeof (time_t)
19257See \`config.log' for more details" "$LINENO" 5; }
19258   else
19259     ac_cv_sizeof_time_t=0
19260   fi
19261fi
19262
19263fi
19264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
19265printf "%s\n" "$ac_cv_sizeof_time_t" >&6; }
19266
19267
19268
19269printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h
19270
19271
19272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
19273printf %s "checking whether char is unsigned... " >&6; }
19274if test ${ac_cv_c_char_unsigned+y}
19275then :
19276  printf %s "(cached) " >&6
19277else $as_nop
19278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19279/* end confdefs.h.  */
19280$ac_includes_default
19281int
19282main (void)
19283{
19284static int test_array [1 - 2 * !(((char) -1) < 0)];
19285test_array [0] = 0;
19286return test_array [0];
19287
19288  ;
19289  return 0;
19290}
19291_ACEOF
19292if ac_fn_c_try_compile "$LINENO"
19293then :
19294  ac_cv_c_char_unsigned=no
19295else $as_nop
19296  ac_cv_c_char_unsigned=yes
19297fi
19298rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19299fi
19300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
19301printf "%s\n" "$ac_cv_c_char_unsigned" >&6; }
19302if test $ac_cv_c_char_unsigned = yes; then
19303  printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
19304
19305fi
19306		# The cast to long int works around a bug in the HP C Compiler
19307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19309# This bug is HP SR number 8606223364.
19310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of signed char" >&5
19311printf %s "checking size of signed char... " >&6; }
19312if test ${ac_cv_sizeof_signed_char+y}
19313then :
19314  printf %s "(cached) " >&6
19315else $as_nop
19316  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (signed char))" "ac_cv_sizeof_signed_char"        "$ac_includes_default"
19317then :
19318
19319else $as_nop
19320  if test "$ac_cv_type_signed_char" = yes; then
19321     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19322printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19323as_fn_error 77 "cannot compute sizeof (signed char)
19324See \`config.log' for more details" "$LINENO" 5; }
19325   else
19326     ac_cv_sizeof_signed_char=0
19327   fi
19328fi
19329
19330fi
19331{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_signed_char" >&5
19332printf "%s\n" "$ac_cv_sizeof_signed_char" >&6; }
19333
19334
19335
19336printf "%s\n" "#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char" >>confdefs.h
19337
19338
19339ac_fn_c_check_type "$LINENO" "s_char" "ac_cv_type_s_char" "$ac_includes_default"
19340if test "x$ac_cv_type_s_char" = xyes
19341then :
19342
19343printf "%s\n" "#define HAVE_S_CHAR 1" >>confdefs.h
19344
19345
19346fi
19347ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
19348if test "x$ac_cv_type_long_long" = xyes
19349then :
19350
19351printf "%s\n" "#define HAVE_LONG_LONG 1" >>confdefs.h
19352
19353
19354fi
19355
19356# The cast to long int works around a bug in the HP C Compiler
19357# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19358# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19359# This bug is HP SR number 8606223364.
19360{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
19361printf %s "checking size of short... " >&6; }
19362if test ${ac_cv_sizeof_short+y}
19363then :
19364  printf %s "(cached) " >&6
19365else $as_nop
19366  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short"        "$ac_includes_default"
19367then :
19368
19369else $as_nop
19370  if test "$ac_cv_type_short" = yes; then
19371     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19372printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19373as_fn_error 77 "cannot compute sizeof (short)
19374See \`config.log' for more details" "$LINENO" 5; }
19375   else
19376     ac_cv_sizeof_short=0
19377   fi
19378fi
19379
19380fi
19381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
19382printf "%s\n" "$ac_cv_sizeof_short" >&6; }
19383
19384
19385
19386printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
19387
19388
19389# The cast to long int works around a bug in the HP C Compiler
19390# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19391# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19392# This bug is HP SR number 8606223364.
19393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
19394printf %s "checking size of int... " >&6; }
19395if test ${ac_cv_sizeof_int+y}
19396then :
19397  printf %s "(cached) " >&6
19398else $as_nop
19399  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"
19400then :
19401
19402else $as_nop
19403  if test "$ac_cv_type_int" = yes; then
19404     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19405printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19406as_fn_error 77 "cannot compute sizeof (int)
19407See \`config.log' for more details" "$LINENO" 5; }
19408   else
19409     ac_cv_sizeof_int=0
19410   fi
19411fi
19412
19413fi
19414{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
19415printf "%s\n" "$ac_cv_sizeof_int" >&6; }
19416
19417
19418
19419printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
19420
19421
19422# The cast to long int works around a bug in the HP C Compiler
19423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19425# This bug is HP SR number 8606223364.
19426{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
19427printf %s "checking size of long... " >&6; }
19428if test ${ac_cv_sizeof_long+y}
19429then :
19430  printf %s "(cached) " >&6
19431else $as_nop
19432  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long"        "$ac_includes_default"
19433then :
19434
19435else $as_nop
19436  if test "$ac_cv_type_long" = yes; then
19437     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19438printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19439as_fn_error 77 "cannot compute sizeof (long)
19440See \`config.log' for more details" "$LINENO" 5; }
19441   else
19442     ac_cv_sizeof_long=0
19443   fi
19444fi
19445
19446fi
19447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
19448printf "%s\n" "$ac_cv_sizeof_long" >&6; }
19449
19450
19451
19452printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
19453
19454
19455
19456case "$ac_cv_type_long_long" in
19457 no)
19458    ;;
19459 *)
19460    # The cast to long int works around a bug in the HP C Compiler
19461# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
19462# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
19463# This bug is HP SR number 8606223364.
19464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
19465printf %s "checking size of long long... " >&6; }
19466if test ${ac_cv_sizeof_long_long+y}
19467then :
19468  printf %s "(cached) " >&6
19469else $as_nop
19470  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long"        "$ac_includes_default"
19471then :
19472
19473else $as_nop
19474  if test "$ac_cv_type_long_long" = yes; then
19475     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19476printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
19477as_fn_error 77 "cannot compute sizeof (long long)
19478See \`config.log' for more details" "$LINENO" 5; }
19479   else
19480     ac_cv_sizeof_long_long=0
19481   fi
19482fi
19483
19484fi
19485{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
19486printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
19487
19488
19489
19490printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
19491
19492
19493    ;;
19494esac
19495
19496case "$ac_cv_c_char_unsigned$ac_cv_sizeof_signed_char$ac_cv_type_s_char" in
19497 *yes)
19498    # We have a typedef for s_char.  Might as well believe it...
19499    ;;
19500 no0no)
19501    # We have signed chars, can't say 'signed char', no s_char typedef.
19502
19503printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19504
19505    ;;
19506 no1no)
19507    # We have signed chars, can say 'signed char', no s_char typedef.
19508
19509printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19510
19511    ;;
19512 yes0no)
19513    # We have unsigned chars, can't say 'signed char', no s_char typedef.
19514    as_fn_error $? "No way to specify a signed character!" "$LINENO" 5
19515    ;;
19516 yes1no)
19517    # We have unsigned chars, can say 'signed char', no s_char typedef.
19518
19519printf "%s\n" "#define NEED_S_CHAR_TYPEDEF 1" >>confdefs.h
19520
19521    ;;
19522esac
19523
19524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
19525printf %s "checking for uid_t in sys/types.h... " >&6; }
19526if test ${ac_cv_type_uid_t+y}
19527then :
19528  printf %s "(cached) " >&6
19529else $as_nop
19530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19531/* end confdefs.h.  */
19532#include <sys/types.h>
19533
19534_ACEOF
19535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19536  $EGREP "uid_t" >/dev/null 2>&1
19537then :
19538  ac_cv_type_uid_t=yes
19539else $as_nop
19540  ac_cv_type_uid_t=no
19541fi
19542rm -rf conftest*
19543
19544fi
19545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
19546printf "%s\n" "$ac_cv_type_uid_t" >&6; }
19547if test $ac_cv_type_uid_t = no; then
19548
19549printf "%s\n" "#define uid_t int" >>confdefs.h
19550
19551
19552printf "%s\n" "#define gid_t int" >>confdefs.h
19553
19554fi
19555
19556
19557
19558
19559
19560
19561{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including debugging code" >&5
19562printf %s "checking if we're including debugging code... " >&6; }
19563# Check whether --enable-debugging was given.
19564if test ${enable_debugging+y}
19565then :
19566  enableval=$enable_debugging; ntp_ok=$enableval
19567else $as_nop
19568  ntp_ok=yes
19569
19570fi
19571
19572case "$ntp_ok" in
19573 yes)
19574
19575printf "%s\n" "#define DEBUG 1" >>confdefs.h
19576
19577esac
19578{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
19579printf "%s\n" "$ntp_ok" >&6; }
19580
19581
19582
19583# check if we can compile with pthreads
19584ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "$ac_includes_default"
19585if test "x$ac_cv_header_semaphore_h" = xyes
19586then :
19587  printf "%s\n" "#define HAVE_SEMAPHORE_H 1" >>confdefs.h
19588
19589fi
19590
19591ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
19592if test "x$ac_cv_func_socketpair" = xyes
19593then :
19594  printf "%s\n" "#define HAVE_SOCKETPAIR 1" >>confdefs.h
19595
19596fi
19597
19598# Check whether --enable-thread-support was given.
19599if test ${enable_thread_support+y}
19600then :
19601  enableval=$enable_thread_support;
19602else $as_nop
19603  enable_thread_support=yes
19604
19605fi
19606
19607have_pthreads=no
19608case "$enable_thread_support" in
19609 no) ;;
19610 *)
19611    ol_found_pthreads=no
19612
19613
19614
19615ac_ext=c
19616ac_cpp='$CPP $CPPFLAGS'
19617ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19618ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19619ac_compiler_gnu=$ac_cv_c_compiler_gnu
19620
19621# OpenLDAP --with-threads
19622
19623# Check whether --with-threads was given.
19624if test ${with_threads+y}
19625then :
19626  withval=$with_threads;
19627	ol_arg=invalid
19628	for ol_val in auto nt posix mach pth lwp yes no manual  ; do
19629		if test "$withval" = "$ol_val" ; then
19630			ol_arg="$ol_val"
19631		fi
19632	done
19633	if test "$ol_arg" = "invalid" ; then
19634		as_fn_error $? "bad value $withval for --with-threads" "$LINENO" 5
19635	fi
19636	ol_with_threads="$ol_arg"
19637
19638else $as_nop
19639  	ol_with_threads="auto"
19640fi
19641# end --with-threads
19642
19643
19644case "$ol_with_threads$host" in
19645 auto*-*-solaris2.[0-6])
19646        ol_with_threads=no
19647    ;;
19648esac
19649
19650
19651ol_aix_threads=no
19652case "$host" in
19653*-*-aix*) 	if test -z "$CC" ; then
19654		case "$ol_with_threads" in
19655		auto | yes |  posix) ol_aix_threads=yes ;;
19656		esac
19657	fi
19658;;
19659esac
19660
19661if test $ol_aix_threads = yes ; then
19662	if test -z "${CC}" ; then
19663		for ac_prog in cc_r xlc_r cc
19664do
19665  # Extract the first word of "$ac_prog", so it can be a program name with args.
19666set dummy $ac_prog; ac_word=$2
19667{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19668printf %s "checking for $ac_word... " >&6; }
19669if test ${ac_cv_prog_CC+y}
19670then :
19671  printf %s "(cached) " >&6
19672else $as_nop
19673  if test -n "$CC"; then
19674  ac_cv_prog_CC="$CC" # Let the user override the test.
19675else
19676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19677for as_dir in $PATH
19678do
19679  IFS=$as_save_IFS
19680  case $as_dir in #(((
19681    '') as_dir=./ ;;
19682    */) ;;
19683    *) as_dir=$as_dir/ ;;
19684  esac
19685    for ac_exec_ext in '' $ac_executable_extensions; do
19686  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19687    ac_cv_prog_CC="$ac_prog"
19688    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19689    break 2
19690  fi
19691done
19692  done
19693IFS=$as_save_IFS
19694
19695fi
19696fi
19697CC=$ac_cv_prog_CC
19698if test -n "$CC"; then
19699  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19700printf "%s\n" "$CC" >&6; }
19701else
19702  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19703printf "%s\n" "no" >&6; }
19704fi
19705
19706
19707  test -n "$CC" && break
19708done
19709
19710
19711		if test "$CC" = cc ; then
19712						if test $ol_with_threads != auto ; then
19713				as_fn_error $? "--with-threads requires cc_r (or other suitable compiler) on AIX" "$LINENO" 5
19714			else
19715				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: disabling threads, no cc_r on AIX" >&5
19716printf "%s\n" "$as_me: WARNING: disabling threads, no cc_r on AIX" >&2;}
19717			fi
19718			ol_with_threads=no
19719  		fi
19720	fi
19721
19722	case ${CC} in cc_r | xlc_r)
19723		ol_with_threads=posix
19724		ol_cv_pthread_create=yes
19725		;;
19726	esac
19727fi
19728
19729ol_link_threads=no
19730# OpenLDAP --with-yielding_select
19731
19732# Check whether --with-yielding_select was given.
19733if test ${with_yielding_select+y}
19734then :
19735  withval=$with_yielding_select;
19736	ol_arg=invalid
19737	for ol_val in auto yes no manual  ; do
19738		if test "$withval" = "$ol_val" ; then
19739			ol_arg="$ol_val"
19740		fi
19741	done
19742	if test "$ol_arg" = "invalid" ; then
19743		as_fn_error $? "bad value $withval for --with-yielding_select" "$LINENO" 5
19744	fi
19745	ol_with_yielding_select="$ol_arg"
19746
19747else $as_nop
19748  	ol_with_yielding_select="auto"
19749fi
19750# end --with-yielding_select
19751
19752
19753case $ol_with_threads in auto | yes | nt)
19754
19755
19756	ac_fn_c_check_func "$LINENO" "_beginthread" "ac_cv_func__beginthread"
19757if test "x$ac_cv_func__beginthread" = xyes
19758then :
19759
19760fi
19761
19762
19763	if test $ac_cv_func__beginthread = yes ; then
19764
19765printf "%s\n" "#define HAVE_NT_THREADS 1" >>confdefs.h
19766
19767		ol_cv_nt_threads=yes
19768	fi
19769
19770
19771	if test "$ol_cv_nt_threads" = yes ; then
19772		ol_link_threads=nt
19773		ol_with_threads=found
19774		ol_with_yielding_select=yes
19775
19776
19777printf "%s\n" "#define HAVE_NT_SERVICE_MANAGER 1" >>confdefs.h
19778
19779
19780printf "%s\n" "#define HAVE_NT_EVENT_LOG 1" >>confdefs.h
19781
19782	fi
19783
19784	if test $ol_with_threads = nt ; then
19785		as_fn_error $? "could not locate NT Threads" "$LINENO" 5
19786	fi
19787	;;
19788esac
19789
19790case $ol_with_threads in auto | yes | posix)
19791
19792	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
19793if test "x$ac_cv_header_pthread_h" = xyes
19794then :
19795  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
19796
19797fi
19798
19799
19800	if test $ac_cv_header_pthread_h = yes ; then
19801		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking POSIX thread version" >&5
19802printf %s "checking POSIX thread version... " >&6; }
19803if test ${ol_cv_pthread_version+y}
19804then :
19805  printf %s "(cached) " >&6
19806else $as_nop
19807
19808	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19809/* end confdefs.h.  */
19810
19811#		include <pthread.h>
19812
19813int
19814main (void)
19815{
19816
19817		int i = PTHREAD_CREATE_JOINABLE;
19818
19819  ;
19820  return 0;
19821}
19822_ACEOF
19823if ac_fn_c_try_compile "$LINENO"
19824then :
19825
19826	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19827/* end confdefs.h.  */
19828#include <pthread.h>
19829
19830_ACEOF
19831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19832  $EGREP "pthread_detach" >/dev/null 2>&1
19833then :
19834  ol_cv_pthread_version=10
19835else $as_nop
19836  ol_cv_pthread_version=8
19837fi
19838rm -rf conftest*
19839
19840else $as_nop
19841
19842	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19843/* end confdefs.h.  */
19844
19845#		include <pthread.h>
19846#		ifdef PTHREAD_CREATE_UNDETACHED
19847		draft7
19848#		endif
19849
19850_ACEOF
19851if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19852  $EGREP "draft7" >/dev/null 2>&1
19853then :
19854  ol_cv_pthread_version=7
19855else $as_nop
19856
19857	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19858/* end confdefs.h.  */
19859#include <pthread.h>
19860
19861_ACEOF
19862if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19863  $EGREP "pthread_attr_init" >/dev/null 2>&1
19864then :
19865  ol_cv_pthread_version=6
19866else $as_nop
19867
19868	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19869/* end confdefs.h.  */
19870
19871#		include <pthread.h>
19872#ifdef		PTHREAD_MUTEX_INITIALIZER
19873		draft5
19874#endif
19875
19876_ACEOF
19877if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19878  $EGREP "draft5" >/dev/null 2>&1
19879then :
19880  ol_cv_pthread_version=5
19881else $as_nop
19882  ol_cv_pthread_version=4
19883fi
19884rm -rf conftest*
19885
19886fi
19887rm -rf conftest*
19888
19889fi
19890rm -rf conftest*
19891
19892fi
19893rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19894
19895fi
19896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_version" >&5
19897printf "%s\n" "$ol_cv_pthread_version" >&6; }
19898
19899
19900		if test $ol_cv_pthread_version != 0 ; then
19901
19902printf "%s\n" "#define HAVE_PTHREADS $ol_cv_pthread_version" >>confdefs.h
19903
19904		else
19905			as_fn_error $? "unknown pthread version" "$LINENO" 5
19906		fi
19907
19908		# consider threads found
19909		ol_with_threads=found
19910
19911
19912	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
19913printf %s "checking for LinuxThreads pthread.h... " >&6; }
19914if test ${ol_cv_header_linux_threads+y}
19915then :
19916  printf %s "(cached) " >&6
19917else $as_nop
19918  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19919/* end confdefs.h.  */
19920#include <pthread.h>
19921_ACEOF
19922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19923  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
19924then :
19925  ol_cv_header_linux_threads=yes
19926else $as_nop
19927  ol_cv_header_linux_threads=no
19928fi
19929rm -rf conftest*
19930
19931
19932fi
19933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
19934printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
19935	if test $ol_cv_header_linux_threads = yes; then
19936
19937printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
19938
19939	fi
19940
19941
19942	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU Pth pthread.h" >&5
19943printf %s "checking for GNU Pth pthread.h... " >&6; }
19944if test ${ol_cv_header_gnu_pth_pthread_h+y}
19945then :
19946  printf %s "(cached) " >&6
19947else $as_nop
19948  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19949/* end confdefs.h.  */
19950#include <pthread.h>
19951#ifdef _POSIX_THREAD_IS_GNU_PTH
19952	__gnu_pth__;
19953#endif
19954
19955_ACEOF
19956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19957  $EGREP "__gnu_pth__" >/dev/null 2>&1
19958then :
19959  ol_cv_header_gnu_pth_pthread_h=yes
19960else $as_nop
19961  ol_cv_header_gnu_pth_pthread_h=no
19962fi
19963rm -rf conftest*
19964
19965
19966fi
19967{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_gnu_pth_pthread_h" >&5
19968printf "%s\n" "$ol_cv_header_gnu_pth_pthread_h" >&6; }
19969
19970
19971		if test $ol_cv_header_gnu_pth_pthread_h = no ; then
19972			ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
19973if test "x$ac_cv_header_sched_h" = xyes
19974then :
19975  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
19976
19977fi
19978
19979		fi
19980
19981
19982				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in default libraries" >&5
19983printf %s "checking for pthread_create in default libraries... " >&6; }
19984if test ${ol_cv_pthread_create+y}
19985then :
19986  printf %s "(cached) " >&6
19987else $as_nop
19988
19989			if test "$cross_compiling" = yes
19990then :
19991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19992/* end confdefs.h.  */
19993
19994/* pthread test headers */
19995#include <pthread.h>
19996#if HAVE_PTHREADS < 7
19997#include <errno.h>
19998#endif
19999#ifndef NULL
20000#define NULL (void*)0
20001#endif
20002
20003static void *task(p)
20004	void *p;
20005{
20006	return (void *) (p == NULL);
20007}
20008
20009int
20010main (void)
20011{
20012
20013	/* pthread test function */
20014#ifndef PTHREAD_CREATE_DETACHED
20015#define	PTHREAD_CREATE_DETACHED	1
20016#endif
20017	pthread_t t;
20018	int status;
20019	int detach = PTHREAD_CREATE_DETACHED;
20020
20021#if HAVE_PTHREADS > 4
20022	/* Final pthreads */
20023	pthread_attr_t attr;
20024
20025	status = pthread_attr_init(&attr);
20026	if( status ) return status;
20027
20028#if HAVE_PTHREADS < 7
20029	status = pthread_attr_setdetachstate(&attr, &detach);
20030	if( status < 0 ) status = errno;
20031#else
20032	status = pthread_attr_setdetachstate(&attr, detach);
20033#endif
20034	if( status ) return status;
20035	status = pthread_create( &t, &attr, task, NULL );
20036#if HAVE_PTHREADS < 7
20037	if( status < 0 ) status = errno;
20038#endif
20039	if( status ) return status;
20040#else
20041	/* Draft 4 pthreads */
20042	status = pthread_create( &t, pthread_attr_default, task, NULL );
20043	if( status ) return errno;
20044
20045	/* give thread a chance to complete */
20046	/* it should remain joinable and hence detachable */
20047	sleep( 1 );
20048
20049	status = pthread_detach( &t );
20050	if( status ) return errno;
20051#endif
20052
20053#ifdef HAVE_LINUX_THREADS
20054	pthread_kill_other_threads_np();
20055#endif
20056
20057	return 0;
20058
20059  ;
20060  return 0;
20061}
20062_ACEOF
20063if ac_fn_c_try_link "$LINENO"
20064then :
20065  ol_cv_pthread_create=yes
20066else $as_nop
20067  ol_cv_pthread_create=no
20068fi
20069rm -f core conftest.err conftest.$ac_objext conftest.beam \
20070    conftest$ac_exeext conftest.$ac_ext
20071else $as_nop
20072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20073/* end confdefs.h.  */
20074
20075
20076/* pthread test headers */
20077#include <pthread.h>
20078#if HAVE_PTHREADS < 7
20079#include <errno.h>
20080#endif
20081#ifndef NULL
20082#define NULL (void*)0
20083#endif
20084
20085static void *task(p)
20086	void *p;
20087{
20088	return (void *) (p == NULL);
20089}
20090
20091
20092int main(argc, argv)
20093	int argc;
20094	char **argv;
20095{
20096
20097	/* pthread test function */
20098#ifndef PTHREAD_CREATE_DETACHED
20099#define	PTHREAD_CREATE_DETACHED	1
20100#endif
20101	pthread_t t;
20102	int status;
20103	int detach = PTHREAD_CREATE_DETACHED;
20104
20105#if HAVE_PTHREADS > 4
20106	/* Final pthreads */
20107	pthread_attr_t attr;
20108
20109	status = pthread_attr_init(&attr);
20110	if( status ) return status;
20111
20112#if HAVE_PTHREADS < 7
20113	status = pthread_attr_setdetachstate(&attr, &detach);
20114	if( status < 0 ) status = errno;
20115#else
20116	status = pthread_attr_setdetachstate(&attr, detach);
20117#endif
20118	if( status ) return status;
20119	status = pthread_create( &t, &attr, task, NULL );
20120#if HAVE_PTHREADS < 7
20121	if( status < 0 ) status = errno;
20122#endif
20123	if( status ) return status;
20124#else
20125	/* Draft 4 pthreads */
20126	status = pthread_create( &t, pthread_attr_default, task, NULL );
20127	if( status ) return errno;
20128
20129	/* give thread a chance to complete */
20130	/* it should remain joinable and hence detachable */
20131	sleep( 1 );
20132
20133	status = pthread_detach( &t );
20134	if( status ) return errno;
20135#endif
20136
20137#ifdef HAVE_LINUX_THREADS
20138	pthread_kill_other_threads_np();
20139#endif
20140
20141	return 0;
20142
20143}
20144
20145_ACEOF
20146if ac_fn_c_try_run "$LINENO"
20147then :
20148  ol_cv_pthread_create=yes
20149else $as_nop
20150  ol_cv_pthread_create=no
20151fi
20152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20153  conftest.$ac_objext conftest.beam conftest.$ac_ext
20154fi
20155
20156fi
20157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_create" >&5
20158printf "%s\n" "$ol_cv_pthread_create" >&6; }
20159
20160		if test $ol_cv_pthread_create != no ; then
20161			ol_link_threads=posix
20162			ol_link_pthreads=""
20163		fi
20164
20165		# Pthread try link: -kthread (ol_cv_pthread_kthread)
20166if test "$ol_link_threads" = no ; then
20167	# try -kthread
20168	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -kthread" >&5
20169printf %s "checking for pthread link with -kthread... " >&6; }
20170if test ${ol_cv_pthread_kthread+y}
20171then :
20172  printf %s "(cached) " >&6
20173else $as_nop
20174
20175		# save the flags
20176		ol_LIBS="$LIBS"
20177		LIBS="-kthread $LIBS"
20178
20179		if test "$cross_compiling" = yes
20180then :
20181  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20182/* end confdefs.h.  */
20183
20184/* pthread test headers */
20185#include <pthread.h>
20186#if HAVE_PTHREADS < 7
20187#include <errno.h>
20188#endif
20189#ifndef NULL
20190#define NULL (void*)0
20191#endif
20192
20193static void *task(p)
20194	void *p;
20195{
20196	return (void *) (p == NULL);
20197}
20198
20199int
20200main (void)
20201{
20202
20203	/* pthread test function */
20204#ifndef PTHREAD_CREATE_DETACHED
20205#define	PTHREAD_CREATE_DETACHED	1
20206#endif
20207	pthread_t t;
20208	int status;
20209	int detach = PTHREAD_CREATE_DETACHED;
20210
20211#if HAVE_PTHREADS > 4
20212	/* Final pthreads */
20213	pthread_attr_t attr;
20214
20215	status = pthread_attr_init(&attr);
20216	if( status ) return status;
20217
20218#if HAVE_PTHREADS < 7
20219	status = pthread_attr_setdetachstate(&attr, &detach);
20220	if( status < 0 ) status = errno;
20221#else
20222	status = pthread_attr_setdetachstate(&attr, detach);
20223#endif
20224	if( status ) return status;
20225	status = pthread_create( &t, &attr, task, NULL );
20226#if HAVE_PTHREADS < 7
20227	if( status < 0 ) status = errno;
20228#endif
20229	if( status ) return status;
20230#else
20231	/* Draft 4 pthreads */
20232	status = pthread_create( &t, pthread_attr_default, task, NULL );
20233	if( status ) return errno;
20234
20235	/* give thread a chance to complete */
20236	/* it should remain joinable and hence detachable */
20237	sleep( 1 );
20238
20239	status = pthread_detach( &t );
20240	if( status ) return errno;
20241#endif
20242
20243#ifdef HAVE_LINUX_THREADS
20244	pthread_kill_other_threads_np();
20245#endif
20246
20247	return 0;
20248
20249  ;
20250  return 0;
20251}
20252_ACEOF
20253if ac_fn_c_try_link "$LINENO"
20254then :
20255  ol_cv_pthread_kthread=yes
20256else $as_nop
20257  ol_cv_pthread_kthread=no
20258fi
20259rm -f core conftest.err conftest.$ac_objext conftest.beam \
20260    conftest$ac_exeext conftest.$ac_ext
20261else $as_nop
20262  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20263/* end confdefs.h.  */
20264
20265
20266/* pthread test headers */
20267#include <pthread.h>
20268#if HAVE_PTHREADS < 7
20269#include <errno.h>
20270#endif
20271#ifndef NULL
20272#define NULL (void*)0
20273#endif
20274
20275static void *task(p)
20276	void *p;
20277{
20278	return (void *) (p == NULL);
20279}
20280
20281
20282int main(argc, argv)
20283	int argc;
20284	char **argv;
20285{
20286
20287	/* pthread test function */
20288#ifndef PTHREAD_CREATE_DETACHED
20289#define	PTHREAD_CREATE_DETACHED	1
20290#endif
20291	pthread_t t;
20292	int status;
20293	int detach = PTHREAD_CREATE_DETACHED;
20294
20295#if HAVE_PTHREADS > 4
20296	/* Final pthreads */
20297	pthread_attr_t attr;
20298
20299	status = pthread_attr_init(&attr);
20300	if( status ) return status;
20301
20302#if HAVE_PTHREADS < 7
20303	status = pthread_attr_setdetachstate(&attr, &detach);
20304	if( status < 0 ) status = errno;
20305#else
20306	status = pthread_attr_setdetachstate(&attr, detach);
20307#endif
20308	if( status ) return status;
20309	status = pthread_create( &t, &attr, task, NULL );
20310#if HAVE_PTHREADS < 7
20311	if( status < 0 ) status = errno;
20312#endif
20313	if( status ) return status;
20314#else
20315	/* Draft 4 pthreads */
20316	status = pthread_create( &t, pthread_attr_default, task, NULL );
20317	if( status ) return errno;
20318
20319	/* give thread a chance to complete */
20320	/* it should remain joinable and hence detachable */
20321	sleep( 1 );
20322
20323	status = pthread_detach( &t );
20324	if( status ) return errno;
20325#endif
20326
20327#ifdef HAVE_LINUX_THREADS
20328	pthread_kill_other_threads_np();
20329#endif
20330
20331	return 0;
20332
20333}
20334
20335_ACEOF
20336if ac_fn_c_try_run "$LINENO"
20337then :
20338  ol_cv_pthread_kthread=yes
20339else $as_nop
20340  ol_cv_pthread_kthread=no
20341fi
20342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20343  conftest.$ac_objext conftest.beam conftest.$ac_ext
20344fi
20345
20346
20347		# restore the LIBS
20348		LIBS="$ol_LIBS"
20349
20350fi
20351{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_kthread" >&5
20352printf "%s\n" "$ol_cv_pthread_kthread" >&6; }
20353
20354	if test $ol_cv_pthread_kthread = yes ; then
20355		ol_link_pthreads="-kthread"
20356		ol_link_threads=posix
20357	fi
20358fi
20359
20360		# Pthread try link: -pthread (ol_cv_pthread_pthread)
20361if test "$ol_link_threads" = no ; then
20362	# try -pthread
20363	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthread" >&5
20364printf %s "checking for pthread link with -pthread... " >&6; }
20365if test ${ol_cv_pthread_pthread+y}
20366then :
20367  printf %s "(cached) " >&6
20368else $as_nop
20369
20370		# save the flags
20371		ol_LIBS="$LIBS"
20372		LIBS="-pthread $LIBS"
20373
20374		if test "$cross_compiling" = yes
20375then :
20376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20377/* end confdefs.h.  */
20378
20379/* pthread test headers */
20380#include <pthread.h>
20381#if HAVE_PTHREADS < 7
20382#include <errno.h>
20383#endif
20384#ifndef NULL
20385#define NULL (void*)0
20386#endif
20387
20388static void *task(p)
20389	void *p;
20390{
20391	return (void *) (p == NULL);
20392}
20393
20394int
20395main (void)
20396{
20397
20398	/* pthread test function */
20399#ifndef PTHREAD_CREATE_DETACHED
20400#define	PTHREAD_CREATE_DETACHED	1
20401#endif
20402	pthread_t t;
20403	int status;
20404	int detach = PTHREAD_CREATE_DETACHED;
20405
20406#if HAVE_PTHREADS > 4
20407	/* Final pthreads */
20408	pthread_attr_t attr;
20409
20410	status = pthread_attr_init(&attr);
20411	if( status ) return status;
20412
20413#if HAVE_PTHREADS < 7
20414	status = pthread_attr_setdetachstate(&attr, &detach);
20415	if( status < 0 ) status = errno;
20416#else
20417	status = pthread_attr_setdetachstate(&attr, detach);
20418#endif
20419	if( status ) return status;
20420	status = pthread_create( &t, &attr, task, NULL );
20421#if HAVE_PTHREADS < 7
20422	if( status < 0 ) status = errno;
20423#endif
20424	if( status ) return status;
20425#else
20426	/* Draft 4 pthreads */
20427	status = pthread_create( &t, pthread_attr_default, task, NULL );
20428	if( status ) return errno;
20429
20430	/* give thread a chance to complete */
20431	/* it should remain joinable and hence detachable */
20432	sleep( 1 );
20433
20434	status = pthread_detach( &t );
20435	if( status ) return errno;
20436#endif
20437
20438#ifdef HAVE_LINUX_THREADS
20439	pthread_kill_other_threads_np();
20440#endif
20441
20442	return 0;
20443
20444  ;
20445  return 0;
20446}
20447_ACEOF
20448if ac_fn_c_try_link "$LINENO"
20449then :
20450  ol_cv_pthread_pthread=yes
20451else $as_nop
20452  ol_cv_pthread_pthread=no
20453fi
20454rm -f core conftest.err conftest.$ac_objext conftest.beam \
20455    conftest$ac_exeext conftest.$ac_ext
20456else $as_nop
20457  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20458/* end confdefs.h.  */
20459
20460
20461/* pthread test headers */
20462#include <pthread.h>
20463#if HAVE_PTHREADS < 7
20464#include <errno.h>
20465#endif
20466#ifndef NULL
20467#define NULL (void*)0
20468#endif
20469
20470static void *task(p)
20471	void *p;
20472{
20473	return (void *) (p == NULL);
20474}
20475
20476
20477int main(argc, argv)
20478	int argc;
20479	char **argv;
20480{
20481
20482	/* pthread test function */
20483#ifndef PTHREAD_CREATE_DETACHED
20484#define	PTHREAD_CREATE_DETACHED	1
20485#endif
20486	pthread_t t;
20487	int status;
20488	int detach = PTHREAD_CREATE_DETACHED;
20489
20490#if HAVE_PTHREADS > 4
20491	/* Final pthreads */
20492	pthread_attr_t attr;
20493
20494	status = pthread_attr_init(&attr);
20495	if( status ) return status;
20496
20497#if HAVE_PTHREADS < 7
20498	status = pthread_attr_setdetachstate(&attr, &detach);
20499	if( status < 0 ) status = errno;
20500#else
20501	status = pthread_attr_setdetachstate(&attr, detach);
20502#endif
20503	if( status ) return status;
20504	status = pthread_create( &t, &attr, task, NULL );
20505#if HAVE_PTHREADS < 7
20506	if( status < 0 ) status = errno;
20507#endif
20508	if( status ) return status;
20509#else
20510	/* Draft 4 pthreads */
20511	status = pthread_create( &t, pthread_attr_default, task, NULL );
20512	if( status ) return errno;
20513
20514	/* give thread a chance to complete */
20515	/* it should remain joinable and hence detachable */
20516	sleep( 1 );
20517
20518	status = pthread_detach( &t );
20519	if( status ) return errno;
20520#endif
20521
20522#ifdef HAVE_LINUX_THREADS
20523	pthread_kill_other_threads_np();
20524#endif
20525
20526	return 0;
20527
20528}
20529
20530_ACEOF
20531if ac_fn_c_try_run "$LINENO"
20532then :
20533  ol_cv_pthread_pthread=yes
20534else $as_nop
20535  ol_cv_pthread_pthread=no
20536fi
20537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20538  conftest.$ac_objext conftest.beam conftest.$ac_ext
20539fi
20540
20541
20542		# restore the LIBS
20543		LIBS="$ol_LIBS"
20544
20545fi
20546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthread" >&5
20547printf "%s\n" "$ol_cv_pthread_pthread" >&6; }
20548
20549	if test $ol_cv_pthread_pthread = yes ; then
20550		ol_link_pthreads="-pthread"
20551		ol_link_threads=posix
20552	fi
20553fi
20554
20555		# Pthread try link: -pthreads (ol_cv_pthread_pthreads)
20556if test "$ol_link_threads" = no ; then
20557	# try -pthreads
20558	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -pthreads" >&5
20559printf %s "checking for pthread link with -pthreads... " >&6; }
20560if test ${ol_cv_pthread_pthreads+y}
20561then :
20562  printf %s "(cached) " >&6
20563else $as_nop
20564
20565		# save the flags
20566		ol_LIBS="$LIBS"
20567		LIBS="-pthreads $LIBS"
20568
20569		if test "$cross_compiling" = yes
20570then :
20571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20572/* end confdefs.h.  */
20573
20574/* pthread test headers */
20575#include <pthread.h>
20576#if HAVE_PTHREADS < 7
20577#include <errno.h>
20578#endif
20579#ifndef NULL
20580#define NULL (void*)0
20581#endif
20582
20583static void *task(p)
20584	void *p;
20585{
20586	return (void *) (p == NULL);
20587}
20588
20589int
20590main (void)
20591{
20592
20593	/* pthread test function */
20594#ifndef PTHREAD_CREATE_DETACHED
20595#define	PTHREAD_CREATE_DETACHED	1
20596#endif
20597	pthread_t t;
20598	int status;
20599	int detach = PTHREAD_CREATE_DETACHED;
20600
20601#if HAVE_PTHREADS > 4
20602	/* Final pthreads */
20603	pthread_attr_t attr;
20604
20605	status = pthread_attr_init(&attr);
20606	if( status ) return status;
20607
20608#if HAVE_PTHREADS < 7
20609	status = pthread_attr_setdetachstate(&attr, &detach);
20610	if( status < 0 ) status = errno;
20611#else
20612	status = pthread_attr_setdetachstate(&attr, detach);
20613#endif
20614	if( status ) return status;
20615	status = pthread_create( &t, &attr, task, NULL );
20616#if HAVE_PTHREADS < 7
20617	if( status < 0 ) status = errno;
20618#endif
20619	if( status ) return status;
20620#else
20621	/* Draft 4 pthreads */
20622	status = pthread_create( &t, pthread_attr_default, task, NULL );
20623	if( status ) return errno;
20624
20625	/* give thread a chance to complete */
20626	/* it should remain joinable and hence detachable */
20627	sleep( 1 );
20628
20629	status = pthread_detach( &t );
20630	if( status ) return errno;
20631#endif
20632
20633#ifdef HAVE_LINUX_THREADS
20634	pthread_kill_other_threads_np();
20635#endif
20636
20637	return 0;
20638
20639  ;
20640  return 0;
20641}
20642_ACEOF
20643if ac_fn_c_try_link "$LINENO"
20644then :
20645  ol_cv_pthread_pthreads=yes
20646else $as_nop
20647  ol_cv_pthread_pthreads=no
20648fi
20649rm -f core conftest.err conftest.$ac_objext conftest.beam \
20650    conftest$ac_exeext conftest.$ac_ext
20651else $as_nop
20652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20653/* end confdefs.h.  */
20654
20655
20656/* pthread test headers */
20657#include <pthread.h>
20658#if HAVE_PTHREADS < 7
20659#include <errno.h>
20660#endif
20661#ifndef NULL
20662#define NULL (void*)0
20663#endif
20664
20665static void *task(p)
20666	void *p;
20667{
20668	return (void *) (p == NULL);
20669}
20670
20671
20672int main(argc, argv)
20673	int argc;
20674	char **argv;
20675{
20676
20677	/* pthread test function */
20678#ifndef PTHREAD_CREATE_DETACHED
20679#define	PTHREAD_CREATE_DETACHED	1
20680#endif
20681	pthread_t t;
20682	int status;
20683	int detach = PTHREAD_CREATE_DETACHED;
20684
20685#if HAVE_PTHREADS > 4
20686	/* Final pthreads */
20687	pthread_attr_t attr;
20688
20689	status = pthread_attr_init(&attr);
20690	if( status ) return status;
20691
20692#if HAVE_PTHREADS < 7
20693	status = pthread_attr_setdetachstate(&attr, &detach);
20694	if( status < 0 ) status = errno;
20695#else
20696	status = pthread_attr_setdetachstate(&attr, detach);
20697#endif
20698	if( status ) return status;
20699	status = pthread_create( &t, &attr, task, NULL );
20700#if HAVE_PTHREADS < 7
20701	if( status < 0 ) status = errno;
20702#endif
20703	if( status ) return status;
20704#else
20705	/* Draft 4 pthreads */
20706	status = pthread_create( &t, pthread_attr_default, task, NULL );
20707	if( status ) return errno;
20708
20709	/* give thread a chance to complete */
20710	/* it should remain joinable and hence detachable */
20711	sleep( 1 );
20712
20713	status = pthread_detach( &t );
20714	if( status ) return errno;
20715#endif
20716
20717#ifdef HAVE_LINUX_THREADS
20718	pthread_kill_other_threads_np();
20719#endif
20720
20721	return 0;
20722
20723}
20724
20725_ACEOF
20726if ac_fn_c_try_run "$LINENO"
20727then :
20728  ol_cv_pthread_pthreads=yes
20729else $as_nop
20730  ol_cv_pthread_pthreads=no
20731fi
20732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20733  conftest.$ac_objext conftest.beam conftest.$ac_ext
20734fi
20735
20736
20737		# restore the LIBS
20738		LIBS="$ol_LIBS"
20739
20740fi
20741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_pthreads" >&5
20742printf "%s\n" "$ol_cv_pthread_pthreads" >&6; }
20743
20744	if test $ol_cv_pthread_pthreads = yes ; then
20745		ol_link_pthreads="-pthreads"
20746		ol_link_threads=posix
20747	fi
20748fi
20749
20750		# Pthread try link: -mthreads (ol_cv_pthread_mthreads)
20751if test "$ol_link_threads" = no ; then
20752	# try -mthreads
20753	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -mthreads" >&5
20754printf %s "checking for pthread link with -mthreads... " >&6; }
20755if test ${ol_cv_pthread_mthreads+y}
20756then :
20757  printf %s "(cached) " >&6
20758else $as_nop
20759
20760		# save the flags
20761		ol_LIBS="$LIBS"
20762		LIBS="-mthreads $LIBS"
20763
20764		if test "$cross_compiling" = yes
20765then :
20766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20767/* end confdefs.h.  */
20768
20769/* pthread test headers */
20770#include <pthread.h>
20771#if HAVE_PTHREADS < 7
20772#include <errno.h>
20773#endif
20774#ifndef NULL
20775#define NULL (void*)0
20776#endif
20777
20778static void *task(p)
20779	void *p;
20780{
20781	return (void *) (p == NULL);
20782}
20783
20784int
20785main (void)
20786{
20787
20788	/* pthread test function */
20789#ifndef PTHREAD_CREATE_DETACHED
20790#define	PTHREAD_CREATE_DETACHED	1
20791#endif
20792	pthread_t t;
20793	int status;
20794	int detach = PTHREAD_CREATE_DETACHED;
20795
20796#if HAVE_PTHREADS > 4
20797	/* Final pthreads */
20798	pthread_attr_t attr;
20799
20800	status = pthread_attr_init(&attr);
20801	if( status ) return status;
20802
20803#if HAVE_PTHREADS < 7
20804	status = pthread_attr_setdetachstate(&attr, &detach);
20805	if( status < 0 ) status = errno;
20806#else
20807	status = pthread_attr_setdetachstate(&attr, detach);
20808#endif
20809	if( status ) return status;
20810	status = pthread_create( &t, &attr, task, NULL );
20811#if HAVE_PTHREADS < 7
20812	if( status < 0 ) status = errno;
20813#endif
20814	if( status ) return status;
20815#else
20816	/* Draft 4 pthreads */
20817	status = pthread_create( &t, pthread_attr_default, task, NULL );
20818	if( status ) return errno;
20819
20820	/* give thread a chance to complete */
20821	/* it should remain joinable and hence detachable */
20822	sleep( 1 );
20823
20824	status = pthread_detach( &t );
20825	if( status ) return errno;
20826#endif
20827
20828#ifdef HAVE_LINUX_THREADS
20829	pthread_kill_other_threads_np();
20830#endif
20831
20832	return 0;
20833
20834  ;
20835  return 0;
20836}
20837_ACEOF
20838if ac_fn_c_try_link "$LINENO"
20839then :
20840  ol_cv_pthread_mthreads=yes
20841else $as_nop
20842  ol_cv_pthread_mthreads=no
20843fi
20844rm -f core conftest.err conftest.$ac_objext conftest.beam \
20845    conftest$ac_exeext conftest.$ac_ext
20846else $as_nop
20847  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20848/* end confdefs.h.  */
20849
20850
20851/* pthread test headers */
20852#include <pthread.h>
20853#if HAVE_PTHREADS < 7
20854#include <errno.h>
20855#endif
20856#ifndef NULL
20857#define NULL (void*)0
20858#endif
20859
20860static void *task(p)
20861	void *p;
20862{
20863	return (void *) (p == NULL);
20864}
20865
20866
20867int main(argc, argv)
20868	int argc;
20869	char **argv;
20870{
20871
20872	/* pthread test function */
20873#ifndef PTHREAD_CREATE_DETACHED
20874#define	PTHREAD_CREATE_DETACHED	1
20875#endif
20876	pthread_t t;
20877	int status;
20878	int detach = PTHREAD_CREATE_DETACHED;
20879
20880#if HAVE_PTHREADS > 4
20881	/* Final pthreads */
20882	pthread_attr_t attr;
20883
20884	status = pthread_attr_init(&attr);
20885	if( status ) return status;
20886
20887#if HAVE_PTHREADS < 7
20888	status = pthread_attr_setdetachstate(&attr, &detach);
20889	if( status < 0 ) status = errno;
20890#else
20891	status = pthread_attr_setdetachstate(&attr, detach);
20892#endif
20893	if( status ) return status;
20894	status = pthread_create( &t, &attr, task, NULL );
20895#if HAVE_PTHREADS < 7
20896	if( status < 0 ) status = errno;
20897#endif
20898	if( status ) return status;
20899#else
20900	/* Draft 4 pthreads */
20901	status = pthread_create( &t, pthread_attr_default, task, NULL );
20902	if( status ) return errno;
20903
20904	/* give thread a chance to complete */
20905	/* it should remain joinable and hence detachable */
20906	sleep( 1 );
20907
20908	status = pthread_detach( &t );
20909	if( status ) return errno;
20910#endif
20911
20912#ifdef HAVE_LINUX_THREADS
20913	pthread_kill_other_threads_np();
20914#endif
20915
20916	return 0;
20917
20918}
20919
20920_ACEOF
20921if ac_fn_c_try_run "$LINENO"
20922then :
20923  ol_cv_pthread_mthreads=yes
20924else $as_nop
20925  ol_cv_pthread_mthreads=no
20926fi
20927rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20928  conftest.$ac_objext conftest.beam conftest.$ac_ext
20929fi
20930
20931
20932		# restore the LIBS
20933		LIBS="$ol_LIBS"
20934
20935fi
20936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_mthreads" >&5
20937printf "%s\n" "$ol_cv_pthread_mthreads" >&6; }
20938
20939	if test $ol_cv_pthread_mthreads = yes ; then
20940		ol_link_pthreads="-mthreads"
20941		ol_link_threads=posix
20942	fi
20943fi
20944
20945		# Pthread try link: -thread (ol_cv_pthread_thread)
20946if test "$ol_link_threads" = no ; then
20947	# try -thread
20948	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -thread" >&5
20949printf %s "checking for pthread link with -thread... " >&6; }
20950if test ${ol_cv_pthread_thread+y}
20951then :
20952  printf %s "(cached) " >&6
20953else $as_nop
20954
20955		# save the flags
20956		ol_LIBS="$LIBS"
20957		LIBS="-thread $LIBS"
20958
20959		if test "$cross_compiling" = yes
20960then :
20961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20962/* end confdefs.h.  */
20963
20964/* pthread test headers */
20965#include <pthread.h>
20966#if HAVE_PTHREADS < 7
20967#include <errno.h>
20968#endif
20969#ifndef NULL
20970#define NULL (void*)0
20971#endif
20972
20973static void *task(p)
20974	void *p;
20975{
20976	return (void *) (p == NULL);
20977}
20978
20979int
20980main (void)
20981{
20982
20983	/* pthread test function */
20984#ifndef PTHREAD_CREATE_DETACHED
20985#define	PTHREAD_CREATE_DETACHED	1
20986#endif
20987	pthread_t t;
20988	int status;
20989	int detach = PTHREAD_CREATE_DETACHED;
20990
20991#if HAVE_PTHREADS > 4
20992	/* Final pthreads */
20993	pthread_attr_t attr;
20994
20995	status = pthread_attr_init(&attr);
20996	if( status ) return status;
20997
20998#if HAVE_PTHREADS < 7
20999	status = pthread_attr_setdetachstate(&attr, &detach);
21000	if( status < 0 ) status = errno;
21001#else
21002	status = pthread_attr_setdetachstate(&attr, detach);
21003#endif
21004	if( status ) return status;
21005	status = pthread_create( &t, &attr, task, NULL );
21006#if HAVE_PTHREADS < 7
21007	if( status < 0 ) status = errno;
21008#endif
21009	if( status ) return status;
21010#else
21011	/* Draft 4 pthreads */
21012	status = pthread_create( &t, pthread_attr_default, task, NULL );
21013	if( status ) return errno;
21014
21015	/* give thread a chance to complete */
21016	/* it should remain joinable and hence detachable */
21017	sleep( 1 );
21018
21019	status = pthread_detach( &t );
21020	if( status ) return errno;
21021#endif
21022
21023#ifdef HAVE_LINUX_THREADS
21024	pthread_kill_other_threads_np();
21025#endif
21026
21027	return 0;
21028
21029  ;
21030  return 0;
21031}
21032_ACEOF
21033if ac_fn_c_try_link "$LINENO"
21034then :
21035  ol_cv_pthread_thread=yes
21036else $as_nop
21037  ol_cv_pthread_thread=no
21038fi
21039rm -f core conftest.err conftest.$ac_objext conftest.beam \
21040    conftest$ac_exeext conftest.$ac_ext
21041else $as_nop
21042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21043/* end confdefs.h.  */
21044
21045
21046/* pthread test headers */
21047#include <pthread.h>
21048#if HAVE_PTHREADS < 7
21049#include <errno.h>
21050#endif
21051#ifndef NULL
21052#define NULL (void*)0
21053#endif
21054
21055static void *task(p)
21056	void *p;
21057{
21058	return (void *) (p == NULL);
21059}
21060
21061
21062int main(argc, argv)
21063	int argc;
21064	char **argv;
21065{
21066
21067	/* pthread test function */
21068#ifndef PTHREAD_CREATE_DETACHED
21069#define	PTHREAD_CREATE_DETACHED	1
21070#endif
21071	pthread_t t;
21072	int status;
21073	int detach = PTHREAD_CREATE_DETACHED;
21074
21075#if HAVE_PTHREADS > 4
21076	/* Final pthreads */
21077	pthread_attr_t attr;
21078
21079	status = pthread_attr_init(&attr);
21080	if( status ) return status;
21081
21082#if HAVE_PTHREADS < 7
21083	status = pthread_attr_setdetachstate(&attr, &detach);
21084	if( status < 0 ) status = errno;
21085#else
21086	status = pthread_attr_setdetachstate(&attr, detach);
21087#endif
21088	if( status ) return status;
21089	status = pthread_create( &t, &attr, task, NULL );
21090#if HAVE_PTHREADS < 7
21091	if( status < 0 ) status = errno;
21092#endif
21093	if( status ) return status;
21094#else
21095	/* Draft 4 pthreads */
21096	status = pthread_create( &t, pthread_attr_default, task, NULL );
21097	if( status ) return errno;
21098
21099	/* give thread a chance to complete */
21100	/* it should remain joinable and hence detachable */
21101	sleep( 1 );
21102
21103	status = pthread_detach( &t );
21104	if( status ) return errno;
21105#endif
21106
21107#ifdef HAVE_LINUX_THREADS
21108	pthread_kill_other_threads_np();
21109#endif
21110
21111	return 0;
21112
21113}
21114
21115_ACEOF
21116if ac_fn_c_try_run "$LINENO"
21117then :
21118  ol_cv_pthread_thread=yes
21119else $as_nop
21120  ol_cv_pthread_thread=no
21121fi
21122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21123  conftest.$ac_objext conftest.beam conftest.$ac_ext
21124fi
21125
21126
21127		# restore the LIBS
21128		LIBS="$ol_LIBS"
21129
21130fi
21131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_thread" >&5
21132printf "%s\n" "$ol_cv_pthread_thread" >&6; }
21133
21134	if test $ol_cv_pthread_thread = yes ; then
21135		ol_link_pthreads="-thread"
21136		ol_link_threads=posix
21137	fi
21138fi
21139
21140
21141		# Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
21142if test "$ol_link_threads" = no ; then
21143	# try -lpthread -lmach -lexc -lc_r
21144	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
21145printf %s "checking for pthread link with -lpthread -lmach -lexc -lc_r... " >&6; }
21146if test ${ol_cv_pthread_lpthread_lmach_lexc_lc_r+y}
21147then :
21148  printf %s "(cached) " >&6
21149else $as_nop
21150
21151		# save the flags
21152		ol_LIBS="$LIBS"
21153		LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
21154
21155		if test "$cross_compiling" = yes
21156then :
21157  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21158/* end confdefs.h.  */
21159
21160/* pthread test headers */
21161#include <pthread.h>
21162#if HAVE_PTHREADS < 7
21163#include <errno.h>
21164#endif
21165#ifndef NULL
21166#define NULL (void*)0
21167#endif
21168
21169static void *task(p)
21170	void *p;
21171{
21172	return (void *) (p == NULL);
21173}
21174
21175int
21176main (void)
21177{
21178
21179	/* pthread test function */
21180#ifndef PTHREAD_CREATE_DETACHED
21181#define	PTHREAD_CREATE_DETACHED	1
21182#endif
21183	pthread_t t;
21184	int status;
21185	int detach = PTHREAD_CREATE_DETACHED;
21186
21187#if HAVE_PTHREADS > 4
21188	/* Final pthreads */
21189	pthread_attr_t attr;
21190
21191	status = pthread_attr_init(&attr);
21192	if( status ) return status;
21193
21194#if HAVE_PTHREADS < 7
21195	status = pthread_attr_setdetachstate(&attr, &detach);
21196	if( status < 0 ) status = errno;
21197#else
21198	status = pthread_attr_setdetachstate(&attr, detach);
21199#endif
21200	if( status ) return status;
21201	status = pthread_create( &t, &attr, task, NULL );
21202#if HAVE_PTHREADS < 7
21203	if( status < 0 ) status = errno;
21204#endif
21205	if( status ) return status;
21206#else
21207	/* Draft 4 pthreads */
21208	status = pthread_create( &t, pthread_attr_default, task, NULL );
21209	if( status ) return errno;
21210
21211	/* give thread a chance to complete */
21212	/* it should remain joinable and hence detachable */
21213	sleep( 1 );
21214
21215	status = pthread_detach( &t );
21216	if( status ) return errno;
21217#endif
21218
21219#ifdef HAVE_LINUX_THREADS
21220	pthread_kill_other_threads_np();
21221#endif
21222
21223	return 0;
21224
21225  ;
21226  return 0;
21227}
21228_ACEOF
21229if ac_fn_c_try_link "$LINENO"
21230then :
21231  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21232else $as_nop
21233  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21234fi
21235rm -f core conftest.err conftest.$ac_objext conftest.beam \
21236    conftest$ac_exeext conftest.$ac_ext
21237else $as_nop
21238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21239/* end confdefs.h.  */
21240
21241
21242/* pthread test headers */
21243#include <pthread.h>
21244#if HAVE_PTHREADS < 7
21245#include <errno.h>
21246#endif
21247#ifndef NULL
21248#define NULL (void*)0
21249#endif
21250
21251static void *task(p)
21252	void *p;
21253{
21254	return (void *) (p == NULL);
21255}
21256
21257
21258int main(argc, argv)
21259	int argc;
21260	char **argv;
21261{
21262
21263	/* pthread test function */
21264#ifndef PTHREAD_CREATE_DETACHED
21265#define	PTHREAD_CREATE_DETACHED	1
21266#endif
21267	pthread_t t;
21268	int status;
21269	int detach = PTHREAD_CREATE_DETACHED;
21270
21271#if HAVE_PTHREADS > 4
21272	/* Final pthreads */
21273	pthread_attr_t attr;
21274
21275	status = pthread_attr_init(&attr);
21276	if( status ) return status;
21277
21278#if HAVE_PTHREADS < 7
21279	status = pthread_attr_setdetachstate(&attr, &detach);
21280	if( status < 0 ) status = errno;
21281#else
21282	status = pthread_attr_setdetachstate(&attr, detach);
21283#endif
21284	if( status ) return status;
21285	status = pthread_create( &t, &attr, task, NULL );
21286#if HAVE_PTHREADS < 7
21287	if( status < 0 ) status = errno;
21288#endif
21289	if( status ) return status;
21290#else
21291	/* Draft 4 pthreads */
21292	status = pthread_create( &t, pthread_attr_default, task, NULL );
21293	if( status ) return errno;
21294
21295	/* give thread a chance to complete */
21296	/* it should remain joinable and hence detachable */
21297	sleep( 1 );
21298
21299	status = pthread_detach( &t );
21300	if( status ) return errno;
21301#endif
21302
21303#ifdef HAVE_LINUX_THREADS
21304	pthread_kill_other_threads_np();
21305#endif
21306
21307	return 0;
21308
21309}
21310
21311_ACEOF
21312if ac_fn_c_try_run "$LINENO"
21313then :
21314  ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
21315else $as_nop
21316  ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
21317fi
21318rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21319  conftest.$ac_objext conftest.beam conftest.$ac_ext
21320fi
21321
21322
21323		# restore the LIBS
21324		LIBS="$ol_LIBS"
21325
21326fi
21327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&5
21328printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc_lc_r" >&6; }
21329
21330	if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
21331		ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
21332		ol_link_threads=posix
21333	fi
21334fi
21335
21336		# Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
21337if test "$ol_link_threads" = no ; then
21338	# try -lpthread -lmach -lexc
21339	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -lmach -lexc" >&5
21340printf %s "checking for pthread link with -lpthread -lmach -lexc... " >&6; }
21341if test ${ol_cv_pthread_lpthread_lmach_lexc+y}
21342then :
21343  printf %s "(cached) " >&6
21344else $as_nop
21345
21346		# save the flags
21347		ol_LIBS="$LIBS"
21348		LIBS="-lpthread -lmach -lexc $LIBS"
21349
21350		if test "$cross_compiling" = yes
21351then :
21352  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21353/* end confdefs.h.  */
21354
21355/* pthread test headers */
21356#include <pthread.h>
21357#if HAVE_PTHREADS < 7
21358#include <errno.h>
21359#endif
21360#ifndef NULL
21361#define NULL (void*)0
21362#endif
21363
21364static void *task(p)
21365	void *p;
21366{
21367	return (void *) (p == NULL);
21368}
21369
21370int
21371main (void)
21372{
21373
21374	/* pthread test function */
21375#ifndef PTHREAD_CREATE_DETACHED
21376#define	PTHREAD_CREATE_DETACHED	1
21377#endif
21378	pthread_t t;
21379	int status;
21380	int detach = PTHREAD_CREATE_DETACHED;
21381
21382#if HAVE_PTHREADS > 4
21383	/* Final pthreads */
21384	pthread_attr_t attr;
21385
21386	status = pthread_attr_init(&attr);
21387	if( status ) return status;
21388
21389#if HAVE_PTHREADS < 7
21390	status = pthread_attr_setdetachstate(&attr, &detach);
21391	if( status < 0 ) status = errno;
21392#else
21393	status = pthread_attr_setdetachstate(&attr, detach);
21394#endif
21395	if( status ) return status;
21396	status = pthread_create( &t, &attr, task, NULL );
21397#if HAVE_PTHREADS < 7
21398	if( status < 0 ) status = errno;
21399#endif
21400	if( status ) return status;
21401#else
21402	/* Draft 4 pthreads */
21403	status = pthread_create( &t, pthread_attr_default, task, NULL );
21404	if( status ) return errno;
21405
21406	/* give thread a chance to complete */
21407	/* it should remain joinable and hence detachable */
21408	sleep( 1 );
21409
21410	status = pthread_detach( &t );
21411	if( status ) return errno;
21412#endif
21413
21414#ifdef HAVE_LINUX_THREADS
21415	pthread_kill_other_threads_np();
21416#endif
21417
21418	return 0;
21419
21420  ;
21421  return 0;
21422}
21423_ACEOF
21424if ac_fn_c_try_link "$LINENO"
21425then :
21426  ol_cv_pthread_lpthread_lmach_lexc=yes
21427else $as_nop
21428  ol_cv_pthread_lpthread_lmach_lexc=no
21429fi
21430rm -f core conftest.err conftest.$ac_objext conftest.beam \
21431    conftest$ac_exeext conftest.$ac_ext
21432else $as_nop
21433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21434/* end confdefs.h.  */
21435
21436
21437/* pthread test headers */
21438#include <pthread.h>
21439#if HAVE_PTHREADS < 7
21440#include <errno.h>
21441#endif
21442#ifndef NULL
21443#define NULL (void*)0
21444#endif
21445
21446static void *task(p)
21447	void *p;
21448{
21449	return (void *) (p == NULL);
21450}
21451
21452
21453int main(argc, argv)
21454	int argc;
21455	char **argv;
21456{
21457
21458	/* pthread test function */
21459#ifndef PTHREAD_CREATE_DETACHED
21460#define	PTHREAD_CREATE_DETACHED	1
21461#endif
21462	pthread_t t;
21463	int status;
21464	int detach = PTHREAD_CREATE_DETACHED;
21465
21466#if HAVE_PTHREADS > 4
21467	/* Final pthreads */
21468	pthread_attr_t attr;
21469
21470	status = pthread_attr_init(&attr);
21471	if( status ) return status;
21472
21473#if HAVE_PTHREADS < 7
21474	status = pthread_attr_setdetachstate(&attr, &detach);
21475	if( status < 0 ) status = errno;
21476#else
21477	status = pthread_attr_setdetachstate(&attr, detach);
21478#endif
21479	if( status ) return status;
21480	status = pthread_create( &t, &attr, task, NULL );
21481#if HAVE_PTHREADS < 7
21482	if( status < 0 ) status = errno;
21483#endif
21484	if( status ) return status;
21485#else
21486	/* Draft 4 pthreads */
21487	status = pthread_create( &t, pthread_attr_default, task, NULL );
21488	if( status ) return errno;
21489
21490	/* give thread a chance to complete */
21491	/* it should remain joinable and hence detachable */
21492	sleep( 1 );
21493
21494	status = pthread_detach( &t );
21495	if( status ) return errno;
21496#endif
21497
21498#ifdef HAVE_LINUX_THREADS
21499	pthread_kill_other_threads_np();
21500#endif
21501
21502	return 0;
21503
21504}
21505
21506_ACEOF
21507if ac_fn_c_try_run "$LINENO"
21508then :
21509  ol_cv_pthread_lpthread_lmach_lexc=yes
21510else $as_nop
21511  ol_cv_pthread_lpthread_lmach_lexc=no
21512fi
21513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21514  conftest.$ac_objext conftest.beam conftest.$ac_ext
21515fi
21516
21517
21518		# restore the LIBS
21519		LIBS="$ol_LIBS"
21520
21521fi
21522{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread_lmach_lexc" >&5
21523printf "%s\n" "$ol_cv_pthread_lpthread_lmach_lexc" >&6; }
21524
21525	if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
21526		ol_link_pthreads="-lpthread -lmach -lexc"
21527		ol_link_threads=posix
21528	fi
21529fi
21530
21531
21532		# Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
21533if test "$ol_link_threads" = no ; then
21534	# try -lpthread -Wl,-woff,85
21535	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread -Wl,-woff,85" >&5
21536printf %s "checking for pthread link with -lpthread -Wl,-woff,85... " >&6; }
21537if test ${ol_cv_pthread_lib_lpthread_woff+y}
21538then :
21539  printf %s "(cached) " >&6
21540else $as_nop
21541
21542		# save the flags
21543		ol_LIBS="$LIBS"
21544		LIBS="-lpthread -Wl,-woff,85 $LIBS"
21545
21546		if test "$cross_compiling" = yes
21547then :
21548  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21549/* end confdefs.h.  */
21550
21551/* pthread test headers */
21552#include <pthread.h>
21553#if HAVE_PTHREADS < 7
21554#include <errno.h>
21555#endif
21556#ifndef NULL
21557#define NULL (void*)0
21558#endif
21559
21560static void *task(p)
21561	void *p;
21562{
21563	return (void *) (p == NULL);
21564}
21565
21566int
21567main (void)
21568{
21569
21570	/* pthread test function */
21571#ifndef PTHREAD_CREATE_DETACHED
21572#define	PTHREAD_CREATE_DETACHED	1
21573#endif
21574	pthread_t t;
21575	int status;
21576	int detach = PTHREAD_CREATE_DETACHED;
21577
21578#if HAVE_PTHREADS > 4
21579	/* Final pthreads */
21580	pthread_attr_t attr;
21581
21582	status = pthread_attr_init(&attr);
21583	if( status ) return status;
21584
21585#if HAVE_PTHREADS < 7
21586	status = pthread_attr_setdetachstate(&attr, &detach);
21587	if( status < 0 ) status = errno;
21588#else
21589	status = pthread_attr_setdetachstate(&attr, detach);
21590#endif
21591	if( status ) return status;
21592	status = pthread_create( &t, &attr, task, NULL );
21593#if HAVE_PTHREADS < 7
21594	if( status < 0 ) status = errno;
21595#endif
21596	if( status ) return status;
21597#else
21598	/* Draft 4 pthreads */
21599	status = pthread_create( &t, pthread_attr_default, task, NULL );
21600	if( status ) return errno;
21601
21602	/* give thread a chance to complete */
21603	/* it should remain joinable and hence detachable */
21604	sleep( 1 );
21605
21606	status = pthread_detach( &t );
21607	if( status ) return errno;
21608#endif
21609
21610#ifdef HAVE_LINUX_THREADS
21611	pthread_kill_other_threads_np();
21612#endif
21613
21614	return 0;
21615
21616  ;
21617  return 0;
21618}
21619_ACEOF
21620if ac_fn_c_try_link "$LINENO"
21621then :
21622  ol_cv_pthread_lib_lpthread_woff=yes
21623else $as_nop
21624  ol_cv_pthread_lib_lpthread_woff=no
21625fi
21626rm -f core conftest.err conftest.$ac_objext conftest.beam \
21627    conftest$ac_exeext conftest.$ac_ext
21628else $as_nop
21629  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21630/* end confdefs.h.  */
21631
21632
21633/* pthread test headers */
21634#include <pthread.h>
21635#if HAVE_PTHREADS < 7
21636#include <errno.h>
21637#endif
21638#ifndef NULL
21639#define NULL (void*)0
21640#endif
21641
21642static void *task(p)
21643	void *p;
21644{
21645	return (void *) (p == NULL);
21646}
21647
21648
21649int main(argc, argv)
21650	int argc;
21651	char **argv;
21652{
21653
21654	/* pthread test function */
21655#ifndef PTHREAD_CREATE_DETACHED
21656#define	PTHREAD_CREATE_DETACHED	1
21657#endif
21658	pthread_t t;
21659	int status;
21660	int detach = PTHREAD_CREATE_DETACHED;
21661
21662#if HAVE_PTHREADS > 4
21663	/* Final pthreads */
21664	pthread_attr_t attr;
21665
21666	status = pthread_attr_init(&attr);
21667	if( status ) return status;
21668
21669#if HAVE_PTHREADS < 7
21670	status = pthread_attr_setdetachstate(&attr, &detach);
21671	if( status < 0 ) status = errno;
21672#else
21673	status = pthread_attr_setdetachstate(&attr, detach);
21674#endif
21675	if( status ) return status;
21676	status = pthread_create( &t, &attr, task, NULL );
21677#if HAVE_PTHREADS < 7
21678	if( status < 0 ) status = errno;
21679#endif
21680	if( status ) return status;
21681#else
21682	/* Draft 4 pthreads */
21683	status = pthread_create( &t, pthread_attr_default, task, NULL );
21684	if( status ) return errno;
21685
21686	/* give thread a chance to complete */
21687	/* it should remain joinable and hence detachable */
21688	sleep( 1 );
21689
21690	status = pthread_detach( &t );
21691	if( status ) return errno;
21692#endif
21693
21694#ifdef HAVE_LINUX_THREADS
21695	pthread_kill_other_threads_np();
21696#endif
21697
21698	return 0;
21699
21700}
21701
21702_ACEOF
21703if ac_fn_c_try_run "$LINENO"
21704then :
21705  ol_cv_pthread_lib_lpthread_woff=yes
21706else $as_nop
21707  ol_cv_pthread_lib_lpthread_woff=no
21708fi
21709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21710  conftest.$ac_objext conftest.beam conftest.$ac_ext
21711fi
21712
21713
21714		# restore the LIBS
21715		LIBS="$ol_LIBS"
21716
21717fi
21718{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthread_woff" >&5
21719printf "%s\n" "$ol_cv_pthread_lib_lpthread_woff" >&6; }
21720
21721	if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
21722		ol_link_pthreads="-lpthread -Wl,-woff,85"
21723		ol_link_threads=posix
21724	fi
21725fi
21726
21727
21728		# Pthread try link: -lpthread (ol_cv_pthread_lpthread)
21729if test "$ol_link_threads" = no ; then
21730	# try -lpthread
21731	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthread" >&5
21732printf %s "checking for pthread link with -lpthread... " >&6; }
21733if test ${ol_cv_pthread_lpthread+y}
21734then :
21735  printf %s "(cached) " >&6
21736else $as_nop
21737
21738		# save the flags
21739		ol_LIBS="$LIBS"
21740		LIBS="-lpthread $LIBS"
21741
21742		if test "$cross_compiling" = yes
21743then :
21744  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21745/* end confdefs.h.  */
21746
21747/* pthread test headers */
21748#include <pthread.h>
21749#if HAVE_PTHREADS < 7
21750#include <errno.h>
21751#endif
21752#ifndef NULL
21753#define NULL (void*)0
21754#endif
21755
21756static void *task(p)
21757	void *p;
21758{
21759	return (void *) (p == NULL);
21760}
21761
21762int
21763main (void)
21764{
21765
21766	/* pthread test function */
21767#ifndef PTHREAD_CREATE_DETACHED
21768#define	PTHREAD_CREATE_DETACHED	1
21769#endif
21770	pthread_t t;
21771	int status;
21772	int detach = PTHREAD_CREATE_DETACHED;
21773
21774#if HAVE_PTHREADS > 4
21775	/* Final pthreads */
21776	pthread_attr_t attr;
21777
21778	status = pthread_attr_init(&attr);
21779	if( status ) return status;
21780
21781#if HAVE_PTHREADS < 7
21782	status = pthread_attr_setdetachstate(&attr, &detach);
21783	if( status < 0 ) status = errno;
21784#else
21785	status = pthread_attr_setdetachstate(&attr, detach);
21786#endif
21787	if( status ) return status;
21788	status = pthread_create( &t, &attr, task, NULL );
21789#if HAVE_PTHREADS < 7
21790	if( status < 0 ) status = errno;
21791#endif
21792	if( status ) return status;
21793#else
21794	/* Draft 4 pthreads */
21795	status = pthread_create( &t, pthread_attr_default, task, NULL );
21796	if( status ) return errno;
21797
21798	/* give thread a chance to complete */
21799	/* it should remain joinable and hence detachable */
21800	sleep( 1 );
21801
21802	status = pthread_detach( &t );
21803	if( status ) return errno;
21804#endif
21805
21806#ifdef HAVE_LINUX_THREADS
21807	pthread_kill_other_threads_np();
21808#endif
21809
21810	return 0;
21811
21812  ;
21813  return 0;
21814}
21815_ACEOF
21816if ac_fn_c_try_link "$LINENO"
21817then :
21818  ol_cv_pthread_lpthread=yes
21819else $as_nop
21820  ol_cv_pthread_lpthread=no
21821fi
21822rm -f core conftest.err conftest.$ac_objext conftest.beam \
21823    conftest$ac_exeext conftest.$ac_ext
21824else $as_nop
21825  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21826/* end confdefs.h.  */
21827
21828
21829/* pthread test headers */
21830#include <pthread.h>
21831#if HAVE_PTHREADS < 7
21832#include <errno.h>
21833#endif
21834#ifndef NULL
21835#define NULL (void*)0
21836#endif
21837
21838static void *task(p)
21839	void *p;
21840{
21841	return (void *) (p == NULL);
21842}
21843
21844
21845int main(argc, argv)
21846	int argc;
21847	char **argv;
21848{
21849
21850	/* pthread test function */
21851#ifndef PTHREAD_CREATE_DETACHED
21852#define	PTHREAD_CREATE_DETACHED	1
21853#endif
21854	pthread_t t;
21855	int status;
21856	int detach = PTHREAD_CREATE_DETACHED;
21857
21858#if HAVE_PTHREADS > 4
21859	/* Final pthreads */
21860	pthread_attr_t attr;
21861
21862	status = pthread_attr_init(&attr);
21863	if( status ) return status;
21864
21865#if HAVE_PTHREADS < 7
21866	status = pthread_attr_setdetachstate(&attr, &detach);
21867	if( status < 0 ) status = errno;
21868#else
21869	status = pthread_attr_setdetachstate(&attr, detach);
21870#endif
21871	if( status ) return status;
21872	status = pthread_create( &t, &attr, task, NULL );
21873#if HAVE_PTHREADS < 7
21874	if( status < 0 ) status = errno;
21875#endif
21876	if( status ) return status;
21877#else
21878	/* Draft 4 pthreads */
21879	status = pthread_create( &t, pthread_attr_default, task, NULL );
21880	if( status ) return errno;
21881
21882	/* give thread a chance to complete */
21883	/* it should remain joinable and hence detachable */
21884	sleep( 1 );
21885
21886	status = pthread_detach( &t );
21887	if( status ) return errno;
21888#endif
21889
21890#ifdef HAVE_LINUX_THREADS
21891	pthread_kill_other_threads_np();
21892#endif
21893
21894	return 0;
21895
21896}
21897
21898_ACEOF
21899if ac_fn_c_try_run "$LINENO"
21900then :
21901  ol_cv_pthread_lpthread=yes
21902else $as_nop
21903  ol_cv_pthread_lpthread=no
21904fi
21905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21906  conftest.$ac_objext conftest.beam conftest.$ac_ext
21907fi
21908
21909
21910		# restore the LIBS
21911		LIBS="$ol_LIBS"
21912
21913fi
21914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthread" >&5
21915printf "%s\n" "$ol_cv_pthread_lpthread" >&6; }
21916
21917	if test $ol_cv_pthread_lpthread = yes ; then
21918		ol_link_pthreads="-lpthread"
21919		ol_link_threads=posix
21920	fi
21921fi
21922
21923		# Pthread try link: -lc_r (ol_cv_pthread_lc_r)
21924if test "$ol_link_threads" = no ; then
21925	# try -lc_r
21926	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lc_r" >&5
21927printf %s "checking for pthread link with -lc_r... " >&6; }
21928if test ${ol_cv_pthread_lc_r+y}
21929then :
21930  printf %s "(cached) " >&6
21931else $as_nop
21932
21933		# save the flags
21934		ol_LIBS="$LIBS"
21935		LIBS="-lc_r $LIBS"
21936
21937		if test "$cross_compiling" = yes
21938then :
21939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21940/* end confdefs.h.  */
21941
21942/* pthread test headers */
21943#include <pthread.h>
21944#if HAVE_PTHREADS < 7
21945#include <errno.h>
21946#endif
21947#ifndef NULL
21948#define NULL (void*)0
21949#endif
21950
21951static void *task(p)
21952	void *p;
21953{
21954	return (void *) (p == NULL);
21955}
21956
21957int
21958main (void)
21959{
21960
21961	/* pthread test function */
21962#ifndef PTHREAD_CREATE_DETACHED
21963#define	PTHREAD_CREATE_DETACHED	1
21964#endif
21965	pthread_t t;
21966	int status;
21967	int detach = PTHREAD_CREATE_DETACHED;
21968
21969#if HAVE_PTHREADS > 4
21970	/* Final pthreads */
21971	pthread_attr_t attr;
21972
21973	status = pthread_attr_init(&attr);
21974	if( status ) return status;
21975
21976#if HAVE_PTHREADS < 7
21977	status = pthread_attr_setdetachstate(&attr, &detach);
21978	if( status < 0 ) status = errno;
21979#else
21980	status = pthread_attr_setdetachstate(&attr, detach);
21981#endif
21982	if( status ) return status;
21983	status = pthread_create( &t, &attr, task, NULL );
21984#if HAVE_PTHREADS < 7
21985	if( status < 0 ) status = errno;
21986#endif
21987	if( status ) return status;
21988#else
21989	/* Draft 4 pthreads */
21990	status = pthread_create( &t, pthread_attr_default, task, NULL );
21991	if( status ) return errno;
21992
21993	/* give thread a chance to complete */
21994	/* it should remain joinable and hence detachable */
21995	sleep( 1 );
21996
21997	status = pthread_detach( &t );
21998	if( status ) return errno;
21999#endif
22000
22001#ifdef HAVE_LINUX_THREADS
22002	pthread_kill_other_threads_np();
22003#endif
22004
22005	return 0;
22006
22007  ;
22008  return 0;
22009}
22010_ACEOF
22011if ac_fn_c_try_link "$LINENO"
22012then :
22013  ol_cv_pthread_lc_r=yes
22014else $as_nop
22015  ol_cv_pthread_lc_r=no
22016fi
22017rm -f core conftest.err conftest.$ac_objext conftest.beam \
22018    conftest$ac_exeext conftest.$ac_ext
22019else $as_nop
22020  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22021/* end confdefs.h.  */
22022
22023
22024/* pthread test headers */
22025#include <pthread.h>
22026#if HAVE_PTHREADS < 7
22027#include <errno.h>
22028#endif
22029#ifndef NULL
22030#define NULL (void*)0
22031#endif
22032
22033static void *task(p)
22034	void *p;
22035{
22036	return (void *) (p == NULL);
22037}
22038
22039
22040int main(argc, argv)
22041	int argc;
22042	char **argv;
22043{
22044
22045	/* pthread test function */
22046#ifndef PTHREAD_CREATE_DETACHED
22047#define	PTHREAD_CREATE_DETACHED	1
22048#endif
22049	pthread_t t;
22050	int status;
22051	int detach = PTHREAD_CREATE_DETACHED;
22052
22053#if HAVE_PTHREADS > 4
22054	/* Final pthreads */
22055	pthread_attr_t attr;
22056
22057	status = pthread_attr_init(&attr);
22058	if( status ) return status;
22059
22060#if HAVE_PTHREADS < 7
22061	status = pthread_attr_setdetachstate(&attr, &detach);
22062	if( status < 0 ) status = errno;
22063#else
22064	status = pthread_attr_setdetachstate(&attr, detach);
22065#endif
22066	if( status ) return status;
22067	status = pthread_create( &t, &attr, task, NULL );
22068#if HAVE_PTHREADS < 7
22069	if( status < 0 ) status = errno;
22070#endif
22071	if( status ) return status;
22072#else
22073	/* Draft 4 pthreads */
22074	status = pthread_create( &t, pthread_attr_default, task, NULL );
22075	if( status ) return errno;
22076
22077	/* give thread a chance to complete */
22078	/* it should remain joinable and hence detachable */
22079	sleep( 1 );
22080
22081	status = pthread_detach( &t );
22082	if( status ) return errno;
22083#endif
22084
22085#ifdef HAVE_LINUX_THREADS
22086	pthread_kill_other_threads_np();
22087#endif
22088
22089	return 0;
22090
22091}
22092
22093_ACEOF
22094if ac_fn_c_try_run "$LINENO"
22095then :
22096  ol_cv_pthread_lc_r=yes
22097else $as_nop
22098  ol_cv_pthread_lc_r=no
22099fi
22100rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22101  conftest.$ac_objext conftest.beam conftest.$ac_ext
22102fi
22103
22104
22105		# restore the LIBS
22106		LIBS="$ol_LIBS"
22107
22108fi
22109{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lc_r" >&5
22110printf "%s\n" "$ol_cv_pthread_lc_r" >&6; }
22111
22112	if test $ol_cv_pthread_lc_r = yes ; then
22113		ol_link_pthreads="-lc_r"
22114		ol_link_threads=posix
22115	fi
22116fi
22117
22118
22119		# Pthread try link: -threads (ol_cv_pthread_threads)
22120if test "$ol_link_threads" = no ; then
22121	# try -threads
22122	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -threads" >&5
22123printf %s "checking for pthread link with -threads... " >&6; }
22124if test ${ol_cv_pthread_threads+y}
22125then :
22126  printf %s "(cached) " >&6
22127else $as_nop
22128
22129		# save the flags
22130		ol_LIBS="$LIBS"
22131		LIBS="-threads $LIBS"
22132
22133		if test "$cross_compiling" = yes
22134then :
22135  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22136/* end confdefs.h.  */
22137
22138/* pthread test headers */
22139#include <pthread.h>
22140#if HAVE_PTHREADS < 7
22141#include <errno.h>
22142#endif
22143#ifndef NULL
22144#define NULL (void*)0
22145#endif
22146
22147static void *task(p)
22148	void *p;
22149{
22150	return (void *) (p == NULL);
22151}
22152
22153int
22154main (void)
22155{
22156
22157	/* pthread test function */
22158#ifndef PTHREAD_CREATE_DETACHED
22159#define	PTHREAD_CREATE_DETACHED	1
22160#endif
22161	pthread_t t;
22162	int status;
22163	int detach = PTHREAD_CREATE_DETACHED;
22164
22165#if HAVE_PTHREADS > 4
22166	/* Final pthreads */
22167	pthread_attr_t attr;
22168
22169	status = pthread_attr_init(&attr);
22170	if( status ) return status;
22171
22172#if HAVE_PTHREADS < 7
22173	status = pthread_attr_setdetachstate(&attr, &detach);
22174	if( status < 0 ) status = errno;
22175#else
22176	status = pthread_attr_setdetachstate(&attr, detach);
22177#endif
22178	if( status ) return status;
22179	status = pthread_create( &t, &attr, task, NULL );
22180#if HAVE_PTHREADS < 7
22181	if( status < 0 ) status = errno;
22182#endif
22183	if( status ) return status;
22184#else
22185	/* Draft 4 pthreads */
22186	status = pthread_create( &t, pthread_attr_default, task, NULL );
22187	if( status ) return errno;
22188
22189	/* give thread a chance to complete */
22190	/* it should remain joinable and hence detachable */
22191	sleep( 1 );
22192
22193	status = pthread_detach( &t );
22194	if( status ) return errno;
22195#endif
22196
22197#ifdef HAVE_LINUX_THREADS
22198	pthread_kill_other_threads_np();
22199#endif
22200
22201	return 0;
22202
22203  ;
22204  return 0;
22205}
22206_ACEOF
22207if ac_fn_c_try_link "$LINENO"
22208then :
22209  ol_cv_pthread_threads=yes
22210else $as_nop
22211  ol_cv_pthread_threads=no
22212fi
22213rm -f core conftest.err conftest.$ac_objext conftest.beam \
22214    conftest$ac_exeext conftest.$ac_ext
22215else $as_nop
22216  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22217/* end confdefs.h.  */
22218
22219
22220/* pthread test headers */
22221#include <pthread.h>
22222#if HAVE_PTHREADS < 7
22223#include <errno.h>
22224#endif
22225#ifndef NULL
22226#define NULL (void*)0
22227#endif
22228
22229static void *task(p)
22230	void *p;
22231{
22232	return (void *) (p == NULL);
22233}
22234
22235
22236int main(argc, argv)
22237	int argc;
22238	char **argv;
22239{
22240
22241	/* pthread test function */
22242#ifndef PTHREAD_CREATE_DETACHED
22243#define	PTHREAD_CREATE_DETACHED	1
22244#endif
22245	pthread_t t;
22246	int status;
22247	int detach = PTHREAD_CREATE_DETACHED;
22248
22249#if HAVE_PTHREADS > 4
22250	/* Final pthreads */
22251	pthread_attr_t attr;
22252
22253	status = pthread_attr_init(&attr);
22254	if( status ) return status;
22255
22256#if HAVE_PTHREADS < 7
22257	status = pthread_attr_setdetachstate(&attr, &detach);
22258	if( status < 0 ) status = errno;
22259#else
22260	status = pthread_attr_setdetachstate(&attr, detach);
22261#endif
22262	if( status ) return status;
22263	status = pthread_create( &t, &attr, task, NULL );
22264#if HAVE_PTHREADS < 7
22265	if( status < 0 ) status = errno;
22266#endif
22267	if( status ) return status;
22268#else
22269	/* Draft 4 pthreads */
22270	status = pthread_create( &t, pthread_attr_default, task, NULL );
22271	if( status ) return errno;
22272
22273	/* give thread a chance to complete */
22274	/* it should remain joinable and hence detachable */
22275	sleep( 1 );
22276
22277	status = pthread_detach( &t );
22278	if( status ) return errno;
22279#endif
22280
22281#ifdef HAVE_LINUX_THREADS
22282	pthread_kill_other_threads_np();
22283#endif
22284
22285	return 0;
22286
22287}
22288
22289_ACEOF
22290if ac_fn_c_try_run "$LINENO"
22291then :
22292  ol_cv_pthread_threads=yes
22293else $as_nop
22294  ol_cv_pthread_threads=no
22295fi
22296rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22297  conftest.$ac_objext conftest.beam conftest.$ac_ext
22298fi
22299
22300
22301		# restore the LIBS
22302		LIBS="$ol_LIBS"
22303
22304fi
22305{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_threads" >&5
22306printf "%s\n" "$ol_cv_pthread_threads" >&6; }
22307
22308	if test $ol_cv_pthread_threads = yes ; then
22309		ol_link_pthreads="-threads"
22310		ol_link_threads=posix
22311	fi
22312fi
22313
22314
22315		# Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
22316if test "$ol_link_threads" = no ; then
22317	# try -lpthreads -lmach -lexc -lc_r
22318	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
22319printf %s "checking for pthread link with -lpthreads -lmach -lexc -lc_r... " >&6; }
22320if test ${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+y}
22321then :
22322  printf %s "(cached) " >&6
22323else $as_nop
22324
22325		# save the flags
22326		ol_LIBS="$LIBS"
22327		LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
22328
22329		if test "$cross_compiling" = yes
22330then :
22331  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22332/* end confdefs.h.  */
22333
22334/* pthread test headers */
22335#include <pthread.h>
22336#if HAVE_PTHREADS < 7
22337#include <errno.h>
22338#endif
22339#ifndef NULL
22340#define NULL (void*)0
22341#endif
22342
22343static void *task(p)
22344	void *p;
22345{
22346	return (void *) (p == NULL);
22347}
22348
22349int
22350main (void)
22351{
22352
22353	/* pthread test function */
22354#ifndef PTHREAD_CREATE_DETACHED
22355#define	PTHREAD_CREATE_DETACHED	1
22356#endif
22357	pthread_t t;
22358	int status;
22359	int detach = PTHREAD_CREATE_DETACHED;
22360
22361#if HAVE_PTHREADS > 4
22362	/* Final pthreads */
22363	pthread_attr_t attr;
22364
22365	status = pthread_attr_init(&attr);
22366	if( status ) return status;
22367
22368#if HAVE_PTHREADS < 7
22369	status = pthread_attr_setdetachstate(&attr, &detach);
22370	if( status < 0 ) status = errno;
22371#else
22372	status = pthread_attr_setdetachstate(&attr, detach);
22373#endif
22374	if( status ) return status;
22375	status = pthread_create( &t, &attr, task, NULL );
22376#if HAVE_PTHREADS < 7
22377	if( status < 0 ) status = errno;
22378#endif
22379	if( status ) return status;
22380#else
22381	/* Draft 4 pthreads */
22382	status = pthread_create( &t, pthread_attr_default, task, NULL );
22383	if( status ) return errno;
22384
22385	/* give thread a chance to complete */
22386	/* it should remain joinable and hence detachable */
22387	sleep( 1 );
22388
22389	status = pthread_detach( &t );
22390	if( status ) return errno;
22391#endif
22392
22393#ifdef HAVE_LINUX_THREADS
22394	pthread_kill_other_threads_np();
22395#endif
22396
22397	return 0;
22398
22399  ;
22400  return 0;
22401}
22402_ACEOF
22403if ac_fn_c_try_link "$LINENO"
22404then :
22405  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22406else $as_nop
22407  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22408fi
22409rm -f core conftest.err conftest.$ac_objext conftest.beam \
22410    conftest$ac_exeext conftest.$ac_ext
22411else $as_nop
22412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22413/* end confdefs.h.  */
22414
22415
22416/* pthread test headers */
22417#include <pthread.h>
22418#if HAVE_PTHREADS < 7
22419#include <errno.h>
22420#endif
22421#ifndef NULL
22422#define NULL (void*)0
22423#endif
22424
22425static void *task(p)
22426	void *p;
22427{
22428	return (void *) (p == NULL);
22429}
22430
22431
22432int main(argc, argv)
22433	int argc;
22434	char **argv;
22435{
22436
22437	/* pthread test function */
22438#ifndef PTHREAD_CREATE_DETACHED
22439#define	PTHREAD_CREATE_DETACHED	1
22440#endif
22441	pthread_t t;
22442	int status;
22443	int detach = PTHREAD_CREATE_DETACHED;
22444
22445#if HAVE_PTHREADS > 4
22446	/* Final pthreads */
22447	pthread_attr_t attr;
22448
22449	status = pthread_attr_init(&attr);
22450	if( status ) return status;
22451
22452#if HAVE_PTHREADS < 7
22453	status = pthread_attr_setdetachstate(&attr, &detach);
22454	if( status < 0 ) status = errno;
22455#else
22456	status = pthread_attr_setdetachstate(&attr, detach);
22457#endif
22458	if( status ) return status;
22459	status = pthread_create( &t, &attr, task, NULL );
22460#if HAVE_PTHREADS < 7
22461	if( status < 0 ) status = errno;
22462#endif
22463	if( status ) return status;
22464#else
22465	/* Draft 4 pthreads */
22466	status = pthread_create( &t, pthread_attr_default, task, NULL );
22467	if( status ) return errno;
22468
22469	/* give thread a chance to complete */
22470	/* it should remain joinable and hence detachable */
22471	sleep( 1 );
22472
22473	status = pthread_detach( &t );
22474	if( status ) return errno;
22475#endif
22476
22477#ifdef HAVE_LINUX_THREADS
22478	pthread_kill_other_threads_np();
22479#endif
22480
22481	return 0;
22482
22483}
22484
22485_ACEOF
22486if ac_fn_c_try_run "$LINENO"
22487then :
22488  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
22489else $as_nop
22490  ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
22491fi
22492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22493  conftest.$ac_objext conftest.beam conftest.$ac_ext
22494fi
22495
22496
22497		# restore the LIBS
22498		LIBS="$ol_LIBS"
22499
22500fi
22501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&5
22502printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" >&6; }
22503
22504	if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
22505		ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
22506		ol_link_threads=posix
22507	fi
22508fi
22509
22510		# Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
22511if test "$ol_link_threads" = no ; then
22512	# try -lpthreads -lmach -lexc
22513	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lmach -lexc" >&5
22514printf %s "checking for pthread link with -lpthreads -lmach -lexc... " >&6; }
22515if test ${ol_cv_pthread_lpthreads_lmach_lexc+y}
22516then :
22517  printf %s "(cached) " >&6
22518else $as_nop
22519
22520		# save the flags
22521		ol_LIBS="$LIBS"
22522		LIBS="-lpthreads -lmach -lexc $LIBS"
22523
22524		if test "$cross_compiling" = yes
22525then :
22526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22527/* end confdefs.h.  */
22528
22529/* pthread test headers */
22530#include <pthread.h>
22531#if HAVE_PTHREADS < 7
22532#include <errno.h>
22533#endif
22534#ifndef NULL
22535#define NULL (void*)0
22536#endif
22537
22538static void *task(p)
22539	void *p;
22540{
22541	return (void *) (p == NULL);
22542}
22543
22544int
22545main (void)
22546{
22547
22548	/* pthread test function */
22549#ifndef PTHREAD_CREATE_DETACHED
22550#define	PTHREAD_CREATE_DETACHED	1
22551#endif
22552	pthread_t t;
22553	int status;
22554	int detach = PTHREAD_CREATE_DETACHED;
22555
22556#if HAVE_PTHREADS > 4
22557	/* Final pthreads */
22558	pthread_attr_t attr;
22559
22560	status = pthread_attr_init(&attr);
22561	if( status ) return status;
22562
22563#if HAVE_PTHREADS < 7
22564	status = pthread_attr_setdetachstate(&attr, &detach);
22565	if( status < 0 ) status = errno;
22566#else
22567	status = pthread_attr_setdetachstate(&attr, detach);
22568#endif
22569	if( status ) return status;
22570	status = pthread_create( &t, &attr, task, NULL );
22571#if HAVE_PTHREADS < 7
22572	if( status < 0 ) status = errno;
22573#endif
22574	if( status ) return status;
22575#else
22576	/* Draft 4 pthreads */
22577	status = pthread_create( &t, pthread_attr_default, task, NULL );
22578	if( status ) return errno;
22579
22580	/* give thread a chance to complete */
22581	/* it should remain joinable and hence detachable */
22582	sleep( 1 );
22583
22584	status = pthread_detach( &t );
22585	if( status ) return errno;
22586#endif
22587
22588#ifdef HAVE_LINUX_THREADS
22589	pthread_kill_other_threads_np();
22590#endif
22591
22592	return 0;
22593
22594  ;
22595  return 0;
22596}
22597_ACEOF
22598if ac_fn_c_try_link "$LINENO"
22599then :
22600  ol_cv_pthread_lpthreads_lmach_lexc=yes
22601else $as_nop
22602  ol_cv_pthread_lpthreads_lmach_lexc=no
22603fi
22604rm -f core conftest.err conftest.$ac_objext conftest.beam \
22605    conftest$ac_exeext conftest.$ac_ext
22606else $as_nop
22607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22608/* end confdefs.h.  */
22609
22610
22611/* pthread test headers */
22612#include <pthread.h>
22613#if HAVE_PTHREADS < 7
22614#include <errno.h>
22615#endif
22616#ifndef NULL
22617#define NULL (void*)0
22618#endif
22619
22620static void *task(p)
22621	void *p;
22622{
22623	return (void *) (p == NULL);
22624}
22625
22626
22627int main(argc, argv)
22628	int argc;
22629	char **argv;
22630{
22631
22632	/* pthread test function */
22633#ifndef PTHREAD_CREATE_DETACHED
22634#define	PTHREAD_CREATE_DETACHED	1
22635#endif
22636	pthread_t t;
22637	int status;
22638	int detach = PTHREAD_CREATE_DETACHED;
22639
22640#if HAVE_PTHREADS > 4
22641	/* Final pthreads */
22642	pthread_attr_t attr;
22643
22644	status = pthread_attr_init(&attr);
22645	if( status ) return status;
22646
22647#if HAVE_PTHREADS < 7
22648	status = pthread_attr_setdetachstate(&attr, &detach);
22649	if( status < 0 ) status = errno;
22650#else
22651	status = pthread_attr_setdetachstate(&attr, detach);
22652#endif
22653	if( status ) return status;
22654	status = pthread_create( &t, &attr, task, NULL );
22655#if HAVE_PTHREADS < 7
22656	if( status < 0 ) status = errno;
22657#endif
22658	if( status ) return status;
22659#else
22660	/* Draft 4 pthreads */
22661	status = pthread_create( &t, pthread_attr_default, task, NULL );
22662	if( status ) return errno;
22663
22664	/* give thread a chance to complete */
22665	/* it should remain joinable and hence detachable */
22666	sleep( 1 );
22667
22668	status = pthread_detach( &t );
22669	if( status ) return errno;
22670#endif
22671
22672#ifdef HAVE_LINUX_THREADS
22673	pthread_kill_other_threads_np();
22674#endif
22675
22676	return 0;
22677
22678}
22679
22680_ACEOF
22681if ac_fn_c_try_run "$LINENO"
22682then :
22683  ol_cv_pthread_lpthreads_lmach_lexc=yes
22684else $as_nop
22685  ol_cv_pthread_lpthreads_lmach_lexc=no
22686fi
22687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22688  conftest.$ac_objext conftest.beam conftest.$ac_ext
22689fi
22690
22691
22692		# restore the LIBS
22693		LIBS="$ol_LIBS"
22694
22695fi
22696{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lmach_lexc" >&5
22697printf "%s\n" "$ol_cv_pthread_lpthreads_lmach_lexc" >&6; }
22698
22699	if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
22700		ol_link_pthreads="-lpthreads -lmach -lexc"
22701		ol_link_threads=posix
22702	fi
22703fi
22704
22705		# Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
22706if test "$ol_link_threads" = no ; then
22707	# try -lpthreads -lexc
22708	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads -lexc" >&5
22709printf %s "checking for pthread link with -lpthreads -lexc... " >&6; }
22710if test ${ol_cv_pthread_lpthreads_lexc+y}
22711then :
22712  printf %s "(cached) " >&6
22713else $as_nop
22714
22715		# save the flags
22716		ol_LIBS="$LIBS"
22717		LIBS="-lpthreads -lexc $LIBS"
22718
22719		if test "$cross_compiling" = yes
22720then :
22721  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22722/* end confdefs.h.  */
22723
22724/* pthread test headers */
22725#include <pthread.h>
22726#if HAVE_PTHREADS < 7
22727#include <errno.h>
22728#endif
22729#ifndef NULL
22730#define NULL (void*)0
22731#endif
22732
22733static void *task(p)
22734	void *p;
22735{
22736	return (void *) (p == NULL);
22737}
22738
22739int
22740main (void)
22741{
22742
22743	/* pthread test function */
22744#ifndef PTHREAD_CREATE_DETACHED
22745#define	PTHREAD_CREATE_DETACHED	1
22746#endif
22747	pthread_t t;
22748	int status;
22749	int detach = PTHREAD_CREATE_DETACHED;
22750
22751#if HAVE_PTHREADS > 4
22752	/* Final pthreads */
22753	pthread_attr_t attr;
22754
22755	status = pthread_attr_init(&attr);
22756	if( status ) return status;
22757
22758#if HAVE_PTHREADS < 7
22759	status = pthread_attr_setdetachstate(&attr, &detach);
22760	if( status < 0 ) status = errno;
22761#else
22762	status = pthread_attr_setdetachstate(&attr, detach);
22763#endif
22764	if( status ) return status;
22765	status = pthread_create( &t, &attr, task, NULL );
22766#if HAVE_PTHREADS < 7
22767	if( status < 0 ) status = errno;
22768#endif
22769	if( status ) return status;
22770#else
22771	/* Draft 4 pthreads */
22772	status = pthread_create( &t, pthread_attr_default, task, NULL );
22773	if( status ) return errno;
22774
22775	/* give thread a chance to complete */
22776	/* it should remain joinable and hence detachable */
22777	sleep( 1 );
22778
22779	status = pthread_detach( &t );
22780	if( status ) return errno;
22781#endif
22782
22783#ifdef HAVE_LINUX_THREADS
22784	pthread_kill_other_threads_np();
22785#endif
22786
22787	return 0;
22788
22789  ;
22790  return 0;
22791}
22792_ACEOF
22793if ac_fn_c_try_link "$LINENO"
22794then :
22795  ol_cv_pthread_lpthreads_lexc=yes
22796else $as_nop
22797  ol_cv_pthread_lpthreads_lexc=no
22798fi
22799rm -f core conftest.err conftest.$ac_objext conftest.beam \
22800    conftest$ac_exeext conftest.$ac_ext
22801else $as_nop
22802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22803/* end confdefs.h.  */
22804
22805
22806/* pthread test headers */
22807#include <pthread.h>
22808#if HAVE_PTHREADS < 7
22809#include <errno.h>
22810#endif
22811#ifndef NULL
22812#define NULL (void*)0
22813#endif
22814
22815static void *task(p)
22816	void *p;
22817{
22818	return (void *) (p == NULL);
22819}
22820
22821
22822int main(argc, argv)
22823	int argc;
22824	char **argv;
22825{
22826
22827	/* pthread test function */
22828#ifndef PTHREAD_CREATE_DETACHED
22829#define	PTHREAD_CREATE_DETACHED	1
22830#endif
22831	pthread_t t;
22832	int status;
22833	int detach = PTHREAD_CREATE_DETACHED;
22834
22835#if HAVE_PTHREADS > 4
22836	/* Final pthreads */
22837	pthread_attr_t attr;
22838
22839	status = pthread_attr_init(&attr);
22840	if( status ) return status;
22841
22842#if HAVE_PTHREADS < 7
22843	status = pthread_attr_setdetachstate(&attr, &detach);
22844	if( status < 0 ) status = errno;
22845#else
22846	status = pthread_attr_setdetachstate(&attr, detach);
22847#endif
22848	if( status ) return status;
22849	status = pthread_create( &t, &attr, task, NULL );
22850#if HAVE_PTHREADS < 7
22851	if( status < 0 ) status = errno;
22852#endif
22853	if( status ) return status;
22854#else
22855	/* Draft 4 pthreads */
22856	status = pthread_create( &t, pthread_attr_default, task, NULL );
22857	if( status ) return errno;
22858
22859	/* give thread a chance to complete */
22860	/* it should remain joinable and hence detachable */
22861	sleep( 1 );
22862
22863	status = pthread_detach( &t );
22864	if( status ) return errno;
22865#endif
22866
22867#ifdef HAVE_LINUX_THREADS
22868	pthread_kill_other_threads_np();
22869#endif
22870
22871	return 0;
22872
22873}
22874
22875_ACEOF
22876if ac_fn_c_try_run "$LINENO"
22877then :
22878  ol_cv_pthread_lpthreads_lexc=yes
22879else $as_nop
22880  ol_cv_pthread_lpthreads_lexc=no
22881fi
22882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22883  conftest.$ac_objext conftest.beam conftest.$ac_ext
22884fi
22885
22886
22887		# restore the LIBS
22888		LIBS="$ol_LIBS"
22889
22890fi
22891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lpthreads_lexc" >&5
22892printf "%s\n" "$ol_cv_pthread_lpthreads_lexc" >&6; }
22893
22894	if test $ol_cv_pthread_lpthreads_lexc = yes ; then
22895		ol_link_pthreads="-lpthreads -lexc"
22896		ol_link_threads=posix
22897	fi
22898fi
22899
22900
22901		# Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
22902if test "$ol_link_threads" = no ; then
22903	# try -lpthreads
22904	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread link with -lpthreads" >&5
22905printf %s "checking for pthread link with -lpthreads... " >&6; }
22906if test ${ol_cv_pthread_lib_lpthreads+y}
22907then :
22908  printf %s "(cached) " >&6
22909else $as_nop
22910
22911		# save the flags
22912		ol_LIBS="$LIBS"
22913		LIBS="-lpthreads $LIBS"
22914
22915		if test "$cross_compiling" = yes
22916then :
22917  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22918/* end confdefs.h.  */
22919
22920/* pthread test headers */
22921#include <pthread.h>
22922#if HAVE_PTHREADS < 7
22923#include <errno.h>
22924#endif
22925#ifndef NULL
22926#define NULL (void*)0
22927#endif
22928
22929static void *task(p)
22930	void *p;
22931{
22932	return (void *) (p == NULL);
22933}
22934
22935int
22936main (void)
22937{
22938
22939	/* pthread test function */
22940#ifndef PTHREAD_CREATE_DETACHED
22941#define	PTHREAD_CREATE_DETACHED	1
22942#endif
22943	pthread_t t;
22944	int status;
22945	int detach = PTHREAD_CREATE_DETACHED;
22946
22947#if HAVE_PTHREADS > 4
22948	/* Final pthreads */
22949	pthread_attr_t attr;
22950
22951	status = pthread_attr_init(&attr);
22952	if( status ) return status;
22953
22954#if HAVE_PTHREADS < 7
22955	status = pthread_attr_setdetachstate(&attr, &detach);
22956	if( status < 0 ) status = errno;
22957#else
22958	status = pthread_attr_setdetachstate(&attr, detach);
22959#endif
22960	if( status ) return status;
22961	status = pthread_create( &t, &attr, task, NULL );
22962#if HAVE_PTHREADS < 7
22963	if( status < 0 ) status = errno;
22964#endif
22965	if( status ) return status;
22966#else
22967	/* Draft 4 pthreads */
22968	status = pthread_create( &t, pthread_attr_default, task, NULL );
22969	if( status ) return errno;
22970
22971	/* give thread a chance to complete */
22972	/* it should remain joinable and hence detachable */
22973	sleep( 1 );
22974
22975	status = pthread_detach( &t );
22976	if( status ) return errno;
22977#endif
22978
22979#ifdef HAVE_LINUX_THREADS
22980	pthread_kill_other_threads_np();
22981#endif
22982
22983	return 0;
22984
22985  ;
22986  return 0;
22987}
22988_ACEOF
22989if ac_fn_c_try_link "$LINENO"
22990then :
22991  ol_cv_pthread_lib_lpthreads=yes
22992else $as_nop
22993  ol_cv_pthread_lib_lpthreads=no
22994fi
22995rm -f core conftest.err conftest.$ac_objext conftest.beam \
22996    conftest$ac_exeext conftest.$ac_ext
22997else $as_nop
22998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22999/* end confdefs.h.  */
23000
23001
23002/* pthread test headers */
23003#include <pthread.h>
23004#if HAVE_PTHREADS < 7
23005#include <errno.h>
23006#endif
23007#ifndef NULL
23008#define NULL (void*)0
23009#endif
23010
23011static void *task(p)
23012	void *p;
23013{
23014	return (void *) (p == NULL);
23015}
23016
23017
23018int main(argc, argv)
23019	int argc;
23020	char **argv;
23021{
23022
23023	/* pthread test function */
23024#ifndef PTHREAD_CREATE_DETACHED
23025#define	PTHREAD_CREATE_DETACHED	1
23026#endif
23027	pthread_t t;
23028	int status;
23029	int detach = PTHREAD_CREATE_DETACHED;
23030
23031#if HAVE_PTHREADS > 4
23032	/* Final pthreads */
23033	pthread_attr_t attr;
23034
23035	status = pthread_attr_init(&attr);
23036	if( status ) return status;
23037
23038#if HAVE_PTHREADS < 7
23039	status = pthread_attr_setdetachstate(&attr, &detach);
23040	if( status < 0 ) status = errno;
23041#else
23042	status = pthread_attr_setdetachstate(&attr, detach);
23043#endif
23044	if( status ) return status;
23045	status = pthread_create( &t, &attr, task, NULL );
23046#if HAVE_PTHREADS < 7
23047	if( status < 0 ) status = errno;
23048#endif
23049	if( status ) return status;
23050#else
23051	/* Draft 4 pthreads */
23052	status = pthread_create( &t, pthread_attr_default, task, NULL );
23053	if( status ) return errno;
23054
23055	/* give thread a chance to complete */
23056	/* it should remain joinable and hence detachable */
23057	sleep( 1 );
23058
23059	status = pthread_detach( &t );
23060	if( status ) return errno;
23061#endif
23062
23063#ifdef HAVE_LINUX_THREADS
23064	pthread_kill_other_threads_np();
23065#endif
23066
23067	return 0;
23068
23069}
23070
23071_ACEOF
23072if ac_fn_c_try_run "$LINENO"
23073then :
23074  ol_cv_pthread_lib_lpthreads=yes
23075else $as_nop
23076  ol_cv_pthread_lib_lpthreads=no
23077fi
23078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23079  conftest.$ac_objext conftest.beam conftest.$ac_ext
23080fi
23081
23082
23083		# restore the LIBS
23084		LIBS="$ol_LIBS"
23085
23086fi
23087{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_lib_lpthreads" >&5
23088printf "%s\n" "$ol_cv_pthread_lib_lpthreads" >&6; }
23089
23090	if test $ol_cv_pthread_lib_lpthreads = yes ; then
23091		ol_link_pthreads="-lpthreads"
23092		ol_link_threads=posix
23093	fi
23094fi
23095
23096
23097{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&5
23098printf "%s\n" "$as_me: ol_link_threads: <$ol_link_threads> ol_link_pthreads <$ol_link_pthreads>" >&6;}
23099
23100		if test $ol_link_threads != no ; then
23101			LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
23102
23103						save_CPPFLAGS="$CPPFLAGS"
23104			save_LIBS="$LIBS"
23105			LIBS="$LTHREAD_LIBS $LIBS"
23106
23107												ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
23108if test "x$ac_cv_func_sched_yield" = xyes
23109then :
23110  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
23111
23112fi
23113ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
23114if test "x$ac_cv_func_pthread_yield" = xyes
23115then :
23116  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
23117
23118fi
23119ac_fn_c_check_func "$LINENO" "thr_yield" "ac_cv_func_thr_yield"
23120if test "x$ac_cv_func_thr_yield" = xyes
23121then :
23122  printf "%s\n" "#define HAVE_THR_YIELD 1" >>confdefs.h
23123
23124fi
23125
23126
23127			if test $ac_cv_func_sched_yield = no &&
23128			   test $ac_cv_func_pthread_yield = no &&
23129			   test $ac_cv_func_thr_yield = no ; then
23130								{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
23131printf %s "checking for sched_yield in -lrt... " >&6; }
23132if test ${ac_cv_lib_rt_sched_yield+y}
23133then :
23134  printf %s "(cached) " >&6
23135else $as_nop
23136  ac_check_lib_save_LIBS=$LIBS
23137LIBS="-lrt  $LIBS"
23138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23139/* end confdefs.h.  */
23140
23141/* Override any GCC internal prototype to avoid an error.
23142   Use char because int might match the return type of a GCC
23143   builtin and then its argument prototype would still apply.  */
23144char sched_yield ();
23145int
23146main (void)
23147{
23148return sched_yield ();
23149  ;
23150  return 0;
23151}
23152_ACEOF
23153if ac_fn_c_try_link "$LINENO"
23154then :
23155  ac_cv_lib_rt_sched_yield=yes
23156else $as_nop
23157  ac_cv_lib_rt_sched_yield=no
23158fi
23159rm -f core conftest.err conftest.$ac_objext conftest.beam \
23160    conftest$ac_exeext conftest.$ac_ext
23161LIBS=$ac_check_lib_save_LIBS
23162fi
23163{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
23164printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; }
23165if test "x$ac_cv_lib_rt_sched_yield" = xyes
23166then :
23167  LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
23168
23169printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
23170
23171					ac_cv_func_sched_yield=yes
23172else $as_nop
23173  ac_cv_func_sched_yield=no
23174fi
23175
23176			fi
23177			if test $ac_cv_func_sched_yield = no &&
23178			   test $ac_cv_func_pthread_yield = no &&
23179			   test "$ac_cv_func_thr_yield" = no ; then
23180				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not locate sched_yield() or pthread_yield()" >&5
23181printf "%s\n" "$as_me: WARNING: could not locate sched_yield() or pthread_yield()" >&2;}
23182			fi
23183
23184						ac_fn_c_check_func "$LINENO" "pthread_kill" "ac_cv_func_pthread_kill"
23185if test "x$ac_cv_func_pthread_kill" = xyes
23186then :
23187  printf "%s\n" "#define HAVE_PTHREAD_KILL 1" >>confdefs.h
23188
23189fi
23190
23191
23192									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_rwlock_destroy with <pthread.h>" >&5
23193printf %s "checking for pthread_rwlock_destroy with <pthread.h>... " >&6; }
23194if test ${ol_cv_func_pthread_rwlock_destroy+y}
23195then :
23196  printf %s "(cached) " >&6
23197else $as_nop
23198
23199								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23200/* end confdefs.h.  */
23201
23202#include <pthread.h>
23203pthread_rwlock_t rwlock;
23204
23205int
23206main (void)
23207{
23208pthread_rwlock_destroy(&rwlock);
23209  ;
23210  return 0;
23211}
23212_ACEOF
23213if ac_fn_c_try_link "$LINENO"
23214then :
23215  ol_cv_func_pthread_rwlock_destroy=yes
23216else $as_nop
23217  ol_cv_func_pthread_rwlock_destroy=no
23218fi
23219rm -f core conftest.err conftest.$ac_objext conftest.beam \
23220    conftest$ac_exeext conftest.$ac_ext
23221
23222fi
23223{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_rwlock_destroy" >&5
23224printf "%s\n" "$ol_cv_func_pthread_rwlock_destroy" >&6; }
23225			if test $ol_cv_func_pthread_rwlock_destroy = yes ; then
23226
23227printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_DESTROY 1" >>confdefs.h
23228
23229			fi
23230
23231									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_detach with <pthread.h>" >&5
23232printf %s "checking for pthread_detach with <pthread.h>... " >&6; }
23233if test ${ol_cv_func_pthread_detach+y}
23234then :
23235  printf %s "(cached) " >&6
23236else $as_nop
23237
23238								cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23239/* end confdefs.h.  */
23240
23241#include <pthread.h>
23242#ifndef NULL
23243#define NULL (void*)0
23244#endif
23245
23246int
23247main (void)
23248{
23249pthread_detach(NULL);
23250  ;
23251  return 0;
23252}
23253_ACEOF
23254if ac_fn_c_try_link "$LINENO"
23255then :
23256  ol_cv_func_pthread_detach=yes
23257else $as_nop
23258  ol_cv_func_pthread_detach=no
23259fi
23260rm -f core conftest.err conftest.$ac_objext conftest.beam \
23261    conftest$ac_exeext conftest.$ac_ext
23262
23263fi
23264{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_func_pthread_detach" >&5
23265printf "%s\n" "$ol_cv_func_pthread_detach" >&6; }
23266
23267			if test $ol_cv_func_pthread_detach = no ; then
23268				as_fn_error $? "could not locate pthread_detach()" "$LINENO" 5
23269			fi
23270
23271
23272printf "%s\n" "#define HAVE_PTHREAD_DETACH 1" >>confdefs.h
23273
23274
23275						ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
23276if test "x$ac_cv_func_pthread_setconcurrency" = xyes
23277then :
23278  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
23279
23280fi
23281ac_fn_c_check_func "$LINENO" "pthread_getconcurrency" "ac_cv_func_pthread_getconcurrency"
23282if test "x$ac_cv_func_pthread_getconcurrency" = xyes
23283then :
23284  printf "%s\n" "#define HAVE_PTHREAD_GETCONCURRENCY 1" >>confdefs.h
23285
23286fi
23287ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
23288if test "x$ac_cv_func_thr_setconcurrency" = xyes
23289then :
23290  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
23291
23292fi
23293ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
23294if test "x$ac_cv_func_thr_getconcurrency" = xyes
23295then :
23296  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
23297
23298fi
23299
23300
23301
23302	ac_fn_c_check_func "$LINENO" "pthread_kill_other_threads_np" "ac_cv_func_pthread_kill_other_threads_np"
23303if test "x$ac_cv_func_pthread_kill_other_threads_np" = xyes
23304then :
23305  printf "%s\n" "#define HAVE_PTHREAD_KILL_OTHER_THREADS_NP 1" >>confdefs.h
23306
23307fi
23308
23309	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads implementation" >&5
23310printf %s "checking for LinuxThreads implementation... " >&6; }
23311if test ${ol_cv_sys_linux_threads+y}
23312then :
23313  printf %s "(cached) " >&6
23314else $as_nop
23315  ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
23316fi
23317{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_sys_linux_threads" >&5
23318printf "%s\n" "$ol_cv_sys_linux_threads" >&6; }
23319
23320
23321
23322
23323	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads consistency" >&5
23324printf %s "checking for LinuxThreads consistency... " >&6; }
23325if test ${ol_cv_linux_threads+y}
23326then :
23327  printf %s "(cached) " >&6
23328else $as_nop
23329
23330		if test $ol_cv_header_linux_threads = yes &&
23331		   test $ol_cv_sys_linux_threads = yes; then
23332			ol_cv_linux_threads=yes
23333		elif test $ol_cv_header_linux_threads = no &&
23334		     test $ol_cv_sys_linux_threads = no; then
23335			ol_cv_linux_threads=no
23336		else
23337			ol_cv_linux_threads=error
23338		fi
23339
23340fi
23341{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_linux_threads" >&5
23342printf "%s\n" "$ol_cv_linux_threads" >&6; }
23343
23344
23345			if test $ol_cv_linux_threads = error; then
23346				as_fn_error $? "LinuxThreads header/library mismatch" "$LINENO" 5;
23347			fi
23348
23349			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if pthread_create() works" >&5
23350printf %s "checking if pthread_create() works... " >&6; }
23351if test ${ol_cv_pthread_create_works+y}
23352then :
23353  printf %s "(cached) " >&6
23354else $as_nop
23355
23356			if test "$cross_compiling" = yes
23357then :
23358  				ol_cv_pthread_create_works=yes
23359else $as_nop
23360  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23361/* end confdefs.h.  */
23362
23363
23364/* pthread test headers */
23365#include <pthread.h>
23366#if HAVE_PTHREADS < 7
23367#include <errno.h>
23368#endif
23369#ifndef NULL
23370#define NULL (void*)0
23371#endif
23372
23373static void *task(p)
23374	void *p;
23375{
23376	return (void *) (p == NULL);
23377}
23378
23379
23380int main(argc, argv)
23381	int argc;
23382	char **argv;
23383{
23384
23385	/* pthread test function */
23386#ifndef PTHREAD_CREATE_DETACHED
23387#define	PTHREAD_CREATE_DETACHED	1
23388#endif
23389	pthread_t t;
23390	int status;
23391	int detach = PTHREAD_CREATE_DETACHED;
23392
23393#if HAVE_PTHREADS > 4
23394	/* Final pthreads */
23395	pthread_attr_t attr;
23396
23397	status = pthread_attr_init(&attr);
23398	if( status ) return status;
23399
23400#if HAVE_PTHREADS < 7
23401	status = pthread_attr_setdetachstate(&attr, &detach);
23402	if( status < 0 ) status = errno;
23403#else
23404	status = pthread_attr_setdetachstate(&attr, detach);
23405#endif
23406	if( status ) return status;
23407	status = pthread_create( &t, &attr, task, NULL );
23408#if HAVE_PTHREADS < 7
23409	if( status < 0 ) status = errno;
23410#endif
23411	if( status ) return status;
23412#else
23413	/* Draft 4 pthreads */
23414	status = pthread_create( &t, pthread_attr_default, task, NULL );
23415	if( status ) return errno;
23416
23417	/* give thread a chance to complete */
23418	/* it should remain joinable and hence detachable */
23419	sleep( 1 );
23420
23421	status = pthread_detach( &t );
23422	if( status ) return errno;
23423#endif
23424
23425#ifdef HAVE_LINUX_THREADS
23426	pthread_kill_other_threads_np();
23427#endif
23428
23429	return 0;
23430
23431}
23432
23433_ACEOF
23434if ac_fn_c_try_run "$LINENO"
23435then :
23436  ol_cv_pthread_create_works=yes
23437else $as_nop
23438  ol_cv_pthread_create_works=no
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_create_works" >&5
23446printf "%s\n" "$ol_cv_pthread_create_works" >&6; }
23447
23448			if test $ol_cv_pthread_create_works = no ; then
23449				as_fn_error $? "pthread_create is not usable, check environment settings" "$LINENO" 5
23450			fi
23451
23452			ol_replace_broken_yield=no
23453
23454			if test $ol_replace_broken_yield = yes ; then
23455
23456printf "%s\n" "#define REPLACE_BROKEN_YIELD 1" >>confdefs.h
23457
23458			fi
23459
23460						if test x$ol_with_yielding_select = xauto ; then
23461				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if select yields when using pthreads" >&5
23462printf %s "checking if select yields when using pthreads... " >&6; }
23463if test ${ol_cv_pthread_select_yields+y}
23464then :
23465  printf %s "(cached) " >&6
23466else $as_nop
23467
23468				if test "$cross_compiling" = yes
23469then :
23470  ol_cv_pthread_select_yields=cross
23471else $as_nop
23472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23473/* end confdefs.h.  */
23474
23475#include <sys/types.h>
23476#include <sys/time.h>
23477#include <unistd.h>
23478#include <pthread.h>
23479#ifndef NULL
23480#define NULL (void*) 0
23481#endif
23482
23483static int fildes[2];
23484
23485static void *task(p)
23486	void *p;
23487{
23488	int i;
23489	struct timeval tv;
23490
23491	fd_set rfds;
23492
23493	tv.tv_sec=10;
23494	tv.tv_usec=0;
23495
23496	FD_ZERO(&rfds);
23497	FD_SET(fildes[0], &rfds);
23498
23499	/* we're not interested in any fds */
23500	i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
23501
23502	if(i < 0) {
23503		perror("select");
23504		exit(10);
23505	}
23506
23507	exit(0); /* if we exit here, the select blocked the whole process */
23508}
23509
23510int main(argc, argv)
23511	int argc;
23512	char **argv;
23513{
23514	pthread_t t;
23515
23516	/* create a pipe to select */
23517	if(pipe(&fildes[0])) {
23518		perror("select");
23519		exit(1);
23520	}
23521
23522#ifdef HAVE_PTHREAD_SETCONCURRENCY
23523	(void) pthread_setconcurrency(2);
23524#else
23525#ifdef HAVE_THR_SETCONCURRENCY
23526	/* Set Solaris LWP concurrency to 2 */
23527	thr_setconcurrency(2);
23528#endif
23529#endif
23530
23531#if HAVE_PTHREADS < 6
23532	pthread_create(&t, pthread_attr_default, task, NULL);
23533#else
23534	pthread_create(&t, NULL, task, NULL);
23535#endif
23536
23537	/* make sure task runs first */
23538#ifdef HAVE_THR_YIELD
23539	thr_yield();
23540#elif defined( HAVE_SCHED_YIELD )
23541	sched_yield();
23542#elif defined( HAVE_PTHREAD_YIELD )
23543	pthread_yield();
23544#endif
23545
23546	exit(2);
23547}
23548_ACEOF
23549if ac_fn_c_try_run "$LINENO"
23550then :
23551  ol_cv_pthread_select_yields=no
23552else $as_nop
23553  ol_cv_pthread_select_yields=yes
23554fi
23555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23556  conftest.$ac_objext conftest.beam conftest.$ac_ext
23557fi
23558
23559fi
23560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_pthread_select_yields" >&5
23561printf "%s\n" "$ol_cv_pthread_select_yields" >&6; }
23562
23563				if test $ol_cv_pthread_select_yields = cross ; then
23564					as_fn_error $? "crossing compiling: use --with-yielding-select=yes|no|manual" "$LINENO" 5
23565				fi
23566
23567				if test $ol_cv_pthread_select_yields = yes ; then
23568					ol_with_yielding_select=yes
23569				fi
23570			fi
23571
23572						CPPFLAGS="$save_CPPFLAGS"
23573			LIBS="$save_LIBS"
23574		else
23575			as_fn_error $? "could not locate usable POSIX Threads" "$LINENO" 5
23576		fi
23577	fi
23578
23579	if test $ol_with_threads = posix ; then
23580		as_fn_error $? "could not locate POSIX Threads" "$LINENO" 5
23581	fi
23582	;;
23583esac
23584
23585case $ol_with_threads in auto | yes | mach)
23586
23587		ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
23588if test "x$ac_cv_header_mach_cthreads_h" = xyes
23589then :
23590  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
23591
23592fi
23593ac_fn_c_check_header_compile "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
23594if test "x$ac_cv_header_cthreads_h" = xyes
23595then :
23596  printf "%s\n" "#define HAVE_CTHREADS_H 1" >>confdefs.h
23597
23598fi
23599
23600	if test $ac_cv_header_mach_cthreads_h = yes ; then
23601		ol_with_threads=found
23602
23603				ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
23604if test "x$ac_cv_func_cthread_fork" = xyes
23605then :
23606  ol_link_threads=yes
23607fi
23608
23609
23610		if test $ol_link_threads = no ; then
23611									{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cthread_fork with -all_load" >&5
23612printf %s "checking for cthread_fork with -all_load... " >&6; }
23613if test ${ol_cv_cthread_all_load+y}
23614then :
23615  printf %s "(cached) " >&6
23616else $as_nop
23617
23618								save_LIBS="$LIBS"
23619				LIBS="-all_load $LIBS"
23620				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23621/* end confdefs.h.  */
23622#include <mach/cthreads.h>
23623int
23624main (void)
23625{
23626
23627					cthread_fork((void *)0, (void *)0);
23628
23629  ;
23630  return 0;
23631}
23632_ACEOF
23633if ac_fn_c_try_link "$LINENO"
23634then :
23635  ol_cv_cthread_all_load=yes
23636else $as_nop
23637  ol_cv_cthread_all_load=no
23638fi
23639rm -f core conftest.err conftest.$ac_objext conftest.beam \
23640    conftest$ac_exeext conftest.$ac_ext
23641								LIBS="$save_LIBS"
23642
23643fi
23644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_cthread_all_load" >&5
23645printf "%s\n" "$ol_cv_cthread_all_load" >&6; }
23646
23647			if test $ol_cv_cthread_all_load = yes ; then
23648				LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
23649				ol_link_threads=mach
23650				ol_with_threads=found
23651			fi
23652		fi
23653
23654	elif test $ac_cv_header_cthreads_h = yes ; then
23655
23656		ol_with_threads=found
23657
23658				save_LIBS="$LIBS"
23659		LIBS="$LIBS -lthreads"
23660		ac_fn_c_check_func "$LINENO" "cthread_fork" "ac_cv_func_cthread_fork"
23661if test "x$ac_cv_func_cthread_fork" = xyes
23662then :
23663  ol_link_threads=yes
23664fi
23665
23666		LIBS="$save_LIBS"
23667
23668		if test $ol_link_threads = yes ; then
23669			LTHREAD_LIBS="-lthreads"
23670			ol_link_threads=mach
23671			ol_with_threads=found
23672		else
23673			as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
23674		fi
23675
23676	elif test $ol_with_threads = mach ; then
23677		as_fn_error $? "could not locate Mach CThreads" "$LINENO" 5
23678	fi
23679
23680	if test $ol_link_threads = mach ; then
23681
23682printf "%s\n" "#define HAVE_MACH_CTHREADS 1" >>confdefs.h
23683
23684	elif test $ol_with_threads = found ; then
23685		as_fn_error $? "could not link with Mach CThreads" "$LINENO" 5
23686	fi
23687	;;
23688esac
23689
23690case $ol_with_threads in auto | yes | pth)
23691
23692	ac_fn_c_check_header_compile "$LINENO" "pth.h" "ac_cv_header_pth_h" "$ac_includes_default"
23693if test "x$ac_cv_header_pth_h" = xyes
23694then :
23695  printf "%s\n" "#define HAVE_PTH_H 1" >>confdefs.h
23696
23697fi
23698
23699
23700	if test $ac_cv_header_pth_h = yes ; then
23701		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pth_version in -lpth" >&5
23702printf %s "checking for pth_version in -lpth... " >&6; }
23703if test ${ac_cv_lib_pth_pth_version+y}
23704then :
23705  printf %s "(cached) " >&6
23706else $as_nop
23707  ac_check_lib_save_LIBS=$LIBS
23708LIBS="-lpth  $LIBS"
23709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23710/* end confdefs.h.  */
23711
23712/* Override any GCC internal prototype to avoid an error.
23713   Use char because int might match the return type of a GCC
23714   builtin and then its argument prototype would still apply.  */
23715char pth_version ();
23716int
23717main (void)
23718{
23719return pth_version ();
23720  ;
23721  return 0;
23722}
23723_ACEOF
23724if ac_fn_c_try_link "$LINENO"
23725then :
23726  ac_cv_lib_pth_pth_version=yes
23727else $as_nop
23728  ac_cv_lib_pth_pth_version=no
23729fi
23730rm -f core conftest.err conftest.$ac_objext conftest.beam \
23731    conftest$ac_exeext conftest.$ac_ext
23732LIBS=$ac_check_lib_save_LIBS
23733fi
23734{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pth_pth_version" >&5
23735printf "%s\n" "$ac_cv_lib_pth_pth_version" >&6; }
23736if test "x$ac_cv_lib_pth_pth_version" = xyes
23737then :
23738  have_pth=yes
23739else $as_nop
23740  have_pth=no
23741fi
23742
23743
23744		if test $have_pth = yes ; then
23745
23746printf "%s\n" "#define HAVE_GNU_PTH 1" >>confdefs.h
23747
23748			LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
23749			ol_link_threads=pth
23750			ol_with_threads=found
23751
23752			if test x$ol_with_yielding_select = xauto ; then
23753				ol_with_yielding_select=yes
23754			fi
23755		fi
23756	fi
23757	;;
23758esac
23759
23760case $ol_with_threads in auto | yes | lwp)
23761
23762		ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
23763if test "x$ac_cv_header_thread_h" = xyes
23764then :
23765  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
23766
23767fi
23768ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
23769if test "x$ac_cv_header_synch_h" = xyes
23770then :
23771  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
23772
23773fi
23774
23775	if test $ac_cv_header_thread_h = yes &&
23776	   test $ac_cv_header_synch_h = yes ; then
23777		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
23778printf %s "checking for thr_create in -lthread... " >&6; }
23779if test ${ac_cv_lib_thread_thr_create+y}
23780then :
23781  printf %s "(cached) " >&6
23782else $as_nop
23783  ac_check_lib_save_LIBS=$LIBS
23784LIBS="-lthread  $LIBS"
23785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23786/* end confdefs.h.  */
23787
23788/* Override any GCC internal prototype to avoid an error.
23789   Use char because int might match the return type of a GCC
23790   builtin and then its argument prototype would still apply.  */
23791char thr_create ();
23792int
23793main (void)
23794{
23795return thr_create ();
23796  ;
23797  return 0;
23798}
23799_ACEOF
23800if ac_fn_c_try_link "$LINENO"
23801then :
23802  ac_cv_lib_thread_thr_create=yes
23803else $as_nop
23804  ac_cv_lib_thread_thr_create=no
23805fi
23806rm -f core conftest.err conftest.$ac_objext conftest.beam \
23807    conftest$ac_exeext conftest.$ac_ext
23808LIBS=$ac_check_lib_save_LIBS
23809fi
23810{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
23811printf "%s\n" "$ac_cv_lib_thread_thr_create" >&6; }
23812if test "x$ac_cv_lib_thread_thr_create" = xyes
23813then :
23814  have_thr=yes
23815else $as_nop
23816  have_thr=no
23817fi
23818
23819
23820		if test $have_thr = yes ; then
23821
23822printf "%s\n" "#define HAVE_THR 1" >>confdefs.h
23823
23824			LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
23825			ol_link_threads=thr
23826
23827			if test x$ol_with_yielding_select = xauto ; then
23828				ol_with_yielding_select=yes
23829			fi
23830
23831						ac_fn_c_check_func "$LINENO" "thr_setconcurrency" "ac_cv_func_thr_setconcurrency"
23832if test "x$ac_cv_func_thr_setconcurrency" = xyes
23833then :
23834  printf "%s\n" "#define HAVE_THR_SETCONCURRENCY 1" >>confdefs.h
23835
23836fi
23837ac_fn_c_check_func "$LINENO" "thr_getconcurrency" "ac_cv_func_thr_getconcurrency"
23838if test "x$ac_cv_func_thr_getconcurrency" = xyes
23839then :
23840  printf "%s\n" "#define HAVE_THR_GETCONCURRENCY 1" >>confdefs.h
23841
23842fi
23843
23844		fi
23845	fi
23846
23847		ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23848if test "x$ac_cv_header_lwp_lwp_h" = xyes
23849then :
23850  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
23851
23852fi
23853
23854	if test $ac_cv_header_lwp_lwp_h = yes ; then
23855		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lwp_create in -llwp" >&5
23856printf %s "checking for lwp_create in -llwp... " >&6; }
23857if test ${ac_cv_lib_lwp_lwp_create+y}
23858then :
23859  printf %s "(cached) " >&6
23860else $as_nop
23861  ac_check_lib_save_LIBS=$LIBS
23862LIBS="-llwp  $LIBS"
23863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23864/* end confdefs.h.  */
23865
23866/* Override any GCC internal prototype to avoid an error.
23867   Use char because int might match the return type of a GCC
23868   builtin and then its argument prototype would still apply.  */
23869char lwp_create ();
23870int
23871main (void)
23872{
23873return lwp_create ();
23874  ;
23875  return 0;
23876}
23877_ACEOF
23878if ac_fn_c_try_link "$LINENO"
23879then :
23880  ac_cv_lib_lwp_lwp_create=yes
23881else $as_nop
23882  ac_cv_lib_lwp_lwp_create=no
23883fi
23884rm -f core conftest.err conftest.$ac_objext conftest.beam \
23885    conftest$ac_exeext conftest.$ac_ext
23886LIBS=$ac_check_lib_save_LIBS
23887fi
23888{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lwp_lwp_create" >&5
23889printf "%s\n" "$ac_cv_lib_lwp_lwp_create" >&6; }
23890if test "x$ac_cv_lib_lwp_lwp_create" = xyes
23891then :
23892  have_lwp=yes
23893else $as_nop
23894  have_lwp=no
23895fi
23896
23897
23898		if test $have_lwp = yes ; then
23899
23900printf "%s\n" "#define HAVE_LWP 1" >>confdefs.h
23901
23902			LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
23903			ol_link_threads=lwp
23904
23905			if test x$ol_with_yielding_select = xauto ; then
23906				ol_with_yielding_select=no
23907			fi
23908		fi
23909	fi
23910	;;
23911esac
23912
23913if test $ol_with_yielding_select = yes ; then
23914
23915printf "%s\n" "#define HAVE_YIELDING_SELECT 1" >>confdefs.h
23916
23917fi
23918
23919if test $ol_with_threads = manual ; then
23920		ol_link_threads=yes
23921
23922	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: thread defines and link options must be set manually" >&5
23923printf "%s\n" "$as_me: WARNING: thread defines and link options must be set manually" >&2;}
23924
23925	ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
23926if test "x$ac_cv_header_pthread_h" = xyes
23927then :
23928  printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h
23929
23930fi
23931ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
23932if test "x$ac_cv_header_sched_h" = xyes
23933then :
23934  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
23935
23936fi
23937
23938	ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield"
23939if test "x$ac_cv_func_sched_yield" = xyes
23940then :
23941  printf "%s\n" "#define HAVE_SCHED_YIELD 1" >>confdefs.h
23942
23943fi
23944ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield"
23945if test "x$ac_cv_func_pthread_yield" = xyes
23946then :
23947  printf "%s\n" "#define HAVE_PTHREAD_YIELD 1" >>confdefs.h
23948
23949fi
23950
23951
23952	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LinuxThreads pthread.h" >&5
23953printf %s "checking for LinuxThreads pthread.h... " >&6; }
23954if test ${ol_cv_header_linux_threads+y}
23955then :
23956  printf %s "(cached) " >&6
23957else $as_nop
23958  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23959/* end confdefs.h.  */
23960#include <pthread.h>
23961_ACEOF
23962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23963  $EGREP "pthread_kill_other_threads_np" >/dev/null 2>&1
23964then :
23965  ol_cv_header_linux_threads=yes
23966else $as_nop
23967  ol_cv_header_linux_threads=no
23968fi
23969rm -rf conftest*
23970
23971
23972fi
23973{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_header_linux_threads" >&5
23974printf "%s\n" "$ol_cv_header_linux_threads" >&6; }
23975	if test $ol_cv_header_linux_threads = yes; then
23976
23977printf "%s\n" "#define HAVE_LINUX_THREADS 1" >>confdefs.h
23978
23979	fi
23980
23981
23982	ac_fn_c_check_header_compile "$LINENO" "mach/cthreads.h" "ac_cv_header_mach_cthreads_h" "$ac_includes_default"
23983if test "x$ac_cv_header_mach_cthreads_h" = xyes
23984then :
23985  printf "%s\n" "#define HAVE_MACH_CTHREADS_H 1" >>confdefs.h
23986
23987fi
23988
23989	ac_fn_c_check_header_compile "$LINENO" "lwp/lwp.h" "ac_cv_header_lwp_lwp_h" "$ac_includes_default"
23990if test "x$ac_cv_header_lwp_lwp_h" = xyes
23991then :
23992  printf "%s\n" "#define HAVE_LWP_LWP_H 1" >>confdefs.h
23993
23994fi
23995
23996	ac_fn_c_check_header_compile "$LINENO" "thread.h" "ac_cv_header_thread_h" "$ac_includes_default"
23997if test "x$ac_cv_header_thread_h" = xyes
23998then :
23999  printf "%s\n" "#define HAVE_THREAD_H 1" >>confdefs.h
24000
24001fi
24002ac_fn_c_check_header_compile "$LINENO" "synch.h" "ac_cv_header_synch_h" "$ac_includes_default"
24003if test "x$ac_cv_header_synch_h" = xyes
24004then :
24005  printf "%s\n" "#define HAVE_SYNCH_H 1" >>confdefs.h
24006
24007fi
24008
24009fi
24010
24011if test $ol_link_threads != no && test $ol_link_threads != nt ; then
24012
24013printf "%s\n" "#define REENTRANT 1" >>confdefs.h
24014
24015
24016printf "%s\n" "#define _REENTRANT 1" >>confdefs.h
24017
24018
24019printf "%s\n" "#define THREAD_SAFE 1" >>confdefs.h
24020
24021
24022printf "%s\n" "#define _THREAD_SAFE 1" >>confdefs.h
24023
24024
24025printf "%s\n" "#define THREADSAFE 1" >>confdefs.h
24026
24027
24028printf "%s\n" "#define _THREADSAFE 1" >>confdefs.h
24029
24030
24031printf "%s\n" "#define _SGI_MP_SOURCE 1" >>confdefs.h
24032
24033
24034			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific errno" >&5
24035printf %s "checking for thread specific errno... " >&6; }
24036if test ${ol_cv_errno_thread_specific+y}
24037then :
24038  printf %s "(cached) " >&6
24039else $as_nop
24040
24041		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24042/* end confdefs.h.  */
24043#include <errno.h>
24044int
24045main (void)
24046{
24047errno = 0;
24048  ;
24049  return 0;
24050}
24051_ACEOF
24052if ac_fn_c_try_link "$LINENO"
24053then :
24054  ol_cv_errno_thread_specific=yes
24055else $as_nop
24056  ol_cv_errno_thread_specific=no
24057fi
24058rm -f core conftest.err conftest.$ac_objext conftest.beam \
24059    conftest$ac_exeext conftest.$ac_ext
24060
24061fi
24062{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_errno_thread_specific" >&5
24063printf "%s\n" "$ol_cv_errno_thread_specific" >&6; }
24064
24065			{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thread specific h_errno" >&5
24066printf %s "checking for thread specific h_errno... " >&6; }
24067if test ${ol_cv_h_errno_thread_specific+y}
24068then :
24069  printf %s "(cached) " >&6
24070else $as_nop
24071
24072		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24073/* end confdefs.h.  */
24074#include <netdb.h>
24075int
24076main (void)
24077{
24078h_errno = 0;
24079  ;
24080  return 0;
24081}
24082_ACEOF
24083if ac_fn_c_try_link "$LINENO"
24084then :
24085  ol_cv_h_errno_thread_specific=yes
24086else $as_nop
24087  ol_cv_h_errno_thread_specific=no
24088fi
24089rm -f core conftest.err conftest.$ac_objext conftest.beam \
24090    conftest$ac_exeext conftest.$ac_ext
24091
24092fi
24093{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ol_cv_h_errno_thread_specific" >&5
24094printf "%s\n" "$ol_cv_h_errno_thread_specific" >&6; }
24095
24096	if test $ol_cv_errno_thread_specific != yes ||
24097	   test $ol_cv_h_errno_thread_specific != yes ; then
24098		LIBS="$LTHREAD_LIBS $LIBS"
24099		LTHREAD_LIBS=""
24100	fi
24101
24102fi
24103
24104if test $ol_link_threads = no ; then
24105	if test $ol_with_threads = yes ; then
24106		as_fn_error $? "no suitable thread support" "$LINENO" 5
24107	fi
24108
24109	if test $ol_with_threads = auto ; then
24110		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no suitable thread support, disabling threads" >&5
24111printf "%s\n" "$as_me: WARNING: no suitable thread support, disabling threads" >&2;}
24112		ol_with_threads=no
24113	fi
24114
24115
24116printf "%s\n" "#define NO_THREADS 1" >>confdefs.h
24117
24118	LTHREAD_LIBS=""
24119	BUILD_THREAD=no
24120else
24121	BUILD_THREAD=yes
24122fi
24123
24124if test $ol_link_threads != no ; then
24125
24126printf "%s\n" "#define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1" >>confdefs.h
24127
24128fi
24129
24130# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
24131case "$ol_with_threads" in
24132 no)
24133    ol_pthread_ok=no
24134
24135    ;;
24136 *)
24137    ol_found_pthreads=yes
24138    ;;
24139esac
24140
24141ac_ext=c
24142ac_cpp='$CPP $CPPFLAGS'
24143ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24144ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24145ac_compiler_gnu=$ac_cv_c_compiler_gnu
24146
24147
24148
24149
24150
24151
24152    case "$ol_found_pthreads" in
24153     yes)
24154	saved_LIBS="$LIBS"
24155	LIBS="$LTHREAD_LIBS $LIBS"
24156	saved_CFLAGS="$CFLAGS"
24157	CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
24158	ac_fn_c_check_func "$LINENO" "sem_timedwait" "ac_cv_func_sem_timedwait"
24159if test "x$ac_cv_func_sem_timedwait" = xyes
24160then :
24161  printf "%s\n" "#define HAVE_SEM_TIMEDWAIT 1" >>confdefs.h
24162
24163fi
24164
24165	LIBS="$saved_LIBS"
24166	{ saved_LIBS=; unset saved_LIBS;}
24167	CFLAGS="$saved_CFLAGS"
24168	{ saved_CFLAGS=; unset saved_CFLAGS;}
24169	case "$ac_cv_func_sem_timedwait" in
24170	 yes)
24171	    PTHREAD_LIBS="$LTHREAD_LIBS"
24172	    have_pthreads=yes
24173	esac
24174    esac
24175esac
24176
24177case "$have_pthreads" in
24178 yes)
24179    CFLAGS_NTP="$CFLAGS_NTP $PTHREAD_CFLAGS"
24180    saved_LIBS="$LIBS"
24181    LIBS="$LTHREAD_LIBS $LIBS"
24182    saved_CFLAGS="$CFLAGS"
24183    CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
24184    # The cast to long int works around a bug in the HP C Compiler
24185# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24186# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24187# This bug is HP SR number 8606223364.
24188{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
24189printf %s "checking size of pthread_t... " >&6; }
24190if test ${ac_cv_sizeof_pthread_t+y}
24191then :
24192  printf %s "(cached) " >&6
24193else $as_nop
24194  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t"        "
24195	    $ac_includes_default
24196	    #include <pthread.h>
24197
24198
24199"
24200then :
24201
24202else $as_nop
24203  if test "$ac_cv_type_pthread_t" = yes; then
24204     { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24205printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
24206as_fn_error 77 "cannot compute sizeof (pthread_t)
24207See \`config.log' for more details" "$LINENO" 5; }
24208   else
24209     ac_cv_sizeof_pthread_t=0
24210   fi
24211fi
24212
24213fi
24214{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
24215printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; }
24216
24217
24218
24219printf "%s\n" "#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t" >>confdefs.h
24220
24221
24222    LIBISC_PTHREADS_NOTHREADS=pthreads
24223
24224printf "%s\n" "#define ISC_PLATFORM_USETHREADS 1" >>confdefs.h
24225
24226    #
24227    # We'd like to use sigwait() too
24228    #
24229    ac_fn_c_check_func "$LINENO" "sigwait" "ac_cv_func_sigwait"
24230if test "x$ac_cv_func_sigwait" = xyes
24231then :
24232  have_sigwait=yes
24233else $as_nop
24234  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc" >&5
24235printf %s "checking for sigwait in -lc... " >&6; }
24236if test ${ac_cv_lib_c_sigwait+y}
24237then :
24238  printf %s "(cached) " >&6
24239else $as_nop
24240  ac_check_lib_save_LIBS=$LIBS
24241LIBS="-lc  $LIBS"
24242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24243/* end confdefs.h.  */
24244
24245/* Override any GCC internal prototype to avoid an error.
24246   Use char because int might match the return type of a GCC
24247   builtin and then its argument prototype would still apply.  */
24248char sigwait ();
24249int
24250main (void)
24251{
24252return sigwait ();
24253  ;
24254  return 0;
24255}
24256_ACEOF
24257if ac_fn_c_try_link "$LINENO"
24258then :
24259  ac_cv_lib_c_sigwait=yes
24260else $as_nop
24261  ac_cv_lib_c_sigwait=no
24262fi
24263rm -f core conftest.err conftest.$ac_objext conftest.beam \
24264    conftest$ac_exeext conftest.$ac_ext
24265LIBS=$ac_check_lib_save_LIBS
24266fi
24267{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_sigwait" >&5
24268printf "%s\n" "$ac_cv_lib_c_sigwait" >&6; }
24269if test "x$ac_cv_lib_c_sigwait" = xyes
24270then :
24271  have_sigwait=yes
24272else $as_nop
24273  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lpthread" >&5
24274printf %s "checking for sigwait in -lpthread... " >&6; }
24275if test ${ac_cv_lib_pthread_sigwait+y}
24276then :
24277  printf %s "(cached) " >&6
24278else $as_nop
24279  ac_check_lib_save_LIBS=$LIBS
24280LIBS="-lpthread  $LIBS"
24281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24282/* end confdefs.h.  */
24283
24284/* Override any GCC internal prototype to avoid an error.
24285   Use char because int might match the return type of a GCC
24286   builtin and then its argument prototype would still apply.  */
24287char sigwait ();
24288int
24289main (void)
24290{
24291return sigwait ();
24292  ;
24293  return 0;
24294}
24295_ACEOF
24296if ac_fn_c_try_link "$LINENO"
24297then :
24298  ac_cv_lib_pthread_sigwait=yes
24299else $as_nop
24300  ac_cv_lib_pthread_sigwait=no
24301fi
24302rm -f core conftest.err conftest.$ac_objext conftest.beam \
24303    conftest$ac_exeext conftest.$ac_ext
24304LIBS=$ac_check_lib_save_LIBS
24305fi
24306{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_sigwait" >&5
24307printf "%s\n" "$ac_cv_lib_pthread_sigwait" >&6; }
24308if test "x$ac_cv_lib_pthread_sigwait" = xyes
24309then :
24310  have_sigwait=yes
24311else $as_nop
24312  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _Psigwait in -lpthread" >&5
24313printf %s "checking for _Psigwait in -lpthread... " >&6; }
24314if test ${ac_cv_lib_pthread__Psigwait+y}
24315then :
24316  printf %s "(cached) " >&6
24317else $as_nop
24318  ac_check_lib_save_LIBS=$LIBS
24319LIBS="-lpthread  $LIBS"
24320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24321/* end confdefs.h.  */
24322
24323/* Override any GCC internal prototype to avoid an error.
24324   Use char because int might match the return type of a GCC
24325   builtin and then its argument prototype would still apply.  */
24326char _Psigwait ();
24327int
24328main (void)
24329{
24330return _Psigwait ();
24331  ;
24332  return 0;
24333}
24334_ACEOF
24335if ac_fn_c_try_link "$LINENO"
24336then :
24337  ac_cv_lib_pthread__Psigwait=yes
24338else $as_nop
24339  ac_cv_lib_pthread__Psigwait=no
24340fi
24341rm -f core conftest.err conftest.$ac_objext conftest.beam \
24342    conftest$ac_exeext conftest.$ac_ext
24343LIBS=$ac_check_lib_save_LIBS
24344fi
24345{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread__Psigwait" >&5
24346printf "%s\n" "$ac_cv_lib_pthread__Psigwait" >&6; }
24347if test "x$ac_cv_lib_pthread__Psigwait" = xyes
24348then :
24349  have_sigwait=yes
24350else $as_nop
24351  have_sigwait=no
24352
24353fi
24354
24355
24356fi
24357
24358
24359fi
24360
24361
24362fi
24363
24364    case "$host:$have_sigwait" in
24365     *-freebsd*:no)
24366	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigwait in -lc_r" >&5
24367printf %s "checking for sigwait in -lc_r... " >&6; }
24368if test ${ac_cv_lib_c_r_sigwait+y}
24369then :
24370  printf %s "(cached) " >&6
24371else $as_nop
24372  ac_check_lib_save_LIBS=$LIBS
24373LIBS="-lc_r  $LIBS"
24374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24375/* end confdefs.h.  */
24376
24377/* Override any GCC internal prototype to avoid an error.
24378   Use char because int might match the return type of a GCC
24379   builtin and then its argument prototype would still apply.  */
24380char sigwait ();
24381int
24382main (void)
24383{
24384return sigwait ();
24385  ;
24386  return 0;
24387}
24388_ACEOF
24389if ac_fn_c_try_link "$LINENO"
24390then :
24391  ac_cv_lib_c_r_sigwait=yes
24392else $as_nop
24393  ac_cv_lib_c_r_sigwait=no
24394fi
24395rm -f core conftest.err conftest.$ac_objext conftest.beam \
24396    conftest$ac_exeext conftest.$ac_ext
24397LIBS=$ac_check_lib_save_LIBS
24398fi
24399{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_sigwait" >&5
24400printf "%s\n" "$ac_cv_lib_c_r_sigwait" >&6; }
24401if test "x$ac_cv_lib_c_r_sigwait" = xyes
24402then :
24403  have_sigwait=yes
24404
24405fi
24406
24407    esac
24408    case "$have_sigwait" in
24409     yes)
24410	ac_cv_func_sigwait=yes
24411
24412printf "%s\n" "#define HAVE_SIGWAIT 1" >>confdefs.h
24413
24414    esac
24415
24416    ac_fn_c_check_func "$LINENO" "pthread_attr_getstacksize" "ac_cv_func_pthread_attr_getstacksize"
24417if test "x$ac_cv_func_pthread_attr_getstacksize" = xyes
24418then :
24419  printf "%s\n" "#define HAVE_PTHREAD_ATTR_GETSTACKSIZE 1" >>confdefs.h
24420
24421fi
24422
24423    ac_fn_c_check_func "$LINENO" "pthread_attr_setstacksize" "ac_cv_func_pthread_attr_setstacksize"
24424if test "x$ac_cv_func_pthread_attr_setstacksize" = xyes
24425then :
24426  printf "%s\n" "#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1" >>confdefs.h
24427
24428fi
24429ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
24430if test "x$ac_cv_func_sysconf" = xyes
24431then :
24432  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
24433
24434fi
24435
24436
24437    case "$host" in
24438     *-freebsd5.[012]|*-freebsd5.[012].*)
24439	;;
24440     *-freebsd5.[3456789]|*-freebsd5.[3456789].*|*-freebsd6.*)
24441
24442printf "%s\n" "#define NEED_PTHREAD_SCOPE_SYSTEM 1" >>confdefs.h
24443
24444	;;
24445     *-bsdi3.*|*-bsdi4.0*)
24446
24447printf "%s\n" "#define NEED_PTHREAD_INIT 1" >>confdefs.h
24448
24449	;;
24450     *-linux*)
24451
24452printf "%s\n" "#define HAVE_LINUXTHREADS 1" >>confdefs.h
24453
24454	;;
24455     *-solaris*)
24456	printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
24457
24458	ac_fn_c_check_func "$LINENO" "pthread_setconcurrency" "ac_cv_func_pthread_setconcurrency"
24459if test "x$ac_cv_func_pthread_setconcurrency" = xyes
24460then :
24461  printf "%s\n" "#define HAVE_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
24462
24463fi
24464
24465	case "$ac_cv_func_pthread_setconcurrency" in
24466	 yes)
24467
24468printf "%s\n" "#define CALL_PTHREAD_SETCONCURRENCY 1" >>confdefs.h
24469
24470	esac
24471	;;
24472     *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
24473
24474printf "%s\n" "#define HAVE_UNIXWARE_SIGWAIT 1" >>confdefs.h
24475
24476	;;
24477    esac
24478    hack_shutup_pthreadonceinit=no
24479    case "$host" in
24480     *-aix5.[123].*)
24481	hack_shutup_pthreadonceinit=yes
24482	;;
24483     *-solaris2.[89])
24484	hack_shutup_pthreadonceinit=yes
24485	;;
24486     *-solaris2.1[0-9])
24487	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if extra braces are needed for PTHREAD_ONCE_INIT" >&5
24488printf %s "checking if extra braces are needed for PTHREAD_ONCE_INIT... " >&6; }
24489if test ${ntp_cv_braces_around_pthread_once_init+y}
24490then :
24491  printf %s "(cached) " >&6
24492else $as_nop
24493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24494/* end confdefs.h.  */
24495
24496			#include <pthread.h>
24497
24498int
24499main (void)
24500{
24501
24502		        static pthread_once_t once_test =
24503						PTHREAD_ONCE_INIT;
24504
24505
24506  ;
24507  return 0;
24508}
24509_ACEOF
24510if ac_fn_c_try_compile "$LINENO"
24511then :
24512  ntp_cv_braces_around_pthread_once_init=no
24513else $as_nop
24514  ntp_cv_braces_around_pthread_once_init=yes
24515
24516fi
24517rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
24518
24519fi
24520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_braces_around_pthread_once_init" >&5
24521printf "%s\n" "$ntp_cv_braces_around_pthread_once_init" >&6; }
24522	case "$ntp_cv_braces_around_pthread_once_init" in
24523	 yes)
24524	    hack_shutup_pthreadonceinit=yes
24525	esac
24526	;;
24527    esac
24528    case "$hack_shutup_pthreadonceinit" in
24529     yes)
24530
24531printf "%s\n" "#define ISC_PLATFORM_BRACEPTHREADONCEINIT 1" >>confdefs.h
24532
24533    esac
24534    LIBS="$saved_LIBS"
24535    { saved_LIBS=; unset saved_LIBS;}
24536    CFLAGS="$saved_CFLAGS"
24537    { saved_CFLAGS=; unset saved_CFLAGS;}
24538    ;;
24539 *)
24540    LIBISC_PTHREADS_NOTHREADS=nothreads
24541    ;;
24542esac
24543
24544 if test "$have_pthreads" != "no"; then
24545  PTHREADS_TRUE=
24546  PTHREADS_FALSE='#'
24547else
24548  PTHREADS_TRUE='#'
24549  PTHREADS_FALSE=
24550fi
24551
24552
24553
24554
24555
24556
24557
24558case "$hw_use_rpl_vsnprintf:$hw_cv_func_vsnprintf" in
24559 no:yes)
24560    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if vsnprintf expands \"%m\" to strerror(errno)" >&5
24561printf %s "checking if vsnprintf expands \"%m\" to strerror(errno)... " >&6; }
24562if test ${ntp_cv_vsnprintf_percent_m+y}
24563then :
24564  printf %s "(cached) " >&6
24565else $as_nop
24566  if test "$cross_compiling" = yes
24567then :
24568  ntp_cv_vsnprintf_percent_m=no
24569
24570else $as_nop
24571  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24572/* end confdefs.h.  */
24573
24574		    #include <stdarg.h>
24575		    #include <errno.h>
24576		    #include <stdio.h>
24577		    #include <string.h>
24578
24579		    int call_vsnprintf(
24580			    char *	dst,
24581			    size_t	sz,
24582			    const char *fmt,
24583			    ...
24584			    );
24585
24586		    int call_vsnprintf(
24587			    char *	dst,
24588			    size_t	sz,
24589			    const char *fmt,
24590			    ...
24591			    )
24592		    {
24593			    va_list	ap;
24594			    int		rc;
24595
24596			    va_start(ap, fmt);
24597			    rc = vsnprintf(dst, sz, fmt, ap);
24598			    va_end(ap);
24599
24600			    return rc;
24601		    }
24602
24603int
24604main (void)
24605{
24606
24607		    char	sbuf[512];
24608		    char	pbuf[512];
24609		    int		slen;
24610
24611		    strcpy(sbuf, strerror(ENOENT));
24612		    errno = ENOENT;
24613		    slen = call_vsnprintf(pbuf, sizeof(pbuf), "%m",
24614					  "wrong");
24615		    return strcmp(sbuf, pbuf);
24616
24617
24618  ;
24619  return 0;
24620}
24621_ACEOF
24622if ac_fn_c_try_run "$LINENO"
24623then :
24624  ntp_cv_vsnprintf_percent_m=yes
24625else $as_nop
24626  ntp_cv_vsnprintf_percent_m=no
24627fi
24628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24629  conftest.$ac_objext conftest.beam conftest.$ac_ext
24630fi
24631
24632
24633fi
24634{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_vsnprintf_percent_m" >&5
24635printf "%s\n" "$ntp_cv_vsnprintf_percent_m" >&6; }
24636    case "$ntp_cv_vsnprintf_percent_m" in
24637     yes)
24638
24639printf "%s\n" "#define VSNPRINTF_PERCENT_M 1" >>confdefs.h
24640
24641    esac
24642esac
24643
24644ac_fn_c_check_header_compile "$LINENO" "sys/clockctl.h" "ac_cv_header_sys_clockctl_h" "$ac_includes_default"
24645if test "x$ac_cv_header_sys_clockctl_h" = xyes
24646then :
24647  printf "%s\n" "#define HAVE_SYS_CLOCKCTL_H 1" >>confdefs.h
24648
24649fi
24650
24651
24652# Check whether --enable-clockctl was given.
24653if test ${enable_clockctl+y}
24654then :
24655  enableval=$enable_clockctl; ntp_use_dev_clockctl=$enableval
24656else $as_nop
24657  ntp_use_dev_clockctl=$ac_cv_header_sys_clockctl_h
24658
24659fi
24660
24661
24662{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use /dev/clockctl" >&5
24663printf %s "checking if we should use /dev/clockctl... " >&6; }
24664{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_dev_clockctl" >&5
24665printf "%s\n" "$ntp_use_dev_clockctl" >&6; }
24666
24667
24668ac_fn_c_check_header_compile "$LINENO" "sys/capability.h" "ac_cv_header_sys_capability_h" "$ac_includes_default"
24669if test "x$ac_cv_header_sys_capability_h" = xyes
24670then :
24671  printf "%s\n" "#define HAVE_SYS_CAPABILITY_H 1" >>confdefs.h
24672
24673fi
24674ac_fn_c_check_header_compile "$LINENO" "sys/prctl.h" "ac_cv_header_sys_prctl_h" "$ac_includes_default"
24675if test "x$ac_cv_header_sys_prctl_h" = xyes
24676then :
24677  printf "%s\n" "#define HAVE_SYS_PRCTL_H 1" >>confdefs.h
24678
24679fi
24680
24681
24682{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have linux capabilities (libcap)" >&5
24683printf %s "checking if we have linux capabilities (libcap)... " >&6; }
24684
24685case "$ac_cv_header_sys_capability_h$ac_cv_header_sys_prctl_h" in
24686 yesyes)
24687    case "$host" in
24688     mips-sgi-irix*)
24689	ntp_have_linuxcaps=no
24690	;;
24691     *) ntp_have_linuxcaps=yes
24692	;;
24693    esac
24694    ;;
24695 *)
24696    ntp_have_linuxcaps=no
24697    ;;
24698esac
24699
24700# Check whether --enable-linuxcaps was given.
24701if test ${enable_linuxcaps+y}
24702then :
24703  enableval=$enable_linuxcaps; ntp_have_linuxcaps=$enableval
24704
24705fi
24706
24707
24708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_linuxcaps" >&5
24709printf "%s\n" "$ntp_have_linuxcaps" >&6; }
24710
24711case "$ntp_have_linuxcaps" in
24712 yes)
24713
24714printf "%s\n" "#define HAVE_LINUX_CAPABILITIES 1" >>confdefs.h
24715
24716    LIBS="$LIBS -lcap"
24717    ;;
24718esac
24719
24720
24721ac_fn_c_check_header_compile "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
24722if test "x$ac_cv_header_priv_h" = xyes
24723then :
24724  printf "%s\n" "#define HAVE_PRIV_H 1" >>confdefs.h
24725
24726fi
24727
24728case "$ac_cv_header_priv_h" in
24729 yes)
24730    case "$host" in
24731     *-solaris*)
24732	ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
24733if test "x$ac_cv_func_setppriv" = xyes
24734then :
24735  ntp_have_solarisprivs=yes
24736else $as_nop
24737  ntp_have_solarisprivs=no
24738
24739fi
24740
24741	;;
24742    esac
24743esac
24744
24745# Check whether --enable-solarisprivs was given.
24746if test ${enable_solarisprivs+y}
24747then :
24748  enableval=$enable_solarisprivs; ntp_have_solarisprivs=$enableval
24749
24750fi
24751
24752
24753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have solaris privileges" >&5
24754printf %s "checking if we have solaris privileges... " >&6; }
24755
24756case "$ntp_have_solarisprivs" in
24757 yes)
24758
24759printf "%s\n" "#define HAVE_SOLARIS_PRIVS 1" >>confdefs.h
24760
24761    ;;
24762 '') ntp_have_solarisprivs="no"
24763    ;;
24764esac
24765
24766{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_have_solarisprivs" >&5
24767printf "%s\n" "$ntp_have_solarisprivs" >&6; }
24768
24769ac_fn_c_check_header_compile "$LINENO" "sys/mac.h" "ac_cv_header_sys_mac_h" "$ac_includes_default"
24770if test "x$ac_cv_header_sys_mac_h" = xyes
24771then :
24772  printf "%s\n" "#define HAVE_SYS_MAC_H 1" >>confdefs.h
24773
24774fi
24775
24776
24777# Check whether --enable-trustedbsd_mac was given.
24778if test ${enable_trustedbsd_mac+y}
24779then :
24780  enableval=$enable_trustedbsd_mac; ntp_use_trustedbsd_mac=$enableval
24781
24782fi
24783
24784
24785{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use TrustedBSD MAC privileges" >&5
24786printf %s "checking if we should use TrustedBSD MAC privileges... " >&6; }
24787
24788case "$ntp_use_trustedbsd_mac$ac_cv_header_sys_mac_h" in
24789 yesyes)
24790
24791printf "%s\n" "#define HAVE_TRUSTEDBSD_MAC 1" >>confdefs.h
24792
24793    ;;
24794 *) ntp_use_trustedbsd_mac="no";
24795    ;;
24796esac
24797
24798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_trustedbsd_mac" >&5
24799printf "%s\n" "$ntp_use_trustedbsd_mac" >&6; }
24800
24801case "$ntp_use_dev_clockctl$ntp_have_linuxcaps$ntp_have_solarisprivs$ntp_use_trustedbsd_mac" in
24802 *yes*)
24803
24804printf "%s\n" "#define HAVE_DROPROOT 1" >>confdefs.h
24805
24806esac
24807
24808case "$host" in
24809 *-*-darwin*)
24810    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_9_init" >&5
24811printf %s "checking for library containing res_9_init... " >&6; }
24812if test ${ac_cv_search_res_9_init+y}
24813then :
24814  printf %s "(cached) " >&6
24815else $as_nop
24816  ac_func_search_save_LIBS=$LIBS
24817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24818/* end confdefs.h.  */
24819
24820/* Override any GCC internal prototype to avoid an error.
24821   Use char because int might match the return type of a GCC
24822   builtin and then its argument prototype would still apply.  */
24823char res_9_init ();
24824int
24825main (void)
24826{
24827return res_9_init ();
24828  ;
24829  return 0;
24830}
24831_ACEOF
24832for ac_lib in '' resolv
24833do
24834  if test -z "$ac_lib"; then
24835    ac_res="none required"
24836  else
24837    ac_res=-l$ac_lib
24838    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24839  fi
24840  if ac_fn_c_try_link "$LINENO"
24841then :
24842  ac_cv_search_res_9_init=$ac_res
24843fi
24844rm -f core conftest.err conftest.$ac_objext conftest.beam \
24845    conftest$ac_exeext
24846  if test ${ac_cv_search_res_9_init+y}
24847then :
24848  break
24849fi
24850done
24851if test ${ac_cv_search_res_9_init+y}
24852then :
24853
24854else $as_nop
24855  ac_cv_search_res_9_init=no
24856fi
24857rm conftest.$ac_ext
24858LIBS=$ac_func_search_save_LIBS
24859fi
24860{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_9_init" >&5
24861printf "%s\n" "$ac_cv_search_res_9_init" >&6; }
24862ac_res=$ac_cv_search_res_9_init
24863if test "$ac_res" != no
24864then :
24865  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24866
24867fi
24868
24869    ;;
24870 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_init" >&5
24871printf %s "checking for library containing res_init... " >&6; }
24872if test ${ac_cv_search_res_init+y}
24873then :
24874  printf %s "(cached) " >&6
24875else $as_nop
24876  ac_func_search_save_LIBS=$LIBS
24877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24878/* end confdefs.h.  */
24879
24880/* Override any GCC internal prototype to avoid an error.
24881   Use char because int might match the return type of a GCC
24882   builtin and then its argument prototype would still apply.  */
24883char res_init ();
24884int
24885main (void)
24886{
24887return res_init ();
24888  ;
24889  return 0;
24890}
24891_ACEOF
24892for ac_lib in '' resolv
24893do
24894  if test -z "$ac_lib"; then
24895    ac_res="none required"
24896  else
24897    ac_res=-l$ac_lib
24898    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
24899  fi
24900  if ac_fn_c_try_link "$LINENO"
24901then :
24902  ac_cv_search_res_init=$ac_res
24903fi
24904rm -f core conftest.err conftest.$ac_objext conftest.beam \
24905    conftest$ac_exeext
24906  if test ${ac_cv_search_res_init+y}
24907then :
24908  break
24909fi
24910done
24911if test ${ac_cv_search_res_init+y}
24912then :
24913
24914else $as_nop
24915  ac_cv_search_res_init=no
24916fi
24917rm conftest.$ac_ext
24918LIBS=$ac_func_search_save_LIBS
24919fi
24920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_init" >&5
24921printf "%s\n" "$ac_cv_search_res_init" >&6; }
24922ac_res=$ac_cv_search_res_init
24923if test "$ac_res" != no
24924then :
24925  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
24926
24927fi
24928
24929    ;;
24930esac
24931ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "#ifdef HAVE_SYS_TYPES_H
24932#  include <sys/types.h>
24933#endif
24934#ifdef HAVE_NETINET_IN_H
24935#  include <netinet/in.h>   /* inet_ functions / structs */
24936#endif
24937#ifdef HAVE_ARPA_NAMESER_H
24938#  include <arpa/nameser.h> /* DNS HEADER struct */
24939#endif
24940#ifdef HAVE_NETDB_H
24941#  include <netdb.h>
24942#endif
24943"
24944if test "x$ac_cv_header_sys_types_h" = xyes
24945then :
24946  printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h
24947
24948fi
24949ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "#ifdef HAVE_SYS_TYPES_H
24950#  include <sys/types.h>
24951#endif
24952#ifdef HAVE_NETINET_IN_H
24953#  include <netinet/in.h>   /* inet_ functions / structs */
24954#endif
24955#ifdef HAVE_ARPA_NAMESER_H
24956#  include <arpa/nameser.h> /* DNS HEADER struct */
24957#endif
24958#ifdef HAVE_NETDB_H
24959#  include <netdb.h>
24960#endif
24961"
24962if test "x$ac_cv_header_netinet_in_h" = xyes
24963then :
24964  printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h
24965
24966fi
24967ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "#ifdef HAVE_SYS_TYPES_H
24968#  include <sys/types.h>
24969#endif
24970#ifdef HAVE_NETINET_IN_H
24971#  include <netinet/in.h>   /* inet_ functions / structs */
24972#endif
24973#ifdef HAVE_ARPA_NAMESER_H
24974#  include <arpa/nameser.h> /* DNS HEADER struct */
24975#endif
24976#ifdef HAVE_NETDB_H
24977#  include <netdb.h>
24978#endif
24979"
24980if test "x$ac_cv_header_arpa_nameser_h" = xyes
24981then :
24982  printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h
24983
24984fi
24985ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "#ifdef HAVE_SYS_TYPES_H
24986#  include <sys/types.h>
24987#endif
24988#ifdef HAVE_NETINET_IN_H
24989#  include <netinet/in.h>   /* inet_ functions / structs */
24990#endif
24991#ifdef HAVE_ARPA_NAMESER_H
24992#  include <arpa/nameser.h> /* DNS HEADER struct */
24993#endif
24994#ifdef HAVE_NETDB_H
24995#  include <netdb.h>
24996#endif
24997"
24998if test "x$ac_cv_header_netdb_h" = xyes
24999then :
25000  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
25001
25002fi
25003ac_fn_c_check_header_compile "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "#ifdef HAVE_SYS_TYPES_H
25004#  include <sys/types.h>
25005#endif
25006#ifdef HAVE_NETINET_IN_H
25007#  include <netinet/in.h>   /* inet_ functions / structs */
25008#endif
25009#ifdef HAVE_ARPA_NAMESER_H
25010#  include <arpa/nameser.h> /* DNS HEADER struct */
25011#endif
25012#ifdef HAVE_NETDB_H
25013#  include <netdb.h>
25014#endif
25015"
25016if test "x$ac_cv_header_resolv_h" = xyes
25017then :
25018  printf "%s\n" "#define HAVE_RESOLV_H 1" >>confdefs.h
25019
25020fi
25021
25022
25023#HMS: Why do we do this check so "early"?
25024
25025  for ac_func in res_init
25026do :
25027  ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
25028if test "x$ac_cv_func_res_init" = xyes
25029then :
25030  printf "%s\n" "#define HAVE_RES_INIT 1" >>confdefs.h
25031
25032else $as_nop
25033  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
25034if test "x$ac_cv_func___res_init" = xyes
25035then :
25036  printf "%s\n" "#define HAVE___RES_INIT 1" >>confdefs.h
25037
25038fi
25039
25040fi
25041
25042done
25043
25044# We also need -lsocket, but we have tested for that already.
25045ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
25046if test "x$ac_cv_func_inet_ntop" = xyes
25047then :
25048
25049else $as_nop
25050
25051printf "%s\n" "#define ISC_PLATFORM_NEEDNTOP 1" >>confdefs.h
25052
25053fi
25054
25055ac_fn_c_check_func "$LINENO" "inet_pton" "ac_cv_func_inet_pton"
25056if test "x$ac_cv_func_inet_pton" = xyes
25057then :
25058
25059else $as_nop
25060
25061printf "%s\n" "#define ISC_PLATFORM_NEEDPTON 1" >>confdefs.h
25062
25063fi
25064
25065
25066ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
25067if test "x$ac_cv_type_uintptr_t" = xyes
25068then :
25069
25070printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h
25071
25072
25073fi
25074ac_fn_c_check_type "$LINENO" "int32" "ac_cv_type_int32" "$ac_includes_default"
25075if test "x$ac_cv_type_int32" = xyes
25076then :
25077
25078printf "%s\n" "#define HAVE_INT32 1" >>confdefs.h
25079
25080
25081fi
25082ac_fn_c_check_type "$LINENO" "u_int32" "ac_cv_type_u_int32" "$ac_includes_default"
25083if test "x$ac_cv_type_u_int32" = xyes
25084then :
25085
25086printf "%s\n" "#define HAVE_U_INT32 1" >>confdefs.h
25087
25088
25089fi
25090
25091
25092
25093
25094case "$ac_cv_type_int32::$ac_cv_header_resolv_h" in
25095 no::yes)
25096    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for int32 with DNS headers included" >&5
25097printf %s "checking for int32 with DNS headers included... " >&6; }
25098if test ${ntp_cv_type_int32_with_dns+y}
25099then :
25100  printf %s "(cached) " >&6
25101else $as_nop
25102  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25103/* end confdefs.h.  */
25104
25105		    #ifdef HAVE_ARPA_NAMESER_H
25106		    # include <arpa/nameser.h>
25107		    #endif
25108		    #include <resolv.h>
25109
25110int
25111main (void)
25112{
25113
25114		    size_t cb = sizeof(int32);
25115
25116
25117  ;
25118  return 0;
25119}
25120_ACEOF
25121if ac_fn_c_try_compile "$LINENO"
25122then :
25123  ntp_cv_type_int32_with_dns=yes
25124else $as_nop
25125  ntp_cv_type_int32_with_dns=no
25126
25127fi
25128rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25129
25130fi
25131{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_int32_with_dns" >&5
25132printf "%s\n" "$ntp_cv_type_int32_with_dns" >&6; }
25133    case "$ntp_cv_type_int32_with_dns" in
25134     yes)
25135
25136printf "%s\n" "#define HAVE_INT32_ONLY_WITH_DNS 1" >>confdefs.h
25137
25138    esac
25139esac
25140
25141case "$ac_cv_type_u_int32::$ac_cv_header_resolv_h" in
25142 no::yes)
25143    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for u_int32 with DNS headers included" >&5
25144printf %s "checking for u_int32 with DNS headers included... " >&6; }
25145if test ${ntp_cv_type_u_int32_with_dns+y}
25146then :
25147  printf %s "(cached) " >&6
25148else $as_nop
25149  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25150/* end confdefs.h.  */
25151
25152		    #ifdef HAVE_ARPA_NAMESER_H
25153		    # include <arpa/nameser.h>
25154		    #endif
25155		    #include <resolv.h>
25156
25157int
25158main (void)
25159{
25160
25161		    size_t cb = sizeof(u_int32);
25162
25163
25164  ;
25165  return 0;
25166}
25167_ACEOF
25168if ac_fn_c_try_compile "$LINENO"
25169then :
25170  ntp_cv_type_u_int32_with_dns=yes
25171else $as_nop
25172  ntp_cv_type_u_int32_with_dns=no
25173
25174fi
25175rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25176
25177fi
25178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_type_u_int32_with_dns" >&5
25179printf "%s\n" "$ntp_cv_type_u_int32_with_dns" >&6; }
25180    case "$ntp_cv_type_u_int32_with_dns" in
25181     yes)
25182
25183printf "%s\n" "#define HAVE_U_INT32_ONLY_WITH_DNS 1" >>confdefs.h
25184
25185    esac
25186esac
25187
25188ac_fn_c_check_header_compile "$LINENO" "sys/timepps.h" "ac_cv_header_sys_timepps_h" "
25189	#ifdef HAVE_SYS_TIME_H
25190	# include <sys/time.h>
25191	#endif
25192	#ifdef HAVE_ERRNO_H
25193	# include <errno.h>
25194	#endif
25195
25196
25197"
25198if test "x$ac_cv_header_sys_timepps_h" = xyes
25199then :
25200  printf "%s\n" "#define HAVE_SYS_TIMEPPS_H 1" >>confdefs.h
25201
25202fi
25203
25204
25205{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
25206printf %s "checking for struct timespec... " >&6; }
25207if test ${ntp_cv_struct_timespec+y}
25208then :
25209  printf %s "(cached) " >&6
25210else $as_nop
25211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25212/* end confdefs.h.  */
25213
25214		#include <sys/time.h>
25215		/* Under SunOS, timespec is in sys/timepps.h,
25216		   which needs errno.h and FRAC */
25217		#ifdef HAVE_ERRNO_H
25218		# include <errno.h>
25219		#endif
25220		#ifdef HAVE_SYS_TIMEPPS_H
25221		# define FRAC 4294967296
25222		# include <sys/timepps.h>
25223		#endif
25224
25225int
25226main (void)
25227{
25228
25229		struct timespec n;
25230
25231
25232  ;
25233  return 0;
25234}
25235_ACEOF
25236if ac_fn_c_try_compile "$LINENO"
25237then :
25238  ntp_cv_struct_timespec=yes
25239else $as_nop
25240  ntp_cv_struct_timespec=no
25241
25242fi
25243rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25244
25245fi
25246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_timespec" >&5
25247printf "%s\n" "$ntp_cv_struct_timespec" >&6; }
25248case "$ntp_cv_struct_timespec" in
25249 yes)
25250
25251printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
25252
25253esac
25254
25255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ntptimeval" >&5
25256printf %s "checking for struct ntptimeval... " >&6; }
25257if test ${ntp_cv_struct_ntptimeval+y}
25258then :
25259  printf %s "(cached) " >&6
25260else $as_nop
25261  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25262/* end confdefs.h.  */
25263
25264		#include <sys/time.h>
25265		#include <sys/timex.h>
25266
25267int
25268main (void)
25269{
25270
25271		struct ntptimeval n;
25272
25273
25274  ;
25275  return 0;
25276}
25277_ACEOF
25278if ac_fn_c_try_compile "$LINENO"
25279then :
25280  ntp_cv_struct_ntptimeval=yes
25281else $as_nop
25282  ntp_cv_struct_ntptimeval=no
25283
25284fi
25285rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25286
25287fi
25288{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ntptimeval" >&5
25289printf "%s\n" "$ntp_cv_struct_ntptimeval" >&6; }
25290case "$ntp_cv_struct_ntptimeval" in
25291 yes)
25292
25293printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL 1" >>confdefs.h
25294
25295esac
25296
25297ac_fn_c_check_header_compile "$LINENO" "md5.h" "ac_cv_header_md5_h" "
25298	#ifdef HAVE_SYS_TYPES_H
25299	# include <sys/types.h>
25300	#endif
25301
25302
25303"
25304if test "x$ac_cv_header_md5_h" = xyes
25305then :
25306  printf "%s\n" "#define HAVE_MD5_H 1" >>confdefs.h
25307
25308fi
25309
25310
25311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing MD5Init" >&5
25312printf %s "checking for library containing MD5Init... " >&6; }
25313if test ${ac_cv_search_MD5Init+y}
25314then :
25315  printf %s "(cached) " >&6
25316else $as_nop
25317  ac_func_search_save_LIBS=$LIBS
25318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25319/* end confdefs.h.  */
25320
25321/* Override any GCC internal prototype to avoid an error.
25322   Use char because int might match the return type of a GCC
25323   builtin and then its argument prototype would still apply.  */
25324char MD5Init ();
25325int
25326main (void)
25327{
25328return MD5Init ();
25329  ;
25330  return 0;
25331}
25332_ACEOF
25333for ac_lib in '' md5 md
25334do
25335  if test -z "$ac_lib"; then
25336    ac_res="none required"
25337  else
25338    ac_res=-l$ac_lib
25339    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25340  fi
25341  if ac_fn_c_try_link "$LINENO"
25342then :
25343  ac_cv_search_MD5Init=$ac_res
25344fi
25345rm -f core conftest.err conftest.$ac_objext conftest.beam \
25346    conftest$ac_exeext
25347  if test ${ac_cv_search_MD5Init+y}
25348then :
25349  break
25350fi
25351done
25352if test ${ac_cv_search_MD5Init+y}
25353then :
25354
25355else $as_nop
25356  ac_cv_search_MD5Init=no
25357fi
25358rm conftest.$ac_ext
25359LIBS=$ac_func_search_save_LIBS
25360fi
25361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_MD5Init" >&5
25362printf "%s\n" "$ac_cv_search_MD5Init" >&6; }
25363ac_res=$ac_cv_search_MD5Init
25364if test "$ac_res" != no
25365then :
25366  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25367
25368fi
25369
25370ac_fn_c_check_func "$LINENO" "MD5Init" "ac_cv_func_MD5Init"
25371if test "x$ac_cv_func_MD5Init" = xyes
25372then :
25373  printf "%s\n" "#define HAVE_MD5INIT 1" >>confdefs.h
25374
25375fi
25376ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
25377if test "x$ac_cv_func_sysconf" = xyes
25378then :
25379  printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
25380
25381fi
25382ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
25383if test "x$ac_cv_func_getdtablesize" = xyes
25384then :
25385  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
25386
25387fi
25388ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
25389if test "x$ac_cv_func_sigaction" = xyes
25390then :
25391  printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
25392
25393fi
25394ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
25395if test "x$ac_cv_func_sigset" = xyes
25396then :
25397  printf "%s\n" "#define HAVE_SIGSET 1" >>confdefs.h
25398
25399fi
25400ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec"
25401if test "x$ac_cv_func_sigvec" = xyes
25402then :
25403  printf "%s\n" "#define HAVE_SIGVEC 1" >>confdefs.h
25404
25405fi
25406
25407
25408# HMS: does this need to be a cached variable?
25409# Check whether --enable-signalled-io was given.
25410if test ${enable_signalled_io+y}
25411then :
25412  enableval=$enable_signalled_io; use_signalled_io=$enableval
25413else $as_nop
25414  use_signalled_io=yes
25415
25416fi
25417
25418
25419{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGIO" >&5
25420printf %s "checking for SIGIO... " >&6; }
25421if test ${ntp_cv_hdr_def_sigio+y}
25422then :
25423  printf %s "(cached) " >&6
25424else $as_nop
25425  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25426/* end confdefs.h.  */
25427
25428	    #include <signal.h>
25429
25430	    #ifndef SIGIO
25431	    # error
25432	    #endif
25433
25434_ACEOF
25435if ac_fn_c_try_cpp "$LINENO"
25436then :
25437  ntp_cv_hdr_def_sigio=yes
25438else $as_nop
25439  ntp_cv_hdr_def_sigio=no
25440
25441fi
25442rm -f conftest.err conftest.i conftest.$ac_ext
25443
25444fi
25445{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigio" >&5
25446printf "%s\n" "$ntp_cv_hdr_def_sigio" >&6; }
25447
25448{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use SIGIO" >&5
25449printf %s "checking if we want to use SIGIO... " >&6; }
25450ans=no
25451case "$ntp_cv_hdr_def_sigio" in
25452 yes)
25453    ans=yes
25454    case "$host" in
25455     alpha*-dec-osf4*|alpha*-dec-osf5*)
25456	ans=no
25457	;;
25458     *-convex-*)
25459	ans=no
25460	;;
25461     *-dec-*)
25462	ans=no
25463	;;
25464     *-pc-cygwin*)
25465	ans=no
25466	;;
25467     *-sni-sysv*)
25468	ans=no
25469	;;
25470     *-stratus-vos)
25471	ans=no
25472	;;
25473     *-univel-sysv*)
25474	ans=no
25475	;;
25476     *-*-irix6*)
25477	ans=no
25478	;;
25479     *-*-freebsd*)
25480	ans=no
25481	;;
25482     *-*-*linux*)
25483	ans=no
25484	;;
25485     *-*-unicosmp*)
25486	ans=no
25487	;;
25488     *-*-kfreebsd*)
25489	ans=no
25490	;;
25491     m68k-*-mint*)
25492	ans=no
25493	;;
25494    esac
25495    case "$ans" in
25496     no)
25497	ans="Possible for $host but disabled because of reported problems"
25498	;;
25499    esac
25500    ;;
25501esac
25502case "$ans" in
25503 yes)
25504    case "$use_signalled_io" in
25505     yes)
25506
25507printf "%s\n" "#define HAVE_SIGNALED_IO 1" >>confdefs.h
25508
25509	;;
25510     *) ans="Allowed for $host but --disable-signalled-io was given"
25511	;;
25512    esac
25513esac
25514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25515printf "%s\n" "$ans" >&6; }
25516
25517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIGPOLL" >&5
25518printf %s "checking for SIGPOLL... " >&6; }
25519if test ${ntp_cv_hdr_def_sigpoll+y}
25520then :
25521  printf %s "(cached) " >&6
25522else $as_nop
25523  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25524/* end confdefs.h.  */
25525
25526	    #include <signal.h>
25527
25528	    #ifndef SIGPOLL
25529	    # error
25530	    #endif
25531
25532_ACEOF
25533if ac_fn_c_try_cpp "$LINENO"
25534then :
25535  ntp_cv_hdr_def_sigpoll=yes
25536else $as_nop
25537  ntp_cv_hdr_def_sigpoll=no
25538
25539fi
25540rm -f conftest.err conftest.i conftest.$ac_ext
25541
25542fi
25543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_hdr_def_sigpoll" >&5
25544printf "%s\n" "$ntp_cv_hdr_def_sigpoll" >&6; }
25545
25546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for UDP I/O" >&5
25547printf %s "checking if we can use SIGPOLL for UDP I/O... " >&6; }
25548ans=no
25549case "$ntp_cv_hdr_def_sigpoll" in
25550 yes)
25551    case "$host" in
25552     mips-sgi-irix*)
25553	ans=no
25554	;;
25555     vax-dec-bsd)
25556	ans=no
25557	;;
25558     *-pc-cygwin*)
25559	ans=no
25560	;;
25561     *-sni-sysv*)
25562	ans=no
25563	;;
25564     *-stratus-vos)
25565	ans=no
25566	;;
25567     *-*-aix[4-9]*)
25568	# XXX Only verified thru AIX6
25569	ans=no
25570	;;
25571     *-*-hpux*)
25572	ans=no
25573	;;
25574     *-*-*linux*)
25575	ans=no
25576	;;
25577     *-*-osf*)
25578	ans=no
25579	;;
25580     *-*-qnx*)
25581	ans=no
25582	;;
25583     *-*-sunos*)
25584	ans=no
25585	;;
25586     *-*-solaris*)
25587	ans=no
25588	;;
25589     *-*-ultrix*)
25590	ans=no
25591	;;
25592     *-*-unicosmp*)
25593	ans=no
25594	;;
25595     *-*-kfreebsd*)
25596	ans=no
25597	;;
25598     *) ans=yes
25599	;;
25600    esac
25601    ;;
25602esac
25603case "$ans" in
25604 yes)
25605
25606printf "%s\n" "#define USE_UDP_SIGPOLL 1" >>confdefs.h
25607
25608esac
25609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25610printf "%s\n" "$ans" >&6; }
25611
25612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can use SIGPOLL for TTY I/O" >&5
25613printf %s "checking if we can use SIGPOLL for TTY I/O... " >&6; }
25614ans=no
25615case "$ntp_cv_hdr_def_sigpoll" in
25616 yes)
25617    case "$host" in
25618     mips-sgi-irix*)
25619	ans=no
25620	;;
25621     vax-dec-bsd)
25622	ans=no
25623	;;
25624     *-pc-cygwin*)
25625	ans=no
25626	;;
25627     *-sni-sysv*)
25628	ans=no
25629	;;
25630     *-stratus-vos)
25631	ans=no
25632	;;
25633     *-*-aix[4-9]*)
25634	# XXX Only verified thru AIX6
25635	ans=no
25636	;;
25637     *-*-hpux*)
25638	ans=no
25639	;;
25640     *-*-*linux*)
25641	ans=no
25642	;;
25643     *-*-osf*)
25644	ans=no
25645	;;
25646     *-*-sunos*)
25647	ans=no
25648	;;
25649     *-*-ultrix*)
25650	ans=no
25651	;;
25652     *-*-qnx*)
25653	ans=no
25654	;;
25655     *-*-unicosmp*)
25656	ans=no
25657	;;
25658     *-*-kfreebsd*)
25659	ans=no
25660	;;
25661     *) ans=yes
25662	;;
25663    esac
25664    ;;
25665esac
25666case "$ans" in
25667 yes)
25668
25669printf "%s\n" "#define USE_TTY_SIGPOLL 1" >>confdefs.h
25670
25671esac
25672{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25673printf "%s\n" "$ans" >&6; }
25674
25675{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments to gettimeofday()" >&5
25676printf %s "checking number of arguments to gettimeofday()... " >&6; }
25677if test ${ntp_cv_func_Xettimeofday_nargs+y}
25678then :
25679  printf %s "(cached) " >&6
25680else $as_nop
25681  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25682/* end confdefs.h.  */
25683
25684		#include <sys/time.h>
25685
25686int
25687main (void)
25688{
25689
25690		gettimeofday(0, 0);
25691		settimeofday(0, 0);
25692
25693
25694  ;
25695  return 0;
25696}
25697_ACEOF
25698if ac_fn_c_try_compile "$LINENO"
25699then :
25700  ntp_cv_func_Xettimeofday_nargs=2
25701else $as_nop
25702  ntp_cv_func_Xettimeofday_nargs=1
25703
25704fi
25705rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
25706
25707fi
25708{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_Xettimeofday_nargs" >&5
25709printf "%s\n" "$ntp_cv_func_Xettimeofday_nargs" >&6; }
25710case "$ntp_cv_func_Xettimeofday_nargs" in
25711 1)
25712
25713printf "%s\n" "#define SYSV_TIMEOFDAY 1" >>confdefs.h
25714
25715esac
25716
25717
25718  for ac_func in settimeofday
25719do :
25720  ac_fn_c_check_func "$LINENO" "settimeofday" "ac_cv_func_settimeofday"
25721if test "x$ac_cv_func_settimeofday" = xyes
25722then :
25723  printf "%s\n" "#define HAVE_SETTIMEOFDAY 1" >>confdefs.h
25724
25725else $as_nop
25726
25727    case "$host" in
25728     *-*-mpeix*) ac_cv_func_settimeofday=yes
25729    esac
25730
25731fi
25732
25733done
25734
25735{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we'll use clock_settime or settimeofday or stime" >&5
25736printf %s "checking if we'll use clock_settime or settimeofday or stime... " >&6; }
25737ntp_warning='GRONK'
25738ans=none
25739case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
25740 yes*)
25741    ntp_warning=''
25742    ans='clock_settime()'
25743    ;;
25744 noyes*)
25745    ntp_warning='But clock_settime() would be better (if we had it)'
25746    ans='settimeofday()'
25747    ;;
25748 nonoyes)
25749    ntp_warning='Which is the worst of the three'
25750    ans='stime()'
25751    ;;
25752 *)
25753    case "$build" in
25754     $host)
25755	ntp_warning='Which leaves us with nothing to use!'
25756    esac
25757esac
25758{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25759printf "%s\n" "$ans" >&6; }
25760case "$ntp_warning" in
25761 '')
25762    ;;
25763 *)
25764    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** $ntp_warning ***" >&5
25765printf "%s\n" "$as_me: WARNING: *** $ntp_warning ***" >&2;}
25766    ;;
25767esac
25768
25769
25770LDADD_LIBNTP="$LDADD_LIBNTP $LIBS"
25771LIBS=$__LIBS
25772{ __LIBS=; unset __LIBS;}
25773
25774
25775
25776{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for deprecated --with-arlib" >&5
25777printf %s "checking for deprecated --with-arlib... " >&6; }
25778
25779# Check whether --with-arlib was given.
25780if test ${with_arlib+y}
25781then :
25782  withval=$with_arlib; ans=$withval
25783else $as_nop
25784  ans=no
25785fi
25786
25787{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
25788printf "%s\n" "$ans" >&6; }
25789
25790case "$ans" in
25791 yes)
25792    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Please do not use --with-arlib, arlib is no longer included.  In the future, --with-arlib will not be recognized." >&5
25793printf "%s\n" "$as_me: WARNING: Please do not use --with-arlib, arlib is no longer included.  In the future, --with-arlib will not be recognized." >&2;}
25794    ;;
25795esac
25796
25797for ac_prog in gawk mawk nawk awk
25798do
25799  # Extract the first word of "$ac_prog", so it can be a program name with args.
25800set dummy $ac_prog; ac_word=$2
25801{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25802printf %s "checking for $ac_word... " >&6; }
25803if test ${ac_cv_prog_AWK+y}
25804then :
25805  printf %s "(cached) " >&6
25806else $as_nop
25807  if test -n "$AWK"; then
25808  ac_cv_prog_AWK="$AWK" # Let the user override the test.
25809else
25810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25811for as_dir in $PATH
25812do
25813  IFS=$as_save_IFS
25814  case $as_dir in #(((
25815    '') as_dir=./ ;;
25816    */) ;;
25817    *) as_dir=$as_dir/ ;;
25818  esac
25819    for ac_exec_ext in '' $ac_executable_extensions; do
25820  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25821    ac_cv_prog_AWK="$ac_prog"
25822    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25823    break 2
25824  fi
25825done
25826  done
25827IFS=$as_save_IFS
25828
25829fi
25830fi
25831AWK=$ac_cv_prog_AWK
25832if test -n "$AWK"; then
25833  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
25834printf "%s\n" "$AWK" >&6; }
25835else
25836  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25837printf "%s\n" "no" >&6; }
25838fi
25839
25840
25841  test -n "$AWK" && break
25842done
25843
25844{ ac_cv_prog_AWK=; unset ac_cv_prog_AWK;}
25845				{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
25846printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
25847set x ${MAKE-make}
25848ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
25849if eval test \${ac_cv_prog_make_${ac_make}_set+y}
25850then :
25851  printf %s "(cached) " >&6
25852else $as_nop
25853  cat >conftest.make <<\_ACEOF
25854SHELL = /bin/sh
25855all:
25856	@echo '@@@%%%=$(MAKE)=@@@%%%'
25857_ACEOF
25858# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
25859case `${MAKE-make} -f conftest.make 2>/dev/null` in
25860  *@@@%%%=?*=@@@%%%*)
25861    eval ac_cv_prog_make_${ac_make}_set=yes;;
25862  *)
25863    eval ac_cv_prog_make_${ac_make}_set=no;;
25864esac
25865rm -f conftest.make
25866fi
25867if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
25868  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25869printf "%s\n" "yes" >&6; }
25870  SET_MAKE=
25871else
25872  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25873printf "%s\n" "no" >&6; }
25874  SET_MAKE="MAKE=${MAKE-make}"
25875fi
25876
25877
25878
25879
25880
25881{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
25882printf %s "checking whether ln -s works... " >&6; }
25883LN_S=$as_ln_s
25884if test "$LN_S" = "ln -s"; then
25885  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25886printf "%s\n" "yes" >&6; }
25887else
25888  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
25889printf "%s\n" "no, using $LN_S" >&6; }
25890fi
25891
25892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
25893printf %s "checking for library containing strerror... " >&6; }
25894if test ${ac_cv_search_strerror+y}
25895then :
25896  printf %s "(cached) " >&6
25897else $as_nop
25898  ac_func_search_save_LIBS=$LIBS
25899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25900/* end confdefs.h.  */
25901
25902/* Override any GCC internal prototype to avoid an error.
25903   Use char because int might match the return type of a GCC
25904   builtin and then its argument prototype would still apply.  */
25905char strerror ();
25906int
25907main (void)
25908{
25909return strerror ();
25910  ;
25911  return 0;
25912}
25913_ACEOF
25914for ac_lib in '' cposix
25915do
25916  if test -z "$ac_lib"; then
25917    ac_res="none required"
25918  else
25919    ac_res=-l$ac_lib
25920    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
25921  fi
25922  if ac_fn_c_try_link "$LINENO"
25923then :
25924  ac_cv_search_strerror=$ac_res
25925fi
25926rm -f core conftest.err conftest.$ac_objext conftest.beam \
25927    conftest$ac_exeext
25928  if test ${ac_cv_search_strerror+y}
25929then :
25930  break
25931fi
25932done
25933if test ${ac_cv_search_strerror+y}
25934then :
25935
25936else $as_nop
25937  ac_cv_search_strerror=no
25938fi
25939rm conftest.$ac_ext
25940LIBS=$ac_func_search_save_LIBS
25941fi
25942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
25943printf "%s\n" "$ac_cv_search_strerror" >&6; }
25944ac_res=$ac_cv_search_strerror
25945if test "$ac_res" != no
25946then :
25947  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25948
25949fi
25950
25951
25952
25953# Extract the first word of "perl", so it can be a program name with args.
25954set dummy perl; ac_word=$2
25955{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25956printf %s "checking for $ac_word... " >&6; }
25957if test ${ac_cv_path_PATH_PERL+y}
25958then :
25959  printf %s "(cached) " >&6
25960else $as_nop
25961  case $PATH_PERL in
25962  [\\/]* | ?:[\\/]*)
25963  ac_cv_path_PATH_PERL="$PATH_PERL" # Let the user override the test with a path.
25964  ;;
25965  *)
25966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25967for as_dir in $PATH
25968do
25969  IFS=$as_save_IFS
25970  case $as_dir in #(((
25971    '') as_dir=./ ;;
25972    */) ;;
25973    *) as_dir=$as_dir/ ;;
25974  esac
25975    for ac_exec_ext in '' $ac_executable_extensions; do
25976  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
25977    ac_cv_path_PATH_PERL="$as_dir$ac_word$ac_exec_ext"
25978    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
25979    break 2
25980  fi
25981done
25982  done
25983IFS=$as_save_IFS
25984
25985  ;;
25986esac
25987fi
25988PATH_PERL=$ac_cv_path_PATH_PERL
25989if test -n "$PATH_PERL"; then
25990  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_PERL" >&5
25991printf "%s\n" "$PATH_PERL" >&6; }
25992else
25993  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
25994printf "%s\n" "no" >&6; }
25995fi
25996
25997
25998{ ac_cv_path_PATH_PERL=; unset ac_cv_path_PATH_PERL;}
25999# Extract the first word of "test", so it can be a program name with args.
26000set dummy test; ac_word=$2
26001{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26002printf %s "checking for $ac_word... " >&6; }
26003if test ${ac_cv_path_PATH_TEST+y}
26004then :
26005  printf %s "(cached) " >&6
26006else $as_nop
26007  case $PATH_TEST in
26008  [\\/]* | ?:[\\/]*)
26009  ac_cv_path_PATH_TEST="$PATH_TEST" # Let the user override the test with a path.
26010  ;;
26011  *)
26012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26013for as_dir in $PATH
26014do
26015  IFS=$as_save_IFS
26016  case $as_dir in #(((
26017    '') as_dir=./ ;;
26018    */) ;;
26019    *) as_dir=$as_dir/ ;;
26020  esac
26021    for ac_exec_ext in '' $ac_executable_extensions; do
26022  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26023    ac_cv_path_PATH_TEST="$as_dir$ac_word$ac_exec_ext"
26024    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26025    break 2
26026  fi
26027done
26028  done
26029IFS=$as_save_IFS
26030
26031  ;;
26032esac
26033fi
26034PATH_TEST=$ac_cv_path_PATH_TEST
26035if test -n "$PATH_TEST"; then
26036  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_TEST" >&5
26037printf "%s\n" "$PATH_TEST" >&6; }
26038else
26039  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26040printf "%s\n" "no" >&6; }
26041fi
26042
26043
26044{ ac_cv_path_PATH_TEST=; unset ac_cv_path_PATH_TEST;}
26045test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
26046
26047
26048# Check whether --with-net-snmp-config was given.
26049if test ${with_net_snmp_config+y}
26050then :
26051  withval=$with_net_snmp_config; ans=$withval
26052else $as_nop
26053  ans=yes
26054
26055fi
26056
26057case "$ans" in
26058 no)
26059    ;;
26060 yes)
26061    ans=net-snmp-config
26062    ;;
26063 /*)
26064    ;;
26065 */*)
26066    as_fn_error $? "--with-net-snmp-config takes either a name or an absolute path" "$LINENO" 5
26067    ;;
26068 *)
26069    ;;
26070esac
26071PROG_NET_SNMP_CONFIG=$ans
26072case "$PROG_NET_SNMP_CONFIG" in
26073 no) ;;
26074 /*)
26075    PATH_NET_SNMP_CONFIG=$PROG_NET_SNMP_CONFIG
26076    ;;
26077 *)
26078    # Extract the first word of "$PROG_NET_SNMP_CONFIG", so it can be a program name with args.
26079set dummy $PROG_NET_SNMP_CONFIG; ac_word=$2
26080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26081printf %s "checking for $ac_word... " >&6; }
26082if test ${ac_cv_path_PATH_NET_SNMP_CONFIG+y}
26083then :
26084  printf %s "(cached) " >&6
26085else $as_nop
26086  case $PATH_NET_SNMP_CONFIG in
26087  [\\/]* | ?:[\\/]*)
26088  ac_cv_path_PATH_NET_SNMP_CONFIG="$PATH_NET_SNMP_CONFIG" # Let the user override the test with a path.
26089  ;;
26090  *)
26091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26092for as_dir in $PATH
26093do
26094  IFS=$as_save_IFS
26095  case $as_dir in #(((
26096    '') as_dir=./ ;;
26097    */) ;;
26098    *) as_dir=$as_dir/ ;;
26099  esac
26100    for ac_exec_ext in '' $ac_executable_extensions; do
26101  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
26102    ac_cv_path_PATH_NET_SNMP_CONFIG="$as_dir$ac_word$ac_exec_ext"
26103    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
26104    break 2
26105  fi
26106done
26107  done
26108IFS=$as_save_IFS
26109
26110  ;;
26111esac
26112fi
26113PATH_NET_SNMP_CONFIG=$ac_cv_path_PATH_NET_SNMP_CONFIG
26114if test -n "$PATH_NET_SNMP_CONFIG"; then
26115  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
26116printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
26117else
26118  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
26119printf "%s\n" "no" >&6; }
26120fi
26121
26122
26123    { ac_cv_path_PATH_NET_SNMP_CONFIG=; unset ac_cv_path_PATH_NET_SNMP_CONFIG;}
26124;;
26125esac
26126{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp-config path" >&5
26127printf %s "checking for net-snmp-config path... " >&6; }
26128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_NET_SNMP_CONFIG" >&5
26129printf "%s\n" "$PATH_NET_SNMP_CONFIG" >&6; }
26130
26131case "$PATH_NET_SNMP_CONFIG" in
26132 /*)	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for net-snmp version" >&5
26133printf %s "checking for net-snmp version... " >&6; }
26134if test ${ntp_cv_net_snmp_version+y}
26135then :
26136  printf %s "(cached) " >&6
26137else $as_nop
26138  ntp_cv_net_snmp_version=`$PATH_NET_SNMP_CONFIG --version`
26139
26140fi
26141{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_net_snmp_version" >&5
26142printf "%s\n" "$ntp_cv_net_snmp_version" >&6; }
26143	;;
26144esac
26145
26146case "$host" in
26147 *-*-vxworks*)
26148    ac_link="$ac_link $VX_KERNEL"
26149    ;;
26150esac
26151
26152# HMS: a check for -lnsl used to be here - now being done in NTP_LIBNTP
26153{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openlog" >&5
26154printf %s "checking for library containing openlog... " >&6; }
26155if test ${ac_cv_search_openlog+y}
26156then :
26157  printf %s "(cached) " >&6
26158else $as_nop
26159  ac_func_search_save_LIBS=$LIBS
26160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26161/* end confdefs.h.  */
26162
26163/* Override any GCC internal prototype to avoid an error.
26164   Use char because int might match the return type of a GCC
26165   builtin and then its argument prototype would still apply.  */
26166char openlog ();
26167int
26168main (void)
26169{
26170return openlog ();
26171  ;
26172  return 0;
26173}
26174_ACEOF
26175for ac_lib in '' gen syslog
26176do
26177  if test -z "$ac_lib"; then
26178    ac_res="none required"
26179  else
26180    ac_res=-l$ac_lib
26181    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26182  fi
26183  if ac_fn_c_try_link "$LINENO"
26184then :
26185  ac_cv_search_openlog=$ac_res
26186fi
26187rm -f core conftest.err conftest.$ac_objext conftest.beam \
26188    conftest$ac_exeext
26189  if test ${ac_cv_search_openlog+y}
26190then :
26191  break
26192fi
26193done
26194if test ${ac_cv_search_openlog+y}
26195then :
26196
26197else $as_nop
26198  ac_cv_search_openlog=no
26199fi
26200rm conftest.$ac_ext
26201LIBS=$ac_func_search_save_LIBS
26202fi
26203{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openlog" >&5
26204printf "%s\n" "$ac_cv_search_openlog" >&6; }
26205ac_res=$ac_cv_search_openlog
26206if test "$ac_res" != no
26207then :
26208  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26209
26210fi
26211
26212# XXX library list will be in ac_cv_search_openlog
26213
26214# LIBSECCOMP is off by default -- needs testing with all the features
26215# Please send bug reports to loganaden@gmail.com
26216{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use libseccomp sandboxing (EXPERIMENTAL)" >&5
26217printf %s "checking if we want to use libseccomp sandboxing (EXPERIMENTAL)... " >&6; }
26218# Check whether --enable-libseccomp was given.
26219if test ${enable_libseccomp+y}
26220then :
26221  enableval=$enable_libseccomp; ntp_ok=$enableval
26222else $as_nop
26223  ntp_ok=no
26224
26225fi
26226
26227{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
26228printf "%s\n" "$ntp_ok" >&6; }
26229case "$ntp_ok" in
26230 yes)
26231    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing seccomp_init" >&5
26232printf %s "checking for library containing seccomp_init... " >&6; }
26233if test ${ac_cv_search_seccomp_init+y}
26234then :
26235  printf %s "(cached) " >&6
26236else $as_nop
26237  ac_func_search_save_LIBS=$LIBS
26238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26239/* end confdefs.h.  */
26240
26241/* Override any GCC internal prototype to avoid an error.
26242   Use char because int might match the return type of a GCC
26243   builtin and then its argument prototype would still apply.  */
26244char seccomp_init ();
26245int
26246main (void)
26247{
26248return seccomp_init ();
26249  ;
26250  return 0;
26251}
26252_ACEOF
26253for ac_lib in '' seccomp
26254do
26255  if test -z "$ac_lib"; then
26256    ac_res="none required"
26257  else
26258    ac_res=-l$ac_lib
26259    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26260  fi
26261  if ac_fn_c_try_link "$LINENO"
26262then :
26263  ac_cv_search_seccomp_init=$ac_res
26264fi
26265rm -f core conftest.err conftest.$ac_objext conftest.beam \
26266    conftest$ac_exeext
26267  if test ${ac_cv_search_seccomp_init+y}
26268then :
26269  break
26270fi
26271done
26272if test ${ac_cv_search_seccomp_init+y}
26273then :
26274
26275else $as_nop
26276  ac_cv_search_seccomp_init=no
26277fi
26278rm conftest.$ac_ext
26279LIBS=$ac_func_search_save_LIBS
26280fi
26281{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_seccomp_init" >&5
26282printf "%s\n" "$ac_cv_search_seccomp_init" >&6; }
26283ac_res=$ac_cv_search_seccomp_init
26284if test "$ac_res" != no
26285then :
26286  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26287
26288printf "%s\n" "#define LIBSECCOMP 1" >>confdefs.h
26289
26290
26291fi
26292
26293    if test "$cross_compiling" = yes
26294then :
26295  { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26296printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
26297as_fn_error $? "cannot run test program while cross compiling
26298See \`config.log' for more details" "$LINENO" 5; }
26299else $as_nop
26300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26301/* end confdefs.h.  */
26302
26303	#include <stdio.h>
26304	#include <stdlib.h>
26305	#include <errno.h>
26306	#include <sys/prctl.h>
26307	#include <linux/seccomp.h>
26308
26309	int main(void)
26310	{
26311		int ret;
26312		ret = prctl(PR_GET_SECCOMP, 0, 0, 0, 0);
26313		if (ret < 0) {
26314			switch (errno) {
26315			case ENOSYS:
26316				return 1;
26317			case EINVAL:
26318				return 1;
26319			default:
26320				return 1;
26321			}
26322		}
26323		ret =
26324		prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
26325		if (ret < 0) {
26326			switch (errno) {
26327			case EINVAL:
26328				return 1;
26329			case EFAULT:
26330				return 0;
26331			default:
26332				return 1;
26333		}
26334	}
26335return 1;
26336}
26337
26338
26339_ACEOF
26340if ac_fn_c_try_run "$LINENO"
26341then :
26342
26343printf "%s\n" "#define KERN_SECCOMP 1" >>confdefs.h
26344
26345
26346fi
26347rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26348  conftest.$ac_objext conftest.beam conftest.$ac_ext
26349fi
26350
26351    ;;
26352esac
26353
26354
26355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for facilitynames in syslog.h" >&5
26356printf %s "checking for facilitynames in syslog.h... " >&6; }
26357if test ${ac_cv_HAVE_SYSLOG_FACILITYNAMES+y}
26358then :
26359  printf %s "(cached) " >&6
26360else $as_nop
26361
26362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26363/* end confdefs.h.  */
26364
26365#define SYSLOG_NAMES
26366#include <stdlib.h>
26367#include <syslog.h>
26368
26369int
26370main (void)
26371{
26372 void *fnames; fnames = facilitynames;
26373  ;
26374  return 0;
26375}
26376_ACEOF
26377if ac_fn_c_try_compile "$LINENO"
26378then :
26379  ac_cv_HAVE_SYSLOG_FACILITYNAMES=yes
26380else $as_nop
26381  ac_cv_HAVE_SYSLOG_FACILITYNAMES=no
26382fi
26383rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26384fi
26385{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&5
26386printf "%s\n" "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" >&6; }
26387case "$ac_cv_HAVE_SYSLOG_FACILITYNAMES" in
26388 yes)
26389
26390printf "%s\n" "#define HAVE_SYSLOG_FACILITYNAMES 1" >>confdefs.h
26391
26392    ;;
26393 no)
26394    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No facilitynames in <syslog.h>" >&5
26395printf "%s\n" "$as_me: WARNING: No facilitynames in <syslog.h>" >&2;}
26396    ;;
26397 cross)
26398    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: facilitynames in <syslog.h> - cross-compiling" >&5
26399printf "%s\n" "$as_me: WARNING: facilitynames in <syslog.h> - cross-compiling" >&2;}
26400    ;;
26401esac
26402
26403
26404
26405case "$host" in
26406 *-*-*linux*) ;;
26407 *-*-osf4*) ;;
26408 *-*-osf5*) ;;
26409 *)
26410    # HMS: Make sure we check for -lrt for clock_* before this...
26411    case "$ac_cv_search_clock_gettime" in
26412     '') as_fn_error $? "Internal Error: Haven't looked for clock_gettime() yet!" "$LINENO" 5 ;;
26413    esac
26414    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sched_setscheduler" >&5
26415printf %s "checking for library containing sched_setscheduler... " >&6; }
26416if test ${ac_cv_search_sched_setscheduler+y}
26417then :
26418  printf %s "(cached) " >&6
26419else $as_nop
26420  ac_func_search_save_LIBS=$LIBS
26421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26422/* end confdefs.h.  */
26423
26424/* Override any GCC internal prototype to avoid an error.
26425   Use char because int might match the return type of a GCC
26426   builtin and then its argument prototype would still apply.  */
26427char sched_setscheduler ();
26428int
26429main (void)
26430{
26431return sched_setscheduler ();
26432  ;
26433  return 0;
26434}
26435_ACEOF
26436for ac_lib in '' rt posix4
26437do
26438  if test -z "$ac_lib"; then
26439    ac_res="none required"
26440  else
26441    ac_res=-l$ac_lib
26442    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26443  fi
26444  if ac_fn_c_try_link "$LINENO"
26445then :
26446  ac_cv_search_sched_setscheduler=$ac_res
26447fi
26448rm -f core conftest.err conftest.$ac_objext conftest.beam \
26449    conftest$ac_exeext
26450  if test ${ac_cv_search_sched_setscheduler+y}
26451then :
26452  break
26453fi
26454done
26455if test ${ac_cv_search_sched_setscheduler+y}
26456then :
26457
26458else $as_nop
26459  ac_cv_search_sched_setscheduler=no
26460fi
26461rm conftest.$ac_ext
26462LIBS=$ac_func_search_save_LIBS
26463fi
26464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sched_setscheduler" >&5
26465printf "%s\n" "$ac_cv_search_sched_setscheduler" >&6; }
26466ac_res=$ac_cv_search_sched_setscheduler
26467if test "$ac_res" != no
26468then :
26469  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26470
26471fi
26472
26473    ;;
26474esac
26475
26476ac_fn_c_check_header_compile "$LINENO" "bstring.h" "ac_cv_header_bstring_h" "$ac_includes_default"
26477if test "x$ac_cv_header_bstring_h" = xyes
26478then :
26479  printf "%s\n" "#define HAVE_BSTRING_H 1" >>confdefs.h
26480
26481fi
26482
26483ac_fn_c_check_header_compile "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
26484if test "x$ac_cv_header_dns_sd_h" = xyes
26485then :
26486  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5
26487printf %s "checking for library containing DNSServiceRegister... " >&6; }
26488if test ${ac_cv_search_DNSServiceRegister+y}
26489then :
26490  printf %s "(cached) " >&6
26491else $as_nop
26492  ac_func_search_save_LIBS=$LIBS
26493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26494/* end confdefs.h.  */
26495
26496/* Override any GCC internal prototype to avoid an error.
26497   Use char because int might match the return type of a GCC
26498   builtin and then its argument prototype would still apply.  */
26499char DNSServiceRegister ();
26500int
26501main (void)
26502{
26503return DNSServiceRegister ();
26504  ;
26505  return 0;
26506}
26507_ACEOF
26508for ac_lib in '' dns_sd
26509do
26510  if test -z "$ac_lib"; then
26511    ac_res="none required"
26512  else
26513    ac_res=-l$ac_lib
26514    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
26515  fi
26516  if ac_fn_c_try_link "$LINENO"
26517then :
26518  ac_cv_search_DNSServiceRegister=$ac_res
26519fi
26520rm -f core conftest.err conftest.$ac_objext conftest.beam \
26521    conftest$ac_exeext
26522  if test ${ac_cv_search_DNSServiceRegister+y}
26523then :
26524  break
26525fi
26526done
26527if test ${ac_cv_search_DNSServiceRegister+y}
26528then :
26529
26530else $as_nop
26531  ac_cv_search_DNSServiceRegister=no
26532fi
26533rm conftest.$ac_ext
26534LIBS=$ac_func_search_save_LIBS
26535fi
26536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5
26537printf "%s\n" "$ac_cv_search_DNSServiceRegister" >&6; }
26538ac_res=$ac_cv_search_DNSServiceRegister
26539if test "$ac_res" != no
26540then :
26541  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26542
26543printf "%s\n" "#define HAVE_DNSREGISTRATION 1" >>confdefs.h
26544
26545
26546fi
26547
26548
26549fi
26550
26551ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default"
26552if test "x$ac_cv_header_fcntl_h" = xyes
26553then :
26554  printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h
26555
26556fi
26557ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default"
26558if test "x$ac_cv_header_fnmatch_h" = xyes
26559then :
26560  printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h
26561
26562fi
26563ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default"
26564if test "x$ac_cv_header_ieeefp_h" = xyes
26565then :
26566  printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h
26567
26568fi
26569ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
26570if test "x$ac_cv_header_inttypes_h" = xyes
26571then :
26572  printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h
26573
26574fi
26575ac_fn_c_check_header_compile "$LINENO" "kvm.h" "ac_cv_header_kvm_h" "$ac_includes_default"
26576if test "x$ac_cv_header_kvm_h" = xyes
26577then :
26578  printf "%s\n" "#define HAVE_KVM_H 1" >>confdefs.h
26579
26580fi
26581ac_fn_c_check_header_compile "$LINENO" "math.h" "ac_cv_header_math_h" "$ac_includes_default"
26582if test "x$ac_cv_header_math_h" = xyes
26583then :
26584  printf "%s\n" "#define HAVE_MATH_H 1" >>confdefs.h
26585
26586fi
26587
26588
26589ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default"
26590if test "x$ac_cv_header_memory_h" = xyes
26591then :
26592  printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h
26593
26594fi
26595ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
26596if test "x$ac_cv_header_netdb_h" = xyes
26597then :
26598  printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h
26599
26600fi
26601ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
26602if test "x$ac_cv_header_poll_h" = xyes
26603then :
26604  printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h
26605
26606fi
26607
26608ac_fn_c_check_header_compile "$LINENO" "sgtty.h" "ac_cv_header_sgtty_h" "$ac_includes_default"
26609if test "x$ac_cv_header_sgtty_h" = xyes
26610then :
26611  printf "%s\n" "#define HAVE_SGTTY_H 1" >>confdefs.h
26612
26613fi
26614ac_fn_c_check_header_compile "$LINENO" "stdatomic.h" "ac_cv_header_stdatomic_h" "$ac_includes_default"
26615if test "x$ac_cv_header_stdatomic_h" = xyes
26616then :
26617  printf "%s\n" "#define HAVE_STDATOMIC_H 1" >>confdefs.h
26618
26619fi
26620
26621ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
26622if test "x$ac_cv_type__Bool" = xyes
26623then :
26624
26625printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
26626
26627
26628fi
26629
26630   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
26631printf %s "checking for stdbool.h that conforms to C99... " >&6; }
26632if test ${ac_cv_header_stdbool_h+y}
26633then :
26634  printf %s "(cached) " >&6
26635else $as_nop
26636  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26637/* end confdefs.h.  */
26638#include <stdbool.h>
26639
26640             #ifndef __bool_true_false_are_defined
26641               #error "__bool_true_false_are_defined is not defined"
26642             #endif
26643             char a[__bool_true_false_are_defined == 1 ? 1 : -1];
26644
26645             /* Regardless of whether this is C++ or "_Bool" is a
26646                valid type name, "true" and "false" should be usable
26647                in #if expressions and integer constant expressions,
26648                and "bool" should be a valid type name.  */
26649
26650             #if !true
26651               #error "'true' is not true"
26652             #endif
26653             #if true != 1
26654               #error "'true' is not equal to 1"
26655             #endif
26656             char b[true == 1 ? 1 : -1];
26657             char c[true];
26658
26659             #if false
26660               #error "'false' is not false"
26661             #endif
26662             #if false != 0
26663               #error "'false' is not equal to 0"
26664             #endif
26665             char d[false == 0 ? 1 : -1];
26666
26667             enum { e = false, f = true, g = false * true, h = true * 256 };
26668
26669             char i[(bool) 0.5 == true ? 1 : -1];
26670             char j[(bool) 0.0 == false ? 1 : -1];
26671             char k[sizeof (bool) > 0 ? 1 : -1];
26672
26673             struct sb { bool s: 1; bool t; } s;
26674             char l[sizeof s.t > 0 ? 1 : -1];
26675
26676             /* The following fails for
26677                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
26678             bool m[h];
26679             char n[sizeof m == h * sizeof m[0] ? 1 : -1];
26680             char o[-1 - (bool) 0 < 0 ? 1 : -1];
26681             /* Catch a bug in an HP-UX C compiler.  See
26682         https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
26683         https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
26684              */
26685             bool p = true;
26686             bool *pp = &p;
26687
26688             /* C 1999 specifies that bool, true, and false are to be
26689                macros, but C++ 2011 and later overrule this.  */
26690             #if __cplusplus < 201103
26691              #ifndef bool
26692               #error "bool is not defined"
26693              #endif
26694              #ifndef false
26695               #error "false is not defined"
26696              #endif
26697              #ifndef true
26698               #error "true is not defined"
26699              #endif
26700             #endif
26701
26702             /* If _Bool is available, repeat with it all the tests
26703                above that used bool.  */
26704             #ifdef HAVE__BOOL
26705               struct sB { _Bool s: 1; _Bool t; } t;
26706
26707               char q[(_Bool) 0.5 == true ? 1 : -1];
26708               char r[(_Bool) 0.0 == false ? 1 : -1];
26709               char u[sizeof (_Bool) > 0 ? 1 : -1];
26710               char v[sizeof t.t > 0 ? 1 : -1];
26711
26712               _Bool w[h];
26713               char x[sizeof m == h * sizeof m[0] ? 1 : -1];
26714               char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
26715               _Bool z = true;
26716               _Bool *pz = &p;
26717             #endif
26718
26719int
26720main (void)
26721{
26722
26723             bool ps = &s;
26724             *pp |= p;
26725             *pp |= ! p;
26726
26727             #ifdef HAVE__BOOL
26728               _Bool pt = &t;
26729               *pz |= z;
26730               *pz |= ! z;
26731             #endif
26732
26733             /* Refer to every declared value, so they cannot be
26734                discarded as unused.  */
26735             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
26736                     + !l + !m + !n + !o + !p + !pp + !ps
26737             #ifdef HAVE__BOOL
26738                     + !q + !r + !u + !v + !w + !x + !y + !z + !pt
26739             #endif
26740                    );
26741
26742  ;
26743  return 0;
26744}
26745_ACEOF
26746if ac_fn_c_try_compile "$LINENO"
26747then :
26748  ac_cv_header_stdbool_h=yes
26749else $as_nop
26750  ac_cv_header_stdbool_h=no
26751fi
26752rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
26753fi
26754{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
26755printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
26756
26757if test $ac_cv_header_stdbool_h = yes; then
26758
26759printf "%s\n" "#define HAVE_STDBOOL_H 1" >>confdefs.h
26760
26761fi
26762
26763ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
26764if test "x$ac_cv_header_stdlib_h" = xyes
26765then :
26766  printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h
26767
26768fi
26769ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default"
26770if test "x$ac_cv_header_string_h" = xyes
26771then :
26772  printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h
26773
26774fi
26775ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default"
26776if test "x$ac_cv_header_termio_h" = xyes
26777then :
26778  printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h
26779
26780fi
26781
26782ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
26783if test "x$ac_cv_header_termios_h" = xyes
26784then :
26785  printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
26786
26787fi
26788ac_fn_c_check_header_compile "$LINENO" "timepps.h" "ac_cv_header_timepps_h" "$ac_includes_default"
26789if test "x$ac_cv_header_timepps_h" = xyes
26790then :
26791  printf "%s\n" "#define HAVE_TIMEPPS_H 1" >>confdefs.h
26792
26793fi
26794ac_fn_c_check_header_compile "$LINENO" "timex.h" "ac_cv_header_timex_h" "$ac_includes_default"
26795if test "x$ac_cv_header_timex_h" = xyes
26796then :
26797  printf "%s\n" "#define HAVE_TIMEX_H 1" >>confdefs.h
26798
26799fi
26800ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
26801if test "x$ac_cv_header_unistd_h" = xyes
26802then :
26803  printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h
26804
26805fi
26806
26807
26808case "$host" in
26809 *-*-aix*)
26810    ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
26811if test "x$ac_cv_header_utmpx_h" = xyes
26812then :
26813  printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
26814
26815fi
26816
26817    case "$ac_cv_header_utmpx_h" in
26818     yes)
26819	;;
26820     *)
26821	ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
26822if test "x$ac_cv_header_utmp_h" = xyes
26823then :
26824  printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
26825
26826fi
26827
26828	;;
26829    esac
26830    ;;
26831 *)
26832    ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default"
26833if test "x$ac_cv_header_utmp_h" = xyes
26834then :
26835  printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h
26836
26837fi
26838ac_fn_c_check_header_compile "$LINENO" "utmpx.h" "ac_cv_header_utmpx_h" "$ac_includes_default"
26839if test "x$ac_cv_header_utmpx_h" = xyes
26840then :
26841  printf "%s\n" "#define HAVE_UTMPX_H 1" >>confdefs.h
26842
26843fi
26844
26845    ;;
26846esac
26847
26848#
26849# On Suns only (so far) getpass() truncates the typed password to 8
26850# characters, but getpassphrase() allows up to 257.  Most systems'
26851# getpass() does not truncate, at least not so as to affect ntpq and
26852# ntpdc password prompts.
26853#
26854# So check for getpassphrase(), but only on Sun operating systems.
26855#
26856case "$host" in
26857 *-*-sunos*|*-*-solaris*)
26858    ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase"
26859if test "x$ac_cv_func_getpassphrase" = xyes
26860then :
26861  printf "%s\n" "#define HAVE_GETPASSPHRASE 1" >>confdefs.h
26862
26863fi
26864
26865esac
26866
26867
26868ac_fn_c_check_header_compile "$LINENO" "net/if6.h" "ac_cv_header_net_if6_h" "$ac_includes_default"
26869if test "x$ac_cv_header_net_if6_h" = xyes
26870then :
26871  printf "%s\n" "#define HAVE_NET_IF6_H 1" >>confdefs.h
26872
26873fi
26874
26875ac_fn_c_check_header_compile "$LINENO" "net/route.h" "ac_cv_header_net_route_h" "
26876    #include <sys/types.h>
26877    #include <sys/socket.h>
26878    #include <net/if.h>
26879
26880"
26881if test "x$ac_cv_header_net_route_h" = xyes
26882then :
26883  printf "%s\n" "#define HAVE_NET_ROUTE_H 1" >>confdefs.h
26884
26885fi
26886
26887
26888ac_fn_c_check_header_compile "$LINENO" "netinfo/ni.h" "ac_cv_header_netinfo_ni_h" "$ac_includes_default"
26889if test "x$ac_cv_header_netinfo_ni_h" = xyes
26890then :
26891  printf "%s\n" "#define HAVE_NETINFO_NI_H 1" >>confdefs.h
26892
26893fi
26894
26895case "$ac_cv_header_netinfo_ni_h" in
26896 yes)
26897
26898printf "%s\n" "#define HAVE_NETINFO 1" >>confdefs.h
26899
26900esac
26901ac_fn_c_check_header_compile "$LINENO" "sun/audioio.h" "ac_cv_header_sun_audioio_h" "$ac_includes_default"
26902if test "x$ac_cv_header_sun_audioio_h" = xyes
26903then :
26904  printf "%s\n" "#define HAVE_SUN_AUDIOIO_H 1" >>confdefs.h
26905
26906fi
26907ac_fn_c_check_header_compile "$LINENO" "sys/audioio.h" "ac_cv_header_sys_audioio_h" "$ac_includes_default"
26908if test "x$ac_cv_header_sys_audioio_h" = xyes
26909then :
26910  printf "%s\n" "#define HAVE_SYS_AUDIOIO_H 1" >>confdefs.h
26911
26912fi
26913ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default"
26914if test "x$ac_cv_header_sys_file_h" = xyes
26915then :
26916  printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h
26917
26918fi
26919
26920case "$host" in
26921 *-*-sunos4*)
26922    ;;
26923 *)
26924    ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
26925if test "x$ac_cv_header_sys_ioctl_h" = xyes
26926then :
26927  printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
26928
26929fi
26930
26931    ;;
26932esac
26933ac_fn_c_check_header_compile "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default"
26934if test "x$ac_cv_header_sys_ipc_h" = xyes
26935then :
26936  printf "%s\n" "#define HAVE_SYS_IPC_H 1" >>confdefs.h
26937
26938fi
26939ac_fn_c_check_header_compile "$LINENO" "sys/lock.h" "ac_cv_header_sys_lock_h" "$ac_includes_default"
26940if test "x$ac_cv_header_sys_lock_h" = xyes
26941then :
26942  printf "%s\n" "#define HAVE_SYS_LOCK_H 1" >>confdefs.h
26943
26944fi
26945ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
26946if test "x$ac_cv_header_sys_mman_h" = xyes
26947then :
26948  printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h
26949
26950fi
26951
26952# HMS: Check sys/proc.h and sys/resource.h after some others
26953ac_fn_c_check_header_compile "$LINENO" "sys/modem.h" "ac_cv_header_sys_modem_h" "$ac_includes_default"
26954if test "x$ac_cv_header_sys_modem_h" = xyes
26955then :
26956  printf "%s\n" "#define HAVE_SYS_MODEM_H 1" >>confdefs.h
26957
26958fi
26959ac_fn_c_check_header_compile "$LINENO" "sys/ppsclock.h" "ac_cv_header_sys_ppsclock_h" "$ac_includes_default"
26960if test "x$ac_cv_header_sys_ppsclock_h" = xyes
26961then :
26962  printf "%s\n" "#define HAVE_SYS_PPSCLOCK_H 1" >>confdefs.h
26963
26964fi
26965ac_fn_c_check_header_compile "$LINENO" "sys/ppstime.h" "ac_cv_header_sys_ppstime_h" "$ac_includes_default"
26966if test "x$ac_cv_header_sys_ppstime_h" = xyes
26967then :
26968  printf "%s\n" "#define HAVE_SYS_PPSTIME_H 1" >>confdefs.h
26969
26970fi
26971ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default"
26972if test "x$ac_cv_header_sched_h" = xyes
26973then :
26974  printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h
26975
26976fi
26977
26978case "$ac_cv_header_sched_h" in
26979 yes)
26980    ;;
26981 *)
26982    ac_fn_c_check_header_compile "$LINENO" "sys/sched.h" "ac_cv_header_sys_sched_h" "$ac_includes_default"
26983if test "x$ac_cv_header_sys_sched_h" = xyes
26984then :
26985  printf "%s\n" "#define HAVE_SYS_SCHED_H 1" >>confdefs.h
26986
26987fi
26988
26989    ;;
26990esac
26991# HMS: Check sys/shm.h after some others
26992ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default"
26993if test "x$ac_cv_header_sys_select_h" = xyes
26994then :
26995  printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h
26996
26997fi
26998ac_fn_c_check_header_compile "$LINENO" "sys/signal.h" "ac_cv_header_sys_signal_h" "$ac_includes_default"
26999if test "x$ac_cv_header_sys_signal_h" = xyes
27000then :
27001  printf "%s\n" "#define HAVE_SYS_SIGNAL_H 1" >>confdefs.h
27002
27003fi
27004ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default"
27005if test "x$ac_cv_header_sys_sockio_h" = xyes
27006then :
27007  printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h
27008
27009fi
27010
27011# HMS: Checked sys/socket.h earlier
27012case "$host" in
27013 *-*-netbsd*)
27014    ;;
27015 *)
27016    ac_fn_c_check_header_compile "$LINENO" "machine/soundcard.h" "ac_cv_header_machine_soundcard_h" "$ac_includes_default"
27017if test "x$ac_cv_header_machine_soundcard_h" = xyes
27018then :
27019  printf "%s\n" "#define HAVE_MACHINE_SOUNDCARD_H 1" >>confdefs.h
27020
27021fi
27022ac_fn_c_check_header_compile "$LINENO" "sys/soundcard.h" "ac_cv_header_sys_soundcard_h" "$ac_includes_default"
27023if test "x$ac_cv_header_sys_soundcard_h" = xyes
27024then :
27025  printf "%s\n" "#define HAVE_SYS_SOUNDCARD_H 1" >>confdefs.h
27026
27027fi
27028
27029    ;;
27030esac
27031ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default"
27032if test "x$ac_cv_header_sys_stat_h" = xyes
27033then :
27034  printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h
27035
27036fi
27037ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default"
27038if test "x$ac_cv_header_sys_stream_h" = xyes
27039then :
27040  printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h
27041
27042fi
27043ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default"
27044if test "x$ac_cv_header_stropts_h" = xyes
27045then :
27046  printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h
27047
27048fi
27049ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default"
27050if test "x$ac_cv_header_sys_stropts_h" = xyes
27051then :
27052  printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h
27053
27054fi
27055ac_fn_c_check_header_compile "$LINENO" "sys/syssgi.h" "ac_cv_header_sys_syssgi_h" "$ac_includes_default"
27056if test "x$ac_cv_header_sys_syssgi_h" = xyes
27057then :
27058  printf "%s\n" "#define HAVE_SYS_SYSSGI_H 1" >>confdefs.h
27059
27060fi
27061
27062ac_fn_c_check_header_compile "$LINENO" "sys/systune.h" "ac_cv_header_sys_systune_h" "$ac_includes_default"
27063if test "x$ac_cv_header_sys_systune_h" = xyes
27064then :
27065  printf "%s\n" "#define HAVE_SYS_SYSTUNE_H 1" >>confdefs.h
27066
27067fi
27068ac_fn_c_check_header_compile "$LINENO" "sys/termios.h" "ac_cv_header_sys_termios_h" "$ac_includes_default"
27069if test "x$ac_cv_header_sys_termios_h" = xyes
27070then :
27071  printf "%s\n" "#define HAVE_SYS_TERMIOS_H 1" >>confdefs.h
27072
27073fi
27074ac_fn_c_check_header_compile "$LINENO" "sys/tpro.h" "ac_cv_header_sys_tpro_h" "$ac_includes_default"
27075if test "x$ac_cv_header_sys_tpro_h" = xyes
27076then :
27077  printf "%s\n" "#define HAVE_SYS_TPRO_H 1" >>confdefs.h
27078
27079fi
27080ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default"
27081if test "x$ac_cv_header_sys_wait_h" = xyes
27082then :
27083  printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
27084
27085fi
27086
27087ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
27088if test "x$ac_cv_func_waitpid" = xyes
27089then :
27090  printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h
27091
27092fi
27093
27094case "$host" in
27095*-convex-*)
27096    ac_fn_c_check_header_compile "$LINENO" "/sys/sync/queue.h" "ac_cv_header__sys_sync_queue_h" "$ac_includes_default"
27097if test "x$ac_cv_header__sys_sync_queue_h" = xyes
27098then :
27099  printf "%s\n" "#define HAVE__SYS_SYNC_QUEUE_H 1" >>confdefs.h
27100
27101fi
27102ac_fn_c_check_header_compile "$LINENO" "/sys/sync/sema.h" "ac_cv_header__sys_sync_sema_h" "$ac_includes_default"
27103if test "x$ac_cv_header__sys_sync_sema_h" = xyes
27104then :
27105  printf "%s\n" "#define HAVE__SYS_SYNC_SEMA_H 1" >>confdefs.h
27106
27107fi
27108
27109    ;;
27110*-*-bsdi*)
27111    ac_fn_c_check_header_compile "$LINENO" "machine/inline.h" "ac_cv_header_machine_inline_h" "$ac_includes_default"
27112if test "x$ac_cv_header_machine_inline_h" = xyes
27113then :
27114  printf "%s\n" "#define HAVE_MACHINE_INLINE_H 1" >>confdefs.h
27115
27116fi
27117ac_fn_c_check_header_compile "$LINENO" "sys/pcl720.h" "ac_cv_header_sys_pcl720_h" "$ac_includes_default"
27118if test "x$ac_cv_header_sys_pcl720_h" = xyes
27119then :
27120  printf "%s\n" "#define HAVE_SYS_PCL720_H 1" >>confdefs.h
27121
27122fi
27123ac_fn_c_check_header_compile "$LINENO" "sys/i8253.h" "ac_cv_header_sys_i8253_h" "$ac_includes_default"
27124if test "x$ac_cv_header_sys_i8253_h" = xyes
27125then :
27126  printf "%s\n" "#define HAVE_SYS_I8253_H 1" >>confdefs.h
27127
27128fi
27129
27130    ;;
27131esac
27132
27133case "$ac_cv_header_stdatomic_h" in
27134 yes)
27135	ac_fn_c_check_func "$LINENO" "atomic_thread_fence" "ac_cv_func_atomic_thread_fence"
27136if test "x$ac_cv_func_atomic_thread_fence" = xyes
27137then :
27138  printf "%s\n" "#define HAVE_ATOMIC_THREAD_FENCE 1" >>confdefs.h
27139
27140fi
27141
27142	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for atomic_thread_fence()" >&5
27143printf %s "checking for atomic_thread_fence()... " >&6; }
27144if test ${ntp_cv_func_atomic_thread_fence+y}
27145then :
27146  printf %s "(cached) " >&6
27147else $as_nop
27148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27149/* end confdefs.h.  */
27150
27151			#include <stdatomic.h>
27152
27153int
27154main (void)
27155{
27156
27157			atomic_thread_fence(memory_order_seq_cst);
27158
27159
27160  ;
27161  return 0;
27162}
27163_ACEOF
27164if ac_fn_c_try_compile "$LINENO"
27165then :
27166  ntp_cv_func_atomic_thread_fence=yes
27167else $as_nop
27168  ntp_cv_func_atomic_thread_fence=no
27169
27170fi
27171rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27172
27173fi
27174{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_atomic_thread_fence" >&5
27175printf "%s\n" "$ntp_cv_func_atomic_thread_fence" >&6; }
27176    ;;
27177esac
27178
27179case "$host" in
27180 *-*-solaris2.6)
27181    # Broken...
27182    ;;
27183 *)
27184    ac_fn_c_check_func "$LINENO" "ntp_adjtime" "ac_cv_func_ntp_adjtime"
27185if test "x$ac_cv_func_ntp_adjtime" = xyes
27186then :
27187  printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
27188
27189fi
27190ac_fn_c_check_func "$LINENO" "ntp_gettime" "ac_cv_func_ntp_gettime"
27191if test "x$ac_cv_func_ntp_gettime" = xyes
27192then :
27193  printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
27194
27195fi
27196
27197    ;;
27198esac
27199
27200case "$host" in
27201 *-*-*linux*)
27202    case "$ac_cv_func_ntp_gettime" in
27203     yes)
27204	;;
27205     *)
27206	ac_fn_c_check_func "$LINENO" "__ntp_gettime" "ac_cv_func___ntp_gettime"
27207if test "x$ac_cv_func___ntp_gettime" = xyes
27208then :
27209  printf "%s\n" "#define HAVE___NTP_GETTIME 1" >>confdefs.h
27210
27211fi
27212
27213	case "$ac_cv_func___ntp_gettime" in
27214	 yes)
27215
27216printf "%s\n" "#define ntp_gettime __ntp_gettime" >>confdefs.h
27217
27218
27219printf "%s\n" "#define HAVE_NTP_GETTIME 1" >>confdefs.h
27220
27221	esac
27222	;;
27223    esac
27224    ac_fn_c_check_func "$LINENO" "adjtimex" "ac_cv_func_adjtimex"
27225if test "x$ac_cv_func_adjtimex" = xyes
27226then :
27227  printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
27228
27229fi
27230
27231    case "$ac_cv_func_adjtimex" in
27232     yes)
27233
27234printf "%s\n" "#define ntp_adjtime adjtimex" >>confdefs.h
27235
27236
27237printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
27238
27239	have_adjtimex=1
27240	;;
27241     *)
27242	ac_fn_c_check_func "$LINENO" "__adjtimex" "ac_cv_func___adjtimex"
27243if test "x$ac_cv_func___adjtimex" = xyes
27244then :
27245  printf "%s\n" "#define HAVE___ADJTIMEX 1" >>confdefs.h
27246
27247fi
27248
27249	case "$ac_cv_func___adjtimex" in
27250	 yes)
27251
27252printf "%s\n" "#define ntp_adjtime __adjtimex" >>confdefs.h
27253
27254
27255printf "%s\n" "#define HAVE_NTP_ADJTIME 1" >>confdefs.h
27256
27257
27258printf "%s\n" "#define adjtimex __adjtimex" >>confdefs.h
27259
27260
27261printf "%s\n" "#define HAVE_ADJTIMEX 1" >>confdefs.h
27262
27263	    have_adjtimex=1
27264	esac
27265	;;
27266    esac
27267esac
27268case "$have_adjtimex" in
27269 '')
27270    # nlist stuff is only needed for tickadj.
27271    saved_LIBS="$LIBS"
27272    LIBS=
27273    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing nlist" >&5
27274printf %s "checking for library containing nlist... " >&6; }
27275if test ${ac_cv_search_nlist+y}
27276then :
27277  printf %s "(cached) " >&6
27278else $as_nop
27279  ac_func_search_save_LIBS=$LIBS
27280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27281/* end confdefs.h.  */
27282
27283/* Override any GCC internal prototype to avoid an error.
27284   Use char because int might match the return type of a GCC
27285   builtin and then its argument prototype would still apply.  */
27286char nlist ();
27287int
27288main (void)
27289{
27290return nlist ();
27291  ;
27292  return 0;
27293}
27294_ACEOF
27295for ac_lib in '' elf ld mld
27296do
27297  if test -z "$ac_lib"; then
27298    ac_res="none required"
27299  else
27300    ac_res=-l$ac_lib
27301    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27302  fi
27303  if ac_fn_c_try_link "$LINENO"
27304then :
27305  ac_cv_search_nlist=$ac_res
27306fi
27307rm -f core conftest.err conftest.$ac_objext conftest.beam \
27308    conftest$ac_exeext
27309  if test ${ac_cv_search_nlist+y}
27310then :
27311  break
27312fi
27313done
27314if test ${ac_cv_search_nlist+y}
27315then :
27316
27317else $as_nop
27318  ac_cv_search_nlist=no
27319fi
27320rm conftest.$ac_ext
27321LIBS=$ac_func_search_save_LIBS
27322fi
27323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nlist" >&5
27324printf "%s\n" "$ac_cv_search_nlist" >&6; }
27325ac_res=$ac_cv_search_nlist
27326if test "$ac_res" != no
27327then :
27328  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27329
27330fi
27331
27332    # XXX ac_cv_search_nlist will be 'none required', 'no', or '-l...'
27333    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing kvm_open" >&5
27334printf %s "checking for library containing kvm_open... " >&6; }
27335if test ${ac_cv_search_kvm_open+y}
27336then :
27337  printf %s "(cached) " >&6
27338else $as_nop
27339  ac_func_search_save_LIBS=$LIBS
27340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27341/* end confdefs.h.  */
27342
27343/* Override any GCC internal prototype to avoid an error.
27344   Use char because int might match the return type of a GCC
27345   builtin and then its argument prototype would still apply.  */
27346char kvm_open ();
27347int
27348main (void)
27349{
27350return kvm_open ();
27351  ;
27352  return 0;
27353}
27354_ACEOF
27355for ac_lib in '' kvm
27356do
27357  if test -z "$ac_lib"; then
27358    ac_res="none required"
27359  else
27360    ac_res=-l$ac_lib
27361    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
27362  fi
27363  if ac_fn_c_try_link "$LINENO"
27364then :
27365  ac_cv_search_kvm_open=$ac_res
27366fi
27367rm -f core conftest.err conftest.$ac_objext conftest.beam \
27368    conftest$ac_exeext
27369  if test ${ac_cv_search_kvm_open+y}
27370then :
27371  break
27372fi
27373done
27374if test ${ac_cv_search_kvm_open+y}
27375then :
27376
27377else $as_nop
27378  ac_cv_search_kvm_open=no
27379fi
27380rm conftest.$ac_ext
27381LIBS=$ac_func_search_save_LIBS
27382fi
27383{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kvm_open" >&5
27384printf "%s\n" "$ac_cv_search_kvm_open" >&6; }
27385ac_res=$ac_cv_search_kvm_open
27386if test "$ac_res" != no
27387then :
27388  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27389
27390fi
27391	    # XXX ac_cv_search_kvm_open will be 'none required', 'no', or '-l...'
27392    ac_fn_c_check_header_compile "$LINENO" "nlist.h" "ac_cv_header_nlist_h" "$ac_includes_default"
27393if test "x$ac_cv_header_nlist_h" = xyes
27394then :
27395  printf "%s\n" "#define HAVE_NLIST_H 1" >>confdefs.h
27396
27397fi
27398ac_fn_c_check_header_compile "$LINENO" "sys/var.h" "ac_cv_header_sys_var_h" "$ac_includes_default"
27399if test "x$ac_cv_header_sys_var_h" = xyes
27400then :
27401  printf "%s\n" "#define HAVE_SYS_VAR_H 1" >>confdefs.h
27402
27403fi
27404
27405    case "$ac_cv_header_nlist_h" in
27406     yes)
27407
27408printf "%s\n" "#define NLIST_STRUCT 1" >>confdefs.h
27409
27410	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for n_un in struct nlist" >&5
27411printf %s "checking for n_un in struct nlist... " >&6; }
27412if test ${ntp_cv_struct_nlist_n_un+y}
27413then :
27414  printf %s "(cached) " >&6
27415else $as_nop
27416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27417/* end confdefs.h.  */
27418
27419			#include <nlist.h>
27420
27421int
27422main (void)
27423{
27424
27425			struct nlist n;
27426			n.n_un.n_name = 0;
27427
27428
27429  ;
27430  return 0;
27431}
27432_ACEOF
27433if ac_fn_c_try_compile "$LINENO"
27434then :
27435  ntp_cv_struct_nlist_n_un=yes
27436else $as_nop
27437  ntp_cv_struct_nlist_n_un=no
27438
27439fi
27440rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27441
27442fi
27443{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_nlist_n_un" >&5
27444printf "%s\n" "$ntp_cv_struct_nlist_n_un" >&6; }
27445	case "$ntp_cv_struct_nlist_n_un" in
27446	 yes)
27447
27448printf "%s\n" "#define NLIST_NAME_UNION 1" >>confdefs.h
27449
27450	esac
27451    esac
27452
27453    LDADD_NLIST="$LIBS"
27454    LIBS="$saved_LIBS"
27455    { saved_LIBS=; unset saved_LIBS;}
27456esac
27457
27458ac_fn_c_check_header_compile "$LINENO" "sys/proc.h" "ac_cv_header_sys_proc_h" "
27459    #ifdef HAVE_SYS_TYPES_H
27460    # include <sys/types.h>
27461    #endif
27462    #ifdef HAVE_SYS_TIME_H
27463    # include <sys/time.h>
27464    #endif
27465
27466"
27467if test "x$ac_cv_header_sys_proc_h" = xyes
27468then :
27469  printf "%s\n" "#define HAVE_SYS_PROC_H 1" >>confdefs.h
27470
27471fi
27472
27473
27474ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "
27475    #ifdef HAVE_SYS_TIME_H
27476    # include <sys/time.h>
27477    #endif
27478
27479"
27480if test "x$ac_cv_header_sys_resource_h" = xyes
27481then :
27482  printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
27483
27484fi
27485
27486
27487ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "
27488    #ifdef HAVE_SYS_TYPES_H
27489    # include <sys/types.h>
27490    #endif
27491    #ifdef HAVE_SYS_IPC_H
27492    # include <sys/ipc.h>
27493    #endif
27494
27495"
27496if test "x$ac_cv_header_sys_shm_h" = xyes
27497then :
27498  printf "%s\n" "#define HAVE_SYS_SHM_H 1" >>confdefs.h
27499
27500fi
27501
27502
27503ac_fn_c_check_header_compile "$LINENO" "sys/timex.h" "ac_cv_header_sys_timex_h" "
27504    #ifdef HAVE_SYS_TIME_H
27505    # include <sys/time.h>
27506    #endif
27507
27508"
27509if test "x$ac_cv_header_sys_timex_h" = xyes
27510then :
27511  printf "%s\n" "#define HAVE_SYS_TIMEX_H 1" >>confdefs.h
27512
27513fi
27514
27515
27516
27517
27518# We could do a cv check here, but is it worth it?
27519
27520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27521/* end confdefs.h.  */
27522
27523    	#include <sys/socket.h>
27524	#ifndef AF_UNSPEC
27525	#include "Bletch: AF_UNSPEC is undefined!"
27526	#endif
27527	#if AF_UNSPEC != 0
27528	#include "Bletch: AF_UNSPEC != 0"
27529	#endif
27530
27531int
27532main (void)
27533{
27534{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: AF_UNSPEC is zero, as expected." >&5
27535printf "%s\n" "$as_me: AF_UNSPEC is zero, as expected." >&6;}
27536  ;
27537  return 0;
27538}
27539
27540_ACEOF
27541if ac_fn_c_try_compile "$LINENO"
27542then :
27543
27544fi
27545rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27546
27547{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
27548printf %s "checking return type of signal handlers... " >&6; }
27549if test ${ac_cv_type_signal+y}
27550then :
27551  printf %s "(cached) " >&6
27552else $as_nop
27553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27554/* end confdefs.h.  */
27555#include <sys/types.h>
27556#include <signal.h>
27557
27558int
27559main (void)
27560{
27561return *(signal (0, 0)) (0) == 1;
27562  ;
27563  return 0;
27564}
27565_ACEOF
27566if ac_fn_c_try_compile "$LINENO"
27567then :
27568  ac_cv_type_signal=int
27569else $as_nop
27570  ac_cv_type_signal=void
27571fi
27572rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27573fi
27574{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
27575printf "%s\n" "$ac_cv_type_signal" >&6; }
27576
27577printf "%s\n" "#define RETSIGTYPE $ac_cv_type_signal" >>confdefs.h
27578
27579
27580ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
27581if test "x$ac_cv_type_off_t" = xyes
27582then :
27583
27584else $as_nop
27585
27586printf "%s\n" "#define off_t long int" >>confdefs.h
27587
27588fi
27589
27590{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
27591printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; }
27592if test ${ac_cv_struct_tm+y}
27593then :
27594  printf %s "(cached) " >&6
27595else $as_nop
27596  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27597/* end confdefs.h.  */
27598#include <sys/types.h>
27599#include <time.h>
27600
27601int
27602main (void)
27603{
27604struct tm tm;
27605				     int *p = &tm.tm_sec;
27606				     return !p;
27607  ;
27608  return 0;
27609}
27610_ACEOF
27611if ac_fn_c_try_compile "$LINENO"
27612then :
27613  ac_cv_struct_tm=time.h
27614else $as_nop
27615  ac_cv_struct_tm=sys/time.h
27616fi
27617rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27618fi
27619{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
27620printf "%s\n" "$ac_cv_struct_tm" >&6; }
27621if test $ac_cv_struct_tm = sys/time.h; then
27622
27623printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
27624
27625fi
27626
27627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a fallback value for HZ" >&5
27628printf %s "checking for a fallback value for HZ... " >&6; }
27629if test ${ntp_cv_default_hz+y}
27630then :
27631  printf %s "(cached) " >&6
27632else $as_nop
27633
27634	ntp_cv_default_hz=100
27635	case "$host" in
27636	 alpha*-dec-osf4*|alpha*-dec-osf5*)
27637	    ntp_cv_default_hz=1024
27638	    ;;
27639	 mips-dec-ultrix4*)
27640	    ntp_cv_default_hz=256
27641	    ;;
27642	esac
27643
27644
27645fi
27646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_default_hz" >&5
27647printf "%s\n" "$ntp_cv_default_hz" >&6; }
27648
27649printf "%s\n" "#define DEFAULT_HZ $ntp_cv_default_hz" >>confdefs.h
27650
27651
27652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to override the system's value for HZ" >&5
27653printf %s "checking if we need to override the system's value for HZ... " >&6; }
27654if test ${ntp_cv_override_hz+y}
27655then :
27656  printf %s "(cached) " >&6
27657else $as_nop
27658
27659	ntp_cv_override_hz=no
27660	case "$host" in
27661	 alpha*-dec-osf4*|alpha*-dec-osf5*)
27662	    ntp_cv_override_hz=yes
27663	    ;;
27664	 mips-dec-ultrix4*)
27665	    ntp_cv_override_hz=yes
27666	    ;;
27667	 *-*-freebsd*)
27668	    ntp_cv_override_hz=yes
27669	    ;;
27670	 *-*-sunos4*)
27671	    ntp_cv_override_hz=yes
27672	    ;;
27673	 *-*-kfreebsd*)
27674	    ntp_cv_override_hz=yes
27675	    ;;
27676	esac
27677
27678
27679fi
27680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_override_hz" >&5
27681printf "%s\n" "$ntp_cv_override_hz" >&6; }
27682case "$ntp_cv_override_hz" in
27683 yes)
27684
27685printf "%s\n" "#define OVERRIDE_HZ 1" >>confdefs.h
27686
27687esac
27688
27689
27690
27691{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rt_msghdr" >&5
27692printf %s "checking for struct rt_msghdr... " >&6; }
27693if test ${ntp_cv_struct_rt_msghdr+y}
27694then :
27695  printf %s "(cached) " >&6
27696else $as_nop
27697  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27698/* end confdefs.h.  */
27699
27700		#include <sys/types.h>
27701		#include <sys/socket.h>
27702		#include <net/if.h>
27703		#include <net/route.h>
27704
27705int
27706main (void)
27707{
27708
27709		struct rt_msghdr p;
27710
27711
27712  ;
27713  return 0;
27714}
27715_ACEOF
27716if ac_fn_c_try_compile "$LINENO"
27717then :
27718  ntp_cv_struct_rt_msghdr=yes
27719else $as_nop
27720  ntp_cv_struct_rt_msghdr=no
27721
27722fi
27723rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27724
27725fi
27726{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_rt_msghdr" >&5
27727printf "%s\n" "$ntp_cv_struct_rt_msghdr" >&6; }
27728
27729{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct rtattr" >&5
27730printf %s "checking for struct rtattr... " >&6; }
27731if test ${ntp_cv_rtattr+y}
27732then :
27733  printf %s "(cached) " >&6
27734else $as_nop
27735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27736/* end confdefs.h.  */
27737
27738		#include <stddef.h>
27739		#include <sys/socket.h>
27740		#include <linux/rtnetlink.h>
27741
27742int
27743main (void)
27744{
27745
27746		struct rtattr p;
27747
27748
27749  ;
27750  return 0;
27751}
27752_ACEOF
27753if ac_fn_c_try_compile "$LINENO"
27754then :
27755  ntp_cv_rtattr=yes
27756else $as_nop
27757  ntp_cv_rtattr=no
27758
27759fi
27760rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27761
27762fi
27763{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rtattr" >&5
27764printf "%s\n" "$ntp_cv_rtattr" >&6; }
27765
27766case "$ntp_cv_struct_rt_msghdr$ntp_cv_rtattr" in
27767 *yes*)
27768
27769printf "%s\n" "#define HAS_ROUTING_SOCKET 1" >>confdefs.h
27770
27771    case "$ntp_cv_rtattr" in
27772     yes)
27773
27774printf "%s\n" "#define HAVE_RTNETLINK 1" >>confdefs.h
27775
27776    esac
27777esac
27778
27779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sigaction for sa_sigaction" >&5
27780printf %s "checking struct sigaction for sa_sigaction... " >&6; }
27781if test ${ntp_cv_struct_sigaction_has_sa_sigaction+y}
27782then :
27783  printf %s "(cached) " >&6
27784else $as_nop
27785  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27786/* end confdefs.h.  */
27787
27788		#include <signal.h>
27789
27790int
27791main (void)
27792{
27793
27794		struct sigaction act;
27795		act.sa_sigaction = 0;
27796
27797
27798  ;
27799  return 0;
27800}
27801_ACEOF
27802if ac_fn_c_try_compile "$LINENO"
27803then :
27804  ntp_cv_struct_sigaction_has_sa_sigaction=yes
27805else $as_nop
27806  ntp_cv_struct_sigaction_has_sa_sigaction=no
27807
27808fi
27809rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27810
27811fi
27812{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_sigaction_has_sa_sigaction" >&5
27813printf "%s\n" "$ntp_cv_struct_sigaction_has_sa_sigaction" >&6; }
27814case "$ntp_cv_struct_sigaction_has_sa_sigaction" in
27815 yes)
27816
27817printf "%s\n" "#define HAVE_SA_SIGACTION_IN_STRUCT_SIGACTION 1" >>confdefs.h
27818
27819esac
27820
27821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct ppsclockev" >&5
27822printf %s "checking for struct ppsclockev... " >&6; }
27823if test ${ntp_cv_struct_ppsclockev+y}
27824then :
27825  printf %s "(cached) " >&6
27826else $as_nop
27827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27828/* end confdefs.h.  */
27829
27830		#ifdef HAVE_SYS_TYPES_H
27831		# include <sys/types.h>
27832		#endif
27833		#ifdef HAVE_SYS_TERMIOS_H
27834		# include <sys/termios.h>
27835		#endif
27836		#ifdef HAVE_SYS_TIME_H
27837		# include <sys/time.h>
27838		#endif
27839		#ifdef HAVE_SYS_PPSCLOCK_H
27840		# include <sys/ppsclock.h>
27841		#endif
27842
27843int
27844main (void)
27845{
27846
27847		extern struct ppsclockev *pce;
27848		return pce->serial;
27849
27850
27851  ;
27852  return 0;
27853}
27854_ACEOF
27855if ac_fn_c_try_compile "$LINENO"
27856then :
27857  ntp_cv_struct_ppsclockev=yes
27858else $as_nop
27859  ntp_cv_struct_ppsclockev=no
27860
27861fi
27862rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27863
27864fi
27865{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_ppsclockev" >&5
27866printf "%s\n" "$ntp_cv_struct_ppsclockev" >&6; }
27867case "$ntp_cv_struct_ppsclockev" in
27868 yes)
27869
27870printf "%s\n" "#define HAVE_STRUCT_PPSCLOCKEV 1" >>confdefs.h
27871
27872esac
27873
27874case "$ac_cv_header_machine_soundcard_h$ac_cv_header_sys_soundcard_h" in
27875  *yes*)
27876    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct snd_size" >&5
27877printf %s "checking for struct snd_size... " >&6; }
27878if test ${ntp_cv_struct_snd_size+y}
27879then :
27880  printf %s "(cached) " >&6
27881else $as_nop
27882  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27883/* end confdefs.h.  */
27884
27885		    #ifdef HAVE_MACHINE_SOUNDCARD_H
27886		    # include <machine/soundcard.h>
27887		    #endif
27888		    #ifdef HAVE_SYS_SOUNDCARD_H
27889		    # include <sys/soundcard.h>
27890		    #endif
27891
27892int
27893main (void)
27894{
27895
27896		    extern struct snd_size *ss;
27897		    return ss->rec_size;
27898
27899
27900  ;
27901  return 0;
27902}
27903_ACEOF
27904if ac_fn_c_try_compile "$LINENO"
27905then :
27906  ntp_cv_struct_snd_size=yes
27907else $as_nop
27908  ntp_cv_struct_snd_size=no
27909
27910fi
27911rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27912
27913fi
27914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_snd_size" >&5
27915printf "%s\n" "$ntp_cv_struct_snd_size" >&6; }
27916    case "$ntp_cv_struct_snd_size" in
27917     yes)
27918
27919printf "%s\n" "#define HAVE_STRUCT_SND_SIZE 1" >>confdefs.h
27920
27921    esac
27922esac
27923
27924{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for hz" >&5
27925printf %s "checking struct clockinfo for hz... " >&6; }
27926if test ${ntp_cv_struct_clockinfo_has_hz+y}
27927then :
27928  printf %s "(cached) " >&6
27929else $as_nop
27930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27931/* end confdefs.h.  */
27932
27933		#include <sys/time.h>
27934
27935int
27936main (void)
27937{
27938
27939		extern struct clockinfo *pc;
27940		return pc->hz;
27941
27942
27943  ;
27944  return 0;
27945}
27946_ACEOF
27947if ac_fn_c_try_compile "$LINENO"
27948then :
27949  ntp_cv_struct_clockinfo_has_hz=yes
27950else $as_nop
27951  ntp_cv_struct_clockinfo_has_hz=no
27952
27953fi
27954rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27955
27956fi
27957{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
27958printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
27959case "$ntp_cv_struct_clockinfo_has_hz" in
27960 yes)
27961
27962printf "%s\n" "#define HAVE_HZ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
27963
27964esac
27965
27966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct clockinfo for tickadj" >&5
27967printf %s "checking struct clockinfo for tickadj... " >&6; }
27968if test ${ntp_cv_struct_clockinfo_has_hz+y}
27969then :
27970  printf %s "(cached) " >&6
27971else $as_nop
27972  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27973/* end confdefs.h.  */
27974
27975		#include <sys/time.h>
27976
27977int
27978main (void)
27979{
27980
27981		extern struct clockinfo *pc;
27982		return pc->tickadj;
27983
27984
27985  ;
27986  return 0;
27987}
27988_ACEOF
27989if ac_fn_c_try_compile "$LINENO"
27990then :
27991  ntp_cv_struct_clockinfo_has_hz=yes
27992else $as_nop
27993  ntp_cv_struct_clockinfo_has_hz=no
27994
27995fi
27996rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
27997
27998fi
27999{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_clockinfo_has_hz" >&5
28000printf "%s\n" "$ntp_cv_struct_clockinfo_has_hz" >&6; }
28001case "$ntp_cv_struct_clockinfo_has_hz" in
28002 yes)
28003
28004printf "%s\n" "#define HAVE_TICKADJ_IN_STRUCT_CLOCKINFO 1" >>confdefs.h
28005
28006esac
28007
28008case "$ntp_cv_struct_ntptimeval" in
28009 yes)
28010    ac_fn_c_check_member "$LINENO" "struct ntptimeval" "time.tv_nsec" "ac_cv_member_struct_ntptimeval_time_tv_nsec" "
28011	    #ifdef HAVE_SYS_TIME_H
28012	    # include <sys/time.h>
28013	    #else
28014	    # ifdef HAVE_TIME_H
28015	    #  include <time.h>
28016	    # endif
28017	    #endif
28018	    #ifdef HAVE_SYS_TIMEX_H
28019	    # include <sys/timex.h>
28020	    #else
28021	    # ifdef HAVE_TIMEX_H
28022	    #  include <timex.h>
28023	    # endif
28024	    #endif
28025
28026
28027"
28028if test "x$ac_cv_member_struct_ntptimeval_time_tv_nsec" = xyes
28029then :
28030
28031printf "%s\n" "#define HAVE_STRUCT_NTPTIMEVAL_TIME_TV_NSEC 1" >>confdefs.h
28032
28033
28034fi
28035
28036esac
28037
28038####
28039
28040ac_fn_c_check_func "$LINENO" "arc4random_buf" "ac_cv_func_arc4random_buf"
28041if test "x$ac_cv_func_arc4random_buf" = xyes
28042then :
28043  printf "%s\n" "#define HAVE_ARC4RANDOM_BUF 1" >>confdefs.h
28044
28045fi
28046
28047
28048####
28049
28050saved_LIBS="$LIBS"
28051LIBS="$LIBS $LDADD_LIBNTP"
28052ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
28053if test "x$ac_cv_func_daemon" = xyes
28054then :
28055  printf "%s\n" "#define HAVE_DAEMON 1" >>confdefs.h
28056
28057fi
28058
28059# XXX if we keep everything in LIBS and also keep separate lists, this simplifies.
28060LIBS="$saved_LIBS"
28061{ saved_LIBS=; unset saved_LIBS;}
28062
28063
28064  for ac_func in finite
28065do :
28066  ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite"
28067if test "x$ac_cv_func_finite" = xyes
28068then :
28069  printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h
28070
28071else $as_nop
28072
28073  for ac_func in isfinite
28074do :
28075  ac_fn_c_check_func "$LINENO" "isfinite" "ac_cv_func_isfinite"
28076if test "x$ac_cv_func_isfinite" = xyes
28077then :
28078  printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
28079
28080else $as_nop
28081
28082	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isfinite with <math.h>" >&5
28083printf %s "checking for isfinite with <math.h>... " >&6; }
28084	    _libs=$LIBS
28085	    # XXX
28086	    LIBS="$LIBS -lm"
28087	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28088/* end confdefs.h.  */
28089
28090			#include <math.h>
28091
28092int
28093main (void)
28094{
28095
28096			float f = 0.0;
28097			isfinite(f);
28098
28099
28100  ;
28101  return 0;
28102}
28103_ACEOF
28104if ac_fn_c_try_link "$LINENO"
28105then :
28106  ans=yes
28107else $as_nop
28108  ans=no
28109
28110fi
28111rm -f core conftest.err conftest.$ac_objext conftest.beam \
28112    conftest$ac_exeext conftest.$ac_ext
28113	    LIBS=$_libs
28114	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28115printf "%s\n" "$ans" >&6; }
28116	    case "$ans" in
28117	     yes)
28118		printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h
28119
28120	    esac
28121
28122
28123fi
28124
28125done
28126
28127fi
28128
28129done
28130
28131ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch"
28132if test "x$ac_cv_func_fnmatch" = xyes
28133then :
28134  printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h
28135
28136fi
28137ac_fn_c_check_func "$LINENO" "getbootfile" "ac_cv_func_getbootfile"
28138if test "x$ac_cv_func_getbootfile" = xyes
28139then :
28140  printf "%s\n" "#define HAVE_GETBOOTFILE 1" >>confdefs.h
28141
28142fi
28143ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid"
28144if test "x$ac_cv_func_getuid" = xyes
28145then :
28146  printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h
28147
28148fi
28149ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
28150if test "x$ac_cv_func_getrusage" = xyes
28151then :
28152  printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
28153
28154fi
28155ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
28156if test "x$ac_cv_func_nanosleep" = xyes
28157then :
28158  printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h
28159
28160fi
28161ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
28162if test "x$ac_cv_func_strsignal" = xyes
28163then :
28164  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
28165
28166fi
28167ac_fn_c_check_func "$LINENO" "strsignal" "ac_cv_func_strsignal"
28168if test "x$ac_cv_func_strsignal" = xyes
28169then :
28170  printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h
28171
28172fi
28173ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom"
28174if test "x$ac_cv_func_closefrom" = xyes
28175then :
28176  printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h
28177
28178fi
28179ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize"
28180if test "x$ac_cv_func_getdtablesize" = xyes
28181then :
28182  printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h
28183
28184fi
28185
28186
28187
28188# kvm_open() is only used by tickadj.  Also see above.
28189case "$ac_cv_header_kvm_h" in
28190 yes)
28191    ac_fn_c_check_func "$LINENO" "kvm_open" "ac_cv_func_kvm_open"
28192if test "x$ac_cv_func_kvm_open" = xyes
28193then :
28194  printf "%s\n" "#define HAVE_KVM_OPEN 1" >>confdefs.h
28195
28196fi
28197
28198    ;;
28199esac
28200
28201case "$host" in
28202 *-*-sco3.2v5.0.*)
28203    # Just stubs.  Sigh.
28204    ;;
28205 *) ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
28206if test "x$ac_cv_func_mkstemp" = xyes
28207then :
28208  printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h
28209
28210fi
28211
28212    ;;
28213esac
28214ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
28215if test "x$ac_cv_func_mktime" = xyes
28216then :
28217  printf "%s\n" "#define HAVE_MKTIME 1" >>confdefs.h
28218
28219fi
28220
28221case "$host" in
28222 *-*-aix[4-9]*)
28223    # XXX only verified thru AIX6.
28224    # Just a stub.  Sigh.
28225    ;;
28226 *-*-irix[45]*)
28227    # Just a stub in "old" Irix.  Sigh.
28228    ;;
28229# In the belief that the fix for bug 1223 fixes mlockall() under linux...
28230# *-*-*linux*)
28231#    # there, but more trouble than it is worth for now (resolver problems)
28232#    ;;
28233 *-*-qnx*)
28234    # Apparently there but not working in QNX.  Sigh?
28235    ;;
28236 *-*-sco3.2v5.0.*)
28237    # Just a stub.  Sigh.
28238    ;;
28239 alpha*-dec-osf4*|alpha*-dec-osf5*)
28240    # mlockall is there, as a #define calling memlk via <sys/mman.h>
28241    # Not easy to test for - cheat.
28242
28243  for ac_func in memlk
28244do :
28245  ac_fn_c_check_func "$LINENO" "memlk" "ac_cv_func_memlk"
28246if test "x$ac_cv_func_memlk" = xyes
28247then :
28248  printf "%s\n" "#define HAVE_MEMLK 1" >>confdefs.h
28249 ac_cv_func_mlockall=yes
28250fi
28251
28252done
28253    ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
28254if test "x$ac_cv_func_mlockall" = xyes
28255then :
28256  printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
28257
28258fi
28259
28260    ;;
28261 *) ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
28262if test "x$ac_cv_func_mlockall" = xyes
28263then :
28264  printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h
28265
28266fi
28267
28268    ;;
28269esac
28270ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
28271if test "x$ac_cv_func_nice" = xyes
28272then :
28273  printf "%s\n" "#define HAVE_NICE 1" >>confdefs.h
28274
28275fi
28276ac_fn_c_check_func "$LINENO" "plock" "ac_cv_func_plock"
28277if test "x$ac_cv_func_plock" = xyes
28278then :
28279  printf "%s\n" "#define HAVE_PLOCK 1" >>confdefs.h
28280
28281fi
28282ac_fn_c_check_func "$LINENO" "pututline" "ac_cv_func_pututline"
28283if test "x$ac_cv_func_pututline" = xyes
28284then :
28285  printf "%s\n" "#define HAVE_PUTUTLINE 1" >>confdefs.h
28286
28287fi
28288ac_fn_c_check_func "$LINENO" "pututxline" "ac_cv_func_pututxline"
28289if test "x$ac_cv_func_pututxline" = xyes
28290then :
28291  printf "%s\n" "#define HAVE_PUTUTXLINE 1" >>confdefs.h
28292
28293fi
28294ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
28295if test "x$ac_cv_func_readlink" = xyes
28296then :
28297  printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h
28298
28299fi
28300ac_fn_c_check_func "$LINENO" "rtprio" "ac_cv_func_rtprio"
28301if test "x$ac_cv_func_rtprio" = xyes
28302then :
28303  printf "%s\n" "#define HAVE_RTPRIO 1" >>confdefs.h
28304
28305fi
28306
28307
28308	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a POSIX-2008 compliant realpath()" >&5
28309printf %s "checking for a POSIX-2008 compliant realpath()... " >&6; }
28310
28311
28312	ac_ext=c
28313ac_cpp='$CPP $CPPFLAGS'
28314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28316ac_compiler_gnu=$ac_cv_c_compiler_gnu
28317
28318
28319	if test "$cross_compiling" = yes
28320then :
28321  ans="CROSS COMPILE!"
28322
28323else $as_nop
28324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28325/* end confdefs.h.  */
28326
28327			#include <sys/param.h>
28328			#include <stdlib.h>
28329			int main() { return (NULL == realpath(".", NULL)); }
28330
28331_ACEOF
28332if ac_fn_c_try_run "$LINENO"
28333then :
28334  ans="yes"
28335else $as_nop
28336  ans="no"
28337fi
28338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28339  conftest.$ac_objext conftest.beam conftest.$ac_ext
28340fi
28341
28342	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28343printf "%s\n" "$ans" >&6; }
28344	case "$ans" in
28345	 yes)
28346
28347printf "%s\n" "#define HAVE_FUNC_POSIX_REALPATH 1" >>confdefs.h
28348
28349	    ;;
28350	esac
28351
28352	ac_ext=c
28353ac_cpp='$CPP $CPPFLAGS'
28354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28356ac_compiler_gnu=$ac_cv_c_compiler_gnu
28357
28358
28359case "$host" in
28360 *-*-aix[4-9]*)
28361    # XXX only verified thru AIX6.
28362    # Just a stub in AIX 4.  Sigh.
28363    ;;
28364 *-*-solaris2.5*)
28365    # Just stubs in solaris2.5.  Sigh.
28366    ;;
28367 *) ac_fn_c_check_func "$LINENO" "sched_setscheduler" "ac_cv_func_sched_setscheduler"
28368if test "x$ac_cv_func_sched_setscheduler" = xyes
28369then :
28370  printf "%s\n" "#define HAVE_SCHED_SETSCHEDULER 1" >>confdefs.h
28371
28372fi
28373
28374    ;;
28375esac
28376ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
28377if test "x$ac_cv_func_setlinebuf" = xyes
28378then :
28379  printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h
28380
28381fi
28382ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
28383if test "x$ac_cv_func_setpgid" = xyes
28384then :
28385  printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
28386
28387fi
28388ac_fn_c_check_func "$LINENO" "setpriority" "ac_cv_func_setpriority"
28389if test "x$ac_cv_func_setpriority" = xyes
28390then :
28391  printf "%s\n" "#define HAVE_SETPRIORITY 1" >>confdefs.h
28392
28393fi
28394ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
28395if test "x$ac_cv_func_setsid" = xyes
28396then :
28397  printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h
28398
28399fi
28400ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf"
28401if test "x$ac_cv_func_setvbuf" = xyes
28402then :
28403  printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h
28404
28405fi
28406
28407ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
28408if test "x$ac_cv_func_strdup" = xyes
28409then :
28410  printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h
28411
28412fi
28413ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
28414if test "x$ac_cv_func_strnlen" = xyes
28415then :
28416  printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h
28417
28418fi
28419ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
28420if test "x$ac_cv_func_memchr" = xyes
28421then :
28422  printf "%s\n" "#define HAVE_MEMCHR 1" >>confdefs.h
28423
28424fi
28425ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
28426if test "x$ac_cv_func_strerror" = xyes
28427then :
28428  printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h
28429
28430fi
28431ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
28432if test "x$ac_cv_func_setrlimit" = xyes
28433then :
28434  printf "%s\n" "#define HAVE_SETRLIMIT 1" >>confdefs.h
28435
28436fi
28437ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr"
28438if test "x$ac_cv_func_strchr" = xyes
28439then :
28440  printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h
28441
28442fi
28443
28444case "$host" in
28445 *-*-aix[4-9]*)
28446    # XXX only verified thru AIX6.
28447    # Just stubs.  Sigh.
28448    ;;
28449 *-*-netbsd1*)
28450    # Just stubs.  Sigh.
28451    ;;
28452 *-*-netbsdelf1*)
28453    # Just stubs.  Sigh.
28454    ;;
28455 *-*-openbsd*)
28456    # Just stubs.  Sigh.
28457    ;;
28458 *)
28459    ac_fn_c_check_func "$LINENO" "timer_create" "ac_cv_func_timer_create"
28460if test "x$ac_cv_func_timer_create" = xyes
28461then :
28462  printf "%s\n" "#define HAVE_TIMER_CREATE 1" >>confdefs.h
28463
28464fi
28465
28466    ;;
28467esac
28468
28469
28470
28471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_MEMLOCK" >&5
28472printf %s "checking for RLIMIT_MEMLOCK... " >&6; }
28473if test ${ntp_cv_rlimit_memlock+y}
28474then :
28475  printf %s "(cached) " >&6
28476else $as_nop
28477  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28478/* end confdefs.h.  */
28479
28480		#ifdef HAVE_SYS_TYPES_H
28481		# include <sys/types.h>
28482		#endif
28483		#ifdef HAVE_SYS_TIME_H
28484		# include <sys/time.h>
28485		#endif
28486		#ifdef HAVE_SYS_RESOURCE_H
28487		# include <sys/resource.h>
28488		#endif
28489
28490int
28491main (void)
28492{
28493
28494		getrlimit(RLIMIT_MEMLOCK, 0);
28495
28496
28497  ;
28498  return 0;
28499}
28500_ACEOF
28501if ac_fn_c_try_compile "$LINENO"
28502then :
28503  ntp_cv_rlimit_memlock=yes
28504else $as_nop
28505  ntp_cv_rlimit_memlock=no
28506
28507fi
28508rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28509
28510fi
28511{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_memlock" >&5
28512printf "%s\n" "$ntp_cv_rlimit_memlock" >&6; }
28513case "$host" in
28514 *-*-*linux*)
28515    ntp_dflt_rlimit_memlock="-1" ;;
28516 *) ntp_dflt_rlimit_memlock="32" ;;
28517esac
28518case "$ntp_cv_rlimit_memlock" in
28519 yes)
28520
28521    HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock"  ;;
28522esac
28523
28524{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for RLIMIT_STACK" >&5
28525printf %s "checking for RLIMIT_STACK... " >&6; }
28526if test ${ntp_cv_rlimit_stack+y}
28527then :
28528  printf %s "(cached) " >&6
28529else $as_nop
28530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28531/* end confdefs.h.  */
28532
28533		#ifdef HAVE_SYS_TYPES_H
28534		# include <sys/types.h>
28535		#endif
28536		#ifdef HAVE_SYS_TIME_H
28537		# include <sys/time.h>
28538		#endif
28539		#ifdef HAVE_SYS_RESOURCE_H
28540		# include <sys/resource.h>
28541		#endif
28542
28543int
28544main (void)
28545{
28546
28547		getrlimit(RLIMIT_STACK, 0);
28548
28549
28550  ;
28551  return 0;
28552}
28553_ACEOF
28554if ac_fn_c_try_compile "$LINENO"
28555then :
28556  ntp_cv_rlimit_stack=yes
28557else $as_nop
28558  ntp_cv_rlimit_stack=no
28559
28560fi
28561rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28562
28563fi
28564{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rlimit_stack" >&5
28565printf "%s\n" "$ntp_cv_rlimit_stack" >&6; }
28566case "$ntp_cv_rlimit_stack" in
28567 yes)
28568
28569    HAVE_RLIMIT_STACK=" stacksize 50"
28570esac
28571
28572# HMS: Only if we are doing the MLOCKALL stuff...
28573{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of 4k stack pages" >&5
28574printf %s "checking for the default number of 4k stack pages... " >&6; }
28575
28576# Check whether --with-stack-limit was given.
28577if test ${with_stack_limit+y}
28578then :
28579  withval=$with_stack_limit; ans=$withval
28580else $as_nop
28581  ans=yes
28582
28583fi
28584
28585case "$ans" in
28586 yes | no)
28587    case "$host" in
28588     *-*-openbsd*)
28589	ans=200
28590	;;
28591     *) ans=50
28592        ;;
28593    esac
28594    ;;
28595 [1-9][0-9]*)
28596    ;;
28597 *) as_fn_error $? "\"--with-stack-limit requires an integer argument.\"" "$LINENO" 5
28598    ;;
28599esac
28600{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28601printf "%s\n" "$ans" >&6; }
28602
28603printf "%s\n" "#define DFLT_RLIMIT_STACK $ans" >>confdefs.h
28604
28605
28606# HMS: only if we have RLIMIT_MEMLOCK
28607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the default number of megabytes to MEMLOCK" >&5
28608printf %s "checking for the default number of megabytes to MEMLOCK... " >&6; }
28609
28610# Check whether --with-memlock was given.
28611if test ${with_memlock+y}
28612then :
28613  withval=$with_memlock; ans=$withval
28614else $as_nop
28615  ans=yes
28616
28617fi
28618
28619case "$ans" in
28620 yes | no)
28621    ans=$ntp_dflt_rlimit_memlock
28622    ;;
28623 [1-9][0-9]*) ;;
28624 *) as_fn_error $? "\"--with-memlock requires an integer argument.\"" "$LINENO" 5
28625     ;;
28626esac
28627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
28628printf "%s\n" "$ans" >&6; }
28629
28630printf "%s\n" "#define DFLT_RLIMIT_MEMLOCK $ans" >>confdefs.h
28631
28632
28633
28634
28635# some OSes prefer _exit() in forked children to exit()
28636ac_fn_c_check_func "$LINENO" "_exit" "ac_cv_func__exit"
28637if test "x$ac_cv_func__exit" = xyes
28638then :
28639  printf "%s\n" "#define HAVE__EXIT 1" >>confdefs.h
28640
28641fi
28642
28643ntp_worker_child_exit=exit
28644case "$ac_cv_func__exit::$host_os" in
28645 yes::netbsd*)
28646    ntp_worker_child_exit=_exit
28647    ;;
28648 yes::openbsd*)
28649    ntp_worker_child_exit=_exit
28650    ;;
28651esac
28652
28653printf "%s\n" "#define WORKER_CHILD_EXIT $ntp_worker_child_exit" >>confdefs.h
28654
28655
28656ac_fn_c_check_func "$LINENO" "umask" "ac_cv_func_umask"
28657if test "x$ac_cv_func_umask" = xyes
28658then :
28659  printf "%s\n" "#define HAVE_UMASK 1" >>confdefs.h
28660
28661fi
28662ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
28663if test "x$ac_cv_func_uname" = xyes
28664then :
28665  printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h
28666
28667fi
28668ac_fn_c_check_func "$LINENO" "updwtmp" "ac_cv_func_updwtmp"
28669if test "x$ac_cv_func_updwtmp" = xyes
28670then :
28671  printf "%s\n" "#define HAVE_UPDWTMP 1" >>confdefs.h
28672
28673fi
28674ac_fn_c_check_func "$LINENO" "updwtmpx" "ac_cv_func_updwtmpx"
28675if test "x$ac_cv_func_updwtmpx" = xyes
28676then :
28677  printf "%s\n" "#define HAVE_UPDWTMPX 1" >>confdefs.h
28678
28679fi
28680
28681
28682###
28683
28684# http://bugs.ntp.org/737
28685case "$ac_cv_func_recvmsg" in
28686 yes)
28687    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need extra help to define struct iovec" >&5
28688printf %s "checking if we need extra help to define struct iovec... " >&6; }
28689if test ${ntp_cv_struct_iovec_help+y}
28690then :
28691  printf %s "(cached) " >&6
28692else $as_nop
28693
28694	    compiled=no
28695	    for ntp_cv_struct_iovec_help in '0' '1'; do
28696		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28697/* end confdefs.h.  */
28698
28699			    #ifdef HAVE_SYS_TYPES_H
28700			    # include <sys/types.h>
28701			    #endif
28702			    #ifdef HAVE_SYS_SOCKET_H
28703			    # include <sys/socket.h>
28704			    #endif
28705			    #if $ntp_cv_struct_iovec_help
28706			    # include <sys/uio.h>
28707			    #endif
28708
28709int
28710main (void)
28711{
28712
28713			    void foo(void) {
28714				ssize_t x;
28715				int s = 0;
28716				struct iovec iov;
28717				struct msghdr mh;
28718				int flags = 0;
28719
28720				mh.msg_iov = &iov;
28721				x = recvmsg(s, &mh, flags);
28722			    }
28723
28724
28725  ;
28726  return 0;
28727}
28728_ACEOF
28729if ac_fn_c_try_compile "$LINENO"
28730then :
28731  compiled=yes ; break 1
28732fi
28733rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28734	    done
28735	    case "$compiled" in
28736	     no)
28737		ntp_cv_struct_iovec_help=0
28738	    esac
28739	    { compiled=; unset compiled;}
28740
28741
28742fi
28743{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_struct_iovec_help" >&5
28744printf "%s\n" "$ntp_cv_struct_iovec_help" >&6; }
28745    case "$ntp_cv_struct_iovec_help" in
28746     1)
28747
28748printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h
28749
28750    esac
28751esac
28752
28753{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking number of arguments taken by setpgrp()" >&5
28754printf %s "checking number of arguments taken by setpgrp()... " >&6; }
28755if test ${ntp_cv_func_setpgrp_nargs+y}
28756then :
28757  printf %s "(cached) " >&6
28758else $as_nop
28759  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28760/* end confdefs.h.  */
28761
28762		#ifdef HAVE_SYS_TYPES_H
28763		# include <sys/types.h>
28764		#endif
28765		#ifdef HAVE_UNISTD_H
28766		# include <unistd.h>
28767		#endif
28768
28769int
28770main (void)
28771{
28772
28773		setpgrp(0, 0);
28774
28775
28776  ;
28777  return 0;
28778}
28779_ACEOF
28780if ac_fn_c_try_compile "$LINENO"
28781then :
28782  ntp_cv_func_setpgrp_nargs=2
28783else $as_nop
28784  ntp_cv_func_setpgrp_nargs=0
28785
28786fi
28787rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28788
28789fi
28790{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_setpgrp_nargs" >&5
28791printf "%s\n" "$ntp_cv_func_setpgrp_nargs" >&6; }
28792case "$ntp_cv_func_setpgrp_nargs" in
28793 0)
28794
28795printf "%s\n" "#define HAVE_SETPGRP_0 1" >>confdefs.h
28796
28797esac
28798
28799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to declare 'errno'" >&5
28800printf %s "checking if we need to declare 'errno'... " >&6; }
28801if test ${ntp_cv_decl_errno+y}
28802then :
28803  printf %s "(cached) " >&6
28804else $as_nop
28805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28806/* end confdefs.h.  */
28807
28808		#ifdef HAVE_ERRNO_H
28809		# include <errno.h>
28810		#endif
28811
28812int
28813main (void)
28814{
28815
28816		errno = 0;
28817
28818
28819  ;
28820  return 0;
28821}
28822_ACEOF
28823if ac_fn_c_try_compile "$LINENO"
28824then :
28825  ntp_cv_decl_errno=no
28826else $as_nop
28827  ntp_cv_decl_errno=yes
28828
28829fi
28830rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28831
28832fi
28833{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_errno" >&5
28834printf "%s\n" "$ntp_cv_decl_errno" >&6; }
28835case "$ntp_cv_decl_errno" in
28836 yes)
28837
28838printf "%s\n" "#define DECL_ERRNO 1" >>confdefs.h
28839
28840esac
28841
28842{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we may declare 'h_errno'" >&5
28843printf %s "checking if we may declare 'h_errno'... " >&6; }
28844if test ${ntp_cv_decl_h_errno+y}
28845then :
28846  printf %s "(cached) " >&6
28847else $as_nop
28848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28849/* end confdefs.h.  */
28850
28851		#include <sys/types.h>
28852		#ifdef HAVE_NETINET_IN_H
28853		# include <netinet/in.h>
28854		#endif
28855		#ifdef HAVE_ARPA_NAMESER_H
28856		# include <arpa/nameser.h>
28857		#endif
28858		#ifdef HAVE_NETDB_H
28859		# include <netdb.h>
28860		#endif
28861		#ifdef HAVE_RESOLV_H
28862		# include <resolv.h>
28863		#endif
28864
28865int
28866main (void)
28867{
28868
28869		extern int h_errno;
28870
28871
28872  ;
28873  return 0;
28874}
28875_ACEOF
28876if ac_fn_c_try_compile "$LINENO"
28877then :
28878  ntp_cv_decl_h_errno=yes
28879else $as_nop
28880  ntp_cv_decl_h_errno=no
28881
28882fi
28883rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28884
28885fi
28886{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_h_errno" >&5
28887printf "%s\n" "$ntp_cv_decl_h_errno" >&6; }
28888case "$ntp_cv_decl_h_errno" in
28889 yes)
28890
28891printf "%s\n" "#define DECL_H_ERRNO 1" >>confdefs.h
28892
28893esac
28894
28895{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if declaring 'syscall()' is ok" >&5
28896printf %s "checking if declaring 'syscall()' is ok... " >&6; }
28897if test ${ntp_cv_decl_syscall+y}
28898then :
28899  printf %s "(cached) " >&6
28900else $as_nop
28901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28902/* end confdefs.h.  */
28903
28904		#ifdef HAVE_SYS_TYPES_H
28905		# include <sys/types.h>
28906		#endif
28907		#ifdef HAVE_UNISTD_H
28908		# include <unistd.h>
28909		#endif
28910
28911int
28912main (void)
28913{
28914
28915		extern int syscall (int, ...);
28916
28917
28918  ;
28919  return 0;
28920}
28921_ACEOF
28922if ac_fn_c_try_compile "$LINENO"
28923then :
28924  ntp_cv_decl_syscall=yes
28925else $as_nop
28926  ntp_cv_decl_syscall=no
28927
28928fi
28929rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
28930
28931fi
28932{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_decl_syscall" >&5
28933printf "%s\n" "$ntp_cv_decl_syscall" >&6; }
28934case "$ntp_cv_decl_syscall" in
28935 yes)
28936
28937printf "%s\n" "#define DECL_SYSCALL 1" >>confdefs.h
28938
28939esac
28940
28941case "$host" in
28942 *-*-aix4.3.*)
28943
28944printf "%s\n" "#define DECL_HSTRERROR_0 1" >>confdefs.h
28945		# Needed for XLC under AIX 4.3.2
28946    ;;
28947 *-*-mpeix*)
28948
28949printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
28950
28951
28952printf "%s\n" "#define DECL_INET_NTOA_0 1" >>confdefs.h
28953
28954
28955printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
28956
28957
28958printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
28959
28960
28961printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
28962
28963
28964printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
28965
28966
28967printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
28968
28969    ;;
28970 *-*-osf[45]*)
28971
28972printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
28973
28974
28975printf "%s\n" "#define DECL_STIME_1 1" >>confdefs.h
28976
28977    ;;
28978 *-*-qnx*)
28979
28980printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
28981
28982    ;;
28983 *-*-riscos4*)
28984
28985printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
28986
28987
28988printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
28989
28990
28991printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
28992
28993
28994printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
28995
28996
28997printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
28998
28999
29000printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29001
29002
29003printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
29004
29005
29006printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29007
29008
29009printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29010
29011
29012printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
29013
29014
29015printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
29016
29017
29018printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
29019
29020
29021printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29022
29023
29024printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
29025
29026
29027printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29028
29029
29030printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
29031
29032    ;;
29033 *-*-solaris2*)
29034
29035printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
29036
29037
29038printf "%s\n" "#define DECL_SETPRIORITY_1 1" >>confdefs.h
29039
29040    case "$host" in
29041     *-*-solaris2.4)
29042
29043printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29044
29045	;;
29046    esac
29047    ;;
29048 *-*-sunos4*)
29049
29050printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29051
29052
29053printf "%s\n" "#define DECL_BCOPY_0 1" >>confdefs.h
29054
29055
29056printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
29057
29058
29059printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
29060
29061
29062printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
29063
29064
29065printf "%s\n" "#define DECL_MEMMOVE_0 1" >>confdefs.h
29066
29067
29068printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29069
29070
29071printf "%s\n" "#define DECL_MKSTEMP_0 1" >>confdefs.h
29072
29073
29074printf "%s\n" "#define DECL_RENAME_0 1" >>confdefs.h
29075
29076
29077printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29078
29079
29080printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29081
29082
29083printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
29084
29085
29086printf "%s\n" "#define DECL_SIGVEC_0 1" >>confdefs.h
29087
29088    case "`basename $ac_cv_prog_CC`" in
29089     acc*) ;;
29090     *)
29091printf "%s\n" "#define DECL_STDIO_0 1" >>confdefs.h
29092
29093	;;
29094    esac
29095
29096printf "%s\n" "#define DECL_STRTOL_0 1" >>confdefs.h
29097
29098
29099printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29100
29101
29102printf "%s\n" "#define DECL_TIME_0 1" >>confdefs.h
29103
29104
29105printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29106
29107
29108printf "%s\n" "#define DECL_TOLOWER_0 1" >>confdefs.h
29109
29110
29111printf "%s\n" "#define DECL_TOUPPER_0 1" >>confdefs.h
29112
29113
29114printf "%s\n" "#define DECL_STRERROR_0 1" >>confdefs.h
29115
29116    ;;
29117 *-*-ultrix4*)
29118
29119printf "%s\n" "#define DECL_ADJTIME_0 1" >>confdefs.h
29120
29121
29122printf "%s\n" "#define DECL_BZERO_0 1" >>confdefs.h
29123
29124
29125printf "%s\n" "#define DECL_CFSETISPEED_0 1" >>confdefs.h
29126
29127
29128printf "%s\n" "#define DECL_IOCTL_0 1" >>confdefs.h
29129
29130
29131printf "%s\n" "#define DECL_IPC_0 1" >>confdefs.h
29132
29133
29134printf "%s\n" "#define DECL_MKTEMP_0 1" >>confdefs.h
29135
29136
29137printf "%s\n" "#define DECL_NLIST_0 1" >>confdefs.h
29138
29139
29140printf "%s\n" "#define DECL_PLOCK_0 1" >>confdefs.h
29141
29142
29143printf "%s\n" "#define DECL_SELECT_0 1" >>confdefs.h
29144
29145
29146printf "%s\n" "#define DECL_SETITIMER_0 1" >>confdefs.h
29147
29148
29149printf "%s\n" "#define DECL_SETPRIORITY_0 1" >>confdefs.h
29150
29151
29152printf "%s\n" "#define DECL_STIME_0 1" >>confdefs.h
29153
29154
29155printf "%s\n" "#define DECL_SYSLOG_0 1" >>confdefs.h
29156
29157
29158printf "%s\n" "#define DECL_TIMEOFDAY_0 1" >>confdefs.h
29159
29160    ;;
29161esac
29162
29163case "$host" in
29164 *-*-sco3.2*)
29165
29166printf "%s\n" "#define TERMIOS_NEEDS__SVID3 1" >>confdefs.h
29167
29168    ;;
29169esac
29170
29171case "$host" in
29172 *-*-hpux[567]*)
29173
29174printf "%s\n" "#define NEED_RCVBUF_SLOP 1" >>confdefs.h
29175
29176esac
29177
29178{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will open the broadcast socket" >&5
29179printf %s "checking if we will open the broadcast socket... " >&6; }
29180if test ${ntp_cv_var_open_bcast_socket+y}
29181then :
29182  printf %s "(cached) " >&6
29183else $as_nop
29184
29185	ans=yes
29186	case "$host" in
29187	 *-*-domainos)
29188	    ans=no
29189	esac
29190	ntp_cv_var_open_bcast_socket=$ans
29191
29192
29193fi
29194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_open_bcast_socket" >&5
29195printf "%s\n" "$ntp_cv_var_open_bcast_socket" >&6; }
29196case "$ntp_cv_var_open_bcast_socket" in
29197 yes)
29198
29199printf "%s\n" "#define OPEN_BCAST_SOCKET 1" >>confdefs.h
29200
29201esac
29202
29203case "$host" in
29204 *-*-hpux*)
29205
29206printf "%s\n" "#define NEED_HPUX_FINDCONFIG 1" >>confdefs.h
29207
29208esac
29209
29210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if process groups are set with -pid" >&5
29211printf %s "checking if process groups are set with -pid... " >&6; }
29212if test ${ntp_cv_arg_setpgrp_negpid+y}
29213then :
29214  printf %s "(cached) " >&6
29215else $as_nop
29216
29217	case "$host" in
29218	 *-*-hpux[567]*)
29219	    ans=no
29220	    ;;
29221	 *-*-hpux*)
29222	    ans=yes
29223	    ;;
29224	 *-*-*linux*)
29225	    ans=yes
29226	    ;;
29227	 *-*-sunos3*)
29228	    ans=yes
29229	    ;;
29230	 *-*-ultrix2*)
29231	    ans=yes
29232	    ;;
29233	 *)
29234	    ans=no
29235	    ;;
29236	esac
29237	ntp_cv_arg_setpgrp_negpid=$ans
29238
29239
29240fi
29241{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_arg_setpgrp_negpid" >&5
29242printf "%s\n" "$ntp_cv_arg_setpgrp_negpid" >&6; }
29243case "$ntp_cv_arg_setpgrp_negpid" in
29244 yes)
29245
29246printf "%s\n" "#define UDP_BACKWARDS_SETOWN 1" >>confdefs.h
29247
29248esac
29249
29250{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need a ctty for F_SETOWN" >&5
29251printf %s "checking if we need a ctty for F_SETOWN... " >&6; }
29252if test ${ntp_cv_func_ctty_for_f_setown+y}
29253then :
29254  printf %s "(cached) " >&6
29255else $as_nop
29256
29257	case "$host" in
29258	 *-*-bsdi[23]*)
29259	    ans=yes
29260	    ;;
29261	 *-*-freebsd*)
29262	    ans=yes
29263	    ;;
29264	# NetBSD versions prior to 3.99.8 require a CTTY for F_SETOWN,
29265	# while later versions will fail a ioctl(TIOCSCTTY, 0) call in
29266	# some cases and so should not have USE_FSETOWNCTTY.  "netbsd"
29267	# in $host may be followed by "aout", "ecoff", or "elf".
29268	 *-*-netbsd*[a-z]3.[0-8]*|*-*-netbsd*[a-z][0-2].*|*-*-netbsd*[a-z]3.99.[0-7])
29269	    ans=yes
29270	    ;;
29271	 *-*-netbsd3.[0-8]*|*-*-netbsd[0-2].*|*-*-netbsd3.99.[0-7])
29272	    ans=yes
29273	    ;;
29274	 *-*-openbsd*)
29275	    ans=yes
29276	    ;;
29277	 *-*-osf*)
29278	    ans=yes
29279	    ;;
29280	 *-*-darwin*)
29281	    ans=yes
29282	    ;;
29283	 *)
29284	    ans=no
29285	    ;;
29286	esac
29287	ntp_cv_func_ctty_for_f_setown=$ans
29288
29289
29290fi
29291{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_func_ctty_for_f_setown" >&5
29292printf "%s\n" "$ntp_cv_func_ctty_for_f_setown" >&6; }
29293case "$ntp_cv_func_ctty_for_f_setown" in
29294 yes)
29295
29296printf "%s\n" "#define USE_FSETOWNCTTY 1" >>confdefs.h
29297
29298esac
29299
29300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the OS clears cached routes when more specifics become available" >&5
29301printf %s "checking if the OS clears cached routes when more specifics become available... " >&6; }
29302if test ${ntp_cv_os_routeupdates+y}
29303then :
29304  printf %s "(cached) " >&6
29305else $as_nop
29306
29307	case "$host" in
29308	 *-*-netbsd*)
29309	    ans=yes
29310	    ;;
29311	 *)
29312	    ans=no
29313	    ;;
29314	esac
29315	ntp_cv_os_routeupdates=$ans
29316
29317
29318fi
29319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_routeupdates" >&5
29320printf "%s\n" "$ntp_cv_os_routeupdates" >&6; }
29321case "$ntp_cv_os_routeupdates" in
29322 yes)
29323
29324printf "%s\n" "#define OS_MISSES_SPECIFIC_ROUTE_UPDATES 1" >>confdefs.h
29325
29326esac
29327
29328{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the wildcard socket needs REUSEADDR to bind other addresses" >&5
29329printf %s "checking if the wildcard socket needs REUSEADDR to bind other addresses... " >&6; }
29330if test ${ntp_cv_os_wildcardreuse+y}
29331then :
29332  printf %s "(cached) " >&6
29333else $as_nop
29334
29335	case "$host" in
29336	 *-*-*linux*)
29337	    ans=yes
29338	    ;;
29339	 *) ans=no
29340	    ;;
29341	esac
29342	ntp_cv_os_wildcardreuse=$ans
29343
29344
29345fi
29346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_os_wildcardreuse" >&5
29347printf "%s\n" "$ntp_cv_os_wildcardreuse" >&6; }
29348case "$ntp_cv_os_wildcardreuse" in
29349 yes)
29350
29351printf "%s\n" "#define OS_NEEDS_REUSEADDR_FOR_IFADDRBIND 1" >>confdefs.h
29352
29353esac
29354
29355case "$host" in
29356 *-*-aix*)
29357
29358printf "%s\n" "#define NLIST_EXTRA_INDIRECTION 1" >>confdefs.h
29359
29360esac
29361
29362{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a minimum recommended value of tickadj" >&5
29363printf %s "checking for a minimum recommended value of tickadj... " >&6; }
29364if test ${ntp_cv_var_min_rec_tickadj+y}
29365then :
29366  printf %s "(cached) " >&6
29367else $as_nop
29368
29369	ans=no
29370	case "$host" in
29371	 *-*-aix*)
29372	    ans=40
29373	    ;;
29374	esac
29375	ntp_cv_var_min_rec_tickadj=$ans
29376
29377
29378fi
29379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_min_rec_tickadj" >&5
29380printf "%s\n" "$ntp_cv_var_min_rec_tickadj" >&6; }
29381case "$ntp_cv_var_min_rec_tickadj" in
29382 ''|no)
29383    ;;
29384 *)
29385
29386printf "%s\n" "#define MIN_REC_TICKADJ $ntp_cv_var_min_rec_tickadj" >>confdefs.h
29387
29388esac
29389
29390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the TTY code permits PARENB and IGNPAR" >&5
29391printf %s "checking if the TTY code permits PARENB and IGNPAR... " >&6; }
29392if test ${ntp_cv_no_parenb_ignpar+y}
29393then :
29394  printf %s "(cached) " >&6
29395else $as_nop
29396
29397	ans=no
29398	case "$host" in
29399	 i?86-*-*linux*)
29400	    ans=yes
29401	    ;;
29402	 mips-sgi-irix*)
29403	    ans=yes
29404	    ;;
29405	 i?86-*-freebsd[123].*)
29406	    ;;
29407	 i?86-*-freebsd*)
29408	    ans=yes
29409	    ;;
29410	 *-*-unicosmp*)
29411	    ans=yes
29412	    ;;
29413	esac
29414	ntp_cv_no_parenb_ignpar=$ans
29415
29416
29417fi
29418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_no_parenb_ignpar" >&5
29419printf "%s\n" "$ntp_cv_no_parenb_ignpar" >&6; }
29420case "$ntp_cv_no_parenb_ignpar" in
29421 yes)
29422
29423printf "%s\n" "#define NO_PARENB_IGNPAR 1" >>confdefs.h
29424
29425esac
29426
29427{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we're including processing time debugging code" >&5
29428printf %s "checking if we're including processing time debugging code... " >&6; }
29429# Check whether --enable-debug-timing was given.
29430if test ${enable_debug_timing+y}
29431then :
29432  enableval=$enable_debug_timing; ntp_ok=$enableval
29433else $as_nop
29434  ntp_ok=no
29435
29436fi
29437
29438case "$ntp_ok" in
29439 yes)
29440
29441printf "%s\n" "#define DEBUG_TIMING 1" >>confdefs.h
29442
29443esac
29444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29445printf "%s\n" "$ntp_ok" >&6; }
29446
29447{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a the number of minutes in a DST adjustment" >&5
29448printf %s "checking for a the number of minutes in a DST adjustment... " >&6; }
29449# Check whether --enable-dst-minutes was given.
29450if test ${enable_dst_minutes+y}
29451then :
29452  enableval=$enable_dst_minutes; ans=$enableval
29453else $as_nop
29454  ans=60
29455
29456fi
29457
29458
29459printf "%s\n" "#define DSTMINUTES $ans" >>confdefs.h
29460
29461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29462printf "%s\n" "$ans" >&6; }
29463
29464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpd will retry permanent DNS failures" >&5
29465printf %s "checking if ntpd will retry permanent DNS failures... " >&6; }
29466# Check whether --enable-ignore-dns-errors was given.
29467if test ${enable_ignore_dns_errors+y}
29468then :
29469  enableval=$enable_ignore_dns_errors; ans=$enableval
29470else $as_nop
29471  ans=no
29472
29473fi
29474
29475case "$ans" in
29476 yes)
29477
29478printf "%s\n" "#define IGNORE_DNS_ERRORS 1" >>confdefs.h
29479
29480esac
29481{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29482printf "%s\n" "$ans" >&6; }
29483
29484{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking availability of ntp_{adj,get}time()" >&5
29485printf %s "checking availability of ntp_{adj,get}time()... " >&6; }
29486if test ${ntp_cv_var_ntp_syscalls+y}
29487then :
29488  printf %s "(cached) " >&6
29489else $as_nop
29490
29491	ntp_cv_var_ntp_syscalls=no
29492	case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in
29493	 yesyes*)
29494	    ntp_cv_var_ntp_syscalls=libc
29495	    ;;
29496	 *yes)
29497	    ntp_cv_var_ntp_syscalls=inline
29498	    ;;
29499	 *)
29500	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29501/* end confdefs.h.  */
29502
29503			#include <sys/syscall.h>
29504			#if !defined(SYS_ntp_gettime) || !defined(SYS_ntp_adjtime)
29505			# error
29506			#endif
29507
29508_ACEOF
29509if ac_fn_c_try_cpp "$LINENO"
29510then :
29511  ntp_cv_var_ntp_syscalls=kernel
29512
29513fi
29514rm -f conftest.err conftest.i conftest.$ac_ext
29515	    ;;
29516	 esac
29517
29518
29519fi
29520{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_ntp_syscalls" >&5
29521printf "%s\n" "$ntp_cv_var_ntp_syscalls" >&6; }
29522case "$ntp_cv_var_ntp_syscalls" in
29523 libc)
29524
29525printf "%s\n" "#define NTP_SYSCALLS_LIBC 1" >>confdefs.h
29526
29527    ;;
29528 kernel)
29529
29530printf "%s\n" "#define NTP_SYSCALLS_STD 1" >>confdefs.h
29531
29532    ;;
29533esac
29534
29535{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sys/timex.h has STA_FLL" >&5
29536printf %s "checking if sys/timex.h has STA_FLL... " >&6; }
29537if test ${ntp_cv_var_sta_fll+y}
29538then :
29539  printf %s "(cached) " >&6
29540else $as_nop
29541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29542/* end confdefs.h.  */
29543
29544		#include <sys/timex.h>
29545		#ifndef STA_FLL
29546		# error
29547		#endif
29548
29549_ACEOF
29550if ac_fn_c_try_cpp "$LINENO"
29551then :
29552  ntp_cv_var_sta_fll=yes
29553else $as_nop
29554  ntp_cv_var_sta_fll=no
29555
29556fi
29557rm -f conftest.err conftest.i conftest.$ac_ext
29558
29559fi
29560{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_sta_fll" >&5
29561printf "%s\n" "$ntp_cv_var_sta_fll" >&6; }
29562
29563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have kernel PLL support" >&5
29564printf %s "checking if we have kernel PLL support... " >&6; }
29565if test ${ntp_cv_var_kernel_pll+y}
29566then :
29567  printf %s "(cached) " >&6
29568else $as_nop
29569  	case "$ac_cv_header_sys_timex_h$ntp_cv_struct_ntptimeval$ntp_cv_var_sta_fll$ntp_cv_var_ntp_syscalls" in
29570	 *no*)
29571	    ntp_cv_var_kernel_pll=no
29572	    ;;
29573	 *) ntp_cv_var_kernel_pll=yes
29574	    ;;
29575	esac
29576
29577
29578fi
29579{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_var_kernel_pll" >&5
29580printf "%s\n" "$ntp_cv_var_kernel_pll" >&6; }
29581case "$ntp_cv_var_kernel_pll" in
29582 yes)
29583
29584printf "%s\n" "#define KERNEL_PLL 1" >>confdefs.h
29585
29586esac
29587
29588{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SIOCGIFCONF returns buffer size in the buffer" >&5
29589printf %s "checking if SIOCGIFCONF returns buffer size in the buffer... " >&6; }
29590if test ${ntp_cv_size_returned_in_buffer+y}
29591then :
29592  printf %s "(cached) " >&6
29593else $as_nop
29594
29595	ans=no
29596	case "$host" in
29597	 *-fujitsu-uxp*)
29598	    ans=yes
29599	    ;;
29600	 *-ncr-sysv4*)
29601	    ans=yes
29602	    ;;
29603	 *-univel-sysv*)
29604	    ans=yes
29605	    ;;
29606	esac
29607	ntp_cv_size_returned_in_buffer=$ans
29608
29609
29610fi
29611{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_size_returned_in_buffer" >&5
29612printf "%s\n" "$ntp_cv_size_returned_in_buffer" >&6; }
29613case "$ntp_cv_size_returned_in_buffer" in
29614 yes)
29615
29616printf "%s\n" "#define SIZE_RETURNED_IN_BUFFER 1" >>confdefs.h
29617
29618esac
29619
29620# Check for ioctls TIOCGPPSEV
29621{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCGPPSEV" >&5
29622printf %s "checking for TTY PPS ioctl TIOCGPPSEV... " >&6; }
29623case "$ac_cv_header_termios_h" in
29624 yes)
29625    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29626/* end confdefs.h.  */
29627
29628	    #include <termios.h>
29629	    #ifndef TIOCGPPSEV
29630	    # error
29631	    #endif
29632
29633_ACEOF
29634if ac_fn_c_try_cpp "$LINENO"
29635then :
29636  ntp_ok=yes
29637else $as_nop
29638  ntp_ok=no
29639
29640fi
29641rm -f conftest.err conftest.i conftest.$ac_ext
29642    ;;
29643 *)
29644    ntp_ok=no
29645    ;;
29646esac
29647case "$ntp_ok" in
29648 yes)
29649
29650printf "%s\n" "#define HAVE_TIOCGPPSEV 1" >>confdefs.h
29651
29652esac
29653{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29654printf "%s\n" "$ntp_ok" >&6; }
29655
29656# Check for ioctls TIOCSPPS
29657{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl TIOCSPPS" >&5
29658printf %s "checking for TTY PPS ioctl TIOCSPPS... " >&6; }
29659case "$ac_cv_header_termios_h" in
29660 yes)
29661    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29662/* end confdefs.h.  */
29663
29664	    #include <termios.h>
29665	    #ifndef TIOCSPPS
29666	    # error
29667	    #endif
29668
29669_ACEOF
29670if ac_fn_c_try_cpp "$LINENO"
29671then :
29672  ntp_ok=yes
29673else $as_nop
29674  ntp_ok=no
29675
29676fi
29677rm -f conftest.err conftest.i conftest.$ac_ext
29678    ;;
29679 *)
29680    ntp_ok=no
29681    ;;
29682esac
29683case "$ntp_ok" in
29684 yes)
29685
29686printf "%s\n" "#define HAVE_TIOCSPPS 1" >>confdefs.h
29687
29688esac
29689{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29690printf "%s\n" "$ntp_ok" >&6; }
29691
29692# Check for ioctls CIOGETEV
29693{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TTY PPS ioctl CIOGETEV" >&5
29694printf %s "checking for TTY PPS ioctl CIOGETEV... " >&6; }
29695case "$ac_cv_header_sys_ppsclock_h" in
29696 yes)
29697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29698/* end confdefs.h.  */
29699
29700	    #include <sys/ppsclock.h>
29701	    #ifndef CIOGETEV
29702	    # error
29703	    #endif
29704
29705_ACEOF
29706if ac_fn_c_try_cpp "$LINENO"
29707then :
29708  ntp_ok=yes
29709else $as_nop
29710  ntp_ok=no
29711
29712fi
29713rm -f conftest.err conftest.i conftest.$ac_ext
29714    ;;
29715 *)
29716    ntp_ok=no
29717    ;;
29718esac
29719case "$ntp_ok" in
29720 yes)
29721
29722printf "%s\n" "#define HAVE_CIOGETEV 1" >>confdefs.h
29723
29724esac
29725{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29726printf "%s\n" "$ntp_ok" >&6; }
29727
29728# ATOM/PPSAPI stuff.
29729
29730ntp_atom_ok=yes
29731
29732# Check for header timepps.h, if found then we have PPS API (Draft RFC) stuff.
29733
29734# The PPSAPI headers need "inline" ($ac_cv_c_inline='inline')
29735# The PPSAPI needs struct timespec.
29736# The PPSAPI also needs a timepps header.
29737
29738case "$ac_cv_c_inline$ntp_cv_struct_timespec" in
29739 inlineyes)
29740    case "$ac_cv_header_timepps_h$ac_cv_header_sys_timepps_h$host_os" in
29741     *yes* | *sunos* | *solaris* | *sco* | *netbsd* )
29742
29743printf "%s\n" "#define HAVE_PPSAPI 1" >>confdefs.h
29744
29745	ntp_jupiter_ok=yes
29746	ntp_oncore_ok=yes
29747	ntp_parse_ok=yes
29748	ntp_ripe_ncc_ok=yes
29749	;;
29750    esac
29751    ;;
29752esac
29753
29754# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
29755ac_fn_c_check_header_compile "$LINENO" "linux/serial.h" "ac_cv_header_linux_serial_h" "$ac_includes_default"
29756if test "x$ac_cv_header_linux_serial_h" = xyes
29757then :
29758
29759fi
29760
29761case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
29762  yesyes)
29763    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG" >&5
29764printf %s "checking ioctl TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG... " >&6; }
29765    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29766/* end confdefs.h.  */
29767
29768	    #include <sys/time.h>
29769	    typedef int u_int;
29770	    #include <sys/ppsclock.h>
29771	    #include <linux/serial.h>
29772
29773	    #ifndef TIOCGSERIAL
29774	    # error
29775	    #endif
29776	    #ifndef TIOCSSERIAL
29777	    # error
29778	    #endif
29779	    #ifndef ASYNC_PPS_CD_POS
29780	    # error
29781	    #endif
29782	    #ifndef ASYNC_PPS_CD_NEG
29783	    # error
29784	    #endif
29785	    #ifndef CIOGETEV
29786	    # error
29787	    #endif
29788
29789_ACEOF
29790if ac_fn_c_try_cpp "$LINENO"
29791then :
29792  ntp_ok=yes
29793else $as_nop
29794  ntp_ok=no
29795
29796fi
29797rm -f conftest.err conftest.i conftest.$ac_ext
29798    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29799printf "%s\n" "$ntp_ok" >&6; }
29800    ;;
29801  *)
29802    ntp_ok=no
29803    ;;
29804esac
29805case "$ntp_ok" in
29806 yes)
29807
29808printf "%s\n" "#define HAVE_TIO_SERIAL_STUFF 1" >>confdefs.h
29809
29810esac
29811
29812# Check for SHMEM_STATUS support
29813{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SHMEM_STATUS support" >&5
29814printf %s "checking SHMEM_STATUS support... " >&6; }
29815case "$ac_cv_header_sys_mman_h" in
29816 yes)
29817    ntp_ok=yes
29818    ;;
29819 *)
29820    ntp_ok=no
29821    ;;
29822esac
29823case "$ntp_ok" in
29824 yes)
29825
29826printf "%s\n" "#define ONCORE_SHMEM_STATUS 1" >>confdefs.h
29827
29828esac
29829{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29830printf "%s\n" "$ntp_ok" >&6; }
29831
29832ntp_refclock=no
29833
29834# HPUX only, and by explicit request
29835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum/Bancomm bc635/VME interface" >&5
29836printf %s "checking Datum/Bancomm bc635/VME interface... " >&6; }
29837# Check whether --enable-BANCOMM was given.
29838if test ${enable_BANCOMM+y}
29839then :
29840  enableval=$enable_BANCOMM; ntp_ok=$enableval
29841else $as_nop
29842  ntp_ok=no
29843
29844fi
29845
29846case "$ntp_ok" in
29847 yes)
29848    ntp_refclock=yes
29849
29850printf "%s\n" "#define CLOCK_BANC 1" >>confdefs.h
29851
29852    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing bcStartPci" >&5
29853printf %s "checking for library containing bcStartPci... " >&6; }
29854if test ${ac_cv_search_bcStartPci+y}
29855then :
29856  printf %s "(cached) " >&6
29857else $as_nop
29858  ac_func_search_save_LIBS=$LIBS
29859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29860/* end confdefs.h.  */
29861
29862/* Override any GCC internal prototype to avoid an error.
29863   Use char because int might match the return type of a GCC
29864   builtin and then its argument prototype would still apply.  */
29865char bcStartPci ();
29866int
29867main (void)
29868{
29869return bcStartPci ();
29870  ;
29871  return 0;
29872}
29873_ACEOF
29874for ac_lib in '' bcsdk
29875do
29876  if test -z "$ac_lib"; then
29877    ac_res="none required"
29878  else
29879    ac_res=-l$ac_lib
29880    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
29881  fi
29882  if ac_fn_c_try_link "$LINENO"
29883then :
29884  ac_cv_search_bcStartPci=$ac_res
29885fi
29886rm -f core conftest.err conftest.$ac_objext conftest.beam \
29887    conftest$ac_exeext
29888  if test ${ac_cv_search_bcStartPci+y}
29889then :
29890  break
29891fi
29892done
29893if test ${ac_cv_search_bcStartPci+y}
29894then :
29895
29896else $as_nop
29897  ac_cv_search_bcStartPci=no
29898fi
29899rm conftest.$ac_ext
29900LIBS=$ac_func_search_save_LIBS
29901fi
29902{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bcStartPci" >&5
29903printf "%s\n" "$ac_cv_search_bcStartPci" >&6; }
29904ac_res=$ac_cv_search_bcStartPci
29905if test "$ac_res" != no
29906then :
29907  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29908
29909fi
29910
29911    ;;
29912esac
29913{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29914printf "%s\n" "$ntp_ok" >&6; }
29915case "$ntp_ok$host" in
29916 yes*-*-hpux*) ;;
29917 yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29918printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
29919esac
29920
29921#HPUX only, and only by explicit request
29922{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime GPS receiver/VME interface" >&5
29923printf %s "checking TrueTime GPS receiver/VME interface... " >&6; }
29924# Check whether --enable-GPSVME was given.
29925if test ${enable_GPSVME+y}
29926then :
29927  enableval=$enable_GPSVME; ntp_ok=$enableval
29928else $as_nop
29929  ntp_ok=no
29930
29931fi
29932
29933case "$ntp_ok" in
29934 yes)
29935    ntp_refclock=yes
29936
29937printf "%s\n" "#define CLOCK_GPSVME 1" >>confdefs.h
29938
29939    ;;
29940esac
29941{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
29942printf "%s\n" "$ntp_ok" >&6; }
29943case "$ntp_ok$host" in
29944 yes*-*-hpux*) ;;
29945 yes*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
29946printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;} ;;
29947esac
29948
29949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PCL720 clock support" >&5
29950printf %s "checking for PCL720 clock support... " >&6; }
29951case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
29952 yesyesyes)
29953
29954printf "%s\n" "#define CLOCK_PPS720 1" >>confdefs.h
29955
29956    ans=yes
29957    ;;
29958 *)
29959    ans=no
29960    ;;
29961esac
29962{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
29963printf "%s\n" "$ans" >&6; }
29964
29965{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable non-PARSE clocks" >&5
29966printf %s "checking for default inclusion of all suitable non-PARSE clocks... " >&6; }
29967# Check whether --enable-all-clocks was given.
29968if test ${enable_all_clocks+y}
29969then :
29970  enableval=$enable_all_clocks; ntp_eac=$enableval
29971else $as_nop
29972  ntp_eac=yes
29973
29974fi
29975
29976{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eac" >&5
29977printf "%s\n" "$ntp_eac" >&6; }
29978
29979# HMS: Should we also require ntp_parse_ok?
29980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for PARSE clocks" >&5
29981printf %s "checking if we have support for PARSE clocks... " >&6; }
29982case "$ntp_atom_ok$ac_cv_header_termio_h$ac_cv_header_termios_h" in
29983 yes*yes*)
29984    ntp_canparse=yes
29985    ;;
29986 *) ntp_canparse=no
29987    ;;
29988esac
29989{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canparse" >&5
29990printf "%s\n" "$ntp_canparse" >&6; }
29991
29992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for audio clocks" >&5
29993printf %s "checking if we have support for audio clocks... " >&6; }
29994case "$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
29995 *yes*)
29996    ntp_canaudio=yes
29997
29998printf "%s\n" "#define HAVE_AUDIO /**/" >>confdefs.h
29999
30000    ;;
30001 *) ntp_canaudio=no ;;
30002esac
30003{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canaudio" >&5
30004printf "%s\n" "$ntp_canaudio" >&6; }
30005
30006{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we have support for the SHM refclock interface" >&5
30007printf %s "checking if we have support for the SHM refclock interface... " >&6; }
30008case "$ac_cv_header_sys_ipc_h$ac_cv_header_sys_shm_h" in
30009 yesyes)
30010    ntp_canshm=yes
30011    ;;
30012 *) ntp_canshm=no ;;
30013esac
30014{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_canshm" >&5
30015printf "%s\n" "$ntp_canshm" >&6; }
30016
30017# Test for termios TIOCMBIS modem control (ACTS, Heath, Palisade)
30018{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for termios modem control" >&5
30019printf %s "checking for termios modem control... " >&6; }
30020if test ${ntp_cv_modem_control+y}
30021then :
30022  printf %s "(cached) " >&6
30023else $as_nop
30024  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30025/* end confdefs.h.  */
30026
30027		#ifdef HAVE_UNISTD_H
30028		# include <unistd.h>
30029		#endif
30030		#ifdef HAVE_TERMIOS_H
30031		# include <termios.h>
30032		#endif
30033		#ifdef HAVE_SYS_IOCTL_H
30034		# include <sys/ioctl.h>
30035		#endif
30036
30037int
30038main (void)
30039{
30040
30041		int	dtr = TIOCM_DTR;
30042
30043		ioctl(1, TIOCMBIS, (char *)&dtr);
30044
30045
30046  ;
30047  return 0;
30048}
30049_ACEOF
30050if ac_fn_c_try_compile "$LINENO"
30051then :
30052  ntp_cv_modem_control=yes
30053else $as_nop
30054  ntp_cv_modem_control=no
30055
30056fi
30057rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
30058
30059fi
30060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_modem_control" >&5
30061printf "%s\n" "$ntp_cv_modem_control" >&6; }
30062case "$ntp_eac::$ntp_cv_modem_control" in
30063 yes::yes)
30064    ntp_enable_all_modem_control_clocks=yes
30065    ;;
30066 *)
30067    ntp_enable_all_modem_control_clocks=no
30068    ;;
30069esac
30070
30071# Requires modem control
30072{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ACTS modem service" >&5
30073printf %s "checking ACTS modem service... " >&6; }
30074# Check whether --enable-ACTS was given.
30075if test ${enable_ACTS+y}
30076then :
30077  enableval=$enable_ACTS; ntp_ok=$enableval
30078else $as_nop
30079  ntp_ok=$ntp_enable_all_modem_control_clocks
30080
30081fi
30082
30083case "$ntp_ok" in
30084 yes)
30085    ntp_refclock=yes
30086
30087printf "%s\n" "#define CLOCK_ACTS 1" >>confdefs.h
30088
30089    ;;
30090esac
30091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30092printf "%s\n" "$ntp_ok" >&6; }
30093
30094{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arbiter 1088A/B GPS receiver" >&5
30095printf %s "checking Arbiter 1088A/B GPS receiver... " >&6; }
30096# Check whether --enable-ARBITER was given.
30097if test ${enable_ARBITER+y}
30098then :
30099  enableval=$enable_ARBITER; ntp_ok=$enableval
30100else $as_nop
30101  ntp_ok=$ntp_eac
30102
30103fi
30104
30105case "$ntp_ok" in
30106 yes)
30107    ntp_refclock=yes
30108
30109printf "%s\n" "#define CLOCK_ARBITER 1" >>confdefs.h
30110
30111    ;;
30112esac
30113{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30114printf "%s\n" "$ntp_ok" >&6; }
30115
30116{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Arcron MSF receiver" >&5
30117printf %s "checking Arcron MSF receiver... " >&6; }
30118# Check whether --enable-ARCRON_MSF was given.
30119if test ${enable_ARCRON_MSF+y}
30120then :
30121  enableval=$enable_ARCRON_MSF; ntp_ok=$enableval
30122else $as_nop
30123  ntp_ok=$ntp_eac
30124
30125fi
30126
30127case "$ntp_ok" in
30128 yes)
30129    ntp_refclock=yes
30130
30131printf "%s\n" "#define CLOCK_ARCRON_MSF 1" >>confdefs.h
30132
30133    ;;
30134esac
30135{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30136printf "%s\n" "$ntp_ok" >&6; }
30137
30138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Austron 2200A/2201A GPS receiver" >&5
30139printf %s "checking Austron 2200A/2201A GPS receiver... " >&6; }
30140# Check whether --enable-AS2201 was given.
30141if test ${enable_AS2201+y}
30142then :
30143  enableval=$enable_AS2201; ntp_ok=$enableval
30144else $as_nop
30145  ntp_ok=$ntp_eac
30146
30147fi
30148
30149case "$ntp_ok" in
30150 yes)
30151    ntp_refclock=yes
30152
30153printf "%s\n" "#define CLOCK_AS2201 1" >>confdefs.h
30154
30155    ;;
30156esac
30157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30158printf "%s\n" "$ntp_ok" >&6; }
30159
30160{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ATOM PPS interface" >&5
30161printf %s "checking ATOM PPS interface... " >&6; }
30162# Check whether --enable-ATOM was given.
30163if test ${enable_ATOM+y}
30164then :
30165  enableval=$enable_ATOM; ntp_ok=$enableval
30166else $as_nop
30167  ntp_ok=$ntp_eac
30168
30169fi
30170
30171case "$ntp_atom_ok" in
30172 no) ntp_ok=no ;;
30173esac
30174case "$ntp_ok" in
30175 yes)
30176    ntp_refclock=yes
30177
30178printf "%s\n" "#define CLOCK_ATOM 1" >>confdefs.h
30179
30180    ;;
30181esac
30182{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30183printf "%s\n" "$ntp_ok" >&6; }
30184
30185{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Chrono-log K-series WWVB receiver" >&5
30186printf %s "checking Chrono-log K-series WWVB receiver... " >&6; }
30187# Check whether --enable-CHRONOLOG was given.
30188if test ${enable_CHRONOLOG+y}
30189then :
30190  enableval=$enable_CHRONOLOG; ntp_ok=$enableval
30191else $as_nop
30192  ntp_ok=$ntp_eac
30193
30194fi
30195
30196case "$ntp_ok" in
30197 yes)
30198    ntp_refclock=yes
30199
30200printf "%s\n" "#define CLOCK_CHRONOLOG 1" >>confdefs.h
30201
30202    ;;
30203esac
30204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30205printf "%s\n" "$ntp_ok" >&6; }
30206
30207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU modem/decoder" >&5
30208printf %s "checking CHU modem/decoder... " >&6; }
30209# Check whether --enable-CHU was given.
30210if test ${enable_CHU+y}
30211then :
30212  enableval=$enable_CHU; ntp_ok=$enableval
30213else $as_nop
30214  ntp_ok=$ntp_eac
30215
30216fi
30217
30218case "$ntp_ok" in
30219 yes)
30220    ntp_refclock=yes
30221
30222printf "%s\n" "#define CLOCK_CHU 1" >>confdefs.h
30223
30224    ;;
30225esac
30226{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30227printf "%s\n" "$ntp_ok" >&6; }
30228ntp_refclock_chu=$ntp_ok
30229
30230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CHU audio/decoder" >&5
30231printf %s "checking CHU audio/decoder... " >&6; }
30232# Check whether --enable-AUDIO-CHU was given.
30233if test ${enable_AUDIO_CHU+y}
30234then :
30235  enableval=$enable_AUDIO_CHU; ntp_ok=$enableval
30236else $as_nop
30237
30238	case "$ntp_eac$ntp_refclock_chu$ntp_canaudio" in
30239	 *no*)	ntp_ok=no  ;;
30240	 *)	ntp_ok=yes ;;
30241	esac
30242
30243
30244fi
30245
30246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30247printf "%s\n" "$ntp_ok" >&6; }
30248# We used to check for sunos/solaris target...
30249case "$ntp_ok$ntp_refclock_chu$ntp_canaudio" in
30250 yes*no*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is...no ***" >&5
30251printf "%s\n" "$as_me: WARNING: *** But the expected answer is...no ***" >&2;}
30252esac
30253
30254# Not under HP-UX
30255{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Datum Programmable Time System" >&5
30256printf %s "checking Datum Programmable Time System... " >&6; }
30257# Check whether --enable-DATUM was given.
30258if test ${enable_DATUM+y}
30259then :
30260  enableval=$enable_DATUM; ntp_ok=$enableval
30261else $as_nop
30262
30263	case "$ac_cv_header_termios_h" in
30264	 yes)
30265	    ntp_ok=$ntp_eac
30266	    ;;
30267	 *) ntp_ok=no
30268	    ;;
30269	esac
30270
30271
30272fi
30273
30274case "$ntp_ok" in
30275 yes)
30276    ntp_refclock=yes
30277
30278printf "%s\n" "#define CLOCK_DATUM 1" >>confdefs.h
30279
30280    ;;
30281esac
30282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30283printf "%s\n" "$ntp_ok" >&6; }
30284
30285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Dumb generic hh:mm:ss local clock" >&5
30286printf %s "checking Dumb generic hh:mm:ss local clock... " >&6; }
30287# Check whether --enable-DUMBCLOCK was given.
30288if test ${enable_DUMBCLOCK+y}
30289then :
30290  enableval=$enable_DUMBCLOCK; ntp_ok=$enableval
30291else $as_nop
30292  ntp_ok=$ntp_eac
30293
30294fi
30295
30296case "$ntp_ok" in
30297 yes)
30298    ntp_refclock=yes
30299
30300printf "%s\n" "#define CLOCK_DUMBCLOCK 1" >>confdefs.h
30301
30302    ;;
30303esac
30304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30305printf "%s\n" "$ntp_ok" >&6; }
30306
30307{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Forum Graphic GPS" >&5
30308printf %s "checking Forum Graphic GPS... " >&6; }
30309# Check whether --enable-FG was given.
30310if test ${enable_FG+y}
30311then :
30312  enableval=$enable_FG; ntp_ok=$enableval
30313else $as_nop
30314  ntp_ok=$ntp_eac
30315
30316fi
30317
30318case "$ntp_ok" in
30319 yes)
30320    ntp_refclock=yes
30321
30322printf "%s\n" "#define CLOCK_FG 1" >>confdefs.h
30323
30324    ;;
30325esac
30326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30327printf "%s\n" "$ntp_ok" >&6; }
30328
30329# Requires modem control
30330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Heath GC-1000 WWV/WWVH receiver" >&5
30331printf %s "checking Heath GC-1000 WWV/WWVH receiver... " >&6; }
30332# Check whether --enable-HEATH was given.
30333if test ${enable_HEATH+y}
30334then :
30335  enableval=$enable_HEATH; ntp_ok=$enableval
30336else $as_nop
30337  ntp_ok=$ntp_enable_all_modem_control_clocks
30338
30339fi
30340
30341case "$ntp_ok" in
30342 yes)
30343    ntp_refclock=yes
30344
30345printf "%s\n" "#define CLOCK_HEATH 1" >>confdefs.h
30346
30347    ;;
30348esac
30349{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30350printf "%s\n" "$ntp_ok" >&6; }
30351
30352{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf serial clock device" >&5
30353printf %s "checking for hopf serial clock device... " >&6; }
30354# Check whether --enable-HOPFSERIAL was given.
30355if test ${enable_HOPFSERIAL+y}
30356then :
30357  enableval=$enable_HOPFSERIAL; ntp_ok=$enableval
30358else $as_nop
30359  ntp_ok=$ntp_eac
30360
30361fi
30362
30363case "$ntp_ok" in
30364 yes)
30365    ntp_refclock=yes
30366
30367printf "%s\n" "#define CLOCK_HOPF_SERIAL 1" >>confdefs.h
30368
30369    ;;
30370esac
30371{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30372printf "%s\n" "$ntp_ok" >&6; }
30373
30374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hopf PCI clock 6039" >&5
30375printf %s "checking for hopf PCI clock 6039... " >&6; }
30376# Check whether --enable-HOPFPCI was given.
30377if test ${enable_HOPFPCI+y}
30378then :
30379  enableval=$enable_HOPFPCI; ntp_ok=$enableval
30380else $as_nop
30381  ntp_ok=$ntp_eac
30382
30383fi
30384
30385case "$ntp_ok" in
30386 yes)
30387    ntp_refclock=yes
30388
30389printf "%s\n" "#define CLOCK_HOPF_PCI 1" >>confdefs.h
30390
30391    ;;
30392esac
30393{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30394printf "%s\n" "$ntp_ok" >&6; }
30395
30396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HP 58503A GPS receiver" >&5
30397printf %s "checking HP 58503A GPS receiver... " >&6; }
30398# Check whether --enable-HPGPS was given.
30399if test ${enable_HPGPS+y}
30400then :
30401  enableval=$enable_HPGPS; ntp_ok=$enableval
30402else $as_nop
30403  ntp_ok=$ntp_eac
30404
30405fi
30406
30407case "$ntp_ok" in
30408 yes)
30409    ntp_refclock=yes
30410
30411printf "%s\n" "#define CLOCK_HPGPS 1" >>confdefs.h
30412
30413    ;;
30414esac
30415{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30416printf "%s\n" "$ntp_ok" >&6; }
30417
30418{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking IRIG audio decoder" >&5
30419printf %s "checking IRIG audio decoder... " >&6; }
30420# Check whether --enable-IRIG was given.
30421if test ${enable_IRIG+y}
30422then :
30423  enableval=$enable_IRIG; ntp_ok=$enableval
30424else $as_nop
30425
30426	case "$ntp_eac$ntp_canaudio" in
30427	 *no*)	ntp_ok=no  ;;
30428	 *)	ntp_ok=yes ;;
30429	esac
30430
30431
30432fi
30433
30434case "$ntp_ok" in
30435 yes)
30436    ntp_refclock=yes
30437
30438printf "%s\n" "#define CLOCK_IRIG 1" >>confdefs.h
30439
30440    ;;
30441esac
30442{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30443printf "%s\n" "$ntp_ok" >&6; }
30444case "$ntp_ok$ntp_canaudio" in
30445 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30446printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
30447esac
30448
30449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JJY receiver" >&5
30450printf %s "checking for JJY receiver... " >&6; }
30451# Check whether --enable-JJY was given.
30452if test ${enable_JJY+y}
30453then :
30454  enableval=$enable_JJY; ntp_ok=$enableval
30455else $as_nop
30456  ntp_ok=$ntp_eac
30457
30458fi
30459
30460case "$ntp_ok" in
30461 yes)
30462    ntp_refclock=yes
30463
30464printf "%s\n" "#define CLOCK_JJY 1" >>confdefs.h
30465
30466    ;;
30467esac
30468{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30469printf "%s\n" "$ntp_ok" >&6; }
30470
30471{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Rockwell Jupiter GPS receiver" >&5
30472printf %s "checking Rockwell Jupiter GPS receiver... " >&6; }
30473# Check whether --enable-JUPITER was given.
30474if test ${enable_JUPITER+y}
30475then :
30476  enableval=$enable_JUPITER; ntp_ok=$enableval
30477else $as_nop
30478  ntp_ok=$ntp_eac
30479fi
30480
30481case "$ntp_jupiter_ok" in
30482 no) ntp_ok=no ;;
30483esac
30484case "$ntp_ok" in
30485 yes)
30486    ntp_refclock=yes
30487
30488printf "%s\n" "#define CLOCK_JUPITER 1" >>confdefs.h
30489
30490    ;;
30491esac
30492{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30493printf "%s\n" "$ntp_ok" >&6; }
30494
30495{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Leitch CSD 5300 Master Clock System Driver" >&5
30496printf %s "checking Leitch CSD 5300 Master Clock System Driver... " >&6; }
30497# Check whether --enable-LEITCH was given.
30498if test ${enable_LEITCH+y}
30499then :
30500  enableval=$enable_LEITCH; ntp_ok=$enableval
30501else $as_nop
30502  ntp_ok=$ntp_eac
30503
30504fi
30505
30506case "$ntp_ok" in
30507 yes)
30508    ntp_refclock=yes
30509
30510printf "%s\n" "#define CLOCK_LEITCH 1" >>confdefs.h
30511
30512    ;;
30513esac
30514{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30515printf "%s\n" "$ntp_ok" >&6; }
30516
30517{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking local clock reference" >&5
30518printf %s "checking local clock reference... " >&6; }
30519# Check whether --enable-LOCAL-CLOCK was given.
30520if test ${enable_LOCAL_CLOCK+y}
30521then :
30522  enableval=$enable_LOCAL_CLOCK; ntp_ok=$enableval
30523else $as_nop
30524  ntp_ok=$ntp_eac
30525
30526fi
30527
30528case "$ntp_ok" in
30529 yes)
30530    ntp_refclock=yes
30531
30532printf "%s\n" "#define CLOCK_LOCAL 1" >>confdefs.h
30533
30534    ;;
30535esac
30536{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30537printf "%s\n" "$ntp_ok" >&6; }
30538
30539
30540# Not Ultrix
30541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Magnavox MX4200 GPS receiver" >&5
30542printf %s "checking Magnavox MX4200 GPS receiver... " >&6; }
30543# Check whether --enable-MX4200 was given.
30544if test ${enable_MX4200+y}
30545then :
30546  enableval=$enable_MX4200; ntp_ok=$enableval
30547else $as_nop
30548
30549	case "$ac_cv_var_ppsclock" in
30550	 yes)
30551	    ntp_ok=$ntp_eac
30552	    ;;
30553	 *)
30554	    ntp_ok=no
30555	    ;;
30556	esac
30557
30558
30559fi
30560
30561case "$ntp_ok" in
30562 yes)
30563    ntp_refclock=yes
30564
30565printf "%s\n" "#define CLOCK_MX4200 1" >>confdefs.h
30566
30567    ;;
30568esac
30569{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30570printf "%s\n" "$ntp_ok" >&6; }
30571case "$ntp_ok$host" in
30572 yes*-*-ultrix*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30573printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
30574esac
30575
30576{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for NeoClock4X receiver" >&5
30577printf %s "checking for NeoClock4X receiver... " >&6; }
30578# Check whether --enable-NEOCLOCK4X was given.
30579if test ${enable_NEOCLOCK4X+y}
30580then :
30581  enableval=$enable_NEOCLOCK4X; ntp_ok=$enableval
30582else $as_nop
30583  ntp_ok=$ntp_eac
30584
30585fi
30586
30587case "$ntp_ok" in
30588 yes)
30589    ntp_refclock=yes
30590
30591printf "%s\n" "#define CLOCK_NEOCLOCK4X 1" >>confdefs.h
30592
30593    ;;
30594esac
30595{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30596printf "%s\n" "$ntp_ok" >&6; }
30597
30598{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking NMEA GPS receiver" >&5
30599printf %s "checking NMEA GPS receiver... " >&6; }
30600# Check whether --enable-NMEA was given.
30601if test ${enable_NMEA+y}
30602then :
30603  enableval=$enable_NMEA; ntp_ok=$enableval
30604else $as_nop
30605  ntp_ok=$ntp_eac
30606
30607fi
30608
30609case "$ntp_ok" in
30610 yes)
30611    ntp_refclock=yes
30612
30613printf "%s\n" "#define CLOCK_NMEA 1" >>confdefs.h
30614
30615    ;;
30616esac
30617{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30618printf "%s\n" "$ntp_ok" >&6; }
30619
30620ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll"
30621if test "x$ac_cv_func_strtoll" = xyes
30622then :
30623  printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h
30624
30625fi
30626
30627{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GPSD JSON receiver" >&5
30628printf %s "checking for GPSD JSON receiver... " >&6; }
30629# Check whether --enable-GPSD was given.
30630if test ${enable_GPSD+y}
30631then :
30632  enableval=$enable_GPSD; ntp_ok=$enableval
30633else $as_nop
30634  case "$ac_cv_func_strtoll" in
30635     yes) ntp_ok=$ntp_eac ;;
30636     *)   ntp_ok="no" ;;
30637    esac
30638
30639fi
30640
30641case "$ntp_ok" in
30642 yes)
30643    ntp_refclock=yes
30644
30645printf "%s\n" "#define CLOCK_GPSDJSON 1" >>confdefs.h
30646
30647    ;;
30648esac
30649{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30650printf "%s\n" "$ntp_ok" >&6; }
30651
30652{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ONCORE Motorola VP/UT Oncore GPS" >&5
30653printf %s "checking for ONCORE Motorola VP/UT Oncore GPS... " >&6; }
30654# Check whether --enable-ONCORE was given.
30655if test ${enable_ONCORE+y}
30656then :
30657  enableval=$enable_ONCORE; ntp_ok=$enableval
30658else $as_nop
30659  ntp_ok=$ntp_eac
30660
30661fi
30662
30663case "$ntp_oncore_ok" in
30664 no) ntp_ok=no ;;
30665esac
30666case "$ntp_ok" in
30667 yes)
30668    ntp_refclock=yes
30669
30670printf "%s\n" "#define CLOCK_ONCORE 1" >>confdefs.h
30671
30672    ;;
30673esac
30674{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30675printf "%s\n" "$ntp_ok" >&6; }
30676
30677# Requires modem control
30678{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Palisade clock" >&5
30679printf %s "checking for Palisade clock... " >&6; }
30680# Check whether --enable-PALISADE was given.
30681if test ${enable_PALISADE+y}
30682then :
30683  enableval=$enable_PALISADE; ntp_ok=$enableval
30684else $as_nop
30685  ntp_ok=$ntp_enable_all_modem_control_clocks
30686
30687fi
30688
30689case "$ntp_ok" in
30690 yes)
30691    ntp_refclock=yes
30692
30693printf "%s\n" "#define CLOCK_PALISADE 1" >>confdefs.h
30694
30695    ;;
30696esac
30697{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30698printf "%s\n" "$ntp_ok" >&6; }
30699
30700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Conrad parallel port radio clock" >&5
30701printf %s "checking Conrad parallel port radio clock... " >&6; }
30702# Check whether --enable-PCF was given.
30703if test ${enable_PCF+y}
30704then :
30705  enableval=$enable_PCF; ntp_ok=$enableval
30706else $as_nop
30707  ntp_ok=$ntp_eac
30708
30709fi
30710
30711case "$ntp_ok" in
30712 yes)
30713    ntp_refclock=yes
30714
30715printf "%s\n" "#define CLOCK_PCF 1" >>confdefs.h
30716
30717    ;;
30718esac
30719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30720printf "%s\n" "$ntp_ok" >&6; }
30721
30722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking PST/Traconex 1020 WWV/WWVH receiver" >&5
30723printf %s "checking PST/Traconex 1020 WWV/WWVH receiver... " >&6; }
30724# Check whether --enable-PST was given.
30725if test ${enable_PST+y}
30726then :
30727  enableval=$enable_PST; ntp_ok=$enableval
30728else $as_nop
30729  ntp_ok=$ntp_eac
30730
30731fi
30732
30733case "$ntp_ok" in
30734 yes)
30735    ntp_refclock=yes
30736
30737printf "%s\n" "#define CLOCK_PST 1" >>confdefs.h
30738
30739    ;;
30740esac
30741{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30742printf "%s\n" "$ntp_ok" >&6; }
30743
30744{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RIPENCC specific Trimble driver" >&5
30745printf %s "checking RIPENCC specific Trimble driver... " >&6; }
30746# Check whether --enable-RIPENCC was given.
30747if test ${enable_RIPENCC+y}
30748then :
30749  enableval=$enable_RIPENCC; ntp_ok=$enableval
30750else $as_nop
30751  ntp_ok=no
30752
30753fi
30754
30755# 020629: HMS: s/$ntp_eac -> -/no because of ptr += sprintf(ptr, ...) usage
30756case "$ntp_ripe_ncc_ok" in
30757 no) ntp_ok=no ;;
30758esac
30759case "$ntp_ok" in
30760 yes)
30761    ntp_refclock=yes
30762
30763printf "%s\n" "#define CLOCK_RIPENCC /**/" >>confdefs.h
30764
30765    ;;
30766esac
30767{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30768printf "%s\n" "$ntp_ok" >&6; }
30769
30770# Danny Meyer says SHM compiles (with a few warnings) under Win32.
30771# For *IX, we need sys/ipc.h and sys/shm.h.
30772{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHM clock attached thru shared memory" >&5
30773printf %s "checking for SHM clock attached thru shared memory... " >&6; }
30774# Check whether --enable-SHM was given.
30775if test ${enable_SHM+y}
30776then :
30777  enableval=$enable_SHM; ntp_ok=$enableval
30778else $as_nop
30779
30780	case "$ntp_eac$ntp_canshm" in
30781	 *no*)	ntp_ok=no  ;;
30782	 *)	ntp_ok=yes ;;
30783	esac
30784
30785
30786fi
30787
30788case "$ntp_ok" in
30789 yes)
30790    ntp_refclock=yes
30791
30792printf "%s\n" "#define CLOCK_SHM 1" >>confdefs.h
30793
30794    ;;
30795esac
30796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30797printf "%s\n" "$ntp_ok" >&6; }
30798
30799{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom 8170/Netclock/2 WWVB receiver" >&5
30800printf %s "checking Spectracom 8170/Netclock/2 WWVB receiver... " >&6; }
30801# Check whether --enable-SPECTRACOM was given.
30802if test ${enable_SPECTRACOM+y}
30803then :
30804  enableval=$enable_SPECTRACOM; ntp_ok=$enableval
30805else $as_nop
30806  ntp_ok=$ntp_eac
30807
30808fi
30809
30810case "$ntp_ok" in
30811 yes)
30812    ntp_refclock=yes
30813
30814printf "%s\n" "#define CLOCK_SPECTRACOM 1" >>confdefs.h
30815
30816    ;;
30817esac
30818{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30819printf "%s\n" "$ntp_ok" >&6; }
30820
30821{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" >&5
30822printf %s "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... " >&6; }
30823# Check whether --enable-TPRO was given.
30824if test ${enable_TPRO+y}
30825then :
30826  enableval=$enable_TPRO; ntp_ok=$enableval
30827else $as_nop
30828
30829	case "$ac_cv_header_sys_tpro_h" in
30830	 yes)
30831	    ntp_ok=$ntp_eac
30832	    ;;
30833	 *)
30834	    ntp_ok=no
30835	    ;;
30836	esac
30837
30838
30839fi
30840
30841case "$ntp_ok" in
30842 yes)
30843    ntp_refclock=yes
30844
30845printf "%s\n" "#define CLOCK_TPRO 1" >>confdefs.h
30846
30847    ;;
30848esac
30849{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30850printf "%s\n" "$ntp_ok" >&6; }
30851case "$ntp_ok$ac_cv_header_sys_tpro" in
30852 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30853printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
30854esac
30855
30856# Not on a vax-dec-bsd
30857{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Kinemetrics/TrueTime receivers" >&5
30858printf %s "checking Kinemetrics/TrueTime receivers... " >&6; }
30859# Check whether --enable-TRUETIME was given.
30860if test ${enable_TRUETIME+y}
30861then :
30862  enableval=$enable_TRUETIME; ntp_ok=$enableval
30863else $as_nop
30864
30865	case "$host" in
30866	 vax-dec-bsd)
30867	    ntp_ok=no
30868	    ;;
30869	 *)
30870	    ntp_ok=$ntp_eac
30871	    ;;
30872	esac
30873
30874
30875fi
30876
30877case "$ntp_ok" in
30878 yes)
30879    ntp_refclock=yes
30880
30881printf "%s\n" "#define CLOCK_TRUETIME 1" >>confdefs.h
30882
30883    ;;
30884esac
30885{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30886printf "%s\n" "$ntp_ok" >&6; }
30887case "$ntp_ok$host" in
30888 yesvax-dec-bsd) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30889printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
30890esac
30891
30892{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking TrueTime 560 IRIG-B decoder" >&5
30893printf %s "checking TrueTime 560 IRIG-B decoder... " >&6; }
30894# Check whether --enable-TT560 was given.
30895if test ${enable_TT560+y}
30896then :
30897  enableval=$enable_TT560; ntp_ok=$enableval
30898else $as_nop
30899  ntp_ok=no
30900
30901fi
30902
30903case "$ntp_ok" in
30904 yes)
30905    ntp_refclock=yes
30906
30907printf "%s\n" "#define CLOCK_TT560 /**/" >>confdefs.h
30908
30909    ;;
30910esac
30911{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30912printf "%s\n" "$ntp_ok" >&6; }
30913
30914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Ultralink M320 WWVB receiver" >&5
30915printf %s "checking Ultralink M320 WWVB receiver... " >&6; }
30916# Check whether --enable-ULINK was given.
30917if test ${enable_ULINK+y}
30918then :
30919  enableval=$enable_ULINK; ntp_ok=$enableval
30920else $as_nop
30921  ntp_ok=$ntp_eac
30922
30923fi
30924
30925case "$ntp_ok" in
30926 yes)
30927    ntp_refclock=yes
30928
30929printf "%s\n" "#define CLOCK_ULINK 1" >>confdefs.h
30930
30931    ;;
30932esac
30933{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30934printf "%s\n" "$ntp_ok" >&6; }
30935
30936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Spectracom TSYNC PCI timing board" >&5
30937printf %s "checking Spectracom TSYNC PCI timing board... " >&6; }
30938# Check whether --enable-TSYNCPCI was given.
30939if test ${enable_TSYNCPCI+y}
30940then :
30941  enableval=$enable_TSYNCPCI; ntp_ok=$enableval
30942else $as_nop
30943
30944	case "$host" in
30945	 *-*-*linux*)
30946	    ntp_ok=$ntp_eac
30947	    ;;
30948	 *)
30949	    ntp_ok=no
30950	esac
30951
30952
30953fi
30954
30955case "$ntp_ok" in
30956 yes)
30957    ntp_refclock=yes
30958
30959printf "%s\n" "#define CLOCK_TSYNCPCI 1" >>confdefs.h
30960
30961    ;;
30962esac
30963{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30964printf "%s\n" "$ntp_ok" >&6; }
30965
30966{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WWV receiver" >&5
30967printf %s "checking WWV receiver... " >&6; }
30968# Check whether --enable-WWV was given.
30969if test ${enable_WWV+y}
30970then :
30971  enableval=$enable_WWV; ntp_ok=$enableval
30972else $as_nop
30973
30974	case "$ntp_eac$ntp_canaudio" in
30975	 *no*)	ntp_ok=no  ;;
30976	 *)	ntp_ok=yes ;;
30977	esac
30978
30979
30980fi
30981
30982case "$ntp_ok" in
30983 yes)
30984    ntp_refclock=yes
30985
30986printf "%s\n" "#define CLOCK_WWV 1" >>confdefs.h
30987
30988    ;;
30989esac
30990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
30991printf "%s\n" "$ntp_ok" >&6; }
30992case "$ntp_ok$ntp_canaudio" in
30993 yesno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *** But the expected answer is... no ***" >&5
30994printf "%s\n" "$as_me: WARNING: *** But the expected answer is... no ***" >&2;}
30995esac
30996
30997{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Zyfer receiver" >&5
30998printf %s "checking for Zyfer receiver... " >&6; }
30999# Check whether --enable-ZYFER was given.
31000if test ${enable_ZYFER+y}
31001then :
31002  enableval=$enable_ZYFER; ntp_ok=$enableval
31003else $as_nop
31004  ntp_ok=$ntp_eac
31005
31006fi
31007
31008case "$ntp_ok" in
31009 yes)
31010    ntp_refclock=yes
31011
31012printf "%s\n" "#define CLOCK_ZYFER 1" >>confdefs.h
31013
31014    ;;
31015esac
31016{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31017printf "%s\n" "$ntp_ok" >&6; }
31018
31019{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default inclusion of all suitable PARSE clocks" >&5
31020printf %s "checking for default inclusion of all suitable PARSE clocks... " >&6; }
31021# Check whether --enable-parse-clocks was given.
31022if test ${enable_parse_clocks+y}
31023then :
31024  enableval=$enable_parse_clocks; ntp_eapc=$enableval
31025else $as_nop
31026
31027	case "$ntp_eac" in
31028	 yes)	ntp_eapc=$ntp_canparse ;;
31029	 *)	ntp_eapc=no ;;
31030	esac
31031	# Delete the next line one of these days
31032	ntp_eapc=no
31033
31034
31035fi
31036
31037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_eapc" >&5
31038printf "%s\n" "$ntp_eapc" >&6; }
31039
31040case "$ntp_eac$ntp_eapc$ntp_canparse" in
31041 noyes*)
31042    as_fn_error $? "\"--enable-parse-clocks\" requires \"--enable-all-clocks\"." "$LINENO" 5
31043    ;;
31044 yesyesno)
31045    as_fn_error $? "You said \"--enable-parse-clocks\" but PARSE isn't supported on this platform!" "$LINENO" 5
31046    ;;
31047esac
31048
31049ntp_libparse=no
31050ntp_parseutil=no
31051ntp_rawdcf=no
31052
31053{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Diem Computime Radio Clock" >&5
31054printf %s "checking Diem Computime Radio Clock... " >&6; }
31055# Check whether --enable-COMPUTIME was given.
31056if test ${enable_COMPUTIME+y}
31057then :
31058  enableval=$enable_COMPUTIME; ntp_ok=$enableval
31059else $as_nop
31060  ntp_ok=$ntp_eapc
31061
31062fi
31063
31064case "$ntp_ok" in
31065 yes)
31066    ntp_libparse=yes
31067    ntp_refclock=yes
31068
31069printf "%s\n" "#define CLOCK_COMPUTIME 1" >>confdefs.h
31070
31071    ;;
31072esac
31073{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31074printf "%s\n" "$ntp_ok" >&6; }
31075case "$ntp_ok$ntp_canparse" in
31076 yesno)
31077    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31078esac
31079
31080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ELV/DCF7000 clock" >&5
31081printf %s "checking ELV/DCF7000 clock... " >&6; }
31082# Check whether --enable-DCF7000 was given.
31083if test ${enable_DCF7000+y}
31084then :
31085  enableval=$enable_DCF7000; ntp_ok=$enableval
31086else $as_nop
31087  ntp_ok=$ntp_eapc
31088
31089fi
31090
31091case "$ntp_ok" in
31092 yes)
31093    ntp_libparse=yes
31094    ntp_refclock=yes
31095
31096printf "%s\n" "#define CLOCK_DCF7000 1" >>confdefs.h
31097
31098    ;;
31099esac
31100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31101printf "%s\n" "$ntp_ok" >&6; }
31102case "$ntp_ok$ntp_canparse" in
31103 yesno)
31104    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31105esac
31106
31107{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking HOPF 6021 clock" >&5
31108printf %s "checking HOPF 6021 clock... " >&6; }
31109# Check whether --enable-HOPF6021 was given.
31110if test ${enable_HOPF6021+y}
31111then :
31112  enableval=$enable_HOPF6021; ntp_ok=$enableval
31113else $as_nop
31114  ntp_ok=$ntp_eapc
31115
31116fi
31117
31118case "$ntp_ok" in
31119 yes)
31120    ntp_libparse=yes
31121    ntp_refclock=yes
31122
31123printf "%s\n" "#define CLOCK_HOPF6021 1" >>confdefs.h
31124
31125    ;;
31126esac
31127{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31128printf "%s\n" "$ntp_ok" >&6; }
31129case "$ntp_ok$ntp_canparse" in
31130 yesno)
31131    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31132esac
31133
31134{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Meinberg clocks" >&5
31135printf %s "checking Meinberg clocks... " >&6; }
31136# Check whether --enable-MEINBERG was given.
31137if test ${enable_MEINBERG+y}
31138then :
31139  enableval=$enable_MEINBERG; ntp_ok=$enableval
31140else $as_nop
31141  ntp_ok=$ntp_eapc
31142
31143fi
31144
31145case "$ntp_ok" in
31146 yes)
31147    ntp_libparse=yes
31148    ntp_refclock=yes
31149
31150printf "%s\n" "#define CLOCK_MEINBERG 1" >>confdefs.h
31151
31152    ;;
31153esac
31154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31155printf "%s\n" "$ntp_ok" >&6; }
31156case "$ntp_ok$ntp_canparse" in
31157 yesno)
31158    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31159esac
31160
31161{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking DCF77 raw time code" >&5
31162printf %s "checking DCF77 raw time code... " >&6; }
31163# Check whether --enable-RAWDCF was given.
31164if test ${enable_RAWDCF+y}
31165then :
31166  enableval=$enable_RAWDCF; ntp_ok=$enableval
31167else $as_nop
31168  ntp_ok=$ntp_eapc
31169
31170fi
31171
31172case "$ntp_ok" in
31173 yes)
31174    ntp_libparse=yes
31175    ntp_parseutil=yes
31176    ntp_refclock=yes
31177    ntp_rawdcf=yes
31178
31179printf "%s\n" "#define CLOCK_RAWDCF 1" >>confdefs.h
31180
31181    ;;
31182esac
31183{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31184printf "%s\n" "$ntp_ok" >&6; }
31185case "$ntp_ok$ntp_canparse" in
31186 yesno)
31187    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31188esac
31189
31190case "$ntp_rawdcf" in
31191 yes)
31192    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we must enable parity for RAWDCF" >&5
31193printf %s "checking if we must enable parity for RAWDCF... " >&6; }
31194if test ${ntp_cv_rawdcf_parity+y}
31195then :
31196  printf %s "(cached) " >&6
31197else $as_nop
31198
31199	    ans=no
31200	    case "$host" in
31201	     *-*-*linux*)
31202		ans=yes
31203		;;
31204	    esac
31205	    ntp_cv_rawdcf_parity=$ans
31206
31207
31208fi
31209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_rawdcf_parity" >&5
31210printf "%s\n" "$ntp_cv_rawdcf_parity" >&6; }
31211    case "$ntp_cv_rawdcf_parity" in
31212     yes)
31213
31214printf "%s\n" "#define RAWDCF_NO_IGNPAR 1" >>confdefs.h
31215 ;;
31216    esac
31217esac
31218
31219{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking RCC 8000 clock" >&5
31220printf %s "checking RCC 8000 clock... " >&6; }
31221# Check whether --enable-RCC8000 was given.
31222if test ${enable_RCC8000+y}
31223then :
31224  enableval=$enable_RCC8000; ntp_ok=$enableval
31225else $as_nop
31226  ntp_ok=$ntp_eapc
31227
31228fi
31229
31230case "$ntp_ok" in
31231 yes)
31232    ntp_libparse=yes
31233    ntp_refclock=yes
31234
31235printf "%s\n" "#define CLOCK_RCC8000 1" >>confdefs.h
31236
31237    ;;
31238esac
31239{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31240printf "%s\n" "$ntp_ok" >&6; }
31241case "$ntp_ok$ntp_canparse" in
31242 yesno)
31243    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31244esac
31245
31246{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Schmid DCF77 clock" >&5
31247printf %s "checking Schmid DCF77 clock... " >&6; }
31248# Check whether --enable-SCHMID was given.
31249if test ${enable_SCHMID+y}
31250then :
31251  enableval=$enable_SCHMID; ntp_ok=$enableval
31252else $as_nop
31253  ntp_ok=$ntp_eapc
31254
31255fi
31256
31257case "$ntp_ok" in
31258 yes)
31259    ntp_libparse=yes
31260    ntp_refclock=yes
31261
31262printf "%s\n" "#define CLOCK_SCHMID 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; }
31268case "$ntp_ok$ntp_canparse" in
31269 yesno)
31270    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31271esac
31272
31273{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TAIP protocol" >&5
31274printf %s "checking Trimble GPS receiver/TAIP protocol... " >&6; }
31275# Check whether --enable-TRIMTAIP was given.
31276if test ${enable_TRIMTAIP+y}
31277then :
31278  enableval=$enable_TRIMTAIP; ntp_ok=$enableval
31279else $as_nop
31280  ntp_ok=$ntp_eapc
31281
31282fi
31283
31284case "$ntp_ok" in
31285 yes)
31286    ntp_libparse=yes
31287    ntp_refclock=yes
31288
31289printf "%s\n" "#define CLOCK_TRIMTAIP 1" >>confdefs.h
31290
31291    ;;
31292esac
31293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31294printf "%s\n" "$ntp_ok" >&6; }
31295case "$ntp_ok$ntp_canparse" in
31296 yesno)
31297    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31298esac
31299
31300{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Trimble GPS receiver/TSIP protocol" >&5
31301printf %s "checking Trimble GPS receiver/TSIP protocol... " >&6; }
31302# Check whether --enable-TRIMTSIP was given.
31303if test ${enable_TRIMTSIP+y}
31304then :
31305  enableval=$enable_TRIMTSIP; ntp_ok=$enableval
31306else $as_nop
31307  ntp_ok=$ntp_eapc
31308
31309fi
31310
31311case "$ntp_ok" in
31312 yes)
31313    ntp_libparse=yes
31314    ntp_refclock=yes
31315
31316printf "%s\n" "#define CLOCK_TRIMTSIP 1" >>confdefs.h
31317
31318    ;;
31319esac
31320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31321printf "%s\n" "$ntp_ok" >&6; }
31322case "$ntp_ok$ntp_canparse" in
31323 yesno)
31324    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31325esac
31326
31327{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking WHARTON 400A Series clock" >&5
31328printf %s "checking WHARTON 400A Series clock... " >&6; }
31329# Check whether --enable-WHARTON was given.
31330if test ${enable_WHARTON+y}
31331then :
31332  enableval=$enable_WHARTON; ntp_ok=$enableval
31333else $as_nop
31334  ntp_ok=$ntp_eapc
31335
31336fi
31337
31338case "$ntp_ok" in
31339 yes)
31340    ntp_libparse=yes
31341    ntp_refclock=yes
31342
31343printf "%s\n" "#define CLOCK_WHARTON_400A 1" >>confdefs.h
31344
31345    ;;
31346esac
31347{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31348printf "%s\n" "$ntp_ok" >&6; }
31349case "$ntp_ok$ntp_canparse" in
31350 yesno)
31351    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31352esac
31353
31354{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking VARITEXT clock" >&5
31355printf %s "checking VARITEXT clock... " >&6; }
31356# Check whether --enable-VARITEXT was given.
31357if test ${enable_VARITEXT+y}
31358then :
31359  enableval=$enable_VARITEXT; ntp_ok=$enableval
31360else $as_nop
31361  ntp_ok=$ntp_eapc
31362
31363fi
31364
31365case "$ntp_ok" in
31366 yes)
31367    ntp_libparse=yes
31368    ntp_refclock=yes
31369
31370printf "%s\n" "#define CLOCK_VARITEXT 1" >>confdefs.h
31371
31372    ;;
31373esac
31374{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31375printf "%s\n" "$ntp_ok" >&6; }
31376case "$ntp_ok$ntp_canparse" in
31377 yesno)
31378    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31379esac
31380
31381{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking SEL240X clock" >&5
31382printf %s "checking SEL240X clock... " >&6; }
31383# Check whether --enable-SEL240X was given.
31384if test ${enable_SEL240X+y}
31385then :
31386  enableval=$enable_SEL240X; ntp_ok=$enableval
31387else $as_nop
31388  ntp_ok=$ntp_eapc
31389fi
31390
31391if test "$ntp_ok" = "yes"; then
31392    ntp_libparse=yes
31393    ntp_refclock=yes
31394
31395printf "%s\n" "#define CLOCK_SEL240X 1" >>confdefs.h
31396
31397fi
31398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
31399printf "%s\n" "$ntp_ok" >&6; }
31400case "$ntp_ok$ntp_canparse" in
31401 yesno)
31402    as_fn_error $? "That's a parse clock and this system doesn't support it!" "$LINENO" 5
31403    ;;
31404esac
31405
31406
31407
31408
31409
31410
31411{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need to make and use the parse libraries" >&5
31412printf %s "checking if we need to make and use the parse libraries... " >&6; }
31413ans=no
31414case "$ntp_libparse" in
31415 yes)
31416    ans=yes
31417
31418printf "%s\n" "#define CLOCK_PARSE 1" >>confdefs.h
31419
31420    LIBPARSE=../libparse/libparse.a
31421    MAKE_LIBPARSE=libparse.a
31422    # HMS: check_y2k trips the 34 year problem now...
31423    false && MAKE_CHECK_Y2K=check_y2k
31424esac
31425{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31426printf "%s\n" "$ans" >&6; }
31427
31428
31429
31430
31431VER_SUFFIX=
31432
31433
31434
31435
31436# Check whether --with-crypto was given.
31437if test ${with_crypto+y}
31438then :
31439  withval=$with_crypto;
31440fi
31441
31442
31443# Check whether --with-openssl-libdir was given.
31444if test ${with_openssl_libdir+y}
31445then :
31446  withval=$with_openssl_libdir;
31447fi
31448
31449
31450# Check whether --with-openssl-incdir was given.
31451if test ${with_openssl_incdir+y}
31452then :
31453  withval=$with_openssl_incdir;
31454fi
31455
31456
31457# Check whether --with-rpath was given.
31458if test ${with_rpath+y}
31459then :
31460  withval=$with_rpath;
31461fi
31462
31463
31464ntp_openssl=no
31465ntp_openssl_from_pkg_config=no
31466
31467with_crypto=${with_crypto:-openssl,libcrypto}
31468case "$with_crypto" in
31469 yes)
31470    with_crypto=openssl,libcrypto
31471esac
31472
31473
31474case "$with_crypto:${PKG_CONFIG:+notempty}:${with_openssl_libdir-notgiven}:${with_openssl_incdir-notgiven}" in
31475 no:*) ;;
31476 *:notempty:notgiven:notgiven)
31477    for pkg in `echo $with_crypto | sed -e 's/,/ /'`; do
31478	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config for $pkg" >&5
31479printf %s "checking pkg-config for $pkg... " >&6; }
31480	if $PKG_CONFIG --exists $pkg ; then
31481	    CPPFLAGS_NTP="$CPPFLAGS_NTP `$PKG_CONFIG --cflags-only-I $pkg`"
31482	    CFLAGS_NTP="$CFLAGS_NTP `$PKG_CONFIG --cflags-only-other $pkg`"
31483	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-L $pkg`"
31484	    LDADD_NTP="$LDADD_NTP `$PKG_CONFIG --libs-only-l --static $pkg`"
31485	    LDFLAGS_NTP="$LDFLAGS_NTP `$PKG_CONFIG --libs-only-other $pkg`"
31486	    VER_SUFFIX=o
31487	    ntp_openssl=yes
31488	    ntp_openssl_from_pkg_config=yes
31489	    ntp_openssl_version="`$PKG_CONFIG --modversion $pkg`"
31490	    case "$ntp_openssl_version" in
31491	     *.*) ;;
31492	     *) ntp_openssl_version='(unknown)' ;;
31493	    esac
31494	    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, version $ntp_openssl_version" >&5
31495printf "%s\n" "yes, version $ntp_openssl_version" >&6; }
31496
31497	    break
31498	fi
31499	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
31500printf "%s\n" "no" >&6; }
31501    done
31502esac
31503case "$with_crypto:$ntp_openssl" in
31504 no:*) ;;
31505 *:no)
31506    need_dash_r=
31507    need_dash_Wlrpath=
31508    case "${with_rpath-notgiven}" in
31509     yes)
31510	# Lame - what to do if we need -Wl... but not -R?
31511	need_dash_r=1
31512	;;
31513     notgiven)
31514	case "$host" in
31515	 *-*-linux*)
31516	    # This may really only be true for gcc
31517	    need_dash_Wlrpath=1
31518	    ;;
31519	 *-*-netbsd*)
31520	    need_dash_r=1
31521	    ;;
31522	 *-*-solaris*)
31523	    need_dash_r=1
31524	    ;;
31525	esac
31526	;;
31527    esac
31528
31529    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl library directory" >&5
31530printf %s "checking for openssl library directory... " >&6; }
31531    with_openssl_libdir=${with_openssl_libdir-notgiven}
31532    case "$with_openssl_libdir" in
31533     notgiven)
31534	case "$build" in
31535	 $host)
31536	    with_openssl_libdir=default
31537	    ;;
31538	 *)
31539	    with_openssl_libdir=no
31540	    ;;
31541	esac
31542    esac
31543    case "$with_openssl_libdir" in
31544     default)
31545	# Look in:
31546	with_openssl_libdir="/usr/lib /usr/lib/openssl /usr/sfw/lib"
31547	with_openssl_libdir="$with_openssl_libdir /usr/local/lib"
31548	with_openssl_libdir="$with_openssl_libdir /usr/local/ssl/lib /lib"
31549    esac
31550    case "$with_openssl_libdir" in
31551     no)
31552	;;
31553     *) # Look for libcrypto.a and libssl.a:
31554	for i in $with_openssl_libdir no
31555	do
31556	    case "$host" in
31557	     *-*-darwin*)
31558		test -f $i/libcrypto.dylib -a -f $i/libssl.dylib && break
31559		;;
31560	     *)
31561		test -f $i/libcrypto.so -a -f $i/libssl.so && break
31562		test -f $i/libcrypto.a -a -f $i/libssl.a && break
31563		;;
31564	    esac
31565	done
31566	openssl_libdir=$i
31567	;;
31568    esac
31569    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_libdir" >&5
31570printf "%s\n" "$openssl_libdir" >&6; }
31571    case "$openssl_libdir" in
31572     no)
31573	openssl_libdir=
31574	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&5
31575printf "%s\n" "$as_me: WARNING: libcrypto and libssl not found in any of $with_openssl_libdir" >&2;}
31576    esac
31577
31578    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl include directory" >&5
31579printf %s "checking for openssl include directory... " >&6; }
31580    with_openssl_incdir=${with_openssl_incdir-notgiven}
31581    case "$with_openssl_incdir" in
31582     notgiven)
31583	# Look in:
31584	with_openssl_incdir="/usr/include /usr/sfw/include"
31585	with_openssl_incdir="$with_openssl_incdir /usr/local/include"
31586	with_openssl_incdir="$with_openssl_incdir /usr/local/ssl/include"
31587    esac
31588    case "$with_openssl_incdir" in
31589     no)
31590	;;
31591     *) # look for openssl/evp.h:
31592	for i in $with_openssl_incdir no
31593	do
31594	    test -f $i/openssl/evp.h && break
31595	done
31596	openssl_incdir=$i
31597	;;
31598    esac
31599    { i=; unset i;}
31600    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssl_incdir" >&5
31601printf "%s\n" "$openssl_incdir" >&6; }
31602    case "$openssl_incdir" in
31603     no)
31604	openssl_incdir=
31605	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&5
31606printf "%s\n" "$as_me: WARNING: did not find openssl/evp.h in any of $with_openssl_incdir" >&2;}
31607    esac
31608    if test -z "$openssl_libdir" -o -z "$openssl_incdir"
31609    then
31610	ntp_openssl=no
31611    else
31612	ntp_openssl=yes
31613	VER_SUFFIX=o
31614    fi
31615    case "$ntp_openssl" in
31616     yes)
31617	# We have OpenSSL inc/lib dirs - use them.
31618	case "$openssl_incdir" in
31619	 /usr/include)
31620	    ;;
31621	 *)
31622	    CPPFLAGS_NTP="$CPPFLAGS_NTP -I$openssl_incdir"
31623	    ;;
31624	esac
31625	case "$openssl_libdir" in
31626	 /usr/lib)
31627	    ;;
31628	 *)
31629	    LDADD_NTP="$LDADD_NTP -L$openssl_libdir"
31630	    case "$need_dash_r" in
31631	     1)
31632		LDFLAGS_NTP="$LDFLAGS_NTP -R$openssl_libdir"
31633	    esac
31634	    case "$need_dash_Wlrpath" in
31635	     1)
31636		LDFLAGS_NTP="$LDFLAGS_NTP -Wl,-rpath,$openssl_libdir"
31637	    esac
31638	    ;;
31639	esac
31640	LDADD_NTP="$LDADD_NTP -lcrypto"
31641    esac
31642esac
31643
31644{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we will use crypto" >&5
31645printf %s "checking if we will use crypto... " >&6; }
31646{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_openssl" >&5
31647printf "%s\n" "$ntp_openssl" >&6; }
31648
31649case "$ntp_openssl" in
31650 yes)
31651    ac_fn_c_check_header_compile "$LINENO" "openssl/cmac.h" "ac_cv_header_openssl_cmac_h" "$ac_includes_default"
31652if test "x$ac_cv_header_openssl_cmac_h" = xyes
31653then :
31654  printf "%s\n" "#define HAVE_OPENSSL_CMAC_H 1" >>confdefs.h
31655
31656fi
31657ac_fn_c_check_header_compile "$LINENO" "openssl/hmac.h" "ac_cv_header_openssl_hmac_h" "$ac_includes_default"
31658if test "x$ac_cv_header_openssl_hmac_h" = xyes
31659then :
31660  printf "%s\n" "#define HAVE_OPENSSL_HMAC_H 1" >>confdefs.h
31661
31662fi
31663
31664
31665printf "%s\n" "#define OPENSSL /**/" >>confdefs.h
31666
31667    case "$VER_SUFFIX" in
31668     *o*) ;;
31669     *) as_fn_error $? "OPENSSL set but no 'o' in VER_SUFFIX!" "$LINENO" 5 ;;
31670    esac
31671    ;;
31672esac
31673
31674NTPO_SAVED_CPPFLAGS="$CPPFLAGS"
31675CPPFLAGS="$CPPFLAGS $CPPFLAGS_NTP"
31676NTPO_SAVED_LIBS="$LIBS"
31677
31678#
31679# check for linking with -lcrypto failure, and try -lcrypto -lz.
31680# Helps m68k-atari-mint
31681#
31682case "$ntp_openssl:$ntp_openssl_from_pkg_config" in
31683 yes:no)
31684    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
31685    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto alone works" >&5
31686printf %s "checking if linking with -lcrypto alone works... " >&6; }
31687if test ${ntp_cv_bare_lcrypto+y}
31688then :
31689  printf %s "(cached) " >&6
31690else $as_nop
31691  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31692/* end confdefs.h.  */
31693
31694		    #include "openssl/err.h"
31695		    #include "openssl/evp.h"
31696
31697int
31698main (void)
31699{
31700
31701		    ERR_load_crypto_strings();
31702		    OpenSSL_add_all_algorithms();
31703
31704
31705  ;
31706  return 0;
31707}
31708_ACEOF
31709if ac_fn_c_try_link "$LINENO"
31710then :
31711  ntp_cv_bare_lcrypto=yes
31712else $as_nop
31713  ntp_cv_bare_lcrypto=no
31714
31715fi
31716rm -f core conftest.err conftest.$ac_objext conftest.beam \
31717    conftest$ac_exeext conftest.$ac_ext
31718
31719fi
31720{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_bare_lcrypto" >&5
31721printf "%s\n" "$ntp_cv_bare_lcrypto" >&6; }
31722    case "$ntp_cv_bare_lcrypto" in
31723     no)
31724	LIBS="$NTPO_SAVED_LIBS $LDADD_NTP -lz"
31725	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if linking with -lcrypto -lz works" >&5
31726printf %s "checking if linking with -lcrypto -lz works... " >&6; }
31727if test ${ntp_cv_lcrypto_lz+y}
31728then :
31729  printf %s "(cached) " >&6
31730else $as_nop
31731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31732/* end confdefs.h.  */
31733
31734			#include "openssl/err.h"
31735			#include "openssl/evp.h"
31736
31737int
31738main (void)
31739{
31740
31741			ERR_load_crypto_strings();
31742			OpenSSL_add_all_algorithms();
31743
31744
31745  ;
31746  return 0;
31747}
31748_ACEOF
31749if ac_fn_c_try_link "$LINENO"
31750then :
31751  ntp_cv_lcrypto_lz=yes
31752else $as_nop
31753  ntp_cv_lcrypto_lz=no
31754
31755fi
31756rm -f core conftest.err conftest.$ac_objext conftest.beam \
31757    conftest$ac_exeext conftest.$ac_ext
31758
31759fi
31760{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_lcrypto_lz" >&5
31761printf "%s\n" "$ntp_cv_lcrypto_lz" >&6; }
31762	case "$ntp_cv_lcrypto_lz" in
31763	 yes)
31764	     LDADD_NTP="$LDADD_NTP -lz"
31765	esac
31766    esac
31767esac
31768
31769#
31770# Older OpenSSL headers have a number of callback prototypes inside
31771# other function prototypes which trigger copious warnings with gcc's
31772# -Wstrict-prototypes, which is included in -Wall.
31773#
31774# An example:
31775#
31776# int i2d_RSA_NET(const RSA *a, unsigned char **pp,
31777#		  int (*cb)(), int sgckey);
31778#		  ^^^^^^^^^^^
31779#
31780#
31781#
31782openssl_triggers_warnings=unknown
31783NTPO_SAVED_CFLAGS="$CFLAGS"
31784
31785case "$ntp_openssl:$GCC" in
31786 yes:yes)
31787    CFLAGS="$CFLAGS -Werror"
31788    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31789/* end confdefs.h.  */
31790
31791
31792int
31793main (void)
31794{
31795
31796		/* see if -Werror breaks gcc */
31797
31798
31799  ;
31800  return 0;
31801}
31802_ACEOF
31803if ac_fn_c_try_compile "$LINENO"
31804then :
31805  gcc_handles_Werror=yes
31806else $as_nop
31807  gcc_handles_Werror=no
31808
31809fi
31810rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31811    case "$gcc_handles_Werror" in
31812     no)
31813	# if this gcc doesn't do -Werror go ahead and use
31814	# -Wstrict-prototypes.
31815	openssl_triggers_warnings=yes
31816	;;
31817     yes)
31818	CFLAGS="$CFLAGS -Wstrict-prototypes"
31819	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31820/* end confdefs.h.  */
31821
31822		    #include "openssl/asn1_mac.h"
31823		    #include "openssl/bn.h"
31824		    #include "openssl/err.h"
31825		    #include "openssl/evp.h"
31826		    #include "openssl/pem.h"
31827		    #include "openssl/rand.h"
31828		    #include "openssl/x509v3.h"
31829
31830int
31831main (void)
31832{
31833
31834		    /* empty body */
31835
31836
31837  ;
31838  return 0;
31839}
31840_ACEOF
31841if ac_fn_c_try_compile "$LINENO"
31842then :
31843  openssl_triggers_warnings=no
31844else $as_nop
31845  openssl_triggers_warnings=yes
31846
31847fi
31848rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
31849    esac
31850    case "$openssl_triggers_warnings" in
31851     yes)
31852	CFLAGS_NTP="$CFLAGS_NTP -Wno-strict-prototypes"
31853	;;
31854     *)
31855	CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
31856    esac
31857    ;;
31858 no:yes)
31859    # gcc without OpenSSL
31860    CFLAGS_NTP="$CFLAGS_NTP -Wstrict-prototypes"
31861esac
31862
31863# Because we don't want -Werror for the EVP_MD_do_all_sorted check
31864CFLAGS="$NTPO_SAVED_CFLAGS"
31865
31866case "$ntp_openssl" in
31867 yes)
31868    LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
31869    ac_fn_c_check_func "$LINENO" "EVP_MD_do_all_sorted" "ac_cv_func_EVP_MD_do_all_sorted"
31870if test "x$ac_cv_func_EVP_MD_do_all_sorted" = xyes
31871then :
31872  printf "%s\n" "#define HAVE_EVP_MD_DO_ALL_SORTED 1" >>confdefs.h
31873
31874fi
31875
31876    ;;
31877esac
31878
31879
31880CPPFLAGS="$NTPO_SAVED_CPPFLAGS"
31881LIBS="$NTPO_SAVED_LIBS"
31882{ NTPO_SAVED_CFLAGS=; unset NTPO_SAVED_CFLAGS;}
31883{ NTPO_SAVED_CPPFLAGS=; unset NTPO_SAVED_CPPFLAGS;}
31884{ NTPO_SAVED_LIBS=; unset NTPO_SAVED_LIBS;}
31885{ openssl_triggers_warnings=; unset openssl_triggers_warnings;}
31886{ ntp_openssl_from_pkg_config=; unset ntp_openssl_from_pkg_config;}
31887
31888
31889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable CMAC support" >&5
31890printf %s "checking if we want to enable CMAC support... " >&6; }
31891case "$ac_cv_header_openssl_cmac_h" in
31892 yes)
31893
31894printf "%s\n" "#define ENABLE_CMAC 1" >>confdefs.h
31895
31896    ans="yes"
31897    ;;
31898 *) ans="no"
31899    ;;
31900esac
31901{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31902printf "%s\n" "$ans" >&6; }
31903
31904
31905
31906
31907{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to use OpenSSL's crypto random (if available)" >&5
31908printf %s "checking if we want to use OpenSSL's crypto random (if available)... " >&6; }
31909# Check whether --enable-openssl-random was given.
31910if test ${enable_openssl_random+y}
31911then :
31912  enableval=$enable_openssl_random; ntp_use_openssl_random=$enableval
31913else $as_nop
31914  ntp_use_openssl_random=yes
31915
31916fi
31917
31918{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_use_openssl_random" >&5
31919printf "%s\n" "$ntp_use_openssl_random" >&6; }
31920
31921# The following might need extra libraries
31922NTPO_SAVED_LIBS="$LIBS"
31923LIBS="$NTPO_SAVED_LIBS $LDADD_NTP"
31924ac_fn_c_check_func "$LINENO" "RAND_bytes" "ac_cv_func_RAND_bytes"
31925if test "x$ac_cv_func_RAND_bytes" = xyes
31926then :
31927  printf "%s\n" "#define HAVE_RAND_BYTES 1" >>confdefs.h
31928
31929fi
31930ac_fn_c_check_func "$LINENO" "RAND_poll" "ac_cv_func_RAND_poll"
31931if test "x$ac_cv_func_RAND_poll" = xyes
31932then :
31933  printf "%s\n" "#define HAVE_RAND_POLL 1" >>confdefs.h
31934
31935fi
31936
31937LIBS="$NTPO_SAVED_LIBS"
31938case "$ntp_openssl$ntp_use_openssl_random$ac_cv_func_RAND_bytes$ac_cv_func_RAND_poll" in
31939 yesyesyesyes)
31940
31941printf "%s\n" "#define USE_OPENSSL_CRYPTO_RAND 1" >>confdefs.h
31942
31943     ;;
31944 *) ntp_use_openssl_random=no ;;
31945esac
31946
31947
31948
31949# if we are using OpenSSL (--with-crypto), by default Autokey is enabled
31950{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to include NTP Autokey protocol support" >&5
31951printf %s "checking if we want to include NTP Autokey protocol support... " >&6; }
31952# Check whether --enable-autokey was given.
31953if test ${enable_autokey+y}
31954then :
31955  enableval=$enable_autokey; ntp_autokey=$enableval
31956else $as_nop
31957  ntp_autokey=$ntp_openssl
31958
31959fi
31960
31961case "$ntp_autokey" in
31962 no)
31963    ;;
31964 *)
31965    case "$ntp_openssl" in
31966     no)
31967	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&5
31968printf "%s\n" "$as_me: WARNING: Disabling Autokey, --enable-autokey requires --with-crypto." >&2;}
31969	ntp_autokey=no
31970	;;
31971     *)
31972
31973printf "%s\n" "#define AUTOKEY 1" >>confdefs.h
31974
31975	ntp_autokey=yes
31976	;;
31977    esac
31978    ;;
31979esac
31980{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_autokey" >&5
31981printf "%s\n" "$ntp_autokey" >&6; }
31982
31983
31984{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to run check-layout" >&5
31985printf %s "checking if we want to run check-layout... " >&6; }
31986case "$cross_compiling$PATH_PERL" in
31987 no/*)
31988    MAKE_CHECK_LAYOUT=check-layout
31989    ans=yes
31990    ;;
31991 *)
31992    ans=no
31993    ;;
31994esac
31995{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
31996printf "%s\n" "$ans" >&6; }
31997
31998
31999
32000{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can make dcf parse utilities" >&5
32001printf %s "checking if we can make dcf parse utilities... " >&6; }
32002ans=no
32003case "$ntp_parseutil" in
32004 yes)
32005    case "$host" in
32006     *-*-sunos4*|*-*-solaris2*|*-*-*linux*|*-*-netbsd*)
32007	ans="dcfd testdcf"
32008	DCFD=dcfd
32009	TESTDCF=testdcf
32010    esac
32011    ;;
32012esac
32013{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32014printf "%s\n" "$ans" >&6; }
32015
32016
32017{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can build kernel streams modules for parse" >&5
32018printf %s "checking if we can build kernel streams modules for parse... " >&6; }
32019ans=no
32020case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
32021 yesyes)
32022    case "$host" in
32023     sparc-*-sunos4*)
32024        case "$ntp_cv_var_kernel_pll" in
32025	yes)
32026
32027printf "%s\n" "#define PPS_SYNC 1" >>confdefs.h
32028
32029	    ;;
32030	esac
32031	ans=parsestreams
32032	MAKE_PARSEKMODULE=parsestreams.loadable_module.o
32033	;;
32034     sparc-*-solaris2*)
32035	ans=parsesolaris
32036	MAKE_PARSEKMODULE=parse
32037	ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default"
32038if test "x$ac_cv_header_strings_h" = xyes
32039then :
32040  printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h
32041
32042fi
32043
32044	;;
32045    esac
32046    ;;
32047esac
32048{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32049printf "%s\n" "$ans" >&6; }
32050
32051{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we need basic refclock support" >&5
32052printf %s "checking if we need basic refclock support... " >&6; }
32053case "$ntp_refclock" in
32054 yes)
32055
32056printf "%s\n" "#define REFCLOCK 1" >>confdefs.h
32057
32058    ;;
32059esac
32060{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_refclock" >&5
32061printf "%s\n" "$ntp_refclock" >&6; }
32062
32063PROPDELAY=propdelay
32064
32065
32066
32067{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want HP-UX adjtimed support" >&5
32068printf %s "checking if we want HP-UX adjtimed support... " >&6; }
32069case "$host" in
32070 *-*-hpux[56789]*)
32071    ans=yes
32072    ;;
32073 *) ans=no
32074    ;;
32075esac
32076case "$ans" in
32077 yes)
32078    MAKE_ADJTIMED=adjtimed
32079
32080printf "%s\n" "#define NEED_HPUX_ADJTIME 1" >>confdefs.h
32081
32082    ;;
32083 *) ADJTIMED_DB=
32084    ADJTIMED_DL=
32085    ADJTIMED_DS=
32086    ADJTIMED_MS=
32087    ;;
32088esac
32089{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32090printf "%s\n" "$ans" >&6; }
32091
32092{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want QNX adjtime support" >&5
32093printf %s "checking if we want QNX adjtime support... " >&6; }
32094case "$host" in
32095 *-*-qnx*)
32096    ans=yes
32097    ;;
32098 *) ans=no
32099    ;;
32100esac
32101case "$ans" in
32102 yes)
32103
32104printf "%s\n" "#define NEED_QNX_ADJTIME 1" >>confdefs.h
32105
32106    ;;
32107esac
32108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32109printf "%s\n" "$ans" >&6; }
32110
32111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can read kmem" >&5
32112printf %s "checking if we can read kmem... " >&6; }
32113
32114#  the default is to enable it if the system has the capability
32115
32116case "$ac_cv_func_nlist$ac_cv_func_K_open$ac_cv_func_kvm_open" in
32117 *yes*)
32118    ans=yes
32119    ;;
32120 *) ans=no
32121    ;;
32122esac
32123
32124case "$host" in
32125 *-*-domainos)	# Won't be found...
32126    ans=no
32127    ;;
32128 *-*-hpux*)
32129    #ans=no
32130    ;;
32131 *-*-irix[456]*)
32132    ans=no
32133    ;;
32134 *-*-*linux*)
32135    ans=no
32136    ;;
32137 *-*-winnt3.5)
32138    ans=no
32139    ;;
32140 *-*-unicosmp*)
32141    ans=no
32142    ;;
32143esac
32144
32145# --enable-kmem / --disable-kmem controls if present
32146# Check whether --enable-kmem was given.
32147if test ${enable_kmem+y}
32148then :
32149  enableval=$enable_kmem; ans=$enableval
32150
32151fi
32152
32153
32154{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32155printf "%s\n" "$ans" >&6; }
32156
32157case "$ans" in
32158 yes)
32159    can_kmem=yes
32160    ;;
32161 *)
32162    can_kmem=no
32163
32164printf "%s\n" "#define NOKMEM 1" >>confdefs.h
32165
32166esac
32167
32168
32169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if adjtime is accurate" >&5
32170printf %s "checking if adjtime is accurate... " >&6; }
32171
32172# target-dependent defaults
32173
32174case "$host" in
32175 i386-sequent-ptx*)
32176    ans=no
32177    ;;
32178 i386-unknown-osf1*)
32179    ans=yes
32180    ;;
32181 mips-sgi-irix[456]*)
32182    ans=yes
32183    ;;
32184 *-fujitsu-uxp*)
32185    ans=yes
32186    ;;
32187 *-ibm-aix[4-9]*)
32188    # XXX only verified thru AIX6.
32189    ans=yes
32190    ;;
32191 *-*-*linux*)
32192    ans=yes
32193    ;;
32194 *-*-solaris2.[01])
32195    ans=no
32196    ;;
32197 *-*-solaris2*)
32198    ans=yes
32199    ;;
32200 *-*-unicosmp*)
32201    ans=yes
32202    ;;
32203 *) ans=no
32204    ;;
32205esac
32206
32207# --enable-accurate-adjtime / --disable-accurate-adjtime
32208# override the default
32209# Check whether --enable-accurate-adjtime was given.
32210if test ${enable_accurate_adjtime+y}
32211then :
32212  enableval=$enable_accurate_adjtime; ans=$enableval
32213
32214fi
32215
32216
32217{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32218printf "%s\n" "$ans" >&6; }
32219
32220case "$ans" in
32221 yes)
32222
32223printf "%s\n" "#define ADJTIME_IS_ACCURATE 1" >>confdefs.h
32224
32225    adjtime_is_accurate=yes
32226    ;;
32227 *)
32228    adjtime_is_accurate=no
32229    ;;
32230esac
32231
32232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tick' in the kernel" >&5
32233printf %s "checking the name of 'tick' in the kernel... " >&6; }
32234if test ${ntp_cv_nlist_tick+y}
32235then :
32236  printf %s "(cached) " >&6
32237else $as_nop
32238
32239	ans=_tick
32240	case "$host" in
32241	 m68*-hp-hpux*) # HP9000/300?
32242	    ans=_old_tick
32243	    ;;
32244	 *-apple-aux[23]*)
32245	    ans=tick
32246	    ;;
32247	 *-hp-hpux*)
32248	    ans=old_tick
32249	    ;;
32250	 *-ibm-aix[3-9]*)
32251	    # XXX only verified thru AIX6.
32252	    ans=no
32253	    ;;
32254	 *-*-mpeix*)
32255	    ans=no
32256	    ;;
32257	 *-*-ptx*)
32258	    ans=tick
32259	    ;;
32260	 *-*-sco3.2v[45]*)
32261	    ans=no
32262	    ;;
32263	 *-*-solaris2*)
32264	    ans=nsec_per_tick
32265	    ;;
32266	 *-*-sysv4*)
32267	    ans=tick
32268	    ;;
32269	esac
32270	ntp_cv_nlist_tick=$ans
32271
32272
32273fi
32274{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tick" >&5
32275printf "%s\n" "$ntp_cv_nlist_tick" >&6; }
32276case "$ntp_cv_nlist_tick" in
32277 ''|no)
32278    ;;	# HMS: I think we can only get 'no' here...
32279 *)
32280
32281printf "%s\n" "#define K_TICK_NAME \"$ntp_cv_nlist_tick\"" >>confdefs.h
32282
32283esac
32284
32285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tick'" >&5
32286printf %s "checking for the units of 'tick'... " >&6; }
32287if test ${ntp_cv_tick_nano+y}
32288then :
32289  printf %s "(cached) " >&6
32290else $as_nop
32291
32292	ans=usec
32293	case "$host" in
32294	 *-*-solaris2*)
32295	    ans=nsec
32296	    ;;
32297	esac
32298	ntp_cv_tick_nano=$ans
32299
32300
32301fi
32302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tick_nano" >&5
32303printf "%s\n" "$ntp_cv_tick_nano" >&6; }
32304case "$ntp_cv_tick_nano" in
32305 nsec)
32306
32307printf "%s\n" "#define TICK_NANO 1" >>confdefs.h
32308
32309esac
32310
32311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name of 'tickadj' in the kernel" >&5
32312printf %s "checking the name of 'tickadj' in the kernel... " >&6; }
32313if test ${ntp_cv_nlist_tickadj+y}
32314then :
32315  printf %s "(cached) " >&6
32316else $as_nop
32317
32318	ans=_tickadj
32319	case "$host" in
32320	 m68*-hp-hpux*) # HP9000/300?
32321	    ans=_tickadj
32322	    ;;
32323	 *-apple-aux[23]*)
32324	    ans=tickadj
32325	    ;;
32326	 *-hp-hpux10*)
32327	    ans=no
32328	    ;;
32329	 *-hp-hpux9*)
32330	    ans=no
32331	    ;;
32332	 *-hp-hpux*)
32333	    ans=tickadj
32334	    ;;
32335	 *-*-aix*)
32336	    ans=tickadj
32337	    ;;
32338	 *-*-mpeix*)
32339	    ans=no
32340	    ;;
32341	 *-*-ptx*)
32342	    ans=tickadj
32343	    ;;
32344	 *-*-sco3.2v4*)
32345	    ans=no
32346	    ;;
32347	 *-*-sco3.2v5.0*)
32348	    ans=clock_drift
32349	    ;;
32350	 *-*-solaris2*)
32351	    ans=no	# hrestime_adj
32352	    ;;
32353	 *-*-sysv4*)
32354	    ans=tickadj
32355	    ;;
32356	esac
32357	ntp_cv_nlist_tickadj=$ans
32358
32359
32360fi
32361{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_tickadj" >&5
32362printf "%s\n" "$ntp_cv_nlist_tickadj" >&6; }
32363case "$ntp_cv_nlist_tickadj" in
32364 ''|no)
32365    ;;	# HMS: I think we can only get 'no' here...
32366 *)
32367
32368printf "%s\n" "#define K_TICKADJ_NAME \"$ntp_cv_nlist_tickadj\"" >>confdefs.h
32369
32370esac
32371
32372{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the units of 'tickadj'" >&5
32373printf %s "checking for the units of 'tickadj'... " >&6; }
32374if test ${ntp_cv_tickadj_nano+y}
32375then :
32376  printf %s "(cached) " >&6
32377else $as_nop
32378
32379	ans=usec
32380	case "$host" in
32381	 *-*-solaris2*)
32382	    ans=nsec
32383	    ;;
32384	esac
32385	ntp_cv_tickadj_nano=$ans
32386
32387
32388fi
32389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_tickadj_nano" >&5
32390printf "%s\n" "$ntp_cv_tickadj_nano" >&6; }
32391case "$ntp_cv_tickadj_nano" in
32392 nsec)
32393
32394printf "%s\n" "#define TICKADJ_NANO 1" >>confdefs.h
32395
32396esac
32397
32398{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'dosynctodr' in the kernel" >&5
32399printf %s "checking half-heartedly for 'dosynctodr' in the kernel... " >&6; }
32400if test ${ntp_cv_nlist_dosynctodr+y}
32401then :
32402  printf %s "(cached) " >&6
32403else $as_nop
32404
32405	case "$host" in
32406	 *-apple-aux[23]*)
32407	    ans=no
32408	    ;;
32409	 *-sni-sysv*)
32410	    ans=dosynctodr
32411	    ;;
32412	 *-stratus-vos)
32413	    ans=no
32414	    ;;
32415	 *-*-aix*)
32416	    ans=dosynctodr
32417	    ;;
32418	 *-*-hpux*)
32419	    ans=no
32420	    ;;
32421	 *-*-mpeix*)
32422	    ans=no
32423	    ;;
32424	 *-*-nextstep*)
32425	    ans=_dosynctodr
32426	    ;;
32427	 *-*-ptx*)
32428	    ans=doresettodr
32429	    ;;
32430	 *-*-sco3.2v4*)
32431	    ans=no
32432	    ;;
32433	 *-*-sco3.2v5*)
32434	    ans=track_rtc
32435	    ;;
32436	 *-*-solaris2*)
32437	    ans=dosynctodr
32438	    ;;
32439	 *-*-sysv4*)
32440	    ans=doresettodr
32441	    ;;
32442	 *)
32443	    ans=_dosynctodr
32444	    ;;
32445	esac
32446	ntp_cv_nlist_dosynctodr=$ans
32447
32448
32449fi
32450{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_dosynctodr" >&5
32451printf "%s\n" "$ntp_cv_nlist_dosynctodr" >&6; }
32452case "$ntp_cv_nlist_dosynctodr" in
32453 no)
32454    ;;
32455 *)
32456
32457printf "%s\n" "#define K_DOSYNCTODR_NAME \"$ntp_cv_nlist_dosynctodr\"" >>confdefs.h
32458
32459    ;;
32460esac
32461
32462{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking half-heartedly for 'noprintf' in the kernel" >&5
32463printf %s "checking half-heartedly for 'noprintf' in the kernel... " >&6; }
32464if test ${ntp_cv_nlist_noprintf+y}
32465then :
32466  printf %s "(cached) " >&6
32467else $as_nop
32468
32469	case "$host" in
32470	 *-apple-aux[23]*)
32471	    ans=no
32472	    ;;
32473	 *-sni-sysv*)
32474	    ans=noprintf
32475	    ;;
32476	 *-stratus-vos)
32477	    ans=no
32478	    ;;
32479	 *-*-aix*)
32480	    ans=noprintf
32481	    ;;
32482	 *-*-hpux*)
32483	    ans=no
32484	    ;;
32485	 *-*-mpeix*)
32486	    ans=no
32487	    ;;
32488	 *-*-ptx*)
32489	    ans=noprintf
32490	    ;;
32491	 *-*-nextstep*)
32492	    ans=_noprintf
32493	    ;;
32494	 *-*-solaris2*)
32495	    ans=noprintf
32496	    ;;
32497	 *-*-sysv4*)
32498	    ans=noprintf
32499	    ;;
32500	 *)
32501	    ans=_noprintf
32502	    ;;
32503	esac
32504	ntp_cv_nlist_noprintf=$ans
32505
32506
32507fi
32508{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_nlist_noprintf" >&5
32509printf "%s\n" "$ntp_cv_nlist_noprintf" >&6; }
32510case "$ntp_cv_nlist_noprintf" in
32511 no)
32512    ;;
32513 *)
32514
32515printf "%s\n" "#define K_NOPRINTF_NAME \"$ntp_cv_nlist_noprintf\"" >>confdefs.h
32516
32517    ;;
32518esac
32519
32520
32521
32522
32523{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tick'" >&5
32524printf %s "checking for a default value for 'tick'... " >&6; }
32525
32526# target-dependent default for tick
32527
32528case "$host" in
32529 *-*-pc-cygwin*)
32530    as_fn_error $? "tick needs work for cygwin" "$LINENO" 5
32531    ;;
32532 *-univel-sysv*)
32533    ans=10000
32534    ;;
32535 *-*-irix*)
32536    ans=10000
32537    ;;
32538 *-*-*linux*)
32539    ans=txc.tick
32540    ;;
32541 *-*-mpeix*)
32542    ans=no
32543    ;;
32544 *-*-winnt3.5)
32545    ans='(every / 10)'
32546    ;;
32547 *-*-unicosmp*)
32548    ans=10000
32549    ;;
32550 *)
32551    ans='1000000L/hz'
32552    ;;
32553esac
32554
32555# Check whether --enable-tick was given.
32556if test ${enable_tick+y}
32557then :
32558  enableval=$enable_tick; ans=$enableval
32559
32560fi
32561
32562
32563{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32564printf "%s\n" "$ans" >&6; }
32565
32566case "$ans" in
32567 ''|no)
32568    ;;	# HMS: I think we can only get 'no' here...
32569 *)
32570
32571printf "%s\n" "#define PRESET_TICK $ans" >>confdefs.h
32572
32573esac
32574
32575{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a default value for 'tickadj'" >&5
32576printf %s "checking for a default value for 'tickadj'... " >&6; }
32577
32578# target-specific default
32579ans='500/hz'
32580case "$host" in
32581 *-fujitsu-uxp*)
32582    case "$adjtime_is_accurate" in
32583     yes)
32584	ans='tick/16'
32585    esac
32586    ;;
32587 *-univel-sysv*)
32588    ans=80
32589    ;;
32590 *-*-aix*)
32591    case "$can_kmem" in
32592     no)
32593	ans=1000
32594	;;
32595    esac
32596    ;;
32597 *-*-domainos)	# Skippy: won't be found...
32598    case "$can_kmem" in
32599     no)
32600	ans=668
32601	;;
32602    esac
32603    ;;
32604 *-*-hpux*)
32605    case "$adjtime_is_accurate" in
32606     yes)
32607	ans='tick/16'
32608	;;
32609    esac
32610    ;;
32611 *-*-irix*)
32612    ans=150
32613    ;;
32614 *-*-mpeix*)
32615    ans=no
32616    ;;
32617 *-*-sco3.2v5.0*)
32618    ans=10000L/hz
32619    ;;
32620 *-*-winnt3.5)
32621    ans=50
32622    ;;
32623 *-*-unicosmp*)
32624    ans=150
32625    ;;
32626esac
32627
32628# Check whether --enable-tickadj was given.
32629if test ${enable_tickadj+y}
32630then :
32631  enableval=$enable_tickadj; ans=$enableval
32632
32633fi
32634
32635
32636{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32637printf "%s\n" "$ans" >&6; }
32638
32639default_tickadj=$ans
32640
32641case "$default_tickadj" in
32642 ''|no)
32643    ;;	# HMS: I think we can only get 'no' here...
32644 *)
32645
32646printf "%s\n" "#define PRESET_TICKADJ $default_tickadj" >>confdefs.h
32647 ;;
32648esac
32649
32650# Newer versions of ReliantUNIX round adjtime() values down to
32651# 1/100s (system tick). Sigh ...
32652# Unfortunately, there is no easy way to know if particular release
32653# has this "feature" or any obvious way to test for it.
32654case "$host" in
32655 mips-sni-sysv4*)
32656
32657printf "%s\n" "#define RELIANTUNIX_CLOCK 1" >>confdefs.h
32658
32659esac
32660
32661case "$host" in
32662 *-*-sco3.2v5*)
32663
32664printf "%s\n" "#define SCO5_CLOCK 1" >>confdefs.h
32665
32666esac
32667
32668ntp_cv_make_tickadj=yes
32669case "$can_kmem$ac_cv_var_tick$default_tickadj" in
32670 nonono)	# Don't read KMEM, no presets.  Bogus.
32671    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&5
32672printf "%s\n" "$as_me: WARNING: Can't read kmem, no PRESET_TICK or PRESET_TICKADJ.  No tickadj." >&2;}
32673    ntp_cv_make_tickadj=no
32674    ;;
32675 nono*)		# Don't read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
32676    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&5
32677printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICK.  No tickadj." >&2;}
32678    ntp_cv_make_tickadj=no
32679    ;;
32680 no*no)		# Don't read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Bogus.
32681    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&5
32682printf "%s\n" "$as_me: WARNING: Can't read kmem but no PRESET_TICKADJ.  No tickadj." >&2;}
32683    ntp_cv_make_tickadj=no
32684    ;;
32685 no*)		# Don't read KMEM, PRESET_TICK and PRESET_TICKADJ.  Cool.
32686    ;;
32687 yesnono)	# Read KMEM, no presets.  Cool.
32688    ;;
32689 yesno*)	# Read KMEM, no PRESET_TICK but PRESET_TICKADJ.  Bogus.
32690    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&5
32691printf "%s\n" "$as_me: WARNING: PRESET_TICKADJ is defined but not PRESET_TICK.  Please report this." >&2;}
32692    ;;
32693 yes*no)	# Read KMEM, PRESET_TICK but no PRESET_TICKADJ.  Cool.
32694    ;;
32695 yes*)		# READ KMEM, PRESET_TICK and PRESET_TICKADJ.
32696    ;;
32697 *)		# Generally bogus.
32698    as_fn_error $? "This shouldn't happen." "$LINENO" 5
32699    ;;
32700esac
32701
32702
32703{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the ntptime utility" >&5
32704printf %s "checking if we want and can make the ntptime utility... " >&6; }
32705if test ${ac_cv_make_ntptime+y}
32706then :
32707  printf %s "(cached) " >&6
32708else $as_nop
32709  case "$host" in
32710 *) case "$ntp_cv_struct_ntptimeval$ntp_cv_var_kernel_pll" in
32711     yesyes)
32712	ans=yes
32713	;;
32714     *)
32715	ans=no
32716	;;
32717    esac
32718    ;;
32719esac
32720ac_cv_make_ntptime=$ans
32721fi
32722{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_make_ntptime" >&5
32723printf "%s\n" "$ac_cv_make_ntptime" >&6; }
32724case "$ac_cv_make_ntptime" in
32725 yes)
32726    MAKE_NTPTIME=ntptime
32727    ;;
32728 *)
32729    NTPTIME_DB=
32730    NTPTIME_DL=
32731    NTPTIME_DS=
32732    NTPTIME_MS=
32733    ;;
32734esac
32735
32736
32737case "$host" in
32738 mips-sni-sysv4*)
32739    # tickadj is pretty useless on newer versions of ReliantUNIX
32740    # Do not bother
32741    ntp_cv_make_tickadj=no
32742    ;;
32743 *-*-irix*)
32744    ntp_cv_make_tickadj=no
32745    ;;
32746 *-*-solaris2*)
32747    # DLM says tickadj is a no-no starting with solaris2.5
32748    case "$host" in
32749     *-*-solaris2.1[0-9]*)
32750	ntp_cv_make_tickadj=no
32751	;;
32752     *-*-solaris2.[0-4]*) ;;
32753     *) ntp_cv_make_tickadj=no ;;
32754    esac
32755    ;;
32756 *-*-unicosmp*)
32757    ntp_cv_make_tickadj=no
32758    ;;
32759esac
32760
32761#
32762# Despite all the above, we always make tickadj.  Setting
32763# ntp_cv_make_tickadj before AC_CACHE_CHECK will cause a false
32764# report that the configuration variable was cached.  It may
32765# be better to simply remove the hunk above, I did not want
32766# to remove it if there is hope it will be used again.
32767#
32768{ ntp_cv_make_tickadj=; unset ntp_cv_make_tickadj;}
32769
32770{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the tickadj utility" >&5
32771printf %s "checking if we want and can make the tickadj utility... " >&6; }
32772if test ${ntp_cv_make_tickadj+y}
32773then :
32774  printf %s "(cached) " >&6
32775else $as_nop
32776  ntp_cv_make_tickadj=yes
32777
32778fi
32779{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_tickadj" >&5
32780printf "%s\n" "$ntp_cv_make_tickadj" >&6; }
32781case "$ntp_cv_make_tickadj" in
32782 yes)
32783    MAKE_TICKADJ=tickadj
32784    ;;
32785 *)
32786    CALC_TICKADJ_DB=
32787    CALC_TICKADJ_DL=
32788    CALC_TICKADJ_DS=
32789    CALC_TICKADJ_MS=
32790    TICKADJ_DB=
32791    TICKADJ_DL=
32792    TICKADJ_DS=
32793    TICKADJ_MS=
32794    ;;
32795esac
32796
32797
32798{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want and can make the timetrim utility" >&5
32799printf %s "checking if we want and can make the timetrim utility... " >&6; }
32800if test ${ntp_cv_make_timetrim+y}
32801then :
32802  printf %s "(cached) " >&6
32803else $as_nop
32804
32805	case "$host" in
32806	 *-*-irix*)
32807	    ntp_cv_make_timetrim=yes
32808	    ;;
32809	 *-*-unicosmp*)
32810	    ntp_cv_make_timetrim=yes
32811	    ;;
32812	 *)
32813	    ntp_cv_make_timetrim=no
32814	    ;;
32815	esac
32816
32817
32818fi
32819{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_make_timetrim" >&5
32820printf "%s\n" "$ntp_cv_make_timetrim" >&6; }
32821case "$ntp_cv_make_timetrim" in
32822 yes)
32823    MAKE_TIMETRIM=timetrim
32824    ;;
32825 *) TIMETRIM_DB=
32826    TIMETRIM_DL=
32827    TIMETRIM_DS=
32828    TIMETRIM_MS=
32829    ;;
32830esac
32831
32832
32833
32834
32835{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build the NTPD simulator" >&5
32836printf %s "checking if we want to build the NTPD simulator... " >&6; }
32837# Check whether --enable-simulator was given.
32838if test ${enable_simulator+y}
32839then :
32840  enableval=$enable_simulator; ans=$enableval
32841else $as_nop
32842  ans=no
32843
32844fi
32845
32846{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32847printf "%s\n" "$ans" >&6; }
32848case "$ans" in
32849 yes)
32850    MAKE_NTPDSIM=ntpdsim
32851    MAKE_LIBNTPSIM=libntpsim.a
32852    ;;
32853 *)
32854    NTPDSIM_DB=
32855    NTPDSIM_DL=
32856    NTPDSIM_DS=
32857    NTPDSIM_MS=
32858    ;;
32859esac
32860
32861case "$build" in
32862 $host)
32863    ;;
32864 *) case "$host" in
32865     *-*-vxworks*)
32866	LDFLAGS="$LDFLAGS -r"
32867	;;
32868    esac
32869    ;;
32870esac
32871
32872
32873
32874{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sntp will be built" >&5
32875printf %s "checking if sntp will be built... " >&6; }
32876
32877# Check whether --with-sntp was given.
32878if test ${with_sntp+y}
32879then :
32880  withval=$with_sntp;
32881else $as_nop
32882  with_sntp="${withsntp=yes}"
32883
32884fi
32885
32886case "$with_sntp" in
32887 no)
32888    SNTP=
32889    ;;
32890 *)
32891    SNTP=sntp
32892    ;;
32893esac
32894
32895 if test -n "$SNTP"; then
32896  BUILD_SNTP_TRUE=
32897  BUILD_SNTP_FALSE='#'
32898else
32899  BUILD_SNTP_TRUE='#'
32900  BUILD_SNTP_FALSE=
32901fi
32902
32903{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sntp" >&5
32904printf "%s\n" "$with_sntp" >&6; }
32905
32906
32907
32908{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to build ntpsnmpd" >&5
32909printf %s "checking if we want to build ntpsnmpd... " >&6; }
32910
32911# Check whether --with-ntpsnmpd was given.
32912if test ${with_ntpsnmpd+y}
32913then :
32914  withval=$with_ntpsnmpd; ans=$withval
32915else $as_nop
32916
32917	case "$PATH_NET_SNMP_CONFIG" in
32918	 /*)	ans=yes ;;
32919	 *)	ans=no  ;;
32920	esac
32921
32922
32923fi
32924
32925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
32926printf "%s\n" "$ans" >&6; }
32927case "$ans" in
32928 yes)
32929    case "$PATH_NET_SNMP_CONFIG" in
32930     /*)
32931	SNMP_LIBS=`$PATH_NET_SNMP_CONFIG --agent-libs`
32932	# Bug 2815.  This is a bit of a hack, but it works...
32933	case "$ntp_cv_net_snmp_version" in
32934	 5.3*)	SNMP_LIBS=`echo $SNMP_LIBS | $SED -e 's/-lnetsnmpagent/-lnetsnmpagent -lnetsnmpmibs/'`
32935		;;
32936	esac
32937
32938	# HMS: we really want to separate CPPFLAGS and CFLAGS
32939	foo=`$PATH_NET_SNMP_CONFIG --cflags`
32940	SNMP_CPPFLAGS=
32941	SNMP_CFLAGS=
32942	for i in $foo; do
32943	    case "$i" in
32944	     -D*|-U*|-I*)
32945		SNMP_CPPFLAGS="$SNMP_CPPFLAGS $i"
32946		;;
32947	    *)	SNMP_CFLAGS="$SNMP_CFLAGS $i"
32948		;;
32949	    esac
32950	done
32951
32952
32953
32954	save_CFLAGS=$CFLAGS
32955	save_CPPFLAGS=$CPPFLAGS
32956	save_LIBS=$LIBS
32957	CFLAGS=$SNMP_CFLAGS
32958	CPPFLAGS=$SNMP_CPPFLAGS
32959
32960	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"
32961if test "x$ac_cv_header_net_snmp_net_snmp_config_h" = xyes
32962then :
32963  MAKE_NTPSNMPD=ntpsnmpd
32964else $as_nop
32965  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: net-snmp-config present but net-snmp headers are not available!" >&5
32966printf "%s\n" "$as_me: WARNING: net-snmp-config present but net-snmp headers are not available!" >&2;}
32967
32968fi
32969
32970
32971	# Do this last, as we're messing up LIBS.
32972	# check -lnetsnmp for netsnmp_daemonize
32973	LIBS=`$PATH_NET_SNMP_CONFIG --libs`
32974	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for netsnmp_daemonize in -lnetsnmp" >&5
32975printf %s "checking for netsnmp_daemonize in -lnetsnmp... " >&6; }
32976if test ${ac_cv_lib_netsnmp_netsnmp_daemonize+y}
32977then :
32978  printf %s "(cached) " >&6
32979else $as_nop
32980  ac_check_lib_save_LIBS=$LIBS
32981LIBS="-lnetsnmp  $LIBS"
32982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32983/* end confdefs.h.  */
32984
32985/* Override any GCC internal prototype to avoid an error.
32986   Use char because int might match the return type of a GCC
32987   builtin and then its argument prototype would still apply.  */
32988char netsnmp_daemonize ();
32989int
32990main (void)
32991{
32992return netsnmp_daemonize ();
32993  ;
32994  return 0;
32995}
32996_ACEOF
32997if ac_fn_c_try_link "$LINENO"
32998then :
32999  ac_cv_lib_netsnmp_netsnmp_daemonize=yes
33000else $as_nop
33001  ac_cv_lib_netsnmp_netsnmp_daemonize=no
33002fi
33003rm -f core conftest.err conftest.$ac_objext conftest.beam \
33004    conftest$ac_exeext conftest.$ac_ext
33005LIBS=$ac_check_lib_save_LIBS
33006fi
33007{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_netsnmp_netsnmp_daemonize" >&5
33008printf "%s\n" "$ac_cv_lib_netsnmp_netsnmp_daemonize" >&6; }
33009if test "x$ac_cv_lib_netsnmp_netsnmp_daemonize" = xyes
33010then :
33011  ans=yes
33012else $as_nop
33013  ans=no
33014
33015fi
33016
33017	case "$ans" in
33018	 no)
33019
33020printf "%s\n" "#define NEED_NETSNMP_DAEMONIZE 1" >>confdefs.h
33021
33022	esac
33023
33024	CFLAGS=$save_CFLAGS
33025	{ save_CFLAGS=; unset save_CFLAGS;}
33026	CPPFLAGS=$save_CPPFLAGS
33027	{ save_CPPFLAGS=; unset save_CPPFLAGS;}
33028	LIBS=$save_LIBS
33029	{ save_LIBS=; unset save_LIBS;}
33030	;;
33031     *)
33032	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&5
33033printf "%s\n" "$as_me: WARNING: Cannot build ntpsnmpd - net-snmp-config cannot be found" >&2;}
33034	;;
33035    esac
33036    ;;
33037esac
33038
33039
33040case "$MAKE_NTPSNMPD" in
33041 '')
33042    NTPSNMPD_DB=
33043    NTPSNMPD_DL=
33044    NTPSNMPD_DS=
33045    NTPSNMPD_MS=
33046    ;;
33047esac
33048
33049{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should always slew the time" >&5
33050printf %s "checking if we should always slew the time... " >&6; }
33051
33052# target-specific defaults
33053
33054case "$host" in
33055 *-apple-aux[23]*)
33056    ans=yes
33057    ;;
33058 *-*-bsdi[012]*)
33059    ans=no
33060    ;;
33061 *-*-bsdi*)
33062    ans=yes
33063    ;;
33064 *-*-openvms*)	# HMS: won't be found
33065    ans=yes
33066    ;;
33067 *) ans=no
33068    ;;
33069esac
33070
33071# --enable-slew-always / --disable-slew-always overrides default
33072
33073# Check whether --enable-slew-always was given.
33074if test ${enable_slew_always+y}
33075then :
33076  enableval=$enable_slew_always; ans=$enableval
33077
33078fi
33079
33080
33081{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33082printf "%s\n" "$ans" >&6; }
33083
33084case "$ans" in
33085 yes)
33086
33087printf "%s\n" "#define SLEWALWAYS 1" >>confdefs.h
33088
33089esac
33090
33091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should step and slew the time" >&5
33092printf %s "checking if we should step and slew the time... " >&6; }
33093
33094case "$host" in
33095 *-sni-sysv*)
33096    ans=yes
33097    ;;
33098 *-stratus-vos)
33099    ans=no
33100    ;;
33101 *-univel-sysv*)
33102    ans=no
33103    ;;
33104 *-*-ptx*)
33105    ans=yes
33106    ;;
33107 *-*-solaris2.1[0-9]*)
33108    ans=no
33109    ;;
33110 *-*-solaris2.[012]*)
33111    ans=yes
33112    ;;
33113 *-*-sysv4*)	# HMS: Does this catch Fujitsu UXP?
33114    ans=yes
33115    ;;
33116 *) ans=no
33117    ;;
33118esac
33119
33120# Check whether --enable-step-slew was given.
33121if test ${enable_step_slew+y}
33122then :
33123  enableval=$enable_step_slew; ans=$enableval
33124
33125fi
33126
33127
33128{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33129printf "%s\n" "$ans" >&6; }
33130
33131case "$ans" in
33132 yes)
33133
33134printf "%s\n" "#define STEP_SLEW 1" >>confdefs.h
33135
33136esac
33137
33138{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if ntpdate should step the time" >&5
33139printf %s "checking if ntpdate should step the time... " >&6; }
33140
33141case "$host" in
33142 *-apple-aux[23]*)
33143    ans=yes
33144    ;;
33145 *) ans=no
33146    ;;
33147esac
33148
33149# Check whether --enable-ntpdate-step was given.
33150if test ${enable_ntpdate_step+y}
33151then :
33152  enableval=$enable_ntpdate_step; ans=$enableval
33153
33154fi
33155
33156
33157{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33158printf "%s\n" "$ans" >&6; }
33159
33160case "$ans" in
33161 yes)
33162
33163printf "%s\n" "#define FORCE_NTPDATE_STEP 1" >>confdefs.h
33164
33165esac
33166
33167
33168{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should sync TODR clock every hour" >&5
33169printf %s "checking if we should sync TODR clock every hour... " >&6; }
33170
33171case "$host" in
33172 *-*-nextstep*)
33173    ans=yes
33174    ;;
33175 *-*-openvms*)	# HMS: won't be found
33176    ans=yes
33177    ;;
33178 *)
33179    ans=no
33180    ;;
33181esac
33182
33183# Check whether --enable-hourly-todr-sync was given.
33184if test ${enable_hourly_todr_sync+y}
33185then :
33186  enableval=$enable_hourly_todr_sync; ans=$enableval
33187
33188fi
33189
33190
33191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33192printf "%s\n" "$ans" >&6; }
33193
33194case "$ac_cv_var_sync_todr" in
33195 yes)
33196
33197printf "%s\n" "#define DOSYNCTODR 1" >>confdefs.h
33198 ;;
33199esac
33200
33201
33202{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should avoid kernel FLL bug" >&5
33203printf %s "checking if we should avoid kernel FLL bug... " >&6; }
33204
33205case "$host" in
33206 *-*-solaris2.6)
33207    unamev=`uname -v`
33208    case "$unamev" in
33209     Generic_105181-*)
33210	old_IFS="$IFS"
33211	IFS="-"
33212	set $unamev
33213	IFS="$old_IFS"
33214	if test "$2" -ge 17
33215	then
33216	    # Generic_105181-17 and higher
33217	    ans=no
33218	else
33219	    ans=yes
33220	fi
33221	;;
33222     *)
33223	ans=yes
33224	;;
33225    esac
33226    ;;
33227 *-*-solaris2.7)
33228    unamev=`uname -v`
33229    case "$unamev" in
33230     Generic_106541-*)
33231	old_IFS="$IFS"
33232	IFS="-"
33233	set $unamev
33234	IFS="$old_IFS"
33235	if test "$2" -ge 07
33236	then
33237	    # Generic_106541-07 and higher
33238	    ans=no
33239	else
33240	    ans=yes
33241	fi
33242	;;
33243     *)
33244	ans=yes
33245	;;
33246    esac
33247    ;;
33248 *)
33249    ans=no
33250    ;;
33251esac
33252
33253# Check whether --enable-kernel-fll-bug was given.
33254if test ${enable_kernel_fll_bug+y}
33255then :
33256  enableval=$enable_kernel_fll_bug; ans=$enableval
33257
33258fi
33259
33260
33261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33262printf "%s\n" "$ans" >&6; }
33263
33264case "$ans" in
33265 yes)
33266
33267printf "%s\n" "#define KERNEL_FLL_BUG 1" >>confdefs.h
33268
33269esac
33270
33271
33272{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want new session key behavior" >&5
33273printf %s "checking if we want new session key behavior... " >&6; }
33274# Check whether --enable-bug1243-fix was given.
33275if test ${enable_bug1243_fix+y}
33276then :
33277  enableval=$enable_bug1243_fix; ans=$enableval
33278else $as_nop
33279  ans=yes
33280
33281fi
33282
33283{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33284printf "%s\n" "$ans" >&6; }
33285case "$ans" in
33286 no)
33287
33288printf "%s\n" "#define DISABLE_BUG1243_FIX 1" >>confdefs.h
33289
33290esac
33291
33292
33293{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the explicit 127.0.0.0/8 martian filter" >&5
33294printf %s "checking if we want the explicit 127.0.0.0/8 martian filter... " >&6; }
33295# Check whether --enable-bug3020-fix was given.
33296if test ${enable_bug3020_fix+y}
33297then :
33298  enableval=$enable_bug3020_fix; ans=$enableval
33299else $as_nop
33300  ans=yes
33301
33302fi
33303
33304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33305printf "%s\n" "$ans" >&6; }
33306case "$ans" in
33307 yes)
33308
33309printf "%s\n" "#define ENABLE_BUG3020_FIX 1" >>confdefs.h
33310
33311esac
33312
33313
33314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want correct mode7 fudgetime2 behavior" >&5
33315printf %s "checking if we want correct mode7 fudgetime2 behavior... " >&6; }
33316# Check whether --enable-bug3527-fix was given.
33317if test ${enable_bug3527_fix+y}
33318then :
33319  enableval=$enable_bug3527_fix; ans=$enableval
33320else $as_nop
33321  ans=yes
33322
33323fi
33324
33325{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33326printf "%s\n" "$ans" >&6; }
33327case "$ans" in
33328 no)
33329
33330printf "%s\n" "#define DISABLE_BUG3527_FIX 1" >>confdefs.h
33331
33332esac
33333
33334
33335{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want a debug assert on an OOB KoD RATE value" >&5
33336printf %s "checking if we want a debug assert on an OOB KoD RATE value... " >&6; }
33337# Check whether --enable-bug3767-fix was given.
33338if test ${enable_bug3767_fix+y}
33339then :
33340  enableval=$enable_bug3767_fix; ans=$enableval
33341else $as_nop
33342  ans=yes
33343
33344fi
33345
33346{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33347printf "%s\n" "$ans" >&6; }
33348case "$ans" in
33349 no)
33350
33351printf "%s\n" "#define DISABLE_BUG3767_FIX 1" >>confdefs.h
33352
33353esac
33354
33355
33356{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should use the IRIG sawtooth filter" >&5
33357printf %s "checking if we should use the IRIG sawtooth filter... " >&6; }
33358
33359case "$host" in
33360 *-*-solaris2.[89])
33361    ans=yes
33362    ;;
33363 *-*-solaris2.1[0-9]*)
33364    ans=yes
33365    ;;
33366 *) ans=no
33367    ;;
33368esac
33369
33370# Check whether --enable-irig-sawtooth was given.
33371if test ${enable_irig_sawtooth+y}
33372then :
33373  enableval=$enable_irig_sawtooth; ans=$enableval
33374
33375fi
33376
33377
33378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33379printf "%s\n" "$ans" >&6; }
33380
33381case "$ans" in
33382 yes)
33383
33384printf "%s\n" "#define IRIG_SUCKS 1" >>confdefs.h
33385
33386esac
33387
33388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should enable NIST lockclock scheme" >&5
33389printf %s "checking if we should enable NIST lockclock scheme... " >&6; }
33390# Check whether --enable-nist was given.
33391if test ${enable_nist+y}
33392then :
33393  enableval=$enable_nist; ans=$enableval
33394else $as_nop
33395  ans=no
33396
33397fi
33398
33399
33400{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33401printf "%s\n" "$ans" >&6; }
33402
33403case "$ans" in
33404 yes)
33405
33406printf "%s\n" "#define LOCKCLOCK 1" >>confdefs.h
33407 ;;
33408esac
33409
33410{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want support for Samba's signing daemon" >&5
33411printf %s "checking if we want support for Samba's signing daemon... " >&6; }
33412# Check whether --enable-ntp-signd was given.
33413if test ${enable_ntp_signd+y}
33414then :
33415  enableval=$enable_ntp_signd; ans=$enableval
33416else $as_nop
33417  ans=no
33418
33419fi
33420
33421
33422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33423printf "%s\n" "$ans" >&6; }
33424
33425case "$ans" in
33426 no)
33427    ntp_signd_path=
33428    ;;
33429 yes)
33430    ntp_signd_path=/var/run/ntp_signd
33431    ;;
33432 *)
33433    ntp_signd_path="$ans"
33434esac
33435
33436case "$ntp_signd_path" in
33437 '')
33438    ;;
33439 *)
33440
33441printf "%s\n" "#define HAVE_NTP_SIGND 1" >>confdefs.h
33442
33443
33444printf "%s\n" "#define NTP_SIGND_PATH \"$ntp_signd_path\"" >>confdefs.h
33445
33446    ;;
33447esac
33448
33449{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want 'magic' PPS support" >&5
33450printf %s "checking if we want 'magic' PPS support... " >&6; }
33451# Check whether --enable-magicpps was given.
33452if test ${enable_magicpps+y}
33453then :
33454  enableval=$enable_magicpps; ans=$enableval
33455else $as_nop
33456  ans=yes
33457
33458fi
33459
33460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ans" >&5
33461printf "%s\n" "$ans" >&6; }
33462case "$ans" in
33463 yes)
33464
33465printf "%s\n" "#define ENABLE_MAGICPPS 1" >>confdefs.h
33466
33467    ac_fn_c_check_func "$LINENO" "openat" "ac_cv_func_openat"
33468if test "x$ac_cv_func_openat" = xyes
33469then :
33470  printf "%s\n" "#define HAVE_OPENAT 1" >>confdefs.h
33471
33472fi
33473ac_fn_c_check_func "$LINENO" "fdopendir" "ac_cv_func_fdopendir"
33474if test "x$ac_cv_func_fdopendir" = xyes
33475then :
33476  printf "%s\n" "#define HAVE_FDOPENDIR 1" >>confdefs.h
33477
33478fi
33479ac_fn_c_check_func "$LINENO" "fstatat" "ac_cv_func_fstatat"
33480if test "x$ac_cv_func_fstatat" = xyes
33481then :
33482  printf "%s\n" "#define HAVE_FSTATAT 1" >>confdefs.h
33483
33484fi
33485
33486    ;;
33487esac
33488
33489ac_fn_c_check_header_compile "$LINENO" "libscf.h" "ac_cv_header_libscf_h" "$ac_includes_default"
33490if test "x$ac_cv_header_libscf_h" = xyes
33491then :
33492  printf "%s\n" "#define HAVE_LIBSCF_H 1" >>confdefs.h
33493
33494fi
33495
33496LSCF=
33497case "$ac_cv_header_libscf_h" in
33498 yes)
33499    LSCF='-lscf'
33500esac
33501
33502
33503
33504
33505{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
33506printf %s "checking for struct sockaddr_storage... " >&6; }
33507if test ${ntp_cv_sockaddr_storage+y}
33508then :
33509  printf %s "(cached) " >&6
33510else $as_nop
33511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33512/* end confdefs.h.  */
33513
33514		#ifdef HAVE_SYS_TYPES_H
33515		# include <sys/types.h>
33516		#endif
33517		#ifdef HAVE_SYS_SOCKET_H
33518		# include <sys/socket.h>
33519		#endif
33520		#ifdef HAVE_NETINET_IN_H
33521		# include <netinet/in.h>
33522		#endif
33523
33524int
33525main (void)
33526{
33527
33528		struct sockaddr_storage n;
33529
33530
33531  ;
33532  return 0;
33533}
33534_ACEOF
33535if ac_fn_c_try_compile "$LINENO"
33536then :
33537  ntp_cv_sockaddr_storage=yes
33538else $as_nop
33539  ntp_cv_sockaddr_storage=no
33540
33541fi
33542rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33543
33544fi
33545{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_sockaddr_storage" >&5
33546printf "%s\n" "$ntp_cv_sockaddr_storage" >&6; }
33547case "$ntp_cv_sockaddr_storage" in
33548 yes)
33549
33550printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
33551
33552    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage.__ss_family" >&5
33553printf %s "checking for sockaddr_storage.__ss_family... " >&6; }
33554if test ${ntp_cv_have___ss_family+y}
33555then :
33556  printf %s "(cached) " >&6
33557else $as_nop
33558  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33559/* end confdefs.h.  */
33560
33561		    #ifdef HAVE_SYS_TYPES_H
33562		    # include <sys/types.h>
33563		    #endif
33564		    #ifdef HAVE_SYS_SOCKET_H
33565		    # include <sys/socket.h>
33566		    #endif
33567		    #ifdef HAVE_NETINET_IN_H
33568		    # include <netinet/in.h>
33569		    #endif
33570
33571int
33572main (void)
33573{
33574
33575		    struct sockaddr_storage s;
33576		    s.__ss_family = 1;
33577
33578
33579  ;
33580  return 0;
33581}
33582_ACEOF
33583if ac_fn_c_try_compile "$LINENO"
33584then :
33585  ntp_cv_have___ss_family=yes
33586else $as_nop
33587  ntp_cv_have___ss_family=no
33588
33589fi
33590rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33591
33592fi
33593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_have___ss_family" >&5
33594printf "%s\n" "$ntp_cv_have___ss_family" >&6; }
33595    case "$ntp_cv_have___ss_family" in
33596     yes)
33597
33598printf "%s\n" "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
33599
33600    esac
33601
33602esac
33603
33604
33605#
33606# Look for in_port_t.
33607#
33608{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in_port_t" >&5
33609printf %s "checking for in_port_t... " >&6; }
33610if test ${isc_cv_have_in_port_t+y}
33611then :
33612  printf %s "(cached) " >&6
33613else $as_nop
33614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33615/* end confdefs.h.  */
33616
33617		#include <sys/types.h>
33618		#include <netinet/in.h>
33619
33620int
33621main (void)
33622{
33623
33624		in_port_t port = 25;
33625		return (0);
33626
33627
33628  ;
33629  return 0;
33630}
33631_ACEOF
33632if ac_fn_c_try_compile "$LINENO"
33633then :
33634  isc_cv_have_in_port_t=yes
33635else $as_nop
33636  isc_cv_have_in_port_t=no
33637
33638fi
33639rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33640
33641fi
33642{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in_port_t" >&5
33643printf "%s\n" "$isc_cv_have_in_port_t" >&6; }
33644case "$isc_cv_have_in_port_t" in
33645 no)
33646
33647printf "%s\n" "#define ISC_PLATFORM_NEEDPORTT 1" >>confdefs.h
33648
33649esac
33650
33651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of socklen arg for getsockname()" >&5
33652printf %s "checking type of socklen arg for getsockname()... " >&6; }
33653if test ${ntp_cv_getsockname_socklen_type+y}
33654then :
33655  printf %s "(cached) " >&6
33656else $as_nop
33657
33658    getsockname_socklen_type_found=no
33659    for getsockname_arg2 in 'struct sockaddr *' 'void *'; do
33660	for ntp_cv_getsockname_socklen_type in 'socklen_t' 'size_t' 'unsigned int' 'int'; do
33661	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33662/* end confdefs.h.  */
33663
33664			#ifdef HAVE_SYS_TYPES_H
33665			# include <sys/types.h>
33666			#endif
33667			#ifdef HAVE_SYS_SOCKET_H
33668			# include <sys/socket.h>
33669			#endif
33670
33671int
33672main (void)
33673{
33674
33675			extern
33676			getsockname(int, $getsockname_arg2,
33677				$ntp_cv_getsockname_socklen_type *);
33678
33679
33680  ;
33681  return 0;
33682}
33683_ACEOF
33684if ac_fn_c_try_compile "$LINENO"
33685then :
33686  getsockname_socklen_type_found=yes ; break 2
33687fi
33688rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33689	done
33690    done
33691    case "$getsockname_socklen_type_found" in
33692     no)
33693	ntp_cv_getsockname_socklen_type='socklen_t'
33694    esac
33695    { getsockname_arg2=; unset getsockname_arg2;}
33696    { getsockname_socklen_type_found=; unset getsockname_socklen_type_found;}
33697
33698
33699fi
33700{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_getsockname_socklen_type" >&5
33701printf "%s\n" "$ntp_cv_getsockname_socklen_type" >&6; }
33702
33703printf "%s\n" "#define GETSOCKNAME_SOCKLEN_TYPE $ntp_cv_getsockname_socklen_type" >>confdefs.h
33704
33705
33706{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking struct sockaddr for sa_len" >&5
33707printf %s "checking struct sockaddr for sa_len... " >&6; }
33708if test ${isc_cv_platform_havesalen+y}
33709then :
33710  printf %s "(cached) " >&6
33711else $as_nop
33712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33713/* end confdefs.h.  */
33714
33715		#include <sys/types.h>
33716		#include <sys/socket.h>
33717
33718int
33719main (void)
33720{
33721
33722		extern struct sockaddr *ps;
33723		return ps->sa_len;
33724
33725
33726  ;
33727  return 0;
33728}
33729_ACEOF
33730if ac_fn_c_try_compile "$LINENO"
33731then :
33732  isc_cv_platform_havesalen=yes
33733else $as_nop
33734  isc_cv_platform_havesalen=no
33735
33736fi
33737rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33738
33739fi
33740{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_platform_havesalen" >&5
33741printf "%s\n" "$isc_cv_platform_havesalen" >&6; }
33742case "$isc_cv_platform_havesalen" in
33743 yes)
33744
33745printf "%s\n" "#define ISC_PLATFORM_HAVESALEN 1" >>confdefs.h
33746
33747esac
33748
33749# Check whether --enable-ipv6 was given.
33750if test ${enable_ipv6+y}
33751then :
33752  enableval=$enable_ipv6;
33753fi
33754
33755
33756case "$enable_ipv6" in
33757 yes|''|autodetect)
33758    case "$host" in
33759     powerpc-ibm-aix4*)
33760	;;
33761     *)
33762
33763printf "%s\n" "#define WANT_IPV6 1" >>confdefs.h
33764
33765	;;
33766    esac
33767    ;;
33768 no)
33769    ;;
33770esac
33771
33772
33773case "$host" in
33774 *-*-darwin*)
33775
33776printf "%s\n" "#define __APPLE_USE_RFC_3542 1" >>confdefs.h
33777
33778esac
33779
33780
33781{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IPv6 structures" >&5
33782printf %s "checking for IPv6 structures... " >&6; }
33783if test ${isc_cv_found_ipv6+y}
33784then :
33785  printf %s "(cached) " >&6
33786else $as_nop
33787  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33788/* end confdefs.h.  */
33789
33790		#include <sys/types.h>
33791		#include <sys/socket.h>
33792		#include <netinet/in.h>
33793
33794int
33795main (void)
33796{
33797
33798		struct sockaddr_in6 sin6;
33799
33800
33801  ;
33802  return 0;
33803}
33804_ACEOF
33805if ac_fn_c_try_compile "$LINENO"
33806then :
33807  isc_cv_found_ipv6=yes
33808else $as_nop
33809  isc_cv_found_ipv6=no
33810
33811fi
33812rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33813
33814fi
33815{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_found_ipv6" >&5
33816printf "%s\n" "$isc_cv_found_ipv6" >&6; }
33817
33818#
33819# See whether IPv6 support is provided via a Kame add-on.
33820# This is done before other IPv6 linking tests so LIBS is properly set.
33821#
33822{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Kame IPv6 support" >&5
33823printf %s "checking for Kame IPv6 support... " >&6; }
33824
33825# Check whether --with-kame was given.
33826if test ${with_kame+y}
33827then :
33828  withval=$with_kame; use_kame="$withval"
33829else $as_nop
33830  use_kame="no"
33831
33832fi
33833
33834case "$use_kame" in
33835 no)
33836    ;;
33837 yes)
33838    kame_path=/usr/local/v6
33839    ;;
33840 *)
33841    kame_path="$use_kame"
33842    ;;
33843esac
33844case "$use_kame" in
33845 no)
33846    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
33847printf "%s\n" "no" >&6; }
33848    ;;
33849 *)
33850    if test -f $kame_path/lib/libinet6.a; then
33851	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $kame_path/lib/libinet6.a" >&5
33852printf "%s\n" "$kame_path/lib/libinet6.a" >&6; }
33853	LIBS="-L$kame_path/lib -linet6 $LIBS"
33854    else
33855	as_fn_error $? "$kame_path/lib/libinet6.a not found.
33856
33857Please choose the proper path with the following command:
33858
33859    configure --with-kame=PATH
33860" "$LINENO" 5
33861    fi
33862    ;;
33863esac
33864
33865#
33866# Whether netinet6/in6.h is needed has to be defined in isc/platform.h.
33867# Including it on Kame-using platforms is very bad, though, because
33868# Kame uses #error against direct inclusion.   So include it on only
33869# the platform that is otherwise broken without it -- BSD/OS 4.0 through 4.1.
33870# This is done before the in6_pktinfo check because that's what
33871# netinet6/in6.h is needed for.
33872#
33873case "$host" in
33874 *-bsdi4.[01]*)
33875
33876printf "%s\n" "#define ISC_PLATFORM_NEEDNETINET6IN6H 1" >>confdefs.h
33877
33878    isc_netinet6in6_hack="#include <netinet6/in6.h>"
33879    ;;
33880 *)
33881    isc_netinet6in6_hack=""
33882    ;;
33883esac
33884
33885#
33886# This is similar to the netinet6/in6.h issue.
33887#
33888case "$host" in
33889 *-sco-sysv*uw*|*-*-sysv*UnixWare*|*-*-sysv*OpenUNIX*)
33890
33891printf "%s\n" "#define ISC_PLATFORM_FIXIN6ISADDR 1" >>confdefs.h
33892
33893    isc_netinetin6_hack="#include <netinet/in6.h>"
33894    ;;
33895 *)
33896    isc_netinetin6_hack=""
33897    ;;
33898esac
33899
33900
33901case "$isc_cv_found_ipv6" in
33902 yes)
33903
33904printf "%s\n" "#define ISC_PLATFORM_HAVEIPV6 1" >>confdefs.h
33905
33906    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
33907printf %s "checking for in6_pktinfo... " >&6; }
33908if test ${isc_cv_have_in6_pktinfo+y}
33909then :
33910  printf %s "(cached) " >&6
33911else $as_nop
33912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33913/* end confdefs.h.  */
33914
33915		    #include <sys/types.h>
33916		    #include <sys/socket.h>
33917		    #include <netinet/in.h>
33918		    $isc_netinetin6_hack
33919		    $isc_netinet6in6_hack
33920
33921int
33922main (void)
33923{
33924
33925		    struct in6_pktinfo xyzzy;
33926
33927
33928  ;
33929  return 0;
33930}
33931_ACEOF
33932if ac_fn_c_try_compile "$LINENO"
33933then :
33934  isc_cv_have_in6_pktinfo=yes
33935else $as_nop
33936  isc_cv_have_in6_pktinfo=no
33937
33938fi
33939rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33940
33941fi
33942{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_in6_pktinfo" >&5
33943printf "%s\n" "$isc_cv_have_in6_pktinfo" >&6; }
33944    case "$isc_cv_have_in6_pktinfo" in
33945     yes)
33946
33947printf "%s\n" "#define ISC_PLATFORM_HAVEIN6PKTINFO 1" >>confdefs.h
33948
33949    esac
33950
33951
33952    # HMS: Use HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID instead?
33953    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sockaddr_in6.sin6_scope_id" >&5
33954printf %s "checking for sockaddr_in6.sin6_scope_id... " >&6; }
33955if test ${isc_cv_have_sin6_scope_id+y}
33956then :
33957  printf %s "(cached) " >&6
33958else $as_nop
33959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33960/* end confdefs.h.  */
33961
33962		    #include <sys/types.h>
33963		    #include <sys/socket.h>
33964		    #include <netinet/in.h>
33965		    $isc_netinetin6_hack
33966		    $isc_netinet6in6_hack
33967
33968int
33969main (void)
33970{
33971
33972		    struct sockaddr_in6 xyzzy;
33973		    xyzzy.sin6_scope_id = 0;
33974
33975
33976  ;
33977  return 0;
33978}
33979_ACEOF
33980if ac_fn_c_try_compile "$LINENO"
33981then :
33982  isc_cv_have_sin6_scope_id=yes
33983else $as_nop
33984  isc_cv_have_sin6_scope_id=no
33985
33986fi
33987rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
33988
33989fi
33990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_have_sin6_scope_id" >&5
33991printf "%s\n" "$isc_cv_have_sin6_scope_id" >&6; }
33992
33993    case "$isc_cv_have_sin6_scope_id" in
33994     yes)
33995
33996printf "%s\n" "#define ISC_PLATFORM_HAVESCOPEID 1" >>confdefs.h
33997
33998    esac
33999esac
34000
34001
34002# We need this check run even without isc_cv_found_ipv6=yes
34003
34004{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
34005printf %s "checking for in6addr_any... " >&6; }
34006if test ${isc_cv_in6addr_any_links+y}
34007then :
34008  printf %s "(cached) " >&6
34009else $as_nop
34010
34011	SAVED_LIBS="$LIBS"
34012	LIBS="$LDADD_LIBNTP $LIBS"
34013	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34014/* end confdefs.h.  */
34015$ac_includes_default
34016		    #include <sys/socket.h>
34017		    #include <netinet/in.h>
34018		    $isc_netinetin6_hack
34019		    $isc_netinet6in6_hack
34020
34021int
34022main (void)
34023{
34024
34025		    printf("%x", in6addr_any.s6_addr[15]);
34026
34027
34028  ;
34029  return 0;
34030}
34031_ACEOF
34032if ac_fn_c_try_link "$LINENO"
34033then :
34034  isc_cv_in6addr_any_links=yes
34035else $as_nop
34036  isc_cv_in6addr_any_links=no
34037
34038fi
34039rm -f core conftest.err conftest.$ac_objext conftest.beam \
34040    conftest$ac_exeext conftest.$ac_ext
34041	LIBS="$SAVED_LIBS"
34042	{ SAVED_LIBS=; unset SAVED_LIBS;}
34043
34044
34045fi
34046{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_in6addr_any_links" >&5
34047printf "%s\n" "$isc_cv_in6addr_any_links" >&6; }
34048
34049case "$isc_cv_in6addr_any_links" in
34050 no)
34051
34052printf "%s\n" "#define ISC_PLATFORM_NEEDIN6ADDRANY 1" >>confdefs.h
34053
34054esac
34055
34056
34057{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrconf" >&5
34058printf %s "checking for struct if_laddrconf... " >&6; }
34059if test ${isc_cv_struct_if_laddrconf+y}
34060then :
34061  printf %s "(cached) " >&6
34062else $as_nop
34063  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34064/* end confdefs.h.  */
34065
34066		#include <sys/types.h>
34067		#include <net/if6.h>
34068
34069int
34070main (void)
34071{
34072
34073		struct if_laddrconf a;
34074
34075
34076  ;
34077  return 0;
34078}
34079_ACEOF
34080if ac_fn_c_try_compile "$LINENO"
34081then :
34082  isc_cv_struct_if_laddrconf=yes
34083else $as_nop
34084  isc_cv_struct_if_laddrconf=no
34085
34086fi
34087rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34088
34089fi
34090{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrconf" >&5
34091printf "%s\n" "$isc_cv_struct_if_laddrconf" >&6; }
34092
34093case "$isc_cv_struct_if_laddrconf" in
34094 yes)
34095
34096printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRCONF 1" >>confdefs.h
34097
34098esac
34099
34100{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
34101printf %s "checking for struct if_laddrreq... " >&6; }
34102if test ${isc_cv_struct_if_laddrreq+y}
34103then :
34104  printf %s "(cached) " >&6
34105else $as_nop
34106  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34107/* end confdefs.h.  */
34108
34109		#include <sys/types.h>
34110		#include <net/if6.h>
34111
34112int
34113main (void)
34114{
34115
34116		struct if_laddrreq a;
34117
34118
34119  ;
34120  return 0;
34121}
34122_ACEOF
34123if ac_fn_c_try_compile "$LINENO"
34124then :
34125  isc_cv_struct_if_laddrreq=yes
34126else $as_nop
34127  isc_cv_struct_if_laddrreq=no
34128
34129fi
34130rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34131
34132fi
34133{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $isc_cv_struct_if_laddrreq" >&5
34134printf "%s\n" "$isc_cv_struct_if_laddrreq" >&6; }
34135
34136case "$isc_cv_struct_if_laddrreq" in
34137 yes)
34138
34139printf "%s\n" "#define ISC_PLATFORM_HAVEIF_LADDRREQ 1" >>confdefs.h
34140
34141esac
34142
34143{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast IP support" >&5
34144printf %s "checking for multicast IP support... " >&6; }
34145if test ${ntp_cv_multicast+y}
34146then :
34147  printf %s "(cached) " >&6
34148else $as_nop
34149
34150	ntp_cv_multicast=no
34151	case "$host" in
34152	 i386-sequent-sysv4)
34153	    ;;
34154	 *)
34155	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34156/* end confdefs.h.  */
34157
34158			#ifdef HAVE_NETINET_IN_H
34159			# include <netinet/in.h>
34160			#endif
34161
34162int
34163main (void)
34164{
34165
34166			struct ip_mreq ipmr;
34167			ipmr.imr_interface.s_addr = 0;
34168
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174if ac_fn_c_try_compile "$LINENO"
34175then :
34176  ntp_cv_multicast=yes
34177fi
34178rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
34179	    ;;
34180	esac
34181
34182
34183fi
34184{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_multicast" >&5
34185printf "%s\n" "$ntp_cv_multicast" >&6; }
34186case "$ntp_cv_multicast" in
34187 yes)
34188
34189printf "%s\n" "#define MCAST 1" >>confdefs.h
34190
34191    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arg type needed for setsockopt() IP*_MULTICAST_LOOP" >&5
34192printf %s "checking arg type needed for setsockopt() IP*_MULTICAST_LOOP... " >&6; }
34193if test ${ntp_cv_typeof_ip_multicast_loop+y}
34194then :
34195  printf %s "(cached) " >&6
34196else $as_nop
34197
34198	    case "$host" in
34199	     *-*-netbsd*|*-*-*linux*)
34200		ntp_cv_typeof_ip_multicast_loop=u_int
34201		;;
34202	     *)
34203		ntp_cv_typeof_ip_multicast_loop=u_char
34204		;;
34205	    esac
34206
34207
34208fi
34209{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_typeof_ip_multicast_loop" >&5
34210printf "%s\n" "$ntp_cv_typeof_ip_multicast_loop" >&6; }
34211
34212printf "%s\n" "#define TYPEOF_IP_MULTICAST_LOOP $ntp_cv_typeof_ip_multicast_loop" >>confdefs.h
34213
34214esac
34215
34216# Check whether --enable-getifaddrs was given.
34217if test ${enable_getifaddrs+y}
34218then :
34219  enableval=$enable_getifaddrs; want_getifaddrs="$enableval"
34220else $as_nop
34221  want_getifaddrs="yes"
34222
34223fi
34224
34225
34226case $want_getifaddrs in
34227 glibc)
34228    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: --enable-getifaddrs=glibc is no longer required" >&5
34229printf "%s\n" "$as_me: WARNING: --enable-getifaddrs=glibc is no longer required" >&2;}
34230esac
34231case $want_getifaddrs in
34232 no)
34233    ;;
34234 *)
34235    SAVED_LIBS="$LIBS"
34236    LIBS="$LDADD_LIBNTP $LIBS"
34237    ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
34238if test "x$ac_cv_func_getifaddrs" = xyes
34239then :
34240  printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h
34241
34242fi
34243
34244    LIBS="$SAVED_LIBS"
34245    { SAVED_LIBS=; unset SAVED_LIBS;}
34246    ;;
34247esac
34248
34249#
34250# Check for if_nametoindex() for IPv6 scoped addresses support
34251#
34252case "$host" in
34253 *-hp-hpux*)
34254    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing if_nametoindex" >&5
34255printf %s "checking for library containing if_nametoindex... " >&6; }
34256if test ${ac_cv_search_if_nametoindex+y}
34257then :
34258  printf %s "(cached) " >&6
34259else $as_nop
34260  ac_func_search_save_LIBS=$LIBS
34261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34262/* end confdefs.h.  */
34263
34264/* Override any GCC internal prototype to avoid an error.
34265   Use char because int might match the return type of a GCC
34266   builtin and then its argument prototype would still apply.  */
34267char if_nametoindex ();
34268int
34269main (void)
34270{
34271return if_nametoindex ();
34272  ;
34273  return 0;
34274}
34275_ACEOF
34276for ac_lib in '' ipv6
34277do
34278  if test -z "$ac_lib"; then
34279    ac_res="none required"
34280  else
34281    ac_res=-l$ac_lib
34282    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
34283  fi
34284  if ac_fn_c_try_link "$LINENO"
34285then :
34286  ac_cv_search_if_nametoindex=$ac_res
34287fi
34288rm -f core conftest.err conftest.$ac_objext conftest.beam \
34289    conftest$ac_exeext
34290  if test ${ac_cv_search_if_nametoindex+y}
34291then :
34292  break
34293fi
34294done
34295if test ${ac_cv_search_if_nametoindex+y}
34296then :
34297
34298else $as_nop
34299  ac_cv_search_if_nametoindex=no
34300fi
34301rm conftest.$ac_ext
34302LIBS=$ac_func_search_save_LIBS
34303fi
34304{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_if_nametoindex" >&5
34305printf "%s\n" "$ac_cv_search_if_nametoindex" >&6; }
34306ac_res=$ac_cv_search_if_nametoindex
34307if test "$ac_res" != no
34308then :
34309  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
34310
34311fi
34312
34313esac
34314SAVED_LIBS="$LIBS"
34315LIBS="$LDADD_LIBNTP $LIBS"
34316ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex"
34317if test "x$ac_cv_func_if_nametoindex" = xyes
34318then :
34319  printf "%s\n" "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h
34320
34321fi
34322
34323LIBS="$SAVED_LIBS"
34324{ SAVED_LIBS=; unset SAVED_LIBS;}
34325case "$ac_cv_func_if_nametoindex" in
34326 yes)
34327
34328printf "%s\n" "#define ISC_PLATFORM_HAVEIFNAMETOINDEX 1" >>confdefs.h
34329
34330esac
34331
34332
34333
34334
34335#
34336# Look for a sysctl call to get the list of network interfaces.
34337#
34338{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for interface list sysctl" >&5
34339printf %s "checking for interface list sysctl... " >&6; }
34340if test ${ntp_cv_iflist_sysctl+y}
34341then :
34342  printf %s "(cached) " >&6
34343else $as_nop
34344  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34345/* end confdefs.h.  */
34346
34347	    #include <sys/param.h>
34348	    #include <sys/sysctl.h>
34349	    #include <sys/socket.h>
34350	    #ifndef NET_RT_IFLIST
34351	    # error
34352	    #endif
34353
34354_ACEOF
34355if ac_fn_c_try_cpp "$LINENO"
34356then :
34357  ntp_cv_iflist_sysctl=yes
34358else $as_nop
34359  ntp_cv_iflist_sysctl=no
34360
34361fi
34362rm -f conftest.err conftest.i conftest.$ac_ext
34363
34364fi
34365{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_cv_iflist_sysctl" >&5
34366printf "%s\n" "$ntp_cv_iflist_sysctl" >&6; }
34367case "$ntp_cv_iflist_sysctl" in
34368 yes)
34369
34370printf "%s\n" "#define HAVE_IFLIST_SYSCTL 1" >>confdefs.h
34371
34372esac
34373
34374###
34375
34376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the saveconfig mechanism" >&5
34377printf %s "checking if we want the saveconfig mechanism... " >&6; }
34378# Check whether --enable-saveconfig was given.
34379if test ${enable_saveconfig+y}
34380then :
34381  enableval=$enable_saveconfig; ntp_ok=$enableval
34382else $as_nop
34383  ntp_ok=yes
34384
34385fi
34386
34387ntp_saveconfig_enabled=0
34388case "$ntp_ok" in
34389 yes)
34390    ntp_saveconfig_enabled=1
34391
34392printf "%s\n" "#define SAVECONFIG 1" >>confdefs.h
34393
34394    ;;
34395esac
34396 if test x$ntp_saveconfig_enabled = x1; then
34397  SAVECONFIG_ENABLED_TRUE=
34398  SAVECONFIG_ENABLED_FALSE='#'
34399else
34400  SAVECONFIG_ENABLED_TRUE='#'
34401  SAVECONFIG_ENABLED_FALSE=
34402fi
34403
34404{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34405printf "%s\n" "$ntp_ok" >&6; }
34406
34407###
34408
34409{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want the experimental leap smear code" >&5
34410printf %s "checking if we want the experimental leap smear code... " >&6; }
34411# Check whether --enable-leap-smear was given.
34412if test ${enable_leap_smear+y}
34413then :
34414  enableval=$enable_leap_smear; ntp_ok=$enableval
34415else $as_nop
34416  ntp_ok=no
34417
34418fi
34419
34420ntp_leap_smear_enabled=0
34421case "$ntp_ok" in
34422 yes)
34423    ntp_leap_smear_enabled=1
34424
34425printf "%s\n" "#define LEAP_SMEAR 1" >>confdefs.h
34426
34427
34428    HAVE_LEAPSMEARINTERVAL="leapsmearinterval 0"
34429    ;;
34430esac
34431{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34432printf "%s\n" "$ntp_ok" >&6; }
34433
34434###
34435
34436{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want dynamic interleave support" >&5
34437printf %s "checking if we want dynamic interleave support... " >&6; }
34438# Check whether --enable-dynamic-interleave was given.
34439if test ${enable_dynamic_interleave+y}
34440then :
34441  enableval=$enable_dynamic_interleave; ntp_ok=$enableval
34442else $as_nop
34443  ntp_ok=no
34444
34445fi
34446
34447ntp_dynamic_interleave=0
34448case "$ntp_ok" in
34449 yes)
34450    ntp_dynamic_interleave=1
34451    ;;
34452esac
34453
34454printf "%s\n" "#define DYNAMIC_INTERLEAVE $ntp_dynamic_interleave" >>confdefs.h
34455
34456{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ok" >&5
34457printf "%s\n" "$ntp_ok" >&6; }
34458
34459
34460# We may not need have_unity
34461have_unity=false
34462# Extract the first word of "ruby", so it can be a program name with args.
34463set dummy ruby; ac_word=$2
34464{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34465printf %s "checking for $ac_word... " >&6; }
34466if test ${ac_cv_path_PATH_RUBY+y}
34467then :
34468  printf %s "(cached) " >&6
34469else $as_nop
34470  case $PATH_RUBY in
34471  [\\/]* | ?:[\\/]*)
34472  ac_cv_path_PATH_RUBY="$PATH_RUBY" # Let the user override the test with a path.
34473  ;;
34474  *)
34475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34476for as_dir in $PATH
34477do
34478  IFS=$as_save_IFS
34479  case $as_dir in #(((
34480    '') as_dir=./ ;;
34481    */) ;;
34482    *) as_dir=$as_dir/ ;;
34483  esac
34484    for ac_exec_ext in '' $ac_executable_extensions; do
34485  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
34486    ac_cv_path_PATH_RUBY="$as_dir$ac_word$ac_exec_ext"
34487    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
34488    break 2
34489  fi
34490done
34491  done
34492IFS=$as_save_IFS
34493
34494  ;;
34495esac
34496fi
34497PATH_RUBY=$ac_cv_path_PATH_RUBY
34498if test -n "$PATH_RUBY"; then
34499  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PATH_RUBY" >&5
34500printf "%s\n" "$PATH_RUBY" >&6; }
34501else
34502  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
34503printf "%s\n" "no" >&6; }
34504fi
34505
34506
34507case "$PATH_RUBY" in
34508 /*)
34509    have_unity=true
34510    ;;
34511 *) PATH_RUBY="false"
34512    ;;
34513esac
34514# We may not need UNITYBUILD_AVAILABLE
34515 if $have_unity; then
34516  UNITYBUILD_AVAILABLE_TRUE=
34517  UNITYBUILD_AVAILABLE_FALSE='#'
34518else
34519  UNITYBUILD_AVAILABLE_TRUE='#'
34520  UNITYBUILD_AVAILABLE_FALSE=
34521fi
34522
34523
34524
34525
34526
34527case "$build" in
34528 $host)	cross=0 ;;
34529 *)	cross=1 ;;
34530esac
34531
34532{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we want to enable tests with undiagnosed problems" >&5
34533printf %s "checking if we want to enable tests with undiagnosed problems... " >&6; }
34534# Check whether --enable-problem-tests was given.
34535if test ${enable_problem_tests+y}
34536then :
34537  enableval=$enable_problem_tests; ntp_ept=$enableval
34538else $as_nop
34539  ntp_ept=yes
34540
34541fi
34542
34543{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_ept" >&5
34544printf "%s\n" "$ntp_ept" >&6; }
34545
34546{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_restrict" >&5
34547printf %s "checking if we can run test-ntp_restrict... " >&6; }
34548ntp_test_ntp_restrict="no"
34549case "$ntp_ept:$cross:$host" in
34550 no:0:*-*-freebsd6.4) ;;
34551 no:0:*-*-hpux11.23*) ;;
34552 no:0:*-*-solaris*) ;;
34553 *) ntp_test_ntp_restrict="yes" ;;
34554esac
34555case "$ntp_cv_gc_sections_runs" in
34556  no) ntp_test_ntp_restrict="no" ;;
34557  * ) ;;
34558esac
34559{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_restrict" >&5
34560printf "%s\n" "$ntp_test_ntp_restrict" >&6; }
34561 if test x$ntp_test_ntp_restrict = xyes; then
34562  BUILD_TEST_NTP_RESTRICT_TRUE=
34563  BUILD_TEST_NTP_RESTRICT_FALSE='#'
34564else
34565  BUILD_TEST_NTP_RESTRICT_TRUE='#'
34566  BUILD_TEST_NTP_RESTRICT_FALSE=
34567fi
34568
34569
34570{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_scanner" >&5
34571printf %s "checking if we can run test-ntp_scanner... " >&6; }
34572ntp_test_ntp_scanner="no"
34573case "$ntp_ept:$cross:$host" in
34574 no:0:*-*-freebsd6.4) ;;
34575 no:0:*-*-solaris*) ;;
34576 *) ntp_test_ntp_scanner="yes" ;;
34577esac
34578case "$ntp_cv_gc_sections_runs" in
34579  no) ntp_test_ntp_scanner="no" ;;
34580  * ) ;;
34581esac
34582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_scanner" >&5
34583printf "%s\n" "$ntp_test_ntp_scanner" >&6; }
34584 if test x$ntp_test_ntp_scanner = xyes; then
34585  BUILD_TEST_NTP_SCANNER_TRUE=
34586  BUILD_TEST_NTP_SCANNER_FALSE='#'
34587else
34588  BUILD_TEST_NTP_SCANNER_TRUE='#'
34589  BUILD_TEST_NTP_SCANNER_FALSE=
34590fi
34591
34592
34593{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can run test-ntp_signd" >&5
34594printf %s "checking if we can run test-ntp_signd... " >&6; }
34595ntp_test_ntp_signd="no"
34596case "$ntp_ept:$cross:$host" in
34597 no:0:*-*-freebsd6.4) ;;
34598 no:0:*-*-solaris*) ;;
34599 *) ntp_test_ntp_signd="yes" ;;
34600esac
34601case "$ntp_cv_gc_sections_runs" in
34602  no) ntp_test_ntp_signd="no" ;;
34603  * ) ;;
34604esac
34605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ntp_test_ntp_signd" >&5
34606printf "%s\n" "$ntp_test_ntp_signd" >&6; }
34607 if test x$ntp_test_ntp_signd = xyes; then
34608  BUILD_TEST_NTP_SIGND_TRUE=
34609  BUILD_TEST_NTP_SIGND_FALSE='#'
34610else
34611  BUILD_TEST_NTP_SIGND_TRUE='#'
34612  BUILD_TEST_NTP_SIGND_FALSE=
34613fi
34614
34615
34616
34617
34618###
34619
34620ac_fn_check_decl "$LINENO" "sigsetjmp" "ac_cv_have_decl_sigsetjmp" "#include <setjmp.h>
34621" "$ac_c_undeclared_builtin_options" "CFLAGS"
34622if test "x$ac_cv_have_decl_sigsetjmp" = xyes
34623then :
34624  ac_have_decl=1
34625else $as_nop
34626  ac_have_decl=0
34627fi
34628printf "%s\n" "#define HAVE_DECL_SIGSETJMP $ac_have_decl" >>confdefs.h
34629ac_fn_check_decl "$LINENO" "siglongjmp" "ac_cv_have_decl_siglongjmp" "#include <setjmp.h>
34630" "$ac_c_undeclared_builtin_options" "CFLAGS"
34631if test "x$ac_cv_have_decl_siglongjmp" = xyes
34632then :
34633  ac_have_decl=1
34634else $as_nop
34635  ac_have_decl=0
34636fi
34637printf "%s\n" "#define HAVE_DECL_SIGLONGJMP $ac_have_decl" >>confdefs.h
34638
34639
34640###
34641
34642
34643  prefix_NONE=
34644  exec_prefix_NONE=
34645  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
34646  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
34647  eval ac_define_dir="\"$sysconfdir\""
34648  eval ac_define_dir="\"$ac_define_dir\""
34649  NTP_KEYSDIR="$ac_define_dir"
34650
34651
34652printf "%s\n" "#define NTP_KEYSDIR \"$ac_define_dir\"" >>confdefs.h
34653
34654  test "$prefix_NONE" && prefix=NONE
34655  test "$exec_prefix_NONE" && exec_prefix=NONE
34656
34657
34658ac_config_files="$ac_config_files Makefile"
34659
34660ac_config_files="$ac_config_files adjtimed/Makefile"
34661
34662ac_config_files="$ac_config_files clockstuff/Makefile"
34663
34664ac_config_files="$ac_config_files include/Makefile"
34665
34666ac_config_files="$ac_config_files include/isc/Makefile"
34667
34668ac_config_files="$ac_config_files kernel/Makefile"
34669
34670ac_config_files="$ac_config_files kernel/sys/Makefile"
34671
34672ac_config_files="$ac_config_files libntp/Makefile"
34673
34674ac_config_files="$ac_config_files libparse/Makefile"
34675
34676ac_config_files="$ac_config_files ntpd/Makefile"
34677
34678ac_config_files="$ac_config_files ntpd/complete.conf"
34679
34680ac_config_files="$ac_config_files ntpdate/Makefile"
34681
34682ac_config_files="$ac_config_files ntpdc/Makefile"
34683
34684ac_config_files="$ac_config_files ntpdc/nl.pl"
34685
34686ac_config_files="$ac_config_files ntpq/Makefile"
34687
34688ac_config_files="$ac_config_files ntpsnmpd/Makefile"
34689
34690ac_config_files="$ac_config_files parseutil/Makefile"
34691
34692ac_config_files="$ac_config_files scripts/Makefile"
34693
34694ac_config_files="$ac_config_files scripts/build/Makefile"
34695
34696ac_config_files="$ac_config_files scripts/build/genAuthors"
34697
34698ac_config_files="$ac_config_files scripts/build/mkver"
34699
34700ac_config_files="$ac_config_files scripts/calc_tickadj/Makefile"
34701
34702ac_config_files="$ac_config_files scripts/calc_tickadj/calc_tickadj"
34703
34704ac_config_files="$ac_config_files scripts/lib/Makefile"
34705
34706ac_config_files="$ac_config_files scripts/ntp-wait/Makefile"
34707
34708ac_config_files="$ac_config_files scripts/ntp-wait/ntp-wait"
34709
34710ac_config_files="$ac_config_files scripts/ntpsweep/Makefile"
34711
34712ac_config_files="$ac_config_files scripts/ntpsweep/ntpsweep"
34713
34714ac_config_files="$ac_config_files scripts/ntptrace/Makefile"
34715
34716ac_config_files="$ac_config_files scripts/ntptrace/ntptrace"
34717
34718ac_config_files="$ac_config_files scripts/ntpver"
34719
34720ac_config_files="$ac_config_files scripts/plot_summary"
34721
34722ac_config_files="$ac_config_files scripts/summary"
34723
34724ac_config_files="$ac_config_files scripts/update-leap/Makefile"
34725
34726ac_config_files="$ac_config_files scripts/update-leap/update-leap"
34727
34728ac_config_files="$ac_config_files tests/Makefile"
34729
34730ac_config_files="$ac_config_files tests/bug-2803/Makefile"
34731
34732ac_config_files="$ac_config_files tests/libntp/Makefile"
34733
34734ac_config_files="$ac_config_files tests/ntpd/Makefile"
34735
34736ac_config_files="$ac_config_files tests/ntpq/Makefile"
34737
34738ac_config_files="$ac_config_files tests/sandbox/Makefile"
34739
34740ac_config_files="$ac_config_files tests/sec-2853/Makefile"
34741
34742ac_config_files="$ac_config_files util/Makefile"
34743
34744
34745perllibdir="${datadir}/ntp/lib"
34746
34747  prefix_NONE=
34748  exec_prefix_NONE=
34749  test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
34750  test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
34751  eval ac_define_dir="\"$perllibdir\""
34752  eval ac_define_dir="\"$ac_define_dir\""
34753  PERLLIBDIR="$ac_define_dir"
34754
34755
34756printf "%s\n" "#define PERLLIBDIR \"$ac_define_dir\"" >>confdefs.h
34757
34758  test "$prefix_NONE" && prefix=NONE
34759  test "$exec_prefix_NONE" && exec_prefix=NONE
34760
34761
34762calc_tickadj_opts="$srcdir/scripts/calc_tickadj/calc_tickadj-opts"
34763
34764ntp_wait_opts="$srcdir/scripts/ntp-wait/ntp-wait-opts"
34765
34766ntpsweep_opts="$srcdir/scripts/ntpsweep/ntpsweep-opts"
34767
34768ntptrace_opts="$srcdir/scripts/ntptrace/ntptrace-opts"
34769
34770summary_opts="$srcdir/scripts/summary-opts"
34771
34772plot_summary_opts="$srcdir/scripts/plot_summary-opts"
34773
34774
34775
34776
34777subdirs="$subdirs sntp"
34778
34779
34780cat >confcache <<\_ACEOF
34781# This file is a shell script that caches the results of configure
34782# tests run on this system so they can be shared between configure
34783# scripts and configure runs, see configure's option --config-cache.
34784# It is not useful on other systems.  If it contains results you don't
34785# want to keep, you may remove or edit it.
34786#
34787# config.status only pays attention to the cache file if you give it
34788# the --recheck option to rerun configure.
34789#
34790# `ac_cv_env_foo' variables (set or unset) will be overridden when
34791# loading this file, other *unset* `ac_cv_foo' will be assigned the
34792# following values.
34793
34794_ACEOF
34795
34796# The following way of writing the cache mishandles newlines in values,
34797# but we know of no workaround that is simple, portable, and efficient.
34798# So, we kill variables containing newlines.
34799# Ultrix sh set writes to stderr and can't be redirected directly,
34800# and sets the high bit in the cache file unless we assign to the vars.
34801(
34802  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
34803    eval ac_val=\$$ac_var
34804    case $ac_val in #(
34805    *${as_nl}*)
34806      case $ac_var in #(
34807      *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
34808printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
34809      esac
34810      case $ac_var in #(
34811      _ | IFS | as_nl) ;; #(
34812      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
34813      *) { eval $ac_var=; unset $ac_var;} ;;
34814      esac ;;
34815    esac
34816  done
34817
34818  (set) 2>&1 |
34819    case $as_nl`(ac_space=' '; set) 2>&1` in #(
34820    *${as_nl}ac_space=\ *)
34821      # `set' does not quote correctly, so add quotes: double-quote
34822      # substitution turns \\\\ into \\, and sed turns \\ into \.
34823      sed -n \
34824	"s/'/'\\\\''/g;
34825	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
34826      ;; #(
34827    *)
34828      # `set' quotes correctly as required by POSIX, so do not add quotes.
34829      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
34830      ;;
34831    esac |
34832    sort
34833) |
34834  sed '
34835     /^ac_cv_env_/b end
34836     t clear
34837     :clear
34838     s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
34839     t end
34840     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
34841     :end' >>confcache
34842if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
34843  if test -w "$cache_file"; then
34844    if test "x$cache_file" != "x/dev/null"; then
34845      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
34846printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
34847      if test ! -f "$cache_file" || test -h "$cache_file"; then
34848	cat confcache >"$cache_file"
34849      else
34850        case $cache_file in #(
34851        */* | ?:*)
34852	  mv -f confcache "$cache_file"$$ &&
34853	  mv -f "$cache_file"$$ "$cache_file" ;; #(
34854        *)
34855	  mv -f confcache "$cache_file" ;;
34856	esac
34857      fi
34858    fi
34859  else
34860    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
34861printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
34862  fi
34863fi
34864rm -f confcache
34865
34866test "x$prefix" = xNONE && prefix=$ac_default_prefix
34867# Let make expand exec_prefix.
34868test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
34869
34870DEFS=-DHAVE_CONFIG_H
34871
34872ac_libobjs=
34873ac_ltlibobjs=
34874U=
34875for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
34876  # 1. Remove the extension, and $U if already installed.
34877  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
34878  ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
34879  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
34880  #    will be set to the directory where LIBOBJS objects are built.
34881  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
34882  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
34883done
34884LIBOBJS=$ac_libobjs
34885
34886LTLIBOBJS=$ac_ltlibobjs
34887
34888
34889{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
34890printf %s "checking that generated files are newer than configure... " >&6; }
34891   if test -n "$am_sleep_pid"; then
34892     # Hide warnings about reused PIDs.
34893     wait $am_sleep_pid 2>/dev/null
34894   fi
34895   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5
34896printf "%s\n" "done" >&6; }
34897 if test -n "$EXEEXT"; then
34898  am__EXEEXT_TRUE=
34899  am__EXEEXT_FALSE='#'
34900else
34901  am__EXEEXT_TRUE='#'
34902  am__EXEEXT_FALSE=
34903fi
34904
34905if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
34906  as_fn_error $? "conditional \"AMDEP\" was never defined.
34907Usually this means the macro was only invoked conditionally." "$LINENO" 5
34908fi
34909if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
34910  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
34911Usually this means the macro was only invoked conditionally." "$LINENO" 5
34912fi
34913
34914if test -z "${VPATH_HACK_TRUE}" && test -z "${VPATH_HACK_FALSE}"; then
34915  as_fn_error $? "conditional \"VPATH_HACK\" was never defined.
34916Usually this means the macro was only invoked conditionally." "$LINENO" 5
34917fi
34918if test -z "${WANT_CALC_TICKADJ_MS_TRUE}" && test -z "${WANT_CALC_TICKADJ_MS_FALSE}"; then
34919  as_fn_error $? "conditional \"WANT_CALC_TICKADJ_MS\" was never defined.
34920Usually this means the macro was only invoked conditionally." "$LINENO" 5
34921fi
34922if test -z "${INSTALL_NTPSWEEP_TRUE}" && test -z "${INSTALL_NTPSWEEP_FALSE}"; then
34923  as_fn_error $? "conditional \"INSTALL_NTPSWEEP\" was never defined.
34924Usually this means the macro was only invoked conditionally." "$LINENO" 5
34925fi
34926if test -z "${INSTALL_UPDATE_LEAP_TRUE}" && test -z "${INSTALL_UPDATE_LEAP_FALSE}"; then
34927  as_fn_error $? "conditional \"INSTALL_UPDATE_LEAP\" was never defined.
34928Usually this means the macro was only invoked conditionally." "$LINENO" 5
34929fi
34930if test -z "${GL_GENERATE_STDNORETURN_H_TRUE}" && test -z "${GL_GENERATE_STDNORETURN_H_FALSE}"; then
34931  as_fn_error $? "conditional \"GL_GENERATE_STDNORETURN_H\" was never defined.
34932Usually this means the macro was only invoked conditionally." "$LINENO" 5
34933fi
34934if test -z "${INSTALL_LIBOPTS_TRUE}" && test -z "${INSTALL_LIBOPTS_FALSE}"; then
34935  as_fn_error $? "conditional \"INSTALL_LIBOPTS\" was never defined.
34936Usually this means the macro was only invoked conditionally." "$LINENO" 5
34937fi
34938if test -z "${NEED_LIBOPTS_TRUE}" && test -z "${NEED_LIBOPTS_FALSE}"; then
34939  as_fn_error $? "conditional \"NEED_LIBOPTS\" was never defined.
34940Usually this means the macro was only invoked conditionally." "$LINENO" 5
34941fi
34942if test -z "${BUILD_LIBEVENT_TRUE}" && test -z "${BUILD_LIBEVENT_FALSE}"; then
34943  as_fn_error $? "conditional \"BUILD_LIBEVENT\" was never defined.
34944Usually this means the macro was only invoked conditionally." "$LINENO" 5
34945fi
34946if test -z "${NTP_CROSSCOMPILE_TRUE}" && test -z "${NTP_CROSSCOMPILE_FALSE}"; then
34947  as_fn_error $? "conditional \"NTP_CROSSCOMPILE\" was never defined.
34948Usually this means the macro was only invoked conditionally." "$LINENO" 5
34949fi
34950if test -z "${PTHREADS_TRUE}" && test -z "${PTHREADS_FALSE}"; then
34951  as_fn_error $? "conditional \"PTHREADS\" was never defined.
34952Usually this means the macro was only invoked conditionally." "$LINENO" 5
34953fi
34954if test -z "${BUILD_SNTP_TRUE}" && test -z "${BUILD_SNTP_FALSE}"; then
34955  as_fn_error $? "conditional \"BUILD_SNTP\" was never defined.
34956Usually this means the macro was only invoked conditionally." "$LINENO" 5
34957fi
34958if test -z "${SAVECONFIG_ENABLED_TRUE}" && test -z "${SAVECONFIG_ENABLED_FALSE}"; then
34959  as_fn_error $? "conditional \"SAVECONFIG_ENABLED\" was never defined.
34960Usually this means the macro was only invoked conditionally." "$LINENO" 5
34961fi
34962if test -z "${UNITYBUILD_AVAILABLE_TRUE}" && test -z "${UNITYBUILD_AVAILABLE_FALSE}"; then
34963  as_fn_error $? "conditional \"UNITYBUILD_AVAILABLE\" was never defined.
34964Usually this means the macro was only invoked conditionally." "$LINENO" 5
34965fi
34966if test -z "${BUILD_TEST_NTP_RESTRICT_TRUE}" && test -z "${BUILD_TEST_NTP_RESTRICT_FALSE}"; then
34967  as_fn_error $? "conditional \"BUILD_TEST_NTP_RESTRICT\" was never defined.
34968Usually this means the macro was only invoked conditionally." "$LINENO" 5
34969fi
34970if test -z "${BUILD_TEST_NTP_SCANNER_TRUE}" && test -z "${BUILD_TEST_NTP_SCANNER_FALSE}"; then
34971  as_fn_error $? "conditional \"BUILD_TEST_NTP_SCANNER\" was never defined.
34972Usually this means the macro was only invoked conditionally." "$LINENO" 5
34973fi
34974if test -z "${BUILD_TEST_NTP_SIGND_TRUE}" && test -z "${BUILD_TEST_NTP_SIGND_FALSE}"; then
34975  as_fn_error $? "conditional \"BUILD_TEST_NTP_SIGND\" was never defined.
34976Usually this means the macro was only invoked conditionally." "$LINENO" 5
34977fi
34978
34979: "${CONFIG_STATUS=./config.status}"
34980ac_write_fail=0
34981ac_clean_files_save=$ac_clean_files
34982ac_clean_files="$ac_clean_files $CONFIG_STATUS"
34983{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
34984printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
34985as_write_fail=0
34986cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
34987#! $SHELL
34988# Generated by $as_me.
34989# Run this file to recreate the current configuration.
34990# Compiler output produced by configure, useful for debugging
34991# configure, is in config.log if it exists.
34992
34993debug=false
34994ac_cs_recheck=false
34995ac_cs_silent=false
34996
34997SHELL=\${CONFIG_SHELL-$SHELL}
34998export SHELL
34999_ASEOF
35000cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
35001## -------------------- ##
35002## M4sh Initialization. ##
35003## -------------------- ##
35004
35005# Be more Bourne compatible
35006DUALCASE=1; export DUALCASE # for MKS sh
35007as_nop=:
35008if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
35009then :
35010  emulate sh
35011  NULLCMD=:
35012  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
35013  # is contrary to our usage.  Disable this feature.
35014  alias -g '${1+"$@"}'='"$@"'
35015  setopt NO_GLOB_SUBST
35016else $as_nop
35017  case `(set -o) 2>/dev/null` in #(
35018  *posix*) :
35019    set -o posix ;; #(
35020  *) :
35021     ;;
35022esac
35023fi
35024
35025
35026
35027# Reset variables that may have inherited troublesome values from
35028# the environment.
35029
35030# IFS needs to be set, to space, tab, and newline, in precisely that order.
35031# (If _AS_PATH_WALK were called with IFS unset, it would have the
35032# side effect of setting IFS to empty, thus disabling word splitting.)
35033# Quoting is to prevent editors from complaining about space-tab.
35034as_nl='
35035'
35036export as_nl
35037IFS=" ""	$as_nl"
35038
35039PS1='$ '
35040PS2='> '
35041PS4='+ '
35042
35043# Ensure predictable behavior from utilities with locale-dependent output.
35044LC_ALL=C
35045export LC_ALL
35046LANGUAGE=C
35047export LANGUAGE
35048
35049# We cannot yet rely on "unset" to work, but we need these variables
35050# to be unset--not just set to an empty or harmless value--now, to
35051# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh).  This construct
35052# also avoids known problems related to "unset" and subshell syntax
35053# in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
35054for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
35055do eval test \${$as_var+y} \
35056  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
35057done
35058
35059# Ensure that fds 0, 1, and 2 are open.
35060if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
35061if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
35062if (exec 3>&2)            ; then :; else exec 2>/dev/null; fi
35063
35064# The user is always right.
35065if ${PATH_SEPARATOR+false} :; then
35066  PATH_SEPARATOR=:
35067  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
35068    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
35069      PATH_SEPARATOR=';'
35070  }
35071fi
35072
35073
35074# Find who we are.  Look in the path if we contain no directory separator.
35075as_myself=
35076case $0 in #((
35077  *[\\/]* ) as_myself=$0 ;;
35078  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35079for as_dir in $PATH
35080do
35081  IFS=$as_save_IFS
35082  case $as_dir in #(((
35083    '') as_dir=./ ;;
35084    */) ;;
35085    *) as_dir=$as_dir/ ;;
35086  esac
35087    test -r "$as_dir$0" && as_myself=$as_dir$0 && break
35088  done
35089IFS=$as_save_IFS
35090
35091     ;;
35092esac
35093# We did not find ourselves, most probably we were run as `sh COMMAND'
35094# in which case we are not to be found in the path.
35095if test "x$as_myself" = x; then
35096  as_myself=$0
35097fi
35098if test ! -f "$as_myself"; then
35099  printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
35100  exit 1
35101fi
35102
35103
35104
35105# as_fn_error STATUS ERROR [LINENO LOG_FD]
35106# ----------------------------------------
35107# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
35108# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
35109# script with STATUS, using 1 if that was 0.
35110as_fn_error ()
35111{
35112  as_status=$1; test $as_status -eq 0 && as_status=1
35113  if test "$4"; then
35114    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
35115    printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
35116  fi
35117  printf "%s\n" "$as_me: error: $2" >&2
35118  as_fn_exit $as_status
35119} # as_fn_error
35120
35121
35122
35123# as_fn_set_status STATUS
35124# -----------------------
35125# Set $? to STATUS, without forking.
35126as_fn_set_status ()
35127{
35128  return $1
35129} # as_fn_set_status
35130
35131# as_fn_exit STATUS
35132# -----------------
35133# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
35134as_fn_exit ()
35135{
35136  set +e
35137  as_fn_set_status $1
35138  exit $1
35139} # as_fn_exit
35140
35141# as_fn_unset VAR
35142# ---------------
35143# Portably unset VAR.
35144as_fn_unset ()
35145{
35146  { eval $1=; unset $1;}
35147}
35148as_unset=as_fn_unset
35149
35150# as_fn_append VAR VALUE
35151# ----------------------
35152# Append the text in VALUE to the end of the definition contained in VAR. Take
35153# advantage of any shell optimizations that allow amortized linear growth over
35154# repeated appends, instead of the typical quadratic growth present in naive
35155# implementations.
35156if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
35157then :
35158  eval 'as_fn_append ()
35159  {
35160    eval $1+=\$2
35161  }'
35162else $as_nop
35163  as_fn_append ()
35164  {
35165    eval $1=\$$1\$2
35166  }
35167fi # as_fn_append
35168
35169# as_fn_arith ARG...
35170# ------------------
35171# Perform arithmetic evaluation on the ARGs, and store the result in the
35172# global $as_val. Take advantage of shells that can avoid forks. The arguments
35173# must be portable across $(()) and expr.
35174if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
35175then :
35176  eval 'as_fn_arith ()
35177  {
35178    as_val=$(( $* ))
35179  }'
35180else $as_nop
35181  as_fn_arith ()
35182  {
35183    as_val=`expr "$@" || test $? -eq 1`
35184  }
35185fi # as_fn_arith
35186
35187
35188if expr a : '\(a\)' >/dev/null 2>&1 &&
35189   test "X`expr 00001 : '.*\(...\)'`" = X001; then
35190  as_expr=expr
35191else
35192  as_expr=false
35193fi
35194
35195if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
35196  as_basename=basename
35197else
35198  as_basename=false
35199fi
35200
35201if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
35202  as_dirname=dirname
35203else
35204  as_dirname=false
35205fi
35206
35207as_me=`$as_basename -- "$0" ||
35208$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
35209	 X"$0" : 'X\(//\)$' \| \
35210	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
35211printf "%s\n" X/"$0" |
35212    sed '/^.*\/\([^/][^/]*\)\/*$/{
35213	    s//\1/
35214	    q
35215	  }
35216	  /^X\/\(\/\/\)$/{
35217	    s//\1/
35218	    q
35219	  }
35220	  /^X\/\(\/\).*/{
35221	    s//\1/
35222	    q
35223	  }
35224	  s/.*/./; q'`
35225
35226# Avoid depending upon Character Ranges.
35227as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35228as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
35229as_cr_Letters=$as_cr_letters$as_cr_LETTERS
35230as_cr_digits='0123456789'
35231as_cr_alnum=$as_cr_Letters$as_cr_digits
35232
35233
35234# Determine whether it's possible to make 'echo' print without a newline.
35235# These variables are no longer used directly by Autoconf, but are AC_SUBSTed
35236# for compatibility with existing Makefiles.
35237ECHO_C= ECHO_N= ECHO_T=
35238case `echo -n x` in #(((((
35239-n*)
35240  case `echo 'xy\c'` in
35241  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
35242  xy)  ECHO_C='\c';;
35243  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
35244       ECHO_T='	';;
35245  esac;;
35246*)
35247  ECHO_N='-n';;
35248esac
35249
35250# For backward compatibility with old third-party macros, we provide
35251# the shell variables $as_echo and $as_echo_n.  New code should use
35252# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
35253as_echo='printf %s\n'
35254as_echo_n='printf %s'
35255
35256rm -f conf$$ conf$$.exe conf$$.file
35257if test -d conf$$.dir; then
35258  rm -f conf$$.dir/conf$$.file
35259else
35260  rm -f conf$$.dir
35261  mkdir conf$$.dir 2>/dev/null
35262fi
35263if (echo >conf$$.file) 2>/dev/null; then
35264  if ln -s conf$$.file conf$$ 2>/dev/null; then
35265    as_ln_s='ln -s'
35266    # ... but there are two gotchas:
35267    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
35268    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
35269    # In both cases, we have to default to `cp -pR'.
35270    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
35271      as_ln_s='cp -pR'
35272  elif ln conf$$.file conf$$ 2>/dev/null; then
35273    as_ln_s=ln
35274  else
35275    as_ln_s='cp -pR'
35276  fi
35277else
35278  as_ln_s='cp -pR'
35279fi
35280rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
35281rmdir conf$$.dir 2>/dev/null
35282
35283
35284# as_fn_mkdir_p
35285# -------------
35286# Create "$as_dir" as a directory, including parents if necessary.
35287as_fn_mkdir_p ()
35288{
35289
35290  case $as_dir in #(
35291  -*) as_dir=./$as_dir;;
35292  esac
35293  test -d "$as_dir" || eval $as_mkdir_p || {
35294    as_dirs=
35295    while :; do
35296      case $as_dir in #(
35297      *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
35298      *) as_qdir=$as_dir;;
35299      esac
35300      as_dirs="'$as_qdir' $as_dirs"
35301      as_dir=`$as_dirname -- "$as_dir" ||
35302$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
35303	 X"$as_dir" : 'X\(//\)[^/]' \| \
35304	 X"$as_dir" : 'X\(//\)$' \| \
35305	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
35306printf "%s\n" X"$as_dir" |
35307    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
35308	    s//\1/
35309	    q
35310	  }
35311	  /^X\(\/\/\)[^/].*/{
35312	    s//\1/
35313	    q
35314	  }
35315	  /^X\(\/\/\)$/{
35316	    s//\1/
35317	    q
35318	  }
35319	  /^X\(\/\).*/{
35320	    s//\1/
35321	    q
35322	  }
35323	  s/.*/./; q'`
35324      test -d "$as_dir" && break
35325    done
35326    test -z "$as_dirs" || eval "mkdir $as_dirs"
35327  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
35328
35329
35330} # as_fn_mkdir_p
35331if mkdir -p . 2>/dev/null; then
35332  as_mkdir_p='mkdir -p "$as_dir"'
35333else
35334  test -d ./-p && rmdir ./-p
35335  as_mkdir_p=false
35336fi
35337
35338
35339# as_fn_executable_p FILE
35340# -----------------------
35341# Test if FILE is an executable regular file.
35342as_fn_executable_p ()
35343{
35344  test -f "$1" && test -x "$1"
35345} # as_fn_executable_p
35346as_test_x='test -x'
35347as_executable_p=as_fn_executable_p
35348
35349# Sed expression to map a string onto a valid CPP name.
35350as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
35351
35352# Sed expression to map a string onto a valid variable name.
35353as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
35354
35355
35356exec 6>&1
35357## ----------------------------------- ##
35358## Main body of $CONFIG_STATUS script. ##
35359## ----------------------------------- ##
35360_ASEOF
35361test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
35362
35363cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35364# Save the log message, to keep $0 and so on meaningful, and to
35365# report actual input values of CONFIG_FILES etc. instead of their
35366# values after options handling.
35367ac_log="
35368This file was extended by ntp $as_me 4.2.8p17, which was
35369generated by GNU Autoconf 2.71.  Invocation command line was
35370
35371  CONFIG_FILES    = $CONFIG_FILES
35372  CONFIG_HEADERS  = $CONFIG_HEADERS
35373  CONFIG_LINKS    = $CONFIG_LINKS
35374  CONFIG_COMMANDS = $CONFIG_COMMANDS
35375  $ $0 $@
35376
35377on `(hostname || uname -n) 2>/dev/null | sed 1q`
35378"
35379
35380_ACEOF
35381
35382case $ac_config_files in *"
35383"*) set x $ac_config_files; shift; ac_config_files=$*;;
35384esac
35385
35386case $ac_config_headers in *"
35387"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
35388esac
35389
35390
35391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35392# Files that config.status was made for.
35393config_files="$ac_config_files"
35394config_headers="$ac_config_headers"
35395config_commands="$ac_config_commands"
35396
35397_ACEOF
35398
35399cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35400ac_cs_usage="\
35401\`$as_me' instantiates files and other configuration actions
35402from templates according to the current configuration.  Unless the files
35403and actions are specified as TAGs, all are instantiated by default.
35404
35405Usage: $0 [OPTION]... [TAG]...
35406
35407  -h, --help       print this help, then exit
35408  -V, --version    print version number and configuration settings, then exit
35409      --config     print configuration, then exit
35410  -q, --quiet, --silent
35411                   do not print progress messages
35412  -d, --debug      don't remove temporary files
35413      --recheck    update $as_me by reconfiguring in the same conditions
35414      --file=FILE[:TEMPLATE]
35415                   instantiate the configuration file FILE
35416      --header=FILE[:TEMPLATE]
35417                   instantiate the configuration header FILE
35418
35419Configuration files:
35420$config_files
35421
35422Configuration headers:
35423$config_headers
35424
35425Configuration commands:
35426$config_commands
35427
35428Report bugs to <https://bugs.ntp.org/>.
35429ntp home page: <https://www.ntp.org/>."
35430
35431_ACEOF
35432ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
35433ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
35434cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35435ac_cs_config='$ac_cs_config_escaped'
35436ac_cs_version="\\
35437ntp config.status 4.2.8p17
35438configured by $0, generated by GNU Autoconf 2.71,
35439  with options \\"\$ac_cs_config\\"
35440
35441Copyright (C) 2021 Free Software Foundation, Inc.
35442This config.status script is free software; the Free Software Foundation
35443gives unlimited permission to copy, distribute and modify it."
35444
35445ac_pwd='$ac_pwd'
35446srcdir='$srcdir'
35447INSTALL='$INSTALL'
35448MKDIR_P='$MKDIR_P'
35449AWK='$AWK'
35450test -n "\$AWK" || AWK=awk
35451_ACEOF
35452
35453cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35454# The default lists apply if the user does not specify any file.
35455ac_need_defaults=:
35456while test $# != 0
35457do
35458  case $1 in
35459  --*=?*)
35460    ac_option=`expr "X$1" : 'X\([^=]*\)='`
35461    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
35462    ac_shift=:
35463    ;;
35464  --*=)
35465    ac_option=`expr "X$1" : 'X\([^=]*\)='`
35466    ac_optarg=
35467    ac_shift=:
35468    ;;
35469  *)
35470    ac_option=$1
35471    ac_optarg=$2
35472    ac_shift=shift
35473    ;;
35474  esac
35475
35476  case $ac_option in
35477  # Handling of the options.
35478  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
35479    ac_cs_recheck=: ;;
35480  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
35481    printf "%s\n" "$ac_cs_version"; exit ;;
35482  --config | --confi | --conf | --con | --co | --c )
35483    printf "%s\n" "$ac_cs_config"; exit ;;
35484  --debug | --debu | --deb | --de | --d | -d )
35485    debug=: ;;
35486  --file | --fil | --fi | --f )
35487    $ac_shift
35488    case $ac_optarg in
35489    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
35490    '') as_fn_error $? "missing file argument" ;;
35491    esac
35492    as_fn_append CONFIG_FILES " '$ac_optarg'"
35493    ac_need_defaults=false;;
35494  --header | --heade | --head | --hea )
35495    $ac_shift
35496    case $ac_optarg in
35497    *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
35498    esac
35499    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
35500    ac_need_defaults=false;;
35501  --he | --h)
35502    # Conflict between --help and --header
35503    as_fn_error $? "ambiguous option: \`$1'
35504Try \`$0 --help' for more information.";;
35505  --help | --hel | -h )
35506    printf "%s\n" "$ac_cs_usage"; exit ;;
35507  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
35508  | -silent | --silent | --silen | --sile | --sil | --si | --s)
35509    ac_cs_silent=: ;;
35510
35511  # This is an error.
35512  -*) as_fn_error $? "unrecognized option: \`$1'
35513Try \`$0 --help' for more information." ;;
35514
35515  *) as_fn_append ac_config_targets " $1"
35516     ac_need_defaults=false ;;
35517
35518  esac
35519  shift
35520done
35521
35522ac_configure_extra_args=
35523
35524if $ac_cs_silent; then
35525  exec 6>/dev/null
35526  ac_configure_extra_args="$ac_configure_extra_args --silent"
35527fi
35528
35529_ACEOF
35530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35531if \$ac_cs_recheck; then
35532  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
35533  shift
35534  \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
35535  CONFIG_SHELL='$SHELL'
35536  export CONFIG_SHELL
35537  exec "\$@"
35538fi
35539
35540_ACEOF
35541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35542exec 5>>config.log
35543{
35544  echo
35545  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
35546## Running $as_me. ##
35547_ASBOX
35548  printf "%s\n" "$ac_log"
35549} >&5
35550
35551_ACEOF
35552cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
35553#
35554# INIT-COMMANDS
35555#
35556AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
35557
35558
35559# The HP-UX ksh and POSIX shell print the target directory to stdout
35560# if CDPATH is set.
35561(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
35562
35563sed_quote_subst='$sed_quote_subst'
35564double_quote_subst='$double_quote_subst'
35565delay_variable_subst='$delay_variable_subst'
35566enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
35567macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
35568macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
35569enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
35570pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
35571enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
35572shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
35573SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
35574ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
35575PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
35576host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
35577host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
35578host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
35579build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
35580build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
35581build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
35582SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
35583Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
35584GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
35585EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
35586FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
35587LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
35588NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
35589LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
35590max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
35591ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
35592exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
35593lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
35594lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
35595lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
35596lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
35597lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
35598reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
35599reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
35600OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
35601deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
35602file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
35603file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
35604want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
35605DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
35606sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
35607AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
35608AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
35609archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
35610STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
35611RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
35612old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
35613old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
35614old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
35615lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
35616CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
35617CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
35618compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
35619GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
35620lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
35621lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
35622lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
35623lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
35624lt_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"`'
35625lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
35626nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
35627lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
35628lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
35629objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
35630MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
35631lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
35632lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
35633lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
35634lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
35635lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
35636need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
35637MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
35638DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
35639NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
35640LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
35641OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
35642OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
35643libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
35644shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
35645extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
35646archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
35647enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
35648export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
35649whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
35650compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
35651old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
35652old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
35653archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
35654archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
35655module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
35656module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
35657with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
35658allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
35659no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
35660hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
35661hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
35662hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
35663hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
35664hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
35665hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
35666hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
35667inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
35668link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
35669always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
35670export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
35671exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
35672include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
35673prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
35674postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
35675file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
35676variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
35677need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
35678need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
35679version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
35680runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
35681shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
35682shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
35683libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
35684library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
35685soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
35686install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
35687postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
35688postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
35689finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
35690finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
35691hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
35692sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
35693configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
35694configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
35695hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
35696enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
35697enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
35698enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
35699old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
35700striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
35701
35702LTCC='$LTCC'
35703LTCFLAGS='$LTCFLAGS'
35704compiler='$compiler_DEFAULT'
35705
35706# A function that is used when there is no print builtin or printf.
35707func_fallback_echo ()
35708{
35709  eval 'cat <<_LTECHO_EOF
35710\$1
35711_LTECHO_EOF'
35712}
35713
35714# Quote evaled strings.
35715for var in SHELL \
35716ECHO \
35717PATH_SEPARATOR \
35718SED \
35719GREP \
35720EGREP \
35721FGREP \
35722LD \
35723NM \
35724LN_S \
35725lt_SP2NL \
35726lt_NL2SP \
35727reload_flag \
35728OBJDUMP \
35729deplibs_check_method \
35730file_magic_cmd \
35731file_magic_glob \
35732want_nocaseglob \
35733DLLTOOL \
35734sharedlib_from_linklib_cmd \
35735AR \
35736AR_FLAGS \
35737archiver_list_spec \
35738STRIP \
35739RANLIB \
35740CC \
35741CFLAGS \
35742compiler \
35743lt_cv_sys_global_symbol_pipe \
35744lt_cv_sys_global_symbol_to_cdecl \
35745lt_cv_sys_global_symbol_to_import \
35746lt_cv_sys_global_symbol_to_c_name_address \
35747lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
35748lt_cv_nm_interface \
35749nm_file_list_spec \
35750lt_cv_truncate_bin \
35751lt_prog_compiler_no_builtin_flag \
35752lt_prog_compiler_pic \
35753lt_prog_compiler_wl \
35754lt_prog_compiler_static \
35755lt_cv_prog_compiler_c_o \
35756need_locks \
35757MANIFEST_TOOL \
35758DSYMUTIL \
35759NMEDIT \
35760LIPO \
35761OTOOL \
35762OTOOL64 \
35763shrext_cmds \
35764export_dynamic_flag_spec \
35765whole_archive_flag_spec \
35766compiler_needs_object \
35767with_gnu_ld \
35768allow_undefined_flag \
35769no_undefined_flag \
35770hardcode_libdir_flag_spec \
35771hardcode_libdir_separator \
35772exclude_expsyms \
35773include_expsyms \
35774file_list_spec \
35775variables_saved_for_relink \
35776libname_spec \
35777library_names_spec \
35778soname_spec \
35779install_override_mode \
35780finish_eval \
35781old_striplib \
35782striplib; do
35783    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
35784    *[\\\\\\\`\\"\\\$]*)
35785      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
35786      ;;
35787    *)
35788      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
35789      ;;
35790    esac
35791done
35792
35793# Double-quote double-evaled strings.
35794for var in reload_cmds \
35795old_postinstall_cmds \
35796old_postuninstall_cmds \
35797old_archive_cmds \
35798extract_expsyms_cmds \
35799old_archive_from_new_cmds \
35800old_archive_from_expsyms_cmds \
35801archive_cmds \
35802archive_expsym_cmds \
35803module_cmds \
35804module_expsym_cmds \
35805export_symbols_cmds \
35806prelink_cmds \
35807postlink_cmds \
35808postinstall_cmds \
35809postuninstall_cmds \
35810finish_cmds \
35811sys_lib_search_path_spec \
35812configure_time_dlsearch_path \
35813configure_time_lt_sys_library_path; do
35814    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
35815    *[\\\\\\\`\\"\\\$]*)
35816      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
35817      ;;
35818    *)
35819      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
35820      ;;
35821    esac
35822done
35823
35824ac_aux_dir='$ac_aux_dir'
35825
35826# See if we are running on zsh, and set the options that allow our
35827# commands through without removal of \ escapes INIT.
35828if test -n "\${ZSH_VERSION+set}"; then
35829   setopt NO_GLOB_SUBST
35830fi
35831
35832
35833    PACKAGE='$PACKAGE'
35834    VERSION='$VERSION'
35835    RM='$RM'
35836    ofile='$ofile'
35837
35838
35839
35840
35841_ACEOF
35842
35843cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
35844
35845# Handling of arguments.
35846for ac_config_target in $ac_config_targets
35847do
35848  case $ac_config_target in
35849    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
35850    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
35851    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
35852    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
35853    "adjtimed/Makefile") CONFIG_FILES="$CONFIG_FILES adjtimed/Makefile" ;;
35854    "clockstuff/Makefile") CONFIG_FILES="$CONFIG_FILES clockstuff/Makefile" ;;
35855    "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
35856    "include/isc/Makefile") CONFIG_FILES="$CONFIG_FILES include/isc/Makefile" ;;
35857    "kernel/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/Makefile" ;;
35858    "kernel/sys/Makefile") CONFIG_FILES="$CONFIG_FILES kernel/sys/Makefile" ;;
35859    "libntp/Makefile") CONFIG_FILES="$CONFIG_FILES libntp/Makefile" ;;
35860    "libparse/Makefile") CONFIG_FILES="$CONFIG_FILES libparse/Makefile" ;;
35861    "ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpd/Makefile" ;;
35862    "ntpd/complete.conf") CONFIG_FILES="$CONFIG_FILES ntpd/complete.conf" ;;
35863    "ntpdate/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdate/Makefile" ;;
35864    "ntpdc/Makefile") CONFIG_FILES="$CONFIG_FILES ntpdc/Makefile" ;;
35865    "ntpdc/nl.pl") CONFIG_FILES="$CONFIG_FILES ntpdc/nl.pl" ;;
35866    "ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES ntpq/Makefile" ;;
35867    "ntpsnmpd/Makefile") CONFIG_FILES="$CONFIG_FILES ntpsnmpd/Makefile" ;;
35868    "parseutil/Makefile") CONFIG_FILES="$CONFIG_FILES parseutil/Makefile" ;;
35869    "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
35870    "scripts/build/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/build/Makefile" ;;
35871    "scripts/build/genAuthors") CONFIG_FILES="$CONFIG_FILES scripts/build/genAuthors" ;;
35872    "scripts/build/mkver") CONFIG_FILES="$CONFIG_FILES scripts/build/mkver" ;;
35873    "scripts/calc_tickadj/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/Makefile" ;;
35874    "scripts/calc_tickadj/calc_tickadj") CONFIG_FILES="$CONFIG_FILES scripts/calc_tickadj/calc_tickadj" ;;
35875    "scripts/lib/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/lib/Makefile" ;;
35876    "scripts/ntp-wait/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/Makefile" ;;
35877    "scripts/ntp-wait/ntp-wait") CONFIG_FILES="$CONFIG_FILES scripts/ntp-wait/ntp-wait" ;;
35878    "scripts/ntpsweep/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/Makefile" ;;
35879    "scripts/ntpsweep/ntpsweep") CONFIG_FILES="$CONFIG_FILES scripts/ntpsweep/ntpsweep" ;;
35880    "scripts/ntptrace/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/Makefile" ;;
35881    "scripts/ntptrace/ntptrace") CONFIG_FILES="$CONFIG_FILES scripts/ntptrace/ntptrace" ;;
35882    "scripts/ntpver") CONFIG_FILES="$CONFIG_FILES scripts/ntpver" ;;
35883    "scripts/plot_summary") CONFIG_FILES="$CONFIG_FILES scripts/plot_summary" ;;
35884    "scripts/summary") CONFIG_FILES="$CONFIG_FILES scripts/summary" ;;
35885    "scripts/update-leap/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/Makefile" ;;
35886    "scripts/update-leap/update-leap") CONFIG_FILES="$CONFIG_FILES scripts/update-leap/update-leap" ;;
35887    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
35888    "tests/bug-2803/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bug-2803/Makefile" ;;
35889    "tests/libntp/Makefile") CONFIG_FILES="$CONFIG_FILES tests/libntp/Makefile" ;;
35890    "tests/ntpd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpd/Makefile" ;;
35891    "tests/ntpq/Makefile") CONFIG_FILES="$CONFIG_FILES tests/ntpq/Makefile" ;;
35892    "tests/sandbox/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sandbox/Makefile" ;;
35893    "tests/sec-2853/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sec-2853/Makefile" ;;
35894    "util/Makefile") CONFIG_FILES="$CONFIG_FILES util/Makefile" ;;
35895
35896  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
35897  esac
35898done
35899
35900
35901# If the user did not use the arguments to specify the items to instantiate,
35902# then the envvar interface is used.  Set only those that are not.
35903# We use the long form for the default assignment because of an extremely
35904# bizarre bug on SunOS 4.1.3.
35905if $ac_need_defaults; then
35906  test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
35907  test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
35908  test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
35909fi
35910
35911# Have a temporary directory for convenience.  Make it in the build tree
35912# simply because there is no reason against having it here, and in addition,
35913# creating and moving files from /tmp can sometimes cause problems.
35914# Hook for its removal unless debugging.
35915# Note that there is a small window in which the directory will not be cleaned:
35916# after its creation but before its name has been assigned to `$tmp'.
35917$debug ||
35918{
35919  tmp= ac_tmp=
35920  trap 'exit_status=$?
35921  : "${ac_tmp:=$tmp}"
35922  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
35923' 0
35924  trap 'as_fn_exit 1' 1 2 13 15
35925}
35926# Create a (secure) tmp directory for tmp files.
35927
35928{
35929  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
35930  test -d "$tmp"
35931}  ||
35932{
35933  tmp=./conf$$-$RANDOM
35934  (umask 077 && mkdir "$tmp")
35935} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
35936ac_tmp=$tmp
35937
35938# Set up the scripts for CONFIG_FILES section.
35939# No need to generate them if there are no CONFIG_FILES.
35940# This happens for instance with `./config.status config.h'.
35941if test -n "$CONFIG_FILES"; then
35942
35943if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
35944  ac_cs_awk_getline=:
35945  ac_cs_awk_pipe_init=
35946  ac_cs_awk_read_file='
35947      while ((getline aline < (F[key])) > 0)
35948	print(aline)
35949      close(F[key])'
35950  ac_cs_awk_pipe_fini=
35951else
35952  ac_cs_awk_getline=false
35953  ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
35954  ac_cs_awk_read_file='
35955      print "|#_!!_#|"
35956      print "cat " F[key] " &&"
35957      '$ac_cs_awk_pipe_init
35958  # The final `:' finishes the AND list.
35959  ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
35960fi
35961ac_cr=`echo X | tr X '\015'`
35962# On cygwin, bash can eat \r inside `` if the user requested igncr.
35963# But we know of no other shell where ac_cr would be empty at this
35964# point, so we can use a bashism as a fallback.
35965if test "x$ac_cr" = x; then
35966  eval ac_cr=\$\'\\r\'
35967fi
35968ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
35969if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
35970  ac_cs_awk_cr='\\r'
35971else
35972  ac_cs_awk_cr=$ac_cr
35973fi
35974
35975echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
35976_ACEOF
35977
35978# Create commands to substitute file output variables.
35979{
35980  echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
35981  echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
35982  echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
35983  echo "_ACAWK" &&
35984  echo "_ACEOF"
35985} >conf$$files.sh &&
35986. ./conf$$files.sh ||
35987  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35988rm -f conf$$files.sh
35989
35990{
35991  echo "cat >conf$$subs.awk <<_ACEOF" &&
35992  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
35993  echo "_ACEOF"
35994} >conf$$subs.sh ||
35995  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
35996ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
35997ac_delim='%!_!# '
35998for ac_last_try in false false false false false :; do
35999  . ./conf$$subs.sh ||
36000    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36001
36002  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
36003  if test $ac_delim_n = $ac_delim_num; then
36004    break
36005  elif $ac_last_try; then
36006    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
36007  else
36008    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36009  fi
36010done
36011rm -f conf$$subs.sh
36012
36013cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36014cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
36015_ACEOF
36016sed -n '
36017h
36018s/^/S["/; s/!.*/"]=/
36019p
36020g
36021s/^[^!]*!//
36022:repl
36023t repl
36024s/'"$ac_delim"'$//
36025t delim
36026:nl
36027h
36028s/\(.\{148\}\)..*/\1/
36029t more1
36030s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
36031p
36032n
36033b repl
36034:more1
36035s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36036p
36037g
36038s/.\{148\}//
36039t nl
36040:delim
36041h
36042s/\(.\{148\}\)..*/\1/
36043t more2
36044s/["\\]/\\&/g; s/^/"/; s/$/"/
36045p
36046b
36047:more2
36048s/["\\]/\\&/g; s/^/"/; s/$/"\\/
36049p
36050g
36051s/.\{148\}//
36052t delim
36053' <conf$$subs.awk | sed '
36054/^[^""]/{
36055  N
36056  s/\n//
36057}
36058' >>$CONFIG_STATUS || ac_write_fail=1
36059rm -f conf$$subs.awk
36060cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36061_ACAWK
36062cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
36063  for (key in S) S_is_set[key] = 1
36064  FS = ""
36065  \$ac_cs_awk_pipe_init
36066}
36067{
36068  line = $ 0
36069  nfields = split(line, field, "@")
36070  substed = 0
36071  len = length(field[1])
36072  for (i = 2; i < nfields; i++) {
36073    key = field[i]
36074    keylen = length(key)
36075    if (S_is_set[key]) {
36076      value = S[key]
36077      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
36078      len += length(value) + length(field[++i])
36079      substed = 1
36080    } else
36081      len += 1 + keylen
36082  }
36083  if (nfields == 3 && !substed) {
36084    key = field[2]
36085    if (F[key] != "" && line ~ /^[	 ]*@.*@[	 ]*$/) {
36086      \$ac_cs_awk_read_file
36087      next
36088    }
36089  }
36090  print line
36091}
36092\$ac_cs_awk_pipe_fini
36093_ACAWK
36094_ACEOF
36095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36096if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
36097  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
36098else
36099  cat
36100fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
36101  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
36102_ACEOF
36103
36104# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
36105# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
36106# trailing colons and then remove the whole line if VPATH becomes empty
36107# (actually we leave an empty line to preserve line numbers).
36108if test "x$srcdir" = x.; then
36109  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
36110h
36111s///
36112s/^/:/
36113s/[	 ]*$/:/
36114s/:\$(srcdir):/:/g
36115s/:\${srcdir}:/:/g
36116s/:@srcdir@:/:/g
36117s/^:*//
36118s/:*$//
36119x
36120s/\(=[	 ]*\).*/\1/
36121G
36122s/\n//
36123s/^[^=]*=[	 ]*$//
36124}'
36125fi
36126
36127cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36128fi # test -n "$CONFIG_FILES"
36129
36130# Set up the scripts for CONFIG_HEADERS section.
36131# No need to generate them if there are no CONFIG_HEADERS.
36132# This happens for instance with `./config.status Makefile'.
36133if test -n "$CONFIG_HEADERS"; then
36134cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
36135BEGIN {
36136_ACEOF
36137
36138# Transform confdefs.h into an awk script `defines.awk', embedded as
36139# here-document in config.status, that substitutes the proper values into
36140# config.h.in to produce config.h.
36141
36142# Create a delimiter string that does not exist in confdefs.h, to ease
36143# handling of long lines.
36144ac_delim='%!_!# '
36145for ac_last_try in false false :; do
36146  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
36147  if test -z "$ac_tt"; then
36148    break
36149  elif $ac_last_try; then
36150    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
36151  else
36152    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
36153  fi
36154done
36155
36156# For the awk script, D is an array of macro values keyed by name,
36157# likewise P contains macro parameters if any.  Preserve backslash
36158# newline sequences.
36159
36160ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
36161sed -n '
36162s/.\{148\}/&'"$ac_delim"'/g
36163t rset
36164:rset
36165s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
36166t def
36167d
36168:def
36169s/\\$//
36170t bsnl
36171s/["\\]/\\&/g
36172s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36173D["\1"]=" \3"/p
36174s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
36175d
36176:bsnl
36177s/["\\]/\\&/g
36178s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
36179D["\1"]=" \3\\\\\\n"\\/p
36180t cont
36181s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
36182t cont
36183d
36184:cont
36185n
36186s/.\{148\}/&'"$ac_delim"'/g
36187t clear
36188:clear
36189s/\\$//
36190t bsnlc
36191s/["\\]/\\&/g; s/^/"/; s/$/"/p
36192d
36193:bsnlc
36194s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
36195b cont
36196' <confdefs.h | sed '
36197s/'"$ac_delim"'/"\\\
36198"/g' >>$CONFIG_STATUS || ac_write_fail=1
36199
36200cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36201  for (key in D) D_is_set[key] = 1
36202  FS = ""
36203}
36204/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
36205  line = \$ 0
36206  split(line, arg, " ")
36207  if (arg[1] == "#") {
36208    defundef = arg[2]
36209    mac1 = arg[3]
36210  } else {
36211    defundef = substr(arg[1], 2)
36212    mac1 = arg[2]
36213  }
36214  split(mac1, mac2, "(") #)
36215  macro = mac2[1]
36216  prefix = substr(line, 1, index(line, defundef) - 1)
36217  if (D_is_set[macro]) {
36218    # Preserve the white space surrounding the "#".
36219    print prefix "define", macro P[macro] D[macro]
36220    next
36221  } else {
36222    # Replace #undef with comments.  This is necessary, for example,
36223    # in the case of _POSIX_SOURCE, which is predefined and required
36224    # on some systems where configure will not decide to define it.
36225    if (defundef == "undef") {
36226      print "/*", prefix defundef, macro, "*/"
36227      next
36228    }
36229  }
36230}
36231{ print }
36232_ACAWK
36233_ACEOF
36234cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36235  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
36236fi # test -n "$CONFIG_HEADERS"
36237
36238
36239eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
36240shift
36241for ac_tag
36242do
36243  case $ac_tag in
36244  :[FHLC]) ac_mode=$ac_tag; continue;;
36245  esac
36246  case $ac_mode$ac_tag in
36247  :[FHL]*:*);;
36248  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
36249  :[FH]-) ac_tag=-:-;;
36250  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
36251  esac
36252  ac_save_IFS=$IFS
36253  IFS=:
36254  set x $ac_tag
36255  IFS=$ac_save_IFS
36256  shift
36257  ac_file=$1
36258  shift
36259
36260  case $ac_mode in
36261  :L) ac_source=$1;;
36262  :[FH])
36263    ac_file_inputs=
36264    for ac_f
36265    do
36266      case $ac_f in
36267      -) ac_f="$ac_tmp/stdin";;
36268      *) # Look for the file first in the build tree, then in the source tree
36269	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
36270	 # because $ac_f cannot contain `:'.
36271	 test -f "$ac_f" ||
36272	   case $ac_f in
36273	   [\\/$]*) false;;
36274	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
36275	   esac ||
36276	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
36277      esac
36278      case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
36279      as_fn_append ac_file_inputs " '$ac_f'"
36280    done
36281
36282    # Let's still pretend it is `configure' which instantiates (i.e., don't
36283    # use $as_me), people would be surprised to read:
36284    #    /* config.h.  Generated by config.status.  */
36285    configure_input='Generated from '`
36286	  printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
36287	`' by configure.'
36288    if test x"$ac_file" != x-; then
36289      configure_input="$ac_file.  $configure_input"
36290      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
36291printf "%s\n" "$as_me: creating $ac_file" >&6;}
36292    fi
36293    # Neutralize special characters interpreted by sed in replacement strings.
36294    case $configure_input in #(
36295    *\&* | *\|* | *\\* )
36296       ac_sed_conf_input=`printf "%s\n" "$configure_input" |
36297       sed 's/[\\\\&|]/\\\\&/g'`;; #(
36298    *) ac_sed_conf_input=$configure_input;;
36299    esac
36300
36301    case $ac_tag in
36302    *:-:* | *:-) cat >"$ac_tmp/stdin" \
36303      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
36304    esac
36305    ;;
36306  esac
36307
36308  ac_dir=`$as_dirname -- "$ac_file" ||
36309$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36310	 X"$ac_file" : 'X\(//\)[^/]' \| \
36311	 X"$ac_file" : 'X\(//\)$' \| \
36312	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
36313printf "%s\n" X"$ac_file" |
36314    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36315	    s//\1/
36316	    q
36317	  }
36318	  /^X\(\/\/\)[^/].*/{
36319	    s//\1/
36320	    q
36321	  }
36322	  /^X\(\/\/\)$/{
36323	    s//\1/
36324	    q
36325	  }
36326	  /^X\(\/\).*/{
36327	    s//\1/
36328	    q
36329	  }
36330	  s/.*/./; q'`
36331  as_dir="$ac_dir"; as_fn_mkdir_p
36332  ac_builddir=.
36333
36334case "$ac_dir" in
36335.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
36336*)
36337  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
36338  # A ".." for each directory in $ac_dir_suffix.
36339  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
36340  case $ac_top_builddir_sub in
36341  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
36342  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
36343  esac ;;
36344esac
36345ac_abs_top_builddir=$ac_pwd
36346ac_abs_builddir=$ac_pwd$ac_dir_suffix
36347# for backward compatibility:
36348ac_top_builddir=$ac_top_build_prefix
36349
36350case $srcdir in
36351  .)  # We are building in place.
36352    ac_srcdir=.
36353    ac_top_srcdir=$ac_top_builddir_sub
36354    ac_abs_top_srcdir=$ac_pwd ;;
36355  [\\/]* | ?:[\\/]* )  # Absolute name.
36356    ac_srcdir=$srcdir$ac_dir_suffix;
36357    ac_top_srcdir=$srcdir
36358    ac_abs_top_srcdir=$srcdir ;;
36359  *) # Relative name.
36360    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
36361    ac_top_srcdir=$ac_top_build_prefix$srcdir
36362    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
36363esac
36364ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
36365
36366
36367  case $ac_mode in
36368  :F)
36369  #
36370  # CONFIG_FILE
36371  #
36372
36373  case $INSTALL in
36374  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
36375  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
36376  esac
36377  ac_MKDIR_P=$MKDIR_P
36378  case $MKDIR_P in
36379  [\\/$]* | ?:[\\/]* ) ;;
36380  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
36381  esac
36382_ACEOF
36383
36384cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36385# If the template does not know about datarootdir, expand it.
36386# FIXME: This hack should be removed a few years after 2.60.
36387ac_datarootdir_hack=; ac_datarootdir_seen=
36388ac_sed_dataroot='
36389/datarootdir/ {
36390  p
36391  q
36392}
36393/@datadir@/p
36394/@docdir@/p
36395/@infodir@/p
36396/@localedir@/p
36397/@mandir@/p'
36398case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
36399*datarootdir*) ac_datarootdir_seen=yes;;
36400*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
36401  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
36402printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
36403_ACEOF
36404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36405  ac_datarootdir_hack='
36406  s&@datadir@&$datadir&g
36407  s&@docdir@&$docdir&g
36408  s&@infodir@&$infodir&g
36409  s&@localedir@&$localedir&g
36410  s&@mandir@&$mandir&g
36411  s&\\\${datarootdir}&$datarootdir&g' ;;
36412esac
36413_ACEOF
36414
36415# Neutralize VPATH when `$srcdir' = `.'.
36416# Shell code in configure.ac might set extrasub.
36417# FIXME: do we really want to maintain this feature?
36418cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
36419ac_sed_extra="$ac_vpsub
36420$extrasub
36421_ACEOF
36422cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
36423:t
36424/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
36425s|@configure_input@|$ac_sed_conf_input|;t t
36426s&@top_builddir@&$ac_top_builddir_sub&;t t
36427s&@top_build_prefix@&$ac_top_build_prefix&;t t
36428s&@srcdir@&$ac_srcdir&;t t
36429s&@abs_srcdir@&$ac_abs_srcdir&;t t
36430s&@top_srcdir@&$ac_top_srcdir&;t t
36431s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
36432s&@builddir@&$ac_builddir&;t t
36433s&@abs_builddir@&$ac_abs_builddir&;t t
36434s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
36435s&@INSTALL@&$ac_INSTALL&;t t
36436s&@MKDIR_P@&$ac_MKDIR_P&;t t
36437$ac_datarootdir_hack
36438"
36439eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
36440if $ac_cs_awk_getline; then
36441  $AWK -f "$ac_tmp/subs.awk"
36442else
36443  $AWK -f "$ac_tmp/subs.awk" | $SHELL
36444fi \
36445  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36446
36447test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
36448  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
36449  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
36450      "$ac_tmp/out"`; test -z "$ac_out"; } &&
36451  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36452which seems to be undefined.  Please make sure it is defined" >&5
36453printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
36454which seems to be undefined.  Please make sure it is defined" >&2;}
36455
36456  rm -f "$ac_tmp/stdin"
36457  case $ac_file in
36458  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
36459  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
36460  esac \
36461  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36462 ;;
36463  :H)
36464  #
36465  # CONFIG_HEADER
36466  #
36467  if test x"$ac_file" != x-; then
36468    {
36469      printf "%s\n" "/* $configure_input  */" >&1 \
36470      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
36471    } >"$ac_tmp/config.h" \
36472      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
36473    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
36474      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
36475printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
36476    else
36477      rm -f "$ac_file"
36478      mv "$ac_tmp/config.h" "$ac_file" \
36479	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
36480    fi
36481  else
36482    printf "%s\n" "/* $configure_input  */" >&1 \
36483      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
36484      || as_fn_error $? "could not create -" "$LINENO" 5
36485  fi
36486# Compute "$ac_file"'s index in $config_headers.
36487_am_arg="$ac_file"
36488_am_stamp_count=1
36489for _am_header in $config_headers :; do
36490  case $_am_header in
36491    $_am_arg | $_am_arg:* )
36492      break ;;
36493    * )
36494      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
36495  esac
36496done
36497echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
36498$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36499	 X"$_am_arg" : 'X\(//\)[^/]' \| \
36500	 X"$_am_arg" : 'X\(//\)$' \| \
36501	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
36502printf "%s\n" X"$_am_arg" |
36503    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36504	    s//\1/
36505	    q
36506	  }
36507	  /^X\(\/\/\)[^/].*/{
36508	    s//\1/
36509	    q
36510	  }
36511	  /^X\(\/\/\)$/{
36512	    s//\1/
36513	    q
36514	  }
36515	  /^X\(\/\).*/{
36516	    s//\1/
36517	    q
36518	  }
36519	  s/.*/./; q'`/stamp-h$_am_stamp_count
36520 ;;
36521
36522  :C)  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
36523printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
36524 ;;
36525  esac
36526
36527
36528  case $ac_file$ac_mode in
36529    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
36530  # Older Autoconf quotes --file arguments for eval, but not when files
36531  # are listed without --file.  Let's play safe and only enable the eval
36532  # if we detect the quoting.
36533  # TODO: see whether this extra hack can be removed once we start
36534  # requiring Autoconf 2.70 or later.
36535  case $CONFIG_FILES in #(
36536  *\'*) :
36537    eval set x "$CONFIG_FILES" ;; #(
36538  *) :
36539    set x $CONFIG_FILES ;; #(
36540  *) :
36541     ;;
36542esac
36543  shift
36544  # Used to flag and report bootstrapping failures.
36545  am_rc=0
36546  for am_mf
36547  do
36548    # Strip MF so we end up with the name of the file.
36549    am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'`
36550    # Check whether this is an Automake generated Makefile which includes
36551    # dependency-tracking related rules and includes.
36552    # Grep'ing the whole file directly is not great: AIX grep has a line
36553    # limit of 2048, but all sed's we know have understand at least 4000.
36554    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
36555      || continue
36556    am_dirpart=`$as_dirname -- "$am_mf" ||
36557$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36558	 X"$am_mf" : 'X\(//\)[^/]' \| \
36559	 X"$am_mf" : 'X\(//\)$' \| \
36560	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
36561printf "%s\n" X"$am_mf" |
36562    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36563	    s//\1/
36564	    q
36565	  }
36566	  /^X\(\/\/\)[^/].*/{
36567	    s//\1/
36568	    q
36569	  }
36570	  /^X\(\/\/\)$/{
36571	    s//\1/
36572	    q
36573	  }
36574	  /^X\(\/\).*/{
36575	    s//\1/
36576	    q
36577	  }
36578	  s/.*/./; q'`
36579    am_filepart=`$as_basename -- "$am_mf" ||
36580$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
36581	 X"$am_mf" : 'X\(//\)$' \| \
36582	 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
36583printf "%s\n" X/"$am_mf" |
36584    sed '/^.*\/\([^/][^/]*\)\/*$/{
36585	    s//\1/
36586	    q
36587	  }
36588	  /^X\/\(\/\/\)$/{
36589	    s//\1/
36590	    q
36591	  }
36592	  /^X\/\(\/\).*/{
36593	    s//\1/
36594	    q
36595	  }
36596	  s/.*/./; q'`
36597    { echo "$as_me:$LINENO: cd "$am_dirpart" \
36598      && sed -e '/# am--include-marker/d' "$am_filepart" \
36599        | $MAKE -f - am--depfiles" >&5
36600   (cd "$am_dirpart" \
36601      && sed -e '/# am--include-marker/d' "$am_filepart" \
36602        | $MAKE -f - am--depfiles) >&5 2>&5
36603   ac_status=$?
36604   echo "$as_me:$LINENO: \$? = $ac_status" >&5
36605   (exit $ac_status); } || am_rc=$?
36606  done
36607  if test $am_rc -ne 0; then
36608    { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36609printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
36610as_fn_error $? "Something went wrong bootstrapping makefile fragments
36611    for automatic dependency tracking.  If GNU make was not used, consider
36612    re-running the configure script with MAKE=\"gmake\" (or whatever is
36613    necessary).  You can also try re-running configure with the
36614    '--disable-dependency-tracking' option to at least be able to build
36615    the package (albeit without support for automatic dependency tracking).
36616See \`config.log' for more details" "$LINENO" 5; }
36617  fi
36618  { am_dirpart=; unset am_dirpart;}
36619  { am_filepart=; unset am_filepart;}
36620  { am_mf=; unset am_mf;}
36621  { am_rc=; unset am_rc;}
36622  rm -f conftest-deps.mk
36623}
36624 ;;
36625    "libtool":C)
36626
36627    # See if we are running on zsh, and set the options that allow our
36628    # commands through without removal of \ escapes.
36629    if test -n "${ZSH_VERSION+set}"; then
36630      setopt NO_GLOB_SUBST
36631    fi
36632
36633    cfgfile=${ofile}T
36634    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
36635    $RM "$cfgfile"
36636
36637    cat <<_LT_EOF >> "$cfgfile"
36638#! $SHELL
36639# Generated automatically by $as_me ($PACKAGE) $VERSION
36640# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
36641# NOTE: Changes made to this file will be lost: look at ltmain.sh.
36642
36643# Provide generalized library-building support services.
36644# Written by Gordon Matzigkeit, 1996
36645
36646# Copyright (C) 2014 Free Software Foundation, Inc.
36647# This is free software; see the source for copying conditions.  There is NO
36648# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36649
36650# GNU Libtool is free software; you can redistribute it and/or modify
36651# it under the terms of the GNU General Public License as published by
36652# the Free Software Foundation; either version 2 of of the License, or
36653# (at your option) any later version.
36654#
36655# As a special exception to the GNU General Public License, if you
36656# distribute this file as part of a program or library that is built
36657# using GNU Libtool, you may include this file under the  same
36658# distribution terms that you use for the rest of that program.
36659#
36660# GNU Libtool is distributed in the hope that it will be useful, but
36661# WITHOUT ANY WARRANTY; without even the implied warranty of
36662# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36663# GNU General Public License for more details.
36664#
36665# You should have received a copy of the GNU General Public License
36666# along with this program.  If not, see <http://www.gnu.org/licenses/>.
36667
36668
36669# The names of the tagged configurations supported by this script.
36670available_tags=''
36671
36672# Configured defaults for sys_lib_dlsearch_path munging.
36673: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
36674
36675# ### BEGIN LIBTOOL CONFIG
36676
36677# Whether or not to build shared libraries.
36678build_libtool_libs=$enable_shared
36679
36680# Which release of libtool.m4 was used?
36681macro_version=$macro_version
36682macro_revision=$macro_revision
36683
36684# Whether or not to build static libraries.
36685build_old_libs=$enable_static
36686
36687# What type of objects to build.
36688pic_mode=$pic_mode
36689
36690# Whether or not to optimize for fast installation.
36691fast_install=$enable_fast_install
36692
36693# Shared archive member basename,for filename based shared library versioning on AIX.
36694shared_archive_member_spec=$shared_archive_member_spec
36695
36696# Shell to use when invoking shell scripts.
36697SHELL=$lt_SHELL
36698
36699# An echo program that protects backslashes.
36700ECHO=$lt_ECHO
36701
36702# The PATH separator for the build system.
36703PATH_SEPARATOR=$lt_PATH_SEPARATOR
36704
36705# The host system.
36706host_alias=$host_alias
36707host=$host
36708host_os=$host_os
36709
36710# The build system.
36711build_alias=$build_alias
36712build=$build
36713build_os=$build_os
36714
36715# A sed program that does not truncate output.
36716SED=$lt_SED
36717
36718# Sed that helps us avoid accidentally triggering echo(1) options like -n.
36719Xsed="\$SED -e 1s/^X//"
36720
36721# A grep program that handles long lines.
36722GREP=$lt_GREP
36723
36724# An ERE matcher.
36725EGREP=$lt_EGREP
36726
36727# A literal string matcher.
36728FGREP=$lt_FGREP
36729
36730# A BSD- or MS-compatible name lister.
36731NM=$lt_NM
36732
36733# Whether we need soft or hard links.
36734LN_S=$lt_LN_S
36735
36736# What is the maximum length of a command?
36737max_cmd_len=$max_cmd_len
36738
36739# Object file suffix (normally "o").
36740objext=$ac_objext
36741
36742# Executable file suffix (normally "").
36743exeext=$exeext
36744
36745# whether the shell understands "unset".
36746lt_unset=$lt_unset
36747
36748# turn spaces into newlines.
36749SP2NL=$lt_lt_SP2NL
36750
36751# turn newlines into spaces.
36752NL2SP=$lt_lt_NL2SP
36753
36754# convert \$build file names to \$host format.
36755to_host_file_cmd=$lt_cv_to_host_file_cmd
36756
36757# convert \$build files to toolchain format.
36758to_tool_file_cmd=$lt_cv_to_tool_file_cmd
36759
36760# An object symbol dumper.
36761OBJDUMP=$lt_OBJDUMP
36762
36763# Method to check whether dependent libraries are shared objects.
36764deplibs_check_method=$lt_deplibs_check_method
36765
36766# Command to use when deplibs_check_method = "file_magic".
36767file_magic_cmd=$lt_file_magic_cmd
36768
36769# How to find potential files when deplibs_check_method = "file_magic".
36770file_magic_glob=$lt_file_magic_glob
36771
36772# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
36773want_nocaseglob=$lt_want_nocaseglob
36774
36775# DLL creation program.
36776DLLTOOL=$lt_DLLTOOL
36777
36778# Command to associate shared and link libraries.
36779sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
36780
36781# The archiver.
36782AR=$lt_AR
36783
36784# Flags to create an archive.
36785AR_FLAGS=$lt_AR_FLAGS
36786
36787# How to feed a file listing to the archiver.
36788archiver_list_spec=$lt_archiver_list_spec
36789
36790# A symbol stripping program.
36791STRIP=$lt_STRIP
36792
36793# Commands used to install an old-style archive.
36794RANLIB=$lt_RANLIB
36795old_postinstall_cmds=$lt_old_postinstall_cmds
36796old_postuninstall_cmds=$lt_old_postuninstall_cmds
36797
36798# Whether to use a lock for old archive extraction.
36799lock_old_archive_extraction=$lock_old_archive_extraction
36800
36801# A C compiler.
36802LTCC=$lt_CC
36803
36804# LTCC compiler flags.
36805LTCFLAGS=$lt_CFLAGS
36806
36807# Take the output of nm and produce a listing of raw symbols and C names.
36808global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
36809
36810# Transform the output of nm in a proper C declaration.
36811global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
36812
36813# Transform the output of nm into a list of symbols to manually relocate.
36814global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
36815
36816# Transform the output of nm in a C name address pair.
36817global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
36818
36819# Transform the output of nm in a C name address pair when lib prefix is needed.
36820global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
36821
36822# The name lister interface.
36823nm_interface=$lt_lt_cv_nm_interface
36824
36825# Specify filename containing input files for \$NM.
36826nm_file_list_spec=$lt_nm_file_list_spec
36827
36828# The root where to search for dependent libraries,and where our libraries should be installed.
36829lt_sysroot=$lt_sysroot
36830
36831# Command to truncate a binary pipe.
36832lt_truncate_bin=$lt_lt_cv_truncate_bin
36833
36834# The name of the directory that contains temporary libtool files.
36835objdir=$objdir
36836
36837# Used to examine libraries when file_magic_cmd begins with "file".
36838MAGIC_CMD=$MAGIC_CMD
36839
36840# Must we lock files when doing compilation?
36841need_locks=$lt_need_locks
36842
36843# Manifest tool.
36844MANIFEST_TOOL=$lt_MANIFEST_TOOL
36845
36846# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
36847DSYMUTIL=$lt_DSYMUTIL
36848
36849# Tool to change global to local symbols on Mac OS X.
36850NMEDIT=$lt_NMEDIT
36851
36852# Tool to manipulate fat objects and archives on Mac OS X.
36853LIPO=$lt_LIPO
36854
36855# ldd/readelf like tool for Mach-O binaries on Mac OS X.
36856OTOOL=$lt_OTOOL
36857
36858# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
36859OTOOL64=$lt_OTOOL64
36860
36861# Old archive suffix (normally "a").
36862libext=$libext
36863
36864# Shared library suffix (normally ".so").
36865shrext_cmds=$lt_shrext_cmds
36866
36867# The commands to extract the exported symbol list from a shared archive.
36868extract_expsyms_cmds=$lt_extract_expsyms_cmds
36869
36870# Variables whose values should be saved in libtool wrapper scripts and
36871# restored at link time.
36872variables_saved_for_relink=$lt_variables_saved_for_relink
36873
36874# Do we need the "lib" prefix for modules?
36875need_lib_prefix=$need_lib_prefix
36876
36877# Do we need a version for libraries?
36878need_version=$need_version
36879
36880# Library versioning type.
36881version_type=$version_type
36882
36883# Shared library runtime path variable.
36884runpath_var=$runpath_var
36885
36886# Shared library path variable.
36887shlibpath_var=$shlibpath_var
36888
36889# Is shlibpath searched before the hard-coded library search path?
36890shlibpath_overrides_runpath=$shlibpath_overrides_runpath
36891
36892# Format of library name prefix.
36893libname_spec=$lt_libname_spec
36894
36895# List of archive names.  First name is the real one, the rest are links.
36896# The last name is the one that the linker finds with -lNAME
36897library_names_spec=$lt_library_names_spec
36898
36899# The coded name of the library, if different from the real name.
36900soname_spec=$lt_soname_spec
36901
36902# Permission mode override for installation of shared libraries.
36903install_override_mode=$lt_install_override_mode
36904
36905# Command to use after installation of a shared archive.
36906postinstall_cmds=$lt_postinstall_cmds
36907
36908# Command to use after uninstallation of a shared archive.
36909postuninstall_cmds=$lt_postuninstall_cmds
36910
36911# Commands used to finish a libtool library installation in a directory.
36912finish_cmds=$lt_finish_cmds
36913
36914# As "finish_cmds", except a single script fragment to be evaled but
36915# not shown.
36916finish_eval=$lt_finish_eval
36917
36918# Whether we should hardcode library paths into libraries.
36919hardcode_into_libs=$hardcode_into_libs
36920
36921# Compile-time system search path for libraries.
36922sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
36923
36924# Detected run-time system search path for libraries.
36925sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
36926
36927# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
36928configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
36929
36930# Whether dlopen is supported.
36931dlopen_support=$enable_dlopen
36932
36933# Whether dlopen of programs is supported.
36934dlopen_self=$enable_dlopen_self
36935
36936# Whether dlopen of statically linked programs is supported.
36937dlopen_self_static=$enable_dlopen_self_static
36938
36939# Commands to strip libraries.
36940old_striplib=$lt_old_striplib
36941striplib=$lt_striplib
36942
36943
36944# The linker used to build libraries.
36945LD=$lt_LD
36946
36947# How to create reloadable object files.
36948reload_flag=$lt_reload_flag
36949reload_cmds=$lt_reload_cmds
36950
36951# Commands used to build an old-style archive.
36952old_archive_cmds=$lt_old_archive_cmds
36953
36954# A language specific compiler.
36955CC=$lt_compiler
36956
36957# Is the compiler the GNU compiler?
36958with_gcc=$GCC
36959
36960# Compiler flag to turn off builtin functions.
36961no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
36962
36963# Additional compiler flags for building library objects.
36964pic_flag=$lt_lt_prog_compiler_pic
36965
36966# How to pass a linker flag through the compiler.
36967wl=$lt_lt_prog_compiler_wl
36968
36969# Compiler flag to prevent dynamic linking.
36970link_static_flag=$lt_lt_prog_compiler_static
36971
36972# Does compiler simultaneously support -c and -o options?
36973compiler_c_o=$lt_lt_cv_prog_compiler_c_o
36974
36975# Whether or not to add -lc for building shared libraries.
36976build_libtool_need_lc=$archive_cmds_need_lc
36977
36978# Whether or not to disallow shared libs when runtime libs are static.
36979allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
36980
36981# Compiler flag to allow reflexive dlopens.
36982export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
36983
36984# Compiler flag to generate shared objects directly from archives.
36985whole_archive_flag_spec=$lt_whole_archive_flag_spec
36986
36987# Whether the compiler copes with passing no objects directly.
36988compiler_needs_object=$lt_compiler_needs_object
36989
36990# Create an old-style archive from a shared archive.
36991old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
36992
36993# Create a temporary old-style archive to link instead of a shared archive.
36994old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
36995
36996# Commands used to build a shared archive.
36997archive_cmds=$lt_archive_cmds
36998archive_expsym_cmds=$lt_archive_expsym_cmds
36999
37000# Commands used to build a loadable module if different from building
37001# a shared archive.
37002module_cmds=$lt_module_cmds
37003module_expsym_cmds=$lt_module_expsym_cmds
37004
37005# Whether we are building with GNU ld or not.
37006with_gnu_ld=$lt_with_gnu_ld
37007
37008# Flag that allows shared libraries with undefined symbols to be built.
37009allow_undefined_flag=$lt_allow_undefined_flag
37010
37011# Flag that enforces no undefined symbols.
37012no_undefined_flag=$lt_no_undefined_flag
37013
37014# Flag to hardcode \$libdir into a binary during linking.
37015# This must work even if \$libdir does not exist
37016hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
37017
37018# Whether we need a single "-rpath" flag with a separated argument.
37019hardcode_libdir_separator=$lt_hardcode_libdir_separator
37020
37021# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
37022# DIR into the resulting binary.
37023hardcode_direct=$hardcode_direct
37024
37025# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
37026# DIR into the resulting binary and the resulting library dependency is
37027# "absolute",i.e impossible to change by setting \$shlibpath_var if the
37028# library is relocated.
37029hardcode_direct_absolute=$hardcode_direct_absolute
37030
37031# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
37032# into the resulting binary.
37033hardcode_minus_L=$hardcode_minus_L
37034
37035# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
37036# into the resulting binary.
37037hardcode_shlibpath_var=$hardcode_shlibpath_var
37038
37039# Set to "yes" if building a shared library automatically hardcodes DIR
37040# into the library and all subsequent libraries and executables linked
37041# against it.
37042hardcode_automatic=$hardcode_automatic
37043
37044# Set to yes if linker adds runtime paths of dependent libraries
37045# to runtime path list.
37046inherit_rpath=$inherit_rpath
37047
37048# Whether libtool must link a program against all its dependency libraries.
37049link_all_deplibs=$link_all_deplibs
37050
37051# Set to "yes" if exported symbols are required.
37052always_export_symbols=$always_export_symbols
37053
37054# The commands to list exported symbols.
37055export_symbols_cmds=$lt_export_symbols_cmds
37056
37057# Symbols that should not be listed in the preloaded symbols.
37058exclude_expsyms=$lt_exclude_expsyms
37059
37060# Symbols that must always be exported.
37061include_expsyms=$lt_include_expsyms
37062
37063# Commands necessary for linking programs (against libraries) with templates.
37064prelink_cmds=$lt_prelink_cmds
37065
37066# Commands necessary for finishing linking programs.
37067postlink_cmds=$lt_postlink_cmds
37068
37069# Specify filename containing input files.
37070file_list_spec=$lt_file_list_spec
37071
37072# How to hardcode a shared library path into an executable.
37073hardcode_action=$hardcode_action
37074
37075# ### END LIBTOOL CONFIG
37076
37077_LT_EOF
37078
37079    cat <<'_LT_EOF' >> "$cfgfile"
37080
37081# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
37082
37083# func_munge_path_list VARIABLE PATH
37084# -----------------------------------
37085# VARIABLE is name of variable containing _space_ separated list of
37086# directories to be munged by the contents of PATH, which is string
37087# having a format:
37088# "DIR[:DIR]:"
37089#       string "DIR[ DIR]" will be prepended to VARIABLE
37090# ":DIR[:DIR]"
37091#       string "DIR[ DIR]" will be appended to VARIABLE
37092# "DIRP[:DIRP]::[DIRA:]DIRA"
37093#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
37094#       "DIRA[ DIRA]" will be appended to VARIABLE
37095# "DIR[:DIR]"
37096#       VARIABLE will be replaced by "DIR[ DIR]"
37097func_munge_path_list ()
37098{
37099    case x$2 in
37100    x)
37101        ;;
37102    *:)
37103        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
37104        ;;
37105    x:*)
37106        eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
37107        ;;
37108    *::*)
37109        eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
37110        eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
37111        ;;
37112    *)
37113        eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
37114        ;;
37115    esac
37116}
37117
37118
37119# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
37120func_cc_basename ()
37121{
37122    for cc_temp in $*""; do
37123      case $cc_temp in
37124        compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
37125        distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
37126        \-*) ;;
37127        *) break;;
37128      esac
37129    done
37130    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
37131}
37132
37133
37134# ### END FUNCTIONS SHARED WITH CONFIGURE
37135
37136_LT_EOF
37137
37138  case $host_os in
37139  aix3*)
37140    cat <<\_LT_EOF >> "$cfgfile"
37141# AIX sometimes has problems with the GCC collect2 program.  For some
37142# reason, if we set the COLLECT_NAMES environment variable, the problems
37143# vanish in a puff of smoke.
37144if test set != "${COLLECT_NAMES+set}"; then
37145  COLLECT_NAMES=
37146  export COLLECT_NAMES
37147fi
37148_LT_EOF
37149    ;;
37150  esac
37151
37152
37153
37154ltmain=$ac_aux_dir/ltmain.sh
37155
37156
37157  # We use sed instead of cat because bash on DJGPP gets confused if
37158  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
37159  # text mode, it properly converts lines to CR/LF.  This bash problem
37160  # is reportedly fixed, but why not run on old versions too?
37161  sed '$q' "$ltmain" >> "$cfgfile" \
37162     || (rm -f "$cfgfile"; exit 1)
37163
37164   mv -f "$cfgfile" "$ofile" ||
37165    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
37166  chmod +x "$ofile"
37167
37168 ;;
37169    "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 ;;
37170    "ntpdc/nl.pl":F) chmod +x ntpdc/nl.pl ;;
37171    "scripts/build/genAuthors":F) chmod +x scripts/build/genAuthors ;;
37172    "scripts/build/mkver":F) chmod +x scripts/build/mkver ;;
37173    "scripts/calc_tickadj/calc_tickadj":F) chmod +x scripts/calc_tickadj/calc_tickadj ;;
37174    "scripts/ntp-wait/ntp-wait":F) chmod +x scripts/ntp-wait/ntp-wait ;;
37175    "scripts/ntpsweep/ntpsweep":F) chmod +x scripts/ntpsweep/ntpsweep ;;
37176    "scripts/ntptrace/ntptrace":F) chmod +x scripts/ntptrace/ntptrace ;;
37177    "scripts/ntpver":F) chmod +x scripts/ntpver ;;
37178    "scripts/plot_summary":F) chmod +x scripts/plot_summary ;;
37179    "scripts/summary":F) chmod +x scripts/summary ;;
37180    "scripts/update-leap/update-leap":F) chmod +x scripts/update-leap/update-leap ;;
37181
37182  esac
37183done # for ac_tag
37184
37185
37186as_fn_exit 0
37187_ACEOF
37188ac_clean_files=$ac_clean_files_save
37189
37190test $ac_write_fail = 0 ||
37191  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
37192
37193
37194# configure is writing to config.log, and then calls config.status.
37195# config.status does its own redirection, appending to config.log.
37196# Unfortunately, on DOS this fails, as config.log is still kept open
37197# by configure, so config.status won't be able to write to it; its
37198# output is simply discarded.  So we exec the FD to /dev/null,
37199# effectively closing config.log, so it can be properly (re)opened and
37200# appended to by config.status.  When coming back to configure, we
37201# need to make the FD available again.
37202if test "$no_create" != yes; then
37203  ac_cs_success=:
37204  ac_config_status_args=
37205  test "$silent" = yes &&
37206    ac_config_status_args="$ac_config_status_args --quiet"
37207  exec 5>/dev/null
37208  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
37209  exec 5>>config.log
37210  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
37211  # would make configure fail if this is the last instruction.
37212  $ac_cs_success || as_fn_exit 1
37213fi
37214
37215#
37216# CONFIG_SUBDIRS section.
37217#
37218if test "$no_recursion" != yes; then
37219
37220  # Remove --cache-file, --srcdir, and --disable-option-checking arguments
37221  # so they do not pile up.
37222  ac_sub_configure_args=
37223  ac_prev=
37224  eval "set x $ac_configure_args"
37225  shift
37226  for ac_arg
37227  do
37228    if test -n "$ac_prev"; then
37229      ac_prev=
37230      continue
37231    fi
37232    case $ac_arg in
37233    -cache-file | --cache-file | --cache-fil | --cache-fi \
37234    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
37235      ac_prev=cache_file ;;
37236    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
37237    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
37238    | --c=*)
37239      ;;
37240    --config-cache | -C)
37241      ;;
37242    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
37243      ac_prev=srcdir ;;
37244    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
37245      ;;
37246    -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
37247      ac_prev=prefix ;;
37248    -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
37249      ;;
37250    --disable-option-checking)
37251      ;;
37252    *)
37253      case $ac_arg in
37254      *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
37255      esac
37256      as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
37257    esac
37258  done
37259
37260  # Always prepend --prefix to ensure using the same prefix
37261  # in subdir configurations.
37262  ac_arg="--prefix=$prefix"
37263  case $ac_arg in
37264  *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
37265  esac
37266  ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
37267
37268  # Pass --silent
37269  if test "$silent" = yes; then
37270    ac_sub_configure_args="--silent $ac_sub_configure_args"
37271  fi
37272
37273  # Always prepend --disable-option-checking to silence warnings, since
37274  # different subdirs can have different --enable and --with options.
37275  ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
37276
37277  ac_popdir=`pwd`
37278  for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
37279
37280    # Do not complain, so a configure script can configure whichever
37281    # parts of a large source tree are present.
37282    test -d "$srcdir/$ac_dir" || continue
37283
37284    ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
37285    printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
37286    printf "%s\n" "$ac_msg" >&6
37287    as_dir="$ac_dir"; as_fn_mkdir_p
37288    ac_builddir=.
37289
37290case "$ac_dir" in
37291.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37292*)
37293  ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
37294  # A ".." for each directory in $ac_dir_suffix.
37295  ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37296  case $ac_top_builddir_sub in
37297  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37298  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37299  esac ;;
37300esac
37301ac_abs_top_builddir=$ac_pwd
37302ac_abs_builddir=$ac_pwd$ac_dir_suffix
37303# for backward compatibility:
37304ac_top_builddir=$ac_top_build_prefix
37305
37306case $srcdir in
37307  .)  # We are building in place.
37308    ac_srcdir=.
37309    ac_top_srcdir=$ac_top_builddir_sub
37310    ac_abs_top_srcdir=$ac_pwd ;;
37311  [\\/]* | ?:[\\/]* )  # Absolute name.
37312    ac_srcdir=$srcdir$ac_dir_suffix;
37313    ac_top_srcdir=$srcdir
37314    ac_abs_top_srcdir=$srcdir ;;
37315  *) # Relative name.
37316    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37317    ac_top_srcdir=$ac_top_build_prefix$srcdir
37318    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37319esac
37320ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37321
37322
37323    cd "$ac_dir"
37324
37325    # Check for configure.gnu first; this name is used for a wrapper for
37326    # Metaconfig's "Configure" on case-insensitive file systems.
37327    if test -f "$ac_srcdir/configure.gnu"; then
37328      ac_sub_configure=$ac_srcdir/configure.gnu
37329    elif test -f "$ac_srcdir/configure"; then
37330      ac_sub_configure=$ac_srcdir/configure
37331    else
37332      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
37333printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
37334      ac_sub_configure=
37335    fi
37336
37337    # The recursion is here.
37338    if test -n "$ac_sub_configure"; then
37339      # Make the cache file name correct relative to the subdirectory.
37340      case $cache_file in
37341      [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
37342      *) # Relative name.
37343	ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
37344      esac
37345
37346      { 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
37347printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
37348      # The eval makes quoting arguments work.
37349      eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
37350	   --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
37351	as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
37352    fi
37353
37354    cd "$ac_popdir"
37355  done
37356fi
37357if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
37358  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
37359printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
37360fi
37361
37362
37363